The following code works. No idea if it is the "best" way.
* INFORMATION RETRIEVED FROM JES VIA IEFSSREQ
LA R1,ASSOB
IEFSSREQ ,
* Check for errors on IEFSSREQ
LHI R0,0 No reason code
LA R14,=C'IEFSSREQ&Z'
LTR R15,R15
JNZ RETERROR
* PARSE THE SSVI DATA RETURNED BY IEFSSREQ
* STRATEGY IS TO USE THE POINTERS TO BUMP DOWN TO THE "SYSTEM DATA,"
* THE SCAN A CHARACTER AT A TIME LOOKING FOR COMMAS, AND EACH TIME A
* COMMA IS FOUND SEE IF THE FOLLOWING STRING IS "JES_NODE="
* See notes in the data block about the length
LA R3,SSVI1
A R3,SSVISDOF-SSVI(,R3) OFFSET TO SYSTEM DATA
LH R2,0(,R3) LENGTH OF SYSTEM DATA
ST R2,JISSVIRLEN Pass back length for verbose msg
* Check for errors in the IEFJSSOB
LR R0,R2 Pass actual length as reason code!
LA R14,=C'IEFJSSOB&Z'
L R15,SSOB1+SSOBRETN-SSOB
LTR R15,R15
JNZ RETERROR
* "The length of this field is not included in the length of the
* string."
LA R3,2(,R3) OKAY, SHOULD NOW POINT AT 1ST COMMA
*
* LOOP LOOKING FOR COMMA
NODE1LP EQU *
CLI 0(R3),C','
JNE NODELP1X
*
* FOUND A COMMA
CLC 1(9,R3),=CL9'JES_NODE='
JNE NODELP1X
*
* FOUND THE RIGHT TAG 012345678901
LA R4,11(,R3) GET PAST ,JES_NODE='
J NODEFND
*
* KEEP GOING
NODELP1X EQU *
LA R3,1(,R3) NEXT CHARACTER
BRCT R2,NODE1LP
*
* NOT FOUND
LA R4,=CL8'NOTAVAIL' ???
*
* STORE THE data for C++
NODEFND EQU *
MVC JIJESNOD(8),0(R4)
------------------------------------
* AREAS USED FOR IEFSSREQ
ASSOB DC A(SSOB1)
*
SSOB1 DC 0F'0'
DC CL4'SSOB'
DC Y(SSOBX-SSOB1) LENGTH
DC Y(SSOBSSVI) VERSION REQUEST = 54
DC A(0) USE LIFE OF JOB SSIB
SSOB1RET DC F'0'
SSOBPTR DC A(SSVI1)
DC 2F'0'
SSOBX EQU * END OF SSOB
*
SSVI1 DC 0F'0'
DC Y(SSVIX-SSVI1) LENGTH
DC AL1(SSVIVTWO) VERSION
DC X'0'
DC CL4'SSVI'
SSVIDATA EQU *
SSVIDATA_Len EQU 1024 Arbitrary response length allowance
DC (SSVIDATA_Len)X'0'
SSVIX EQU * END OF SSVI
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Tim Hare
Sent: Tuesday, November 17, 2020 7:53 AM
To: [email protected]
Subject: Finding JES2 node name
I have some code that follows a control block chain to the HCCT to get the JES2
node name, but that requires going to key zero (or so the source says, it's
been years ). Is there a way to retrieve the JES2 node name in a program
running in batch, without being APF-authorized? We'd like to remove the need
for this program to be in an APF-authorized library.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN