This could be a method (not the only and not the best !): LA 7,X'10' L 7,0(7) L 7,0(7) L 7,4(7) Pointer to current TCB L 7,X'B4'(7) Pointer to JSCB and then TCBJSCBB LA 6,X'168'(7) Here you'll fine the main program - JSCBPGMN
Within JSCBPGMN you can trigger your application because if it's like 'DFS%' you should be IMS, like 'DFH%' CICS, like 'IKJ%' TSO and so on for every known prefix environment. I'm not stating anything, it's a way ! Contact me offline if you need further infos. Good luck. -----Messaggio originale----- Da: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] Per conto di Bill Kotchish Inviato: lunedì 12 dicembre 2005 16.19 A: [email protected] Oggetto: Determine IMS Environ From MVS Cntl Blks I need a way to determine if I, as an executing program, am running in an online or batch environment. By online, I mean either IMS online or CICS. I found a program entitled COB2JOB on the web that gives examples of various MVS Control Block addresses and useful data. In one section of this program, there is reference to the TCB and at the 53rd address, the TCBEXT2 (Common Extension) and at offset 21, the address of the AFCB. The program says if there is a valid (non-zero) address in there, then we must be under CICS control; otherwise, "batch". I tested this in an IMS online environment and this address is zero, so I cannot use this to determine anything IMS. Do you know of an area in the MVS Control Blocks that will definitively indicate being under IMS online control, similar to this CICS solution? I'm obviously not a sys prog, so make it simple for this semi-retired 53-year-old. Thanks in advance. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

