Page 1 of 2

how to copy GDG file to PS file

PostPosted: Thu Mar 21, 2013 5:38 pm
by cbhargavi
Hello everyone,

Can any one suggest me how to copy a GDG file like GDS.report(+1) into a PS file.

Re: how to copy GDG file to PS file

PostPosted: Thu Mar 21, 2013 5:49 pm
by Robert Sample
Depending upon the generation's organization, use IEBGENER or IEBCOPY or SORT.

This is no different that doing a PDS member copy or sequential copy to a sequential file -- so why are you even posting the question?

Re: how to copy GDG file to PS file

PostPosted: Thu Mar 21, 2013 6:03 pm
by NicC
The generation concept is a form of NAMING convention not DATA FORMAT.

Re: how to copy GDG file to PS file

PostPosted: Thu Mar 21, 2013 8:48 pm
by c62ap90
This may work for you...

//STEP010  EXEC PGM=IDCAMS                     
//SYSPRINT DD SYSOUT=*                         
//SYSUDUMP DD SYSOUT=*                         
//SYSOUD   DD SYSOUT=*                         
//SYSOUT   DD SYSOUT=*                         
//FILEA    DD DSN=GDS.REPORT(+0),               
//            DISP=SHR                         
//FILEB    DD DSN=GDS.REPORT.PS,               
//            DISP=(NEW,CATLG,DELETE),         
//            UNIT=(TEST,1),                   
//*           VOL=SER=???,                     
//            SPACE=(TRK,(15,30),RLSE),         
//            DCB=(RECFM=FB,LRECL=???,BLKSIZE=0)
//SYSIN   DD *                                 
   REPRO                         -             
      INFILE(FILEA)              -             
      OUTFILE(FILEB)                           
/*                                             
//                                             

Re: how to copy GDG file to PS file

PostPosted: Fri Mar 22, 2013 12:53 am
by NicC
Or you could use ICEGENER or IEBGENER or the COPY option of your sort product. IEB/ICEGENER are favourites as you do not need any control cards.

Re: how to copy GDG file to PS file

PostPosted: Fri Mar 22, 2013 2:31 pm
by cbhargavi
sorry by mistake I posted the another requirement...
I want the jcl to get the latest gdg generation file name in to a ps file not the content of the gdg file.
accept my apologies and please assit me..

Re: how to copy GDG file to PS file

PostPosted: Fri Mar 22, 2013 2:42 pm
by BillyBoyo
Perhaps IDCAMS LISTCAT, with the output going to a dataset not SYSOUT=? You can then format the output dataset to what you want.

Re: how to copy GDG file to PS file

PostPosted: Fri Mar 22, 2013 3:33 pm
by cbhargavi
yes,but listcat provides all the generations but i need only latest genaration file name to wrriten to ps file

Re: how to copy GDG file to PS file

PostPosted: Fri Mar 22, 2013 3:49 pm
by enrico-sorichetti
if You search this same forum or http://ibmmainframes.com
You will find quite a few examples on how to do it

Re: how to copy GDG file to PS file

PostPosted: Fri Mar 22, 2013 5:18 pm
by cbhargavi
yeah,i found the example...thanks for suggestion.
But i didnt understand about EASYTRIEVE and how to code in jcl...
Can any one provide exact jcl ....