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
 

 

merging Two files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
srloui

New User


Joined: 06 Jan 2009
Posts: 2
Location: Chennai

PostPosted: Mon Jan 18, 2010 3:11 pm    Post subject: merging Two files
Reply with quote

I am having two input files which are as follows

Input File 1:
---------------
DEBUT
X10 PFE 102000I01
FIN

Input File2 :
---------------
DEBUT
X38 PFE 182295I03
FIN

I want the output file as
DEBUT
X10 PFE 102000I01
X38 PFE 182295I03
FIN


Can help me?
Back to top
View user's profile Send private message

Mazahar

New User


Joined: 11 Dec 2007
Posts: 82
Location: hyderabad

PostPosted: Mon Jan 18, 2010 4:37 pm    Post subject: Reply to: merging Two files
Reply with quote

do you mean you need a file with sorted records in that? if yes on which positions the file needs to be sorted? give records lengths and formats of the input files for a proper reply
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Mon Jan 18, 2010 4:43 pm    Post subject: Reply to: merging Two files
Reply with quote

no... the ts wants to keep one header and one trailer
and merge ( sorted ) the detail records

quite a few samples in these forums, for example
http://ibmmainframes.com/viewtopic.php?t=42932&highlight=trailer+header+sort+detail+records
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jan 18, 2010 4:48 pm    Post subject:
Reply with quote

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and should be posted in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
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: Mon Jan 18, 2010 11:24 pm    Post subject:
Reply with quote

srloui,

It's not clear what you want to do. Please show an example with more records in each input file and the expected output. Please explain clearly the "rules" for getting from input to output. Do you want to keep the first record from one input file (which one) and the last record from one input file (which one) in the output? Do you want to sort the detail records from the two input files (on what field?) or just append the detail records from input file2 after the detail records from input file1, or what? Are the records in each input file already in sorted order?
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
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 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