|
|
| Author |
Message |
CICS fan
New User
Joined: 03 Apr 2008 Posts: 8 Location: Gurgaon
|
|
|
|
Hi All.
I have 2 input files.
File 1 LRECL 17
File2 LRECL 129
Output FIle should be LRECL 129
The output file will simply contain all records from FIle1 and File2.
How to do this thru SYNCSORT?
Thanks in advance. |
|
| Back to top |
|
 |
References
|
|
 |
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 156 Location: PUNE(INDIA)
|
|
|
|
Here is syncsort's synctool job for your requirement.
| Code: |
//S1 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=INPUT-FILE-ONE-WITH-LRECL 129
// DISP=SHR
//IN2 DD DSN=INPUT-FILE-ONE-WITH-LRECL 17
// DISP=SHR
//OUT1 DD DSN=OUT-PUT-FILE
// DSORG=PS,RECFM=FB,LRECL=129,
// DISP=(MOD,CATLG,DELETE)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT1)
COPY FROM(IN2) TO(OUT1)
/*
|
|
|
| Back to top |
|
 |
sedireswarapu
New User
Joined: 18 Jun 2008 Posts: 25 Location: India
|
|
|
|
Hi,
Also, you can do it as shown below..
| Code: |
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=INPUT.FILE1,DISP=SHR
// DD DSN=INPUT.FILE2,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILE,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=129)
//SYSIN DD *
SORT FIELDS=COPY
/*
//SYSOUT DD SYSOUT=* |
Also, please see the below links for some more details.
http://ibmmainframes.com/viewtopic.php?t=2470
http://ibmmainframes.com/viewtopic.php?t=2170 |
|
| Back to top |
|
 |
CICS fan
New User
Joined: 03 Apr 2008 Posts: 8 Location: Gurgaon
|
|
|
|
| Hi..since the 2 files are of different LRECL..these are not working |
|
| Back to top |
|
 |
sedireswarapu
New User
Joined: 18 Jun 2008 Posts: 25 Location: India
|
|
|
|
Hi,
Sorry, ignore my code in case of different LRECL used in the 2 input files..
But, the code given by ParagChouguley should be working fine. If not, what is the output you are getting?
Just make sure you used the same DISP (MOD,CATLG,DELETE) mentioned in the given code.
Also, if you look at the first link given by me, Frank had responded how you can pad the 80-byte record from input file 2 with blanks, and MOD it on to the end of input file 1. |
|
| Back to top |
|
 |
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1148 Location: Mumbai - India
|
|
|
|
Cics fan,
| Quote: |
| these are not working |
Post your error messages from the SYSOUT. |
|
| Back to top |
|
 |
|
|