Well, my code could almost certainly be improved by using SRST rather than a 
CLI loop to find the comma, and perhaps by changing the code such that the 
likely path through the conditional jumps was straight through rather than 
branching. In my defense I wrote it a long time ago.

I was just looking at SRSTU. It's too bad it increments two bytes at a time; 
otherwise it would be terribly clever to use SRSTU to search for ',J'.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Rob Scott
Sent: Tuesday, November 17, 2020 9:55 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Finding JES2 node name

Getting the JES node name from the SSVI (in response to SSI-54) is exactly what 
SDSF does.

Rob Scott
Rocket Software

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Charles Mills
Sent: 17 November 2020 17:48
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Finding JES2 node name

EXTERNAL EMAIL





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:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Tim Hare
Sent: Tuesday, November 17, 2020 7:53 AM
To: IBM-MAIN@LISTSERV.UA.EDU
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 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

================================
Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 02451 ■ 
Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: 
https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - 
http://www.rocketsoftware.com/manage-your-email-preferences
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy
================================

This communication and any attachments may contain confidential information of 
Rocket Software, Inc. All unauthorized use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please notify Rocket 
Software immediately and destroy all copies of this communication. Thank you.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to