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

Splice two files to a single file using SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Chennai

PostPosted: Fri Apr 20, 2007 5:03 pm
Reply with quote

I have two files 1 with student name in the first field, having 10 records and blank in the rest of the fields & the second file, also having 10 records having blank in the first field and student details in the second field. I want to splice these files to a single file so that i get the student name in the first field &student detail in the second field.

Code:

file1
aaaaaa  spaces
file2
spaces   1234etyf124
file3
aaaaaa  1234etyf124
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 20, 2007 5:14 pm
Reply with quote

Is there a common key ?
Back to top
View user's profile Send private message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Chennai

PostPosted: Fri Apr 20, 2007 5:29 pm
Reply with quote

There is no common key as of now.But it assumed that both the files are in sorted order.and the first record in the file 1 corresponds to the first record in file 2 and so on.
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: Fri Apr 20, 2007 8:13 pm
Reply with quote

You can use the method discussed in the "Join fields from two files record-by-record" Smart DFSORT Trick at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top