Variables in File Manager JCL



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

Re: Variables in File Manager JCL

Postby DonkeyKong » Thu Oct 02, 2014 10:01 pm

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                                                 
 /*                                                           
DonkeyKong
 
Posts: 34
Joined: Thu Oct 02, 2014 7:51 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Variables in File Manager JCL

Postby DonkeyKong » Thu Oct 02, 2014 10:17 pm

Thanks for the help, but Mr. Spock solved in this thread posted just a few down from mine....

jcl/topic10162.html#p50858
DonkeyKong
 
Posts: 34
Joined: Thu Oct 02, 2014 7:51 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Variables in File Manager JCL

Postby enrico-sorichetti » Thu Oct 02, 2014 10:18 pm

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.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Variables in File Manager JCL

Postby DonkeyKong » Thu Oct 02, 2014 10:45 pm

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.
DonkeyKong
 
Posts: 34
Joined: Thu Oct 02, 2014 7:51 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Variables in File Manager JCL

Postby Ed Goodman » Fri Oct 03, 2014 7:29 pm

Never just say "it's not working"

Tell us what is happening now.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post