Page 2 of 3

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Thu Feb 07, 2013 7:21 am
by sganja
Till now we created tape files with 5,10 and maximum 20 years using RETPD directly in jcl while creating tape
We never came up to create for 99 years.

I tried with Retpd, but its supporting upto 24 years only.

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Thu Feb 07, 2013 3:39 pm
by Akatsukami
Yes, as the fine manual tells you, the maximum RETPD is 9,999 days, which is 27 years and a few months.

Post sample JCL here...in Code tags. I'll look at it when I get into my office in a few hours.

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Thu Feb 07, 2013 3:53 pm
by sganja
Step to copy flat file to tape file
//JS001  EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//SYSUT1   DD  DSN=XYZ.TEMP.FILE.COPY,DISP=SHR
//SYSUT2   DD  DSN=XYZ.TAPE.TEMP.FILE,                 
//             DISP=(NEW,CATLG,DELETE),
//             RECFM=VB,
//             LRECL=10144,
//             UNIT=TAPEC,
//             EXPDT=99001


Code'd

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Thu Feb 07, 2013 3:55 pm
by BillyBoyo
Can't you set up something in your Scheduler to uncatalog/recatalog it in 27 years time, twice, and then once more for the last little bit?

OK, humour(?) aside. I know it is the requirement, but why is it the requirement. The tapes are not going to be "released back into the scratch pool" after 99 years. I can see no reason for them not to be permanent. Unless your client's system runs for the next 99 years, whether it is coded "exactly" or not will not even matter for any specious reason your client has.

Keep forever. Use a professional storage facility. Take the volume out of the main tape catalogue.

Or tell us the reason for the requirement.

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Thu Feb 07, 2013 9:43 pm
by Akatsukami
sganja wrote:Step to copy flat file to tape file
//JS001 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=XYZ.TEMP.FILE.COPY,DISP=SHR
//SYSUT2 DD DSN=XYZ.TAPE.TEMP.FILE,
// DISP=(NEW,CATLG,DELETE),
// RECFM=VB,
// LRECL=10144,
// UNIT=TAPEC,
// EXPDT=99001

Couldn't be bothered to post that in Code tags although I'd explicitly asked you to, eh? I guess you're not serious about wanting help.

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Thu Feb 07, 2013 10:03 pm
by sganja
Seriously i didnt get what post in the code tags means thats the reason i pasted the code directly.

Whats the difference in pasting with codes tags and no code tags.

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Thu Feb 07, 2013 10:20 pm
by steve-myers
Without code tags -

//JS001 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=XYZ.TEMP.FILE.COPY,DISP=SHR
//SYSUT2 DD DSN=XYZ.TAPE.TEMP.FILE,
// DISP=(NEW,CATLG,DELETE),
// RECFM=VB,
// LRECL=10144,
// UNIT=TAPEC,
// EXPDT=99001

With code tags -
//JS001  EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//SYSUT1   DD  DSN=XYZ.TEMP.FILE.COPY,DISP=SHR
//SYSUT2   DD  DSN=XYZ.TAPE.TEMP.FILE,
//             DISP=(NEW,CATLG,DELETE),
//             RECFM=VB,
//             LRECL=10144,
//             UNIT=TAPEC,
//             EXPDT=99001

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Thu Feb 07, 2013 11:38 pm
by Akatsukami
This Rexx script will take a job and replace the parameter EXPDT=99001 with EXPDT=later, where later is 99 years to the day from when the script is run. The job is then submitted and the modified JCL erased; the original JCL is retained. The JCL PDS and member are supplied as parameters. No ISPF services or SQL are used.

/* Rexx */                                                             
/*********************************************************************/
/*                                                                   */
/* Written Heisei 25.02.07 by Akatsukami-sama                        */
/*                                                                   */
/*********************************************************************/
  trace o                                                               
  arg inlib inmbr .                                                     
  first    = 1                                                         
  sig      = x2c("E69989A3A3859540C88589A2858940F2F54BF0F24BF0F740")   
  sig      = sig || x2c("82A840C19281A3A2A49281948960A2819481")         
  sug      = x2c("61615C40C481A3854081A2A289879585844082A840C19281")   
  sug      = sug || x2c("A3A2A49281948960A28194817DA240C5A7838593")     
  sug      = sug || x2c("938595A340C1A4A396858489A39699")               
  indsn    = inlib"("inmbr")"                                           
  later    = substr(date("Standard"),1,4) || '/' ||,                   
             substr(date("Julian"),3)                                   
  outdsn   = 'T' || time("Seconds")                                     
  "ALLOC FI(DO) DA('"indsn"') SHR REU"                                 
  "ALLOC FI(FO) DA ("outdsn") NEW REU SPACE(1,1) TRACKS LRECL(80)",     
  "      RECFM(F B)"                                                   
  "EXECIO * DISKR DO (STEM LINE. FINIS"                                 
                                                                       
  do i = 1 to line.0                                                   
    parse var line.i token1 op .                                       
                                                                       
    if ((op="EXEC") & (substr(token1,1,2)="//") &,                     
        (substr(token1,3,1)¬='*') & (first=1)) then do                 
      first = 0                                                         
      queue "//***"                                                     
      queue sug                                                         
      queue "//***"                                                     
      "EXECIO 3 DISKW FO"                                               
    end                                                                 
                                                                       
    p = pos("EXPDT=99001",line.i)                                     
                                                                       
    if (p¬=0) then                                                     
      line.i = substr(line.i,1,p+5) ||,                               
               later ||,                                               
               substr(line.i,p+11)                                     
                                                                       
    queue line.i                                                       
    "EXECIO 1 DISKW FO"                                               
  end                                                                 
                                                                       
  "EXECIO 0 DISKW FO (FINIS"                                           
  "SUBMIT" outdsn                                                     
  "FREE FI(DO)"                                                       
  "FREE FI(FO)"                                                       
  "DELETE" outdsn                                                     

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Tue Feb 12, 2013 3:25 pm
by Blackthorn
What release of z/OS are you on?

I believe in 1.13 the maximum value for RETPD is increased to 93,000 which is approximately 254 years.

Re: How to create Tape file with Retention Period of 99 year

PostPosted: Tue Feb 12, 2013 5:45 pm
by steve-myers
Blackthorn wrote:What release of z/OS are you on?

I believe in 1.13 the maximum value for RETPD is increased to 93,000 which is approximately 254 years.
I didn't know that! I then went to the z/OS 1.13 JCL Reference manual and confirmed it. There are some interesting other comments there one should read. Dynamic allocation allows the longer retention period, too.