Page 2 of 2

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 10:01 pm
by DonkeyKong
Here's what I have right now....

//XXXXXXXT JOB (X9999),'SET TEST DATES',CLASS=T,MSGCLASS=Y,
//     NOTIFY=&SYSUID,REGION=0M                                                 
//*                                                       
//   SET OCYYMMDD='20140120',                             
//       NCYYMMDD='20140525',                             
//       OYYMMDD='140120',                                 
//       NYYMMDD='140525',                                 
//       OMMDDYY='012014',                                 
//       NMMDDYY='052514'                                 


//S10      EXEC PGM=FILEMGR                                           
//*                                                                   
//SYSPRINT DD SYSOUT=*                                                 
//SYSLIST  DD SYSOUT=*                                                 
//SYSTOTAL DD SYSOUT=*                                                 
//DATES    DD DSN=TT200.MERSPL.DTE.D&NMMDDYY.,                         
//            DISP=SHR                                                 
//*                                                                   
 //SYSIN    DD *                                             
 $$FILEM DSU INPUT=DATES,MEMBER=*,PROC=*                     
 IF   SUBSTR(INREC,24,8)=(OCYYMMDD)            THEN           
    OUTREC=CHANGE(OUTREC,(OCYYMMDD),(NCYYMMDD),0,24,8)       
 IF   SUBSTR(INREC,23,8)=(OCYYMMDD)            THEN           
    OUTREC=CHANGE(OUTREC,(OCYYMMDD),(NCYYMMDD),0,23,8)       
 IF   SUBSTR(INREC,23,6)=(OYYMMDD)             THEN           
    OUTREC=CHANGE(OUTREC,(OYYMMDD),(NYYMMDD),0,23,6)         
 IF   SUBSTR(INREC,22,6)=(OMMDDYY)              THEN         
    OUTREC=CHANGE(OUTREC,(OMMDDYY),(NMMDDYY),0,22,6)         
 RETURN                                                       
 /+                                                           
 $$FILEM EOJ                                                 
 /*                                                           

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 10:17 pm
by DonkeyKong
Thanks for the help, but Mr. Spock solved in this thread posted just a few down from mine....

jcl/topic10162.html#p50858

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 10:18 pm
by enrico-sorichetti
instead of blindly cloning somebody' s else code snippet
why not start reading Yourself the jcl manuals to find out the proper format/syntax for inline substitution symbols ???

again... ASK YOUR SUPPORT to check if the approach is accepted.

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 10:45 pm
by DonkeyKong
As said I'm an amateur. I think my post says that pretty clearly.... but as stated, this is for testing purposes ONLY. There are very few rules imposed on testing. We have UNIT (no rules), INTEGRATION (still pretty much whatever, but there is structure), ACCEPTANCE (highly structured, has limitations on access), and then there is PRODUCTION.

This process is ONLY for setting testing dates/ testing JCL date overrides. So it really doesn't need to be audited by anyone but my boss. And he will do that before I move it to IT and again before UAT.

You're right I should read the manuals.... but A) I don't have one B) I didn't know that the term I was after was 'Instream'... so I would have been reading for a looooonnnggggg time.

Anyway, thanks for the help. I learned quite a bit today.

Re: Variables in File Manager JCL

PostPosted: Fri Oct 03, 2014 7:29 pm
by Ed Goodman
Never just say "it's not working"

Tell us what is happening now.