IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Combine files with different LRECL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Baskaran Gunasekaran

New User


Joined: 09 Sep 2007
Posts: 10
Location: Chennai

PostPosted: Wed Feb 06, 2008 11:01 am
Reply with quote

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
View user's profile Send private message
Baskaran Gunasekaran

New User


Joined: 09 Sep 2007
Posts: 10
Location: Chennai

PostPosted: Wed Feb 06, 2008 11:06 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Feb 06, 2008 5:46 pm
Reply with quote

What is the required RECFM/LRECL of the output file?
Back to top
View user's profile Send private message
Baskaran Gunasekaran

New User


Joined: 09 Sep 2007
Posts: 10
Location: Chennai

PostPosted: Wed Feb 06, 2008 7:28 pm
Reply with quote

O/p file can have LRECL as the maximum of the three files LRECL.
In this case it is 53.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 06, 2008 9:28 pm
Reply with quote

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
View user's profile Send private message
Baskaran Gunasekaran

New User


Joined: 09 Sep 2007
Posts: 10
Location: Chennai

PostPosted: Wed Feb 06, 2008 9:35 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 06, 2008 9:42 pm
Reply with quote

If you have DFSORT, then you have ICETOOL. ICETOOL has been part of DFSORT since 1991.
Back to top
View user's profile Send private message
Baskaran Gunasekaran

New User


Joined: 09 Sep 2007
Posts: 10
Location: Chennai

PostPosted: Wed Feb 06, 2008 9:48 pm
Reply with quote

We have SYNCSORT not DFSORT. I think that is the reason we dont have ICETOOL. Anyway thanks for the confirmation.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 06, 2008 9:52 pm
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Feb 07, 2008 1:04 am
Reply with quote

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
View user's profile Send private message
Baskaran Gunasekaran

New User


Joined: 09 Sep 2007
Posts: 10
Location: Chennai

PostPosted: Thu Feb 07, 2008 9:43 am
Reply with quote

Thanks everyone for your help...ICETOOL worked... icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts WER247A SORTOUT HAS INCOMPATIBLE LRECL SYNCSORT 4
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts VB to FB - Finding LRECL SYNCSORT 4
Search our Forums:

Back to Top