Page 1 of 2

Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 7:59 pm
by DonkeyKong
I would say that my skill level is low in all things COBOL and JCL related. However, I am learning.

I am working to improve a current process. The JCL makes a call to the File Manager program as such...

//S10      EXEC PGM=FILEMGR                     
//*                                             
//SYSPRINT DD SYSOUT=*                         
//SYSLIST  DD SYSOUT=*                         
//SYSTOTAL DD SYSOUT=*                         
//DATES    DD DSN=xxxxx.xxxxxx.xxx.x&NMMDDYY., 
//            DISP=SHR                         
//*                                             


Note the symbolic used in the filename. It is a date value in the form of a symbolic.
I would like to use the same symbolic(s) in the File Manager code that follows the above JCL:

//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                                                       
/*                                                               
//*                                                               


So far I have been unsuccessful in using symbolics in this way. I am assuming that is because it is not actually JCL. Is there a way to use variables in the File Manager code?

Thanks

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 8:43 pm
by enrico-sorichetti
only if You are running zOS V2
which accepts symbol substitution in inline data

but it is not related to FILEMANAGER, but to any process/program which uses inline data

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 8:53 pm
by DonkeyKong
Hey Enrico, crazy I was just reading a post of yours from March 2007 on REXX. The job output says that I am executing REXX, so would it be possible for me to something like this guy was trying to do?

http://ibmmainframes.com/about41245.html

Sorry about this, but can you tell me how I can find out the version of zOS I am running?

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 9:15 pm
by enrico-sorichetti
the ISPF primary option panel should tell!

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 9:20 pm
by DonkeyKong
Im running ISPF 7.1?

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 9:22 pm
by Terry Heinze
... or key WHO at an SDSF command line.

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 9:23 pm
by DonkeyKong
MVS=z/OS 02.01.00,JES=z/OS 2.1,SDSF=HQX7790,ISPF=7.1

That look like it!?

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 9:30 pm
by enrico-sorichetti
yes...
but before using this approach it would be wiser to speak to Your support
to see if it is acceptable

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 9:41 pm
by DonkeyKong
This will only be used in testing, not in production.

I had a little help from a coworker. He said to use SET to declare the symbolics. I am working on this approach currently. Is that what you were refering to earlier?

Re: Variables in File Manager JCL

PostPosted: Thu Oct 02, 2014 9:55 pm
by DonkeyKong
OK. So it's not working..... any suggestions?