Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
JCL/OPC SCAN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
jothibso

New User


Joined: 03 Sep 2009
Posts: 18
Location: chennai

PostPosted: Wed Mar 09, 2011 5:14 pm    Post subject: JCL/OPC SCAN
Reply with quote

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.
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2445
Location: Netherlands, Amstelveen

PostPosted: Wed Mar 09, 2011 7:46 pm    Post subject:
Reply with quote

Maybe you show the TWS generated output.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS TS 5.3 migr after DFHCSDUP UPGRA... Kyle Carroll CICS 6 Wed Aug 31, 2016 10:58 pm
No new posts Scan for Calls to DB2 kctechpro2 IBM Tools 10 Fri Sep 04, 2015 11:31 pm
No new posts Using Wildcard for PDS names with PDS... PokerGuru CA Products 1 Fri May 22, 2015 2:30 pm
No new posts table scan can cause deadlock over RID? dejunzhu DB2 10 Fri Jul 04, 2014 8:36 am
No new posts Nonmatching index scan sumit_tumba DB2 6 Tue Mar 19, 2013 1:17 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us