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

concatenation Files


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

New User


Joined: 10 Aug 2006
Posts: 7

PostPosted: Mon Mar 04, 2013 6:55 pm
Reply with quote

i have 4 files as input and need to write it to two files as below, please let me know whether it can be done by SORT in a single step.

Input File 1 (F1)
1111
1111

Input File 2 (F2)
2222
2222

Input File 3 (F3)
3333
3333

Input File 4 (F4)
4444
4444

Output File1 (concatenation of first two input files, F1 and F2)
1111
1111
2222
2222

Output File2 (concatenation of last two input files, F3 and F4)
3333
3333
4444
4444
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Mar 04, 2013 7:04 pm
Reply with quote

OK, you're going to have to explain this.

Why does it have to be in one step?

Yes, it can be done, just wondering why you want to bother with it in one step, rather than two, which goes like this:

Code:
//SORTIN DD your necessary details dataset a
//       DD your necessary details dataset b
//SORTOUT DD your necessary output details
//SYSIN DD *
  OPTION COPY


That, along with the "usual stuff", will copy your two input datasets to one output. Put it in a PROC. Run the PROC twice with different input/output datasets.

Also note, without having headers and trailers, you can just "concatenate" wherever the data is needed, without having to have it as one dataset. Might be worth considering, especially for very large amounts of data.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Mar 04, 2013 7:05 pm
Reply with quote

It can be done in a single step using ICETOOL, but why the need for a single step ?
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Mon Mar 04, 2013 8:42 pm
Reply with quote

Quote:
Why does it have to be in one step?

Quote:
It can be done in a single step using ICETOOL, but why the need for a single step ?


The original requestor was asking can it be done in a single step
and not that it has to be done in a single step.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Mar 04, 2013 9:03 pm
Reply with quote

Ah...., didn't realise it was just an idle question with a Yes/No answer.

Yes.

As expat points out, it can also be done in ICETOOL in one step.

It is far more sensible to do it in no steps, or two steps, (until we know otherwise as a non-"idle question") but there you go.
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 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 Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top