View previous topic :: View next topic
|
Author |
Message |
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
Hi,
I am submitting the JCL using SPOOL open,WRITE and CLOSE command using CICS command.
I need to check the return code of the JCL after execution, there may be possibilty that:
1. Input file is empty
2. Input file does not exists.
3. Input file is having different length.
I have to check the status code and send the mail accordingly.
how can we check the job status in CICS program.
Regards,
krunal Bafna
09320145664 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
I have to check the status code and send the mail accordingly. |
that should be done as a step in the <submitted> job
search the forum for examples
Quote: |
how can we check the job status in CICS program. |
can not be done |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Yes in CICS there is no possibility,but i remember in one of my project there is an piece of code in assembler called as batch monitoring program which would be invoked from CICS and CA7 is scheduled with batch parameters like job name,clas etc, where the Assembler would return the status back to CICS program.Since i am not having knowledge on assembler i skipped to understand the flow... still remains as a black box. |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
you need to ask your management to invest in some vendor software that can communicate from batch.
try google search batch to cics |
|
Back to top |
|
|
rajesh1183
New User
Joined: 07 Jan 2008 Posts: 98 Location: Hyderabad
|
|
|
|
If your mgmt cannot afford a 3rd party tools or other stuff... one of my idea/approach would be :
1) Write an INSERT query which inserts a row into a DB2 table with the condition code of previous step. Probably, you can differentiate the row inserted by the current user with the other users thru a RACF ID/terminal ID/TIMESTAMPS.
2) Check the same condition code from the DB2 table in your CICS program after a certain amount of time(based on the avg run time statistics of the batch job) and act accordingly in your CICS program based on CC.
Risk: If the batch job executes successfully by taking much more time than the expected avg run time, you might need to validate the START & END timestamps of the batch job and handle accordingly in your CICS program |
|
Back to top |
|
|
rajesh1183
New User
Joined: 07 Jan 2008 Posts: 98 Location: Hyderabad
|
|
|
|
you might also need to check with your Batch OPS or with implementation team on "How to prepare the JCL(with PRIORITY and other parameters) such that the job should start executing IMMEDIATLY once the CICS program triggers the JCL...?" |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
1) Write an INSERT query which inserts a row into a DB2 table with the condition code of previous step. Probably, you can differentiate the row inserted by the current user with the other users thru a RACF ID/terminal ID/TIMESTAMPS. |
Where you do you suggest CICS get this contidion code?
Quote: |
2) Check the same condition code from the DB2 table in your CICS program after a certain amount of time(based on the avg run time statistics of the batch job) and act accordingly in your CICS program based on CC. |
So a CICS transaction (most likely several) are to hang around in the system waiting for something to happen in a batch prcesss. . . What a waste of resources - and is not permitted in any decent production environment. . .
Quote: |
Risk: If the batch job executes successfully by taking much more time than the expected avg run time, you might need to validate the START & END timestamps of the batch job and handle accordingly in your CICS program |
Much more than a risk - this would most likely cause the process to fail often.
Quote: |
you might also need to check with your Batch OPS or with implementation team on "How to prepare the JCL(with PRIORITY and other parameters) such that the job should start executing IMMEDIATLY once the CICS program triggers the JCL...?" |
Better to check with these people as well as the Scheduling people / System support people for a more acceptable solution.
If someone really believes you need to ping-pong between online and batch, the organization should invest in proven software that suppports this. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
why all the back and forth...
just insert as the last step of the jcl the EMAIL step
the topic is shifting towards... how to write a RYO scheduler ,
is going to be locked pretty soon! |
|
Back to top |
|
|
|