View previous topic :: View next topic
|
Author |
Message |
Vagdevi sesha
New User
Joined: 30 Jun 2009 Posts: 1 Location: chennai
|
|
|
|
How to copy a variable length file into an another file (it is also a variable length file) and also add 2 fields at the end of output file.
I have used Sort with OUTREC with different options. I got errors like SHORT RECORD, RDW not included etc
Code: |
//SORT1 EXEC PGM=SORT
//*
//SORTIN DD DSN=MLIFE22.VCSE.TCONTF.DB2BKUP(0),
// DISP=SHR
//SORTOUT DD DSN=TLIFE22.VCSE.TCONTF.DB2BKUP.NEW,
// DISP=(NEW,CATLG,DELETE),
// DATACLAS=DATAV,LRECL=2323
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:5,2314,2319:X'099999999C')
/* |
Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi,
You need to include first four bytes (RDW) in the input VB file into the o/p file as well
Try changing
OUTREC FIELDS=(1:5,2314,2319:X'099999999C')
to
OUTREC FIELDS=(1:1,4,5:5,2314,2319:X'099999999C')
Thanks,
Ajay |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Anuj, Methinks the problem is appending the PD field at the end of the record.
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5)
|
Will copy the RDW and the variable part of the record to output. I have searched without success and might even try a quick google on how to append the additional field onto the end of a variable length record.
I have had a play with this, again without success using DFSORT.
As this is posted in the JCL forum I assume that the product is SYNCSORT rather than DFSORT. |
|
Back to top |
|
|
Brian Wood
New User
Joined: 12 Feb 2009 Posts: 2 Location: United States
|
|
|
|
Vagdevi:
You might want to try something like this:
Code: |
//TEST12 EXEC PGM=SORT
//SORTIN DD DSN=your.input,
// DISP=SHR
//SORTOUT DD DSN=your.output...
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=OUT,
OUTREC=(1,4,5,2314,X'099999999C'),VLFILL=X'00' |
Please let us know if you require further assistance with this. |
|
Back to top |
|
|
|