Attributes of name of PS file in a PS file



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: Attributes of name of PS file in a PS file

Postby szvemana79 » Thu Mar 08, 2018 2:31 pm

Thankyou for the quick reply.
I tried in below way in taking the backup as suggested in one of the post in this forum and it worked fine.

The only issue i was facing is to get the DCB attributes of the file that is present in &&TEMP01 and pass it to OFILE.if i am testing for a single known file by giving proper DCB paremeters to OFILE, it is working fine. But my requirement is the PS file attributes keep on changing that is present in &&TEMP01.Sometimes it is FB,300LRECL, FB600LRECL,VB 450LRECL,VB670LRECL,etc.As suggested above, i cant keep the file name in a PDS member due to some security reasons.

//BUILDER EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=dataset with the name in it ,DISP=SHR
//SORTOUT DD DSN=&&TEMP001,DISP=(,PASS,DELETE),
// RECFM=FB,LRECL=80,
// SPACE=(CYL,(25,25),RLSE)
//SYSIN DD *
OPTION COPY
OUTFIL BUILD=(C' IDS(',1,44,1X,C') -',80:X)
/*
//*
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//OFILE DD DSN=FILE NAME, Disp=(new,catlg,delete),space=... , dcb=....
//SYSIN DD *
PARM MARGINS(1 80)
REPRO -
// DD DSN=&&TEMP001,DISP=SHR
// DD *
OFILE(OFILE)
/*
//
szvemana79
 
Posts: 5
Joined: Tue Nov 14, 2017 9:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Re: Attributes of name of PS file in a PS file

 

Re: Attributes of name of PS file in a PS file

Postby willy jensen » Thu Mar 08, 2018 2:50 pm

You can't do it like you propose. And if your input really is like you say, then I see no way around a programmed solution. A simple REXX using dynalloc springs to mind.
willy jensen
 
Posts: 149
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 23 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post