PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Selection based on part of char field

View previous topic View next topic Go down

Selection based on part of char field

Post  rajkumar400 on Sat Dec 25, 2010 1:40 pm

Is there a way to select only data where field A has a 'C' in position 12. The field is a 15A field.

Thanks in advance!
Raj

rajkumar400

Posts : 59
Join date : 2010-12-25

View user profile

Back to top Go down

search for a filed with a char C in 12th position

Post  kushaalrathi on Sun Dec 26, 2010 7:29 pm

A R RECNAM PFILE(XYZ)*/
A NEWFLD 1A I SST(FIELDA 12 1) /* DECLARE A NEW FLD WITH ONE CHAR LEN */
A K KEYFLD
A S NEWFLD COMP(*EQ 'C') /* USING SELECT/OMIT PROCESS WE CAN DO IT

kushaalrathi

Posts : 12
Join date : 2010-12-26

View user profile

Back to top Go down

Re: Selection based on part of char field

Post  rajkumar400 on Wed Dec 29, 2010 1:57 am

Thanks. It works.

Is there any otherway to do this?

Raj

rajkumar400

Posts : 59
Join date : 2010-12-25

View user profile

Back to top Go down

Re: Selection based on part of char field

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum