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

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

Join the forum, it's quick and easy

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

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Selection based on part of char field

2 posters

Go down

Selection based on part of char field   Empty Selection based on part of char field

Post  rajkumar400 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

Back to top Go down

Selection based on part of char field   Empty search for a filed with a char C in 12th position

Post  kushaalrathi 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

Back to top Go down

Selection based on part of char field   Empty Re: Selection based on part of char field

Post  rajkumar400 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

Back to top Go down

Selection based on part of char field   Empty Re: Selection based on part of char field

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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