JCL to fetch a record from a dataset

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...
pavan.kanugo
Posts: 5
Joined: Tue Mar 25, 2008 12:19 pm
Skillset: JCL
COBOL
VSAM
REXX
CICS
DB2
Referer: GOOGLE

JCL to fetch a record from a dataset

Postby pavan.kanugo » Wed Mar 26, 2008 7:17 pm

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

arunprasad.k
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Skillset: Known little stuffs to answer a few queries!!
Referer: Google
Contact:

Re: JCL to fetch a record from a dataset

Postby arunprasad.k » Wed Mar 26, 2008 7:41 pm

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:

Code: Select all

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.


  • Similar Topics
    Replies
    Views
    Last post