Page 1 of 1

Is posible merge files with unknown name?

PostPosted: Thu Mar 06, 2014 3:03 pm
by ottoelflaco
First of all, sorry my english..

I would like to know...Is posible merge different files like the next example?:
//SORT    EXEC PGM=SORT                                     
//SORTIN   DD  DSN=TSSDN.DATA.CONCATD1.HXXXXX,DISP=SHR             
//         DD  DSN=TSSDN.DATA.CONCATD1.HXXXXX,DISP=SHR             
//         DD  DSN=TSSDN.DATA.CONCATD1.HXXXXX,DISP=SHR             
//SORTOUT  DD  DSN=TSSDN.DATA.CONCATD4,                     
//             DISP=(NEW,CATLG,DELETE),                     
//             STORCLAS=MFI,                                 
//             SPACE=(TRK,5),                               
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SYSOUT   DD  SYSOUT=*                                     
//SYSIN    DD  *                                             
  SORT FIELDS=COPY
//*               


XXXXX is unknown for me, this value change in each execution of jcl...

I think this is hard..but maybe exists any solution?

Thx! ;)

Re: Is posible merge files with unknown name?

PostPosted: Thu Mar 06, 2014 3:12 pm
by NicC
You can either use a symbolic parameter (see the JCL reference manual) changing the value each time or use a program to generate the JCL and submit it via the internal reader. even this would require the setting of a symbolic parameter to the program unless you can write something that can extract the required dataset names from the catalog.

Re: Is posible merge files with unknown name?

PostPosted: Thu Mar 06, 2014 3:16 pm
by BillyBoyo
Or look at using a GDG.

Re: Is posible merge files with unknown name?

PostPosted: Thu Mar 06, 2014 10:10 pm
by dick scherrer
Hello,

But one would still need to resolve the XXXXX.

Personally, i'd use the symbolic parameter.

When does the value for XXXXX become known?