Juan Mautalen wrote:

>I have a question regarding JCL and date variables. I need to run a job daily, 
>whose output must be written to a partitionned dataset with a member name 
>referring to the day before job execution.

Can you not use automation software? Control-M and others, for example, can be 
setup to specify whatever you want and set it up. Say, use Schedule day or 
system day and subtract/add x many days and you have your variables. I use that 
JCL editing facility every day for all my dozen reporting jobs.

>Example: If the job runs today, january 7 of 2014, it must create the member 
>F140106 ( and not F140107). That is because the job processes information from 
>the day before (and not from the day it is indeed running).

>Is there a way to achieve this purely from JCL? we have z/OS 1.13.

Not from z/OS 1.12 or 1.13 AFAIK. I don't know if z/OS v2 has that, but things 
could be interesting if it has that ability.

But you can use date and other variables in a STC, not in a batch job. 

Like this working STC:

//WHATSUP EXEC PGM=IEFBR14                                    
//PEST     DD DISP=(NEW,CATLG),                                
//            SPACE=(CYL,(1,1)),LRECL=80,RECFM=FB,DSNTYPE=PDS,
//            DSN=SYS1.A&JDAY                        

But, no further editing AFAIK...

Could you write a REXX program to achieve that?
Say, get system date, convert to julian, subtract 1 and check whether yesterday 
is on a leap year or not.

Groete / Greetings
Elardus Engelbrecht

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to