View previous topic :: View next topic
Author
Message
Krishnadeva Reddy New User Joined: 14 Nov 2007Posts: 37 Location: Chennai
Hi,
I have a input file (1894 bytes) with different type of record layouts. I'm trying to write only required fields in each record type into a output file of 147 bytes. The issue is job fails with invalid record length on the output file.
INPUT FILE IS 1894 BYTES
OUTPUT FILE NEEDED IS 147 BYTES
Here is my sort card, please help on this.
Code:
//STEP1 EXEC PGM=SYNCSORT
//SORTIN DD DISP=SHR,DSN=IN-FILE1
//SORTOUT DD DSN=OUT-FILE1,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=147,BLKSIZE=0),
// UNIT=(SYSDA,8),SPACE=(CYL,(1,5),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OMIT COND=(1,1,CH,EQ,C'A',OR,1,1,CH,EQ,C'Z')
OUTREC IFTHEN=(WHEN=(1,1,CH,EQ,C'H'),BUILD=(1,15,25,8,246,14,
348,9,386,31,566,9,
663,18,703,12,753,31)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'D'),BUILD=(1,15,25,8,45,5,75,2,
112,10,288,10,400,97)) /*
//
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi,
please show job output.
Gerry
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi,
change as below
Code:
SORT FIELDS=COPY
OMIT COND=(1,1,CH,EQ,C'A',OR,1,1,CH,EQ,C'Z')
OUTREC IFOUTLEN=147,
IFTHEN=(WHEN=(1,1,CH,EQ,C'H'),BUILD=(1,15,25,8,246,14,
348,9,386,31,566,9,
663,18,703,12,753,31)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'D'),BUILD=(1,15,25,8,45,5,75,2,
112,10,288,10,400,97))
Gerry
Back to top
Krishnadeva Reddy New User Joined: 14 Nov 2007Posts: 37 Location: Chennai
Thanks a lot for your help.Its working now.
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi,
another happy customer.
Gerry
Back to top
Anuj Dhawan Superior Member Joined: 22 Apr 2006Posts: 6250 Location: Mumbai, India
gcicchet wrote:
another happy customer.
How much did you charge! If that's confidential, use PM...
Back to top
Please enable JavaScript!