Page 1 of 1

JCL to fetch a record from a dataset

PostPosted: Wed Mar 26, 2008 7:17 pm
by pavan.kanugo
hai,
i am trying to fetch those records where the name field starts with a specified character, and store them to another flat file. Can anybody suggest me a solution, also i am stating the details of the problem.

for example assume my flat file layout is as following

Emp-id Emp-Name Salary Employer project

i would like to copy those records whose name starts with say 'a'

thanks and regards.....
pavan

Re: JCL to fetch a record from a dataset

PostPosted: Wed Mar 26, 2008 7:41 pm
by arunprasad.k
i am stating the details of the problem.

What is the problem?? What did you try and where you stuck??

This requires a simple INCLUDE COND statement.

SYSIN should read:
SORT FIELDS=COPY
INCLUDE COND=(starting_position,1,CH,EQ,C'A')


Read the examples in the link.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/3.7.3?DT=20060615185603

I would request you to read the DFSORT getting started from

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/CCONTENTS

Also the programming guide from

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/CCONTENTS

Arun.