jothibso
New User
Joined: 03 Sep 2009 Posts: 18 Location: chennai
|
|
|
|
Hi All,
I have the following requirement in JCL
Currently i have Included the following piece in JCL
//*%OPC SCAN
//*%OPC SETFORM OCDATE=(CCYYMMDD)
//*%OPEC SETVAR TESTATE=(OCDATE - 7CD)
In this the TSDATE will have the date 1 week prior to the current date. Its working fine.
Now My new requirement is to extract 2 days prior data from the current date if it is monday and for other than Monday i need to extract 1 day prior date from the currrent date. For this I have used the following code
/*%OPC SCAN
//*%OPC SETFORM OCDATE=(CCYYMMDD)
//*If it is not a Monday */
//*%OPC BEGIN ACTION=INCLUDE,
//*%OPC SETVAR TDAY = CDAY
//*%OPC COMP=(&TDAY..NE.1)
//*%OPC SETVAR TSDATE=(OCDATE - 1CD)
//*%OPC END ACTION=INCLUDE
//*If it is Monday */
//*%OPC BEGIN ACTION=INCLUDE,
//*%OPC SETVAR TDAY = CDAY
//*%OPC COMP=(&TDAY..EQ.1)
//*%OPC SETVAR TSDATE=(OCDATE - 2CD)
//*%OPC END ACTION=INCLUDE
But the above piece of code is not working. I am getting Error as INVALID ARITHMETIC EXPRESSION. Please help. |
|