erhema
New User
Joined: 07 Oct 2008 Posts: 23 Location: Chennai
|
|
|
|
Hello,
My first file will have n number of row eg: 5 rows (16 Record length)
1123ABCDEF081228
2342JKLSDFF090127
2342JKLSDFL090126
2342DFGFDY090125
2342JKLSDFP090124
My second file will always have 1 row with a 4 byte 'YYMM' value (15 Record length)
0903
I want my output file with all the rows of the first file concatenated with the same 4 byte value of 2nd file for each and every row in the First file (Output requires 5 rows)
1123ABCDEF0812280903
2342JKLSDFF0901270903
2342JKLSDFL0901260903
2342AFJOFDY0901250903
2342JKLSDFP0901240903
Please help me with the UTILITY, to satisfy this condition.
Thanks in advance. |
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
you can try this
Code: |
//STEP010 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SORTIN DD *
0903
/*
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
* CREATE DFSORT SYMBOL AS:
* YYMM,'0903'
OUTFIL FNAMES=SORTOUT,
BUILD=(C'YYMM,''',1,4,C'''',80:X)
/*
//STEP020 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=SHR
///SORTIN DD *
1123ABCDEF081228
2342JKLSDFF090127
2342JKLSDFL090126
2342DFGFDY090125
2342JKLSDFP090124
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,16,YYMM)
/*
|
Gerry |
|