Check if the CICS region is down or up?

Customer Information Control System. Middleware and MQ Series.
Post Reply
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

Check if the CICS region is down or up?

Post by utkarsh »

Good day

I have one query
How to check if a job needs to run when the cics region is up or down if is having IMS data base?
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

Re: Check if the CICS region is down or up?

Post by utkarsh »

Is there no way using which we can check if the CICS region is down or up, in batch?
User avatar
zum13
Registered Member
Posts: 85
Joined: Thu May 04, 2023 12:58 am

Re: Check if the CICS region is down or up?

Post by zum13 »

If just finding out if the started task for the region is running would suffice, asking SDSF will do that:

Code: Select all

/*REXX*/ 
Arg Taskname . 
                                            
If   ISFCalls("ON") = 0 Then Do 
     ISFPrefix = Taskname 
     ISFOwner = "*" 
                                            
     Address SDSF "ISFEXEC DA" 
     If   RC ¬= 0 Then Retcode = 12
     Else If   ISFRows = 0 Then Retcode = 4 
     Else Retcode = 0 
                                            
     RC = ISFCalls("OFF") 
                                            
     Exit Retcode 
     End 
Else Exit 8
Run using the IRXJCL utility with a parameter of your CICS started task name and it'll give you CC 0 if it's there or 4 if it's not (anything else is an error).
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

Re: Check if the CICS region is down or up?

Post by utkarsh »

Thanks zum13. This is working, will do more test.

I asked one of my known, he said run any command of CICS in batch, capture the return code, if it fails, region is down, like you said.

Is it common to run CICS commands in batch? Even if not, how can we run a CICS command in batch?
User avatar
zum13
Registered Member
Posts: 85
Joined: Thu May 04, 2023 12:58 am

Re: Check if the CICS region is down or up?

Post by zum13 »

The sites I've worked on that have been using CICS have tended to leave it running continuously except for a small amount of outage time. Stuff that needed to run while CICS was down was considered a scheduling issue and so it was left to the operations staff to ensure that it happened at the right time. As a result, testing whether a region is actually available isn't something I've had to do nor have I seen it done in a live batch job.

That said, the only mechanism I know of for running CICS commands that's guaranteed to be available would be to issue the MVS "MODIFY" command against the started task (assuming console access has been set up). That can be done my either putting the command into a job:

Code: Select all

// F region,'command'
running it through the TSO OPERATOR command or SDSF, or running an authorised utility program that calls MGCR. The command in the job would require operator intervention, the TSO OPERATOR command and SDSF would need authorisation, but none of these methods would give you a usable condition code back so it can't be the basis of a test. In reality, the started task would need to be there first so at least using the SDSF script gives you a usable condition code.

There's an IBM product called "CICS Batch Application Control for z/OS" which appears to allow limited commands to be issued from a batch utility. Also, there are some third-party tools out there that will let you start CICS transactions which might be suitable for the task. The problem is, there's no guarantee that you'd have any of these products installed so you'd have to ask around about what's available on your system. It is definitely possible as I know ChangeMan had the ability to issue a "CEMT SET PROGRAM NEWCOPY" command when a CICS program was promoted.

The only other alternatives for testing region availability I can think of involve either looking for signs that the CICS region is running (such as going to TCP/IP and looking for open ports) or creating your own utility program for the purpose. Although I've not tried it, the EXCI interface looks like it might hold some promise as it allows a connection to be created to the region and that's basically all you need to confirm it's running. The other options I know of would be to use the CICS Transaction Gateway or try connecting to a webservice running on the region.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “CICS, Middleware and MQ Series.”