Get prior year using EZACFSM1



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

Get prior year using EZACFSM1

Postby ditto » Fri Sep 11, 2015 1:26 pm

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           
@@
ditto
 
Posts: 2
Joined: Fri Sep 11, 2015 1:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Get prior year using EZACFSM1

 

Re: Get prior year using EZACFSM1

Postby NicC » Fri Sep 11, 2015 2:47 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Get prior year using EZACFSM1

Postby ditto » Fri Sep 11, 2015 2:53 pm

Sorry Nicc... JCL related code, so just posted here...
ditto
 
Posts: 2
Joined: Fri Sep 11, 2015 1:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Get prior year using EZACFSM1

Postby BillyBoyo » Fri Sep 11, 2015 3:43 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Get prior year using EZACFSM1

Postby NicC » Fri Sep 11, 2015 5:25 pm

Billy, I think we were at it at the same time - your post wasn't there when I started but was when I finished!
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post