View previous topic :: View next topic
|
Author |
Message |
tridib_nandi
New User
Joined: 11 Apr 2005 Posts: 1
|
|
|
|
Hi,
I need a JCL which will delete first few records from a file and copy the rest to a new file. Please respond asap,
Thanks in Advance
Tridib |
|
Back to top |
|
|
thiru.guduru
New User
Joined: 06 Apr 2005 Posts: 9 Location: Bangalore
|
|
|
|
use sort utility
//sysin dd *
sort fields=copy,skiprec=12
/*
This will skip the first 12 records in the input file and copies the remaining records to output file |
|
Back to top |
|
|
ynagabhushanrao
New User
Joined: 11 Apr 2005 Posts: 1
|
|
|
|
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=test.test.input,DISP=SHR
//SORTOUT DD DSN=test.test.output,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(2,1),RLSE),
// DCB=(LRECL=82,RECFM=FB,BLKSIZE=8200)
//SYSIN DD *
SORT FIELDS=COPY,
SKIPREC=2
END
/* |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT job that will delete the first 10 records from the input file and copy the rest to the output file:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY,SKIPREC=10
/*
|
The following will also work, although the previous form is preferred:
Code: |
SORT FIELDS=COPY,SKIPREC=10
|
|
|
Back to top |
|
|
|