View previous topic :: View next topic
|
Author |
Message |
sameetshetty
New User
Joined: 19 Jan 2007 Posts: 11 Location: bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sameetshetty
New User
Joined: 19 Jan 2007 Posts: 11 Location: bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
. . . but we do not have this facility in our shop. |
Well, bummer
Is there no possibility of running one or more "reports" and creating a reference file/table the cobol code could use? |
|
Back to top |
|
|
sameetshetty
New User
Joined: 19 Jan 2007 Posts: 11 Location: bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
I believe that CA-7 has a Calendar pds used for base calendar maintenance. Maybe its something that can be used. |
|
Back to top |
|
|
kalyanbrata.dhar
New User
Joined: 02 Sep 2008 Posts: 13 Location: Kolkata
|
|
|
|
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 |
|
|
|