Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8617
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: 4650
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 Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm

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