Title : How to find on which IMSID an online application is running Submitter : Frank Fleming Barclays Computer Operations Radbroke Hall Knutsford Cheshire WA16 9EU Phone : 0565-621000 ext 3581 Release Submitter Details - Y Text :- The following code will find the IMS ID against which an online application is running. The basis of the logic (as found from reading IMS region initialisation code) is that the IMS ID is located in the SSCD (module DFSVC000). If the IMS ID is specified in the PARM field for DFSRRC00 then this value is copied into the SSCD, otherwise the value coded in the IMS GEN (and hence assembled into DFSVC000) is used. Note that the use of the new AIB interface INQY call which is part of the newly closed 'Changed Data Capture' SPE is probably preferable to this method of finding the IMS ID. * * * FINDS IMSID USING MVS & IMS CONTROL BLOCKS * * * * * IF WE ARE NOT IN AN IMS REGION THEN WE WILL * PROBABLY ABEND S0C4 SOMEWHERE AROUND HERE * USING PSA,R0 BASE PSA ON NOTHING L R2,PSATOLD CURRENT TCB - MUST BE ME * COZ I'M RUNNING USING TCBRBP,R2 TELL ASSEMBLER ABOUT TCB DROP R0 FINISHED WITH NOTHING NOW L R3,TCBFSA A(FIRST SAVE AREA) DROP R2 FINISHED WITH TCB NOW L R2,24(R3) R1 IN FSA IS A(ECP OR PARMBLK) USING DFSECP,R2 PRETEND IT'S ECP FOR NOW CLC ECPID,=C'ECP ' IS IT REALLY? BNE PARMBLCK NAH! - IT'S PARMBLOCK OR NOWT L R2,ECLRCPRM YEP - SO FIND PARMBLOCK FROM ECP DROP R2 FINISHED WITH ECP PARMBLCK EQU * USING DFSPRPX0,R2 TELL ASSEMBLER ABOUT PARMBLOCK L R3,RRCPARMS NOW POINT R2 AT REGION CNTL PRMS USING RCPARMS,R3 TELL ASSEMBLER ABOUT RC PARMS L R4,PCSSCDAD AND FIND THE SSCD USING SCD,R4 * IMS ID IS IN FIELD SSCDIMID EITHER AS LOADED IN DFSVC000 FROM * STEPLIB, OR AS COPIED TO FROM DFSRRC00 PARM FIELD REQUIRED DSECTS DFSECP IMS PARMBLK ISCD SCDBASE=0 IHAPSA IKJTCB