View previous topic :: View next topic
|
Author |
Message |
gowrishankar.k
New User
Joined: 09 Apr 2007 Posts: 2 Location: bangalore
|
|
|
|
i have pure flat file.in that i have 2000 records.now i what to seperate those who have taken up the interview on mainframes.those seperated items, i want to copy in a seperate file.so i want to know how can i do this by using jcl
Thanks to all of you. |
|
Back to top |
|
|
Rambhupal.chaudari
New User
Joined: 30 Mar 2007 Posts: 25 Location: Hyderabad
|
|
|
|
By using sort utility,you can copy the records based on the conditions in to a seperate file..plz look at the following jcl..
//STEPSORT EXEC PGM=SORT,PARM=sort-parms
//SORTIN DD DSN=G1SG00AT.SORTIN1,DISP=SHR Input for sort
//SORTOUT DD DSN=G1SG00AT.SORTOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(2,2),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS)
//SYSIN DD *
INCLUDE COND=(21,2,ch,EQ,c's')
/*
The INCLUDE above will only pass through records in which the contents of the 2 byte field at position 21 are equal to s |
|
Back to top |
|
|
pcoreddy
New User
Joined: 14 Mar 2007 Posts: 24 Location: Mysore
|
|
|
|
By using FIlaid also we can do
//STEPCOPY EXEC PGM=FILEAID
//DD01 DD DSN=G1SG00AT.INPUT1,DISP=SHR
//DD01O DD DSN=G1SG00AT.OUTPUT1,DISP=OLD
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSIN DD *
$$DD01 COPY IF=(14,EQ,C'YES')
/*
copy input file data only if 14th Position is equal to Yes then copy to output file |
|
Back to top |
|
|
gowrishankar.k
New User
Joined: 09 Apr 2007 Posts: 2 Location: bangalore
|
|
|
|
thank you rambhupal and pcoreddy for your suggestions |
|
Back to top |
|
|
|