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 of files after reading there names from another file

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

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Mon May 28, 2007 6:25 pm    Post subject: Merging of files after reading there names from another file
Reply with quote

I have a requirement like this

I will be getting a file from some external sources. The file will contain names of some GDG's. The generation number may not be consecutive. My requirement is: I have to get the GDG names from the file and in the next step i want to concatenate the contents of GDG using a sort

Example

my input file contains

XX.PRESENT.DATA.GDG.G0001V00
XX.PRESENT.DATA.GDG.G0003V00
XX.PRESENT.DATA.GDG.G0009V00

In the next step I want to read the input file naems and then merge the contents of
XX.PRESENT.DATA.GDG.G0001V00,XX.PRESENT.DATA.GDG.G0003V00,XX.PRESENT.DATA.GDG.G0009V00 into a another file
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 May 28, 2007 6:28 pm    Post subject:
Reply with quote

You can do it using REXX.
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 Jun 06, 2007 8:34 pm    Post subject: Re: Merging of files after reading there names from another
Reply with quote

This is how I would approach this:

Code:

//JOB#1    JOB (),'....',CLASS=T,....
//*
//STEP1    EXEC PGM=ICEMAN                                 
//SORTIN   DD   *                                         
XX.PRESENT.DATA.GDG.G0001V00                               
XX.PRESENT.DATA.GDG.G0003V00                               
XX.PRESENT.DATA.GDG.G0009V00                               
/*                                                         
//SORTOF1  DD   DSN=&&T1,DISP=(,PASS),UNIT=VIO             
//SORTOF2  DD   DSN=&&T2,DISP=(,PASS),UNIT=VIO             
//SYSOUT   DD   SYSOUT=*                                   
//SYSIN    DD   *                                         
  OPTION COPY                                             
  OUTFIL FILES=1,ENDREC=1,                                 
    OUTREC=(1:C'//SORTIN   DD   DISP=SHR,DSN=',1,44,80:X) 
  OUTFIL FILES=2,STARTREC=2,                               
    OUTREC=(1:C'//         DD   DISP=SHR,DSN=',1,44,80:X) 
/*                                                         
//*                                                       
//STEP2    EXEC PGM=ICEMAN                               
//SORTIN   DD   DATA,DLM=@@                               
//JOB#2    JOB (),'....',CLASS=T,....
//*                                                       
//STEP1    EXEC PGM=ICEMAN                               
//SORTOUT  DD   SYSOUT=*                                 
//SYSOUT   DD   SYSOUT=*                                 
//SYSIN    DD   *                                         
  OPTION COPY                                             
/*                                                       
@@                                                       
//         DD   DSN=&&T1,DISP=(OLD,PASS)                 
//         DD   DSN=&&T2,DISP=(OLD,PASS)                 
//SORTOUT  DD   SYSOUT=(*,INTRDR)                         
//SYSOUT   DD   SYSOUT=*                                 
//SYSIN    DD   *                                         
  OPTION COPY                                             
/*                                                       
//*                                                       


where JOB#1 STEP1 would create DD statements for each of the GDG datasets in the input file, JOB#1 STEP2 would copy the JCL for JOB#2 to the internal reader while providing the concatenated dataset list for the SORT input.
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 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 Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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