Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
concatenation Files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: concatenation Files
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7312

PostPosted: Mon Mar 04, 2013 7:04 pm    Post subject: Reply to: concatenation Files
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: 8784
Location: Welsh Wales

PostPosted: Mon Mar 04, 2013 7:05 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7312

PostPosted: Mon Mar 04, 2013 9:03 pm    Post subject: Reply to: concatenation Files
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    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 Pack to Unpack conversion for sending... A_programmers COBOL Programming 13 Wed Sep 11, 2019 10:46 pm
This topic is locked: you cannot edit posts or make replies. Compare two files logic in COBOL Nishant Singhal COBOL Programming 4 Sun Aug 25, 2019 2:25 am
No new posts Concatenate two files of variable rec... Thiru S DFSORT/ICETOOL 3 Wed Aug 21, 2019 11:53 pm
No new posts Copy physical Tape files to a Mainfra... Dadi Krishna Teja JCL & VSAM 11 Thu May 16, 2019 10:25 pm
No new posts Search string from concatenated input... srini24 JCL & VSAM 8 Sat Mar 30, 2019 9:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us