Variables in File Manager JCL



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

Variables in File Manager JCL

Postby DonkeyKong » Thu Oct 02, 2014 7:59 pm

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
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 8:43 pm

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
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 8:53 pm

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?
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 9:15 pm

the ISPF primary option panel should tell!
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 9:20 pm

Im running ISPF 7.1?
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 Terry Heinze » Thu Oct 02, 2014 9:22 pm

... or key WHO at an SDSF command line.
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

Re: Variables in File Manager JCL

Postby DonkeyKong » Thu Oct 02, 2014 9:23 pm

MVS=z/OS 02.01.00,JES=z/OS 2.1,SDSF=HQX7790,ISPF=7.1

That look like it!?
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 9:30 pm

yes...
but before using this approach it would be wiser to speak to Your support
to see if it is acceptable
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 9:41 pm

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?
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 9:55 pm

OK. So it's not working..... any suggestions?
DonkeyKong
 
Posts: 34
Joined: Thu Oct 02, 2014 7:51 pm
Has thanked: 3 times
Been thanked: 0 time

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post