On 2/7/2020 12:37 PM, John Szura wrote:
Is there a way to tell if you application is running under a Secondary JES? We have common code that is used in several products that needs to check the JES it is running under. If I look at the chain of SSCTs it will only tell me there are more than one JES running but I can't find a way to determine under which the application started.
John, I mentioned this same thing (albeit without a code example) in response to your previous question on a similar topic. The "life of job" SSIB tells you which subsystem you are started under. It's the same SSIB you should be using to communicate via the SSI to that subsystem. You should almost never need to search the SSCT chain other than for esoteric reasons.
************************************ * Determine Subsystem Type * ************************************ LLGT R14,PSATOLD Load TCB address USING TCB,R14 <Synchronize TCB DSECT LLGT R14,TCBJSCB Load JSCB address USING IEZJSCB,R14 <Synchronize JSCB DSECT LLGT R14,JSCBACT Load active JSCB address LLGT R14,JSCBSSIB Load Life-of-Job SSIB address DROP R14 <Drop JSCB DSECT IF LTGR,R14,R14,NZ If life-of-job SSIB exists USING SSIB,R14 <Synchronize SSIB DSECT IF CLI,SSIBSSID,EQ,SSIBJES2, If subsystem type = JES2 OR, .. OR .. CLI,SSIBSSID,EQ,SSIBJES3, .. subsystem type = JES3 XGR R15,R15 Set return code = 0 MVC ECAJTYPE,SSIBSSID Copy JES subsystem type MVC ECASUBNM,SSIBSSNM Copy JES subsystem name ELSE , Else not JES2 or JES3 LGHI R15,4 Set return code = 4 ENDIF , EndIf subsys = JES2 or JES3 DROP R14 <Drop SSIB DSECT ELSE , Else no life-of-job SSIB LGHI R15,4 Set return code = 4 ENDIF , EndIf life-of-job SSIB exists -- Phoenix Software International Edward E. Jaffe 831 Parkview Drive North El Segundo, CA 90245 https://www.phoenixsoftware.com/ -------------------------------------------------------------------------------- This e-mail message, including any attachments, appended messages and the information contained therein, is for the sole use of the intended recipient(s). If you are not an intended recipient or have otherwise received this email message in error, any use, dissemination, distribution, review, storage or copying of this e-mail message and the information contained therein is strictly prohibited. If you are not an intended recipient, please contact the sender by reply e-mail and destroy all copies of this email message and do not otherwise utilize or retain this email message or any or all of the information contained therein. Although this email message and any attachments or appended messages are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the sender for any loss or damage arising in any way from its opening or use. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
