Region Detect

General discussion on the JZOS batch launcher and toolkit
Post Reply
ek1975
Posts: 23
Joined: Tue Sep 30, 2008 10:04 pm

Region Detect

Post by ek1975 »

Hello, I tried googling without much luck. So I thought I would post here. I have a java program that could be called from Batch or CICS

When the java program executes, I would like to detect a couple of things
1) Is the java program being called from a batch or a CICS program or in other words - Is there any command to detect if the java program is executing under TSO or CICS?

2) When my program executes under CICS, I can get the region name using methods from dfhjcics.jar and I can tell if the program is executing under DEVL or PROD. It would be nice if there was a similar option to tell if the program is executing under DEVL or PROD under TSO. Is there one? Thank you for your time.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Take a look at the methods in class com.ibm.jzos.ZUtil. You can get the jobname, stepname, procstepname. Also, you can read environment variables, which you might use.

Finally, you can use ZUtil.peekOSMemory method to read memory from the CVT, etc to get about anything that you want.
ek1975
Posts: 23
Joined: Tue Sep 30, 2008 10:04 pm

Post by ek1975 »

Thank you very much, I will take a look at those methods.
Post Reply