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

CICS - Execution of JCL using program.


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Fri Dec 30, 2011 12:08 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Dec 30, 2011 12:15 pm
Reply with quote

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
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Thu Jan 05, 2012 6:53 pm
Reply with quote

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
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sun Jan 08, 2012 9:06 pm
Reply with quote

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
View user's profile Send private message
rajesh1183

New User


Joined: 07 Jan 2008
Posts: 98
Location: Hyderabad

PostPosted: Mon Jan 09, 2012 11:22 am
Reply with quote

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
View user's profile Send private message
rajesh1183

New User


Joined: 07 Jan 2008
Posts: 98
Location: Hyderabad

PostPosted: Mon Jan 09, 2012 11:31 am
Reply with 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...?"
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: Mon Jan 09, 2012 8:43 pm
Reply with quote

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. . . icon_sad.gif 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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jan 09, 2012 9:42 pm
Reply with quote

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
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
Search our Forums:

Back to Top