IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

to check if a date falls under a CA-7 calendar


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sameetshetty

New User


Joined: 19 Jan 2007
Posts: 11
Location: bangalore

PostPosted: Tue May 25, 2010 1:14 pm
Reply with quote

Hi,

Can some one please let me know if there is any way where in from a COBOL program I can pass a date and a CA-7 calendar (e.g. SCAL=NA) to some CA-7 routine or program (if present) and get returned whether the date falls under this calendar or not.

I agree this is a strange query but below is the requirement I have:
I need to process a row in the table which has along with the other data and CA7 calendar it is valid for.

So, was wondering if incase there is any CA7 subroutine to which I can pass the CA7 calendar and todays date - from a cobol program / JCL / REXX- and the subroutine returns if the date is falls in under the calendar or not.

I am aware I can schedule multiple jobs for each appropriate calendar option, but was thinking if there is some other/efficient way of achieving this.

Please let me know if more clarifications is needed.

Thank you inadvance

Regards
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue May 25, 2010 9:38 pm
Reply with quote

Hello,

My first thought would be to open an issue with CA support. They have most likely been asked this before and may have an available solution.

Can you run a "report" of all of the calendars defined to your CA7 system? If so (as calendars tend to be stable) create a database table or other "control file" of this calendar information to use when needed in an application. Each time calendar maintenance is done, re-generate this table/file (or just do this periodically).
Back to top
View user's profile Send private message
sameetshetty

New User


Joined: 19 Jan 2007
Posts: 11
Location: bangalore

PostPosted: Thu May 27, 2010 6:26 am
Reply with quote

Thank you Dick Scherrer.

I have asked the CA7 expert in our org and seems there is no way to call CA7 subroutine from COBOL program.

Alternatively, I was also looking if I can pass CA7 parametrs to the cobol program from a JCL and found that the CA7 has a facility called CA-DRIVER that can be used to pass CA7 parameters to the JCL but we do not have this facility in our shop.

Regards
Sameet
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 27, 2010 6:57 am
Reply with quote

Hello,

Quote:
. . . but we do not have this facility in our shop.
Well, bummer icon_sad.gif

Is there no possibility of running one or more "reports" and creating a reference file/table the cobol code could use?
Back to top
View user's profile Send private message
sameetshetty

New User


Joined: 19 Jan 2007
Posts: 11
Location: bangalore

PostPosted: Thu May 27, 2010 7:26 am
Reply with quote

Well, we have a DB2 table which has rows that needs to process. Each row has an additional columns saying on which days it should be processed.
For example they can specify that the row should be processed only from Mon - Fri from 10 a.m to 10 p.m. We can cater for this requirement.

But apart from specifying the DaysOfWeek and Start & end time, there is also an optional requirement to specify the CA7 calendar that it is applicable to, since the application runs for various countries.
i.e. it can be specified that a specific row should not be precessed every day excluding US public holidays and another row needs to process only on Indian public holidays.

Not sure how by running one or more CA-7 "reports" will be helpful in this case.

Currently we are thinking of having 1 comman cobol program and multiple JOBs per schedule that will call this cobol program. But this has a draw back that any time a new a new calendar option is specified, than a new CA7 schedule and a new JCL also needs developed.


Regards
Sameet
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 27, 2010 9:07 am
Reply with quote

Hello,

From ca7 is it possible to run a report that shows all of the dates for a calendar? If it is possible, please post a bit of this report - i'm not familiar with ca7 reporting.

If this report has what i want, this info can be converted into data that you can use in your cobol processing.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Thu May 27, 2010 1:40 pm
Reply with quote

I believe that CA-7 has a Calendar pds used for base calendar maintenance. Maybe its something that can be used.
Back to top
View user's profile Send private message
kalyanbrata.dhar

New User


Joined: 02 Sep 2008
Posts: 13
Location: Kolkata

PostPosted: Wed Jun 09, 2010 1:16 pm
Reply with quote

Quote:
Alternatively, I was also looking if I can pass CA7 parametrs to the cobol program from a JCL and found that the CA7 has a facility called CA-DRIVER that can be used to pass CA7 parameters to the JCL but we do not have this facility in our shop.


You can try BTERM. BTERM is the facility to run CA7 commands from JCl.
----------------------------
//STEP001 EXEC CA7LST
//BTERM.SYSPRINT DD DSN=xxx.xxx.xxx,DISP=SHR
//BTERM.SYSIN DD *
/LOGON
PRINT,SCAL=<calender name>,YEAR=<YY>
/LOGOFF
------------------------------

This will capture the date of the calender into the ps. Now, I guess, you can use this ps for your use.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts SCOPE PENDING option -check data DB2 2
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top