Page 1 of 1

Get prior year using EZACFSM1

PostPosted: Fri Sep 11, 2015 1:26 pm
by ditto
Hi - I need to get current year and subtract 1 from that and get the prior year. This prior year will be used as symbolic in the dataset name creation. My JCL will look like this but when I use &YR4 -1 does not work. Pls help me.
//STEP001  EXEC PGM=EZACFSM1     
//SYSOUT   DD SYSOUT=*           
//SYSIN    DD DATA,DLM=@@       
// SET DTVAR    = &YR4           
@@

Re: Get prior year using EZACFSM1

PostPosted: Fri Sep 11, 2015 2:47 pm
by NicC
Do you know how many forum rules you broke with your first post when they should have been fresh in your mind? I have split your topic from the one that you hi-jacked/tailgated and applied the code tags.

Re: Get prior year using EZACFSM1

PostPosted: Fri Sep 11, 2015 2:53 pm
by ditto
Sorry Nicc... JCL related code, so just posted here...

Re: Get prior year using EZACFSM1

PostPosted: Fri Sep 11, 2015 3:43 pm
by BillyBoyo
If you look at the documentation for SET you'll find it doesn't do anything fancy like arithmetic expressions. Or anything.

So, what you want to do is not going to work.

The usual way to do this is with your Scheduler, so talk to your Scheduler people.

NicC, it seems you chopped my previous posting of this when you did the split :-)

No biggie.

Re: Get prior year using EZACFSM1

PostPosted: Fri Sep 11, 2015 5:25 pm
by NicC
Billy, I think we were at it at the same time - your post wasn't there when I started but was when I finished!