View previous topic :: View next topic
|
Author |
Message |
Baskaran Gunasekaran
New User
Joined: 09 Sep 2007 Posts: 10 Location: Chennai
|
|
|
|
Hi,
I have to merge the contents of 3 files each having different LRECL in to a single file.
For ex:
File 1 - LRECL 53
File 2 - LRECL 20
File 3 - LRECL 21
Is it possible to do the above using SORT. |
|
Back to top |
|
|
Baskaran Gunasekaran
New User
Joined: 09 Sep 2007 Posts: 10 Location: Chennai
|
|
|
|
To make the requirement more clear:
The requirement is combining three files(with different LRECL) to a single file rather than merging the contents.
File 1: LRECL 53
ABCD EFG IJKDDDDDDDDDDDDDDDDDDDDD
AA KLID DDDDDFEEC DDFFFFFFFFFFF
File 2: LRECL 20
12333 DFD EE33
DFDFD 33345
File 3: LRECL 21
DFEWER DFDFEERDF
DFDFD 8897DD
Output File: Should look like this.
ABCD EFG IJKDDDDDDDDDDDDDDDDDDDDD
AA KLID DDDDDFEEC DDFFFFFFFFFFF
12333 DFD EE33
DFDFD 33345
DFEWER DFDFEERDF
DFDFD 8897DD |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
What is the required RECFM/LRECL of the output file? |
|
Back to top |
|
|
Baskaran Gunasekaran
New User
Joined: 09 Sep 2007 Posts: 10 Location: Chennai
|
|
|
|
O/p file can have LRECL as the maximum of the three files LRECL.
In this case it is 53. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/53)
//IN2 DD DSN=... input file2 (FB/20)
//IN3 DD DSN=... input file3 (FB/21)
//****> USE MOD FOR THE OUT DATA SET
//OUT DD DISP=MOD,DSN=... output file (FB/53)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT)
COPY FROM(IN2) TO(OUT) USING(CTL1)
COPY FROM(IN3) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
INREC OVERLAY=(53:X)
/*
|
|
|
Back to top |
|
|
Baskaran Gunasekaran
New User
Joined: 09 Sep 2007 Posts: 10 Location: Chennai
|
|
|
|
Thanks Frank. Is it possible to do the same without using ICETOOL?
I am not sure ICETOOL is available in our system. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you have DFSORT, then you have ICETOOL. ICETOOL has been part of DFSORT since 1991. |
|
Back to top |
|
|
Baskaran Gunasekaran
New User
Joined: 09 Sep 2007 Posts: 10 Location: Chennai
|
|
|
|
We have SYNCSORT not DFSORT. I think that is the reason we dont have ICETOOL. Anyway thanks for the confirmation. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you have Syncsort, why did you post in the DFSORT Forum which is for DFSORT questions?
I'm moving your post to the JCL Forum. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Baskaran Gunasekaran wrote: |
We have SYNCSORT not DFSORT. I think that is the reason we dont have ICETOOL. |
With SyncSort, you should still be able to execute this. If for some reason you are not able to specify PGM=ICETOOL in your shop, try PGM=SYNCTOOL. If you encounter any problems, please post the error message so that we can assist you further. |
|
Back to top |
|
|
Baskaran Gunasekaran
New User
Joined: 09 Sep 2007 Posts: 10 Location: Chennai
|
|
|
|
Thanks everyone for your help...ICETOOL worked... |
|
Back to top |
|
|
|