by mathew28 » Tue Mar 20, 2012 9:57 pm
Hi Frank and Others,
My Input file changed such that the first record is different , I need to use it for a different purpose
Input File:
QC12345
123456789
123456789
123456789
123456789
123456789
123456789
123456789
Output File:
('123456789',
'123456789',
'123456789',
'123456789',
'123456789',
'123456789',
'123456789')
Another Output file (PROC):
//ERCRPT1 PROC QCNAME=QC12345
//STEP01 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=XXXX28.TEST.INFILE(INPUT1),DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=XXXX28.TEST.JCLPROC(ERCRPT2),DISP=OLD
//OUT2 DD DSN=XXXX28.TEST.OUTFILE(OUTFIL1),DISP=OLD
//* DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(2,1),RLSE),
//* RECFM=FB,LRECL=500
//TOOLIN DD *
SUBSET FROM(IN) TO(T1) KEEP INPUT FIRST USING(CTL1)
SUBSET FROM(IN) TO(T2) REMOVE INPUT FIRST LAST USING(CTL2)
SUBSET FROM(IN) TO(T2) KEEP INPUT LAST USING(CTL3)
COPY FROM(T1) TO(OUT)
COPY FROM(T2) TO(OUT2)
//CTL1CNTL DD *
INREC BUILD=(C'//ERCRPT1 PROC QCNAME=',1,7,80:X)
//CTL2CNTL DD *
INREC BUILD=(C'''',1,9,C''',',80:X)
//CTL3CNTL DD *
INREC BUILD=(C'''',1,9,C''' ) WITH UR;',80:X)
//*
//
I got the output incorrectly, since my first record has now become second record. So the output has become.
like:
Output file:
'123456789',
'123456789',
'123456789',
'123456789',
'123456789',
'123456789')
Another Output file (PROC):
//ERCRPT1 PROC QCNAME=QC12345
The first " (' " is missing in the first record in the output file. It is now the second record in the input file. So, please suggest how to include this in the second record only.
Please help.