MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Merging of files of different record lengths

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kalidasv
Beginner


Joined: 05 Mar 2009
Posts: 13
Topics: 8

PostPosted: Fri Mar 06, 2009 1:34 am    Post subject: Merging of files of different record lengths Reply with quote

Using SORT utility can I merge two files of different LRECL. Say file 1 has LRECL of 300 and file 2 has LRECL of 200. I want the merged file to have LRECL of 300 and all records from file 1 and file 2.

If this is possible, please provide the parameters that need to be used in the SORT step.
Back to top
View user's profile Send private message
callanand
Beginner


Joined: 12 Jun 2007
Posts: 23
Topics: 2

PostPosted: Fri Mar 06, 2009 4:57 am    Post subject: Reply with quote

Kalidsav.

In sorting concatenate as follows

//SORTIN DD DSN=300 FB FILE,DISP=SHR
DD DSN=200 FB FILE,DISP=SHR
//SORTOUT DD DSN=300 NEW FB OUTPUT FILE,DISP=OLD
//SYSIN DD *
SORT FIELDS=COPY
/*
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Mar 06, 2009 7:20 am    Post subject: Reply with quote

kalidasv, the files must be of the same format and LRECL in order to perform a MERGE. The shorter records need to be lengthend, or the longer records need to be shortened.

callanand, the operating system does not allow datasets with different attributes to be concatenated. The example you've provided can't possibly work.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Mar 06, 2009 11:09 am    Post subject: Reply with quote

kalidasv,

Please search before posting. Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=5225&highlight=different+lrecl

Callanand,

Please do NOT post solutions without testing them.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group