Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Combine files with different LRECL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Combine files with different LRECL
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    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Feb 06, 2008 5:46 pm    Post subject: Reply to: Combine files with different LRECL
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    Post subject:
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 Moderator


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

PostPosted: Wed Feb 06, 2008 9:28 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Feb 06, 2008 9:42 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Feb 06, 2008 9:52 pm    Post subject:
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: 500
Location: USA

PostPosted: Thu Feb 07, 2008 1:04 am    Post subject:
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    Post subject: Reply to: Combine files with different LRECL
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts WER247A incompatible lrecl Danielle.Filteau SYNCSORT 8 Tue May 02, 2017 4:04 am
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us