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
 

 

Need to merge more than 2 files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nirmal arthur

New User


Joined: 26 Jun 2008
Posts: 8
Location: Hyderabad

PostPosted: Wed Jan 06, 2010 7:59 pm    Post subject: Need to merge more than 2 files
Reply with quote

We have a requirement where we are supposed to merge two or more sequential files. The catch is that the file names are present in a table. Is there any way I can extract the file names using an unload JCL (INZUTILB) and use a sort to merge the files all without using a program. The problem here is I don't know how to get the file names present in the unloaded sequential file to the DD statement in the SORT step. Is there any way I can do this?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Jan 06, 2010 8:05 pm    Post subject: Reply to: Need to merge more than 2 files
Reply with quote

The two thoughts I have are either using IDCAMS to make a copy of those datasets to work or temp datasets, or dynamically generating the JCL and/or the proper DD statements to be used in a subsequent job.

It would be helpful if you could maybe let us know what your thoughts are and what standards or restrictions you may need to abide by.
Back to top
View user's profile Send private message
nirmal arthur

New User


Joined: 26 Jun 2008
Posts: 8
Location: Hyderabad

PostPosted: Wed Jan 06, 2010 8:08 pm    Post subject:
Reply with quote

We cannot use a subsequent job. Can you please eloberate on the IDCAMS approach.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Wed Jan 06, 2010 8:13 pm    Post subject:
Reply with quote

Quote:
The problem here is I don't know how to get the file names present in the unloaded sequential file to the DD statement in the SORT step
If you cannot use a second job, you must either use dynamic allocation of the files (supported in COBOL and Assembler, for example) or tell whoever gave you the assignment that it cannot be completed as specified. The big problem is that JCL, once submitted to JES and run through the Converter / Interpreter, is fixed in stone and cannot be changed in any way, shape, style or form for any reason whatsoever. So you cannot (I repeat, can not) have a job where the first step modifies the JCL used in the second (or subsequent) step -- since that JCL has been fixed by JES and is unchangeable.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Jan 06, 2010 8:20 pm    Post subject: Reply to: Need to merge more than 2 files
Reply with quote

You can use the IDCAMS REPRO command to copy from a cataloged dataset to either another cataloged dataset or to an associated DD statement:

REPRO IDS(INPUT.DATASET) ODS(OUTPUT.DATASET)

or

REPRO IDS(INPUT.DATASET) OFILE(DDNAME)

30.1 REPRO Parameters.
Back to top
View user's profile Send private message
nirmal arthur

New User


Joined: 26 Jun 2008
Posts: 8
Location: Hyderabad

PostPosted: Wed Jan 06, 2010 8:39 pm    Post subject:
Reply with quote

Thanks a lot!
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us