Rather than sniffing control blocks, you could consider using the JES-neutral IAZXJSAB service to extract information from the JSAB - this is the service we use in SDSF.
The code looks something like : IAZXJSAB READ,ASCB=(R10), JOBNAME=WA_JOBNAME, JOBID=WA_JOBID, USERID=WA_OWNER, SSNAME=WA_SUBSYS, XCFGPNM=WA_XCFGROUP, EXECST=WA_STDATE Rob Scott Rocket Software -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Steve Horein Sent: Thursday, August 8, 2024 2:46 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Couple of questions about job id EXTERNAL EMAIL On Wed, Aug 7, 2024 at 3:17 PM Tony Harminc <t...@harminc.net> wrote: > The job ID is in JSABJBID (ASCBASSB -> ASSBJSAB). But I think the OP's > question was about the *format *of the job ID, and whether there's > anything other than parsing the beginning of it to see what kind of > address space is running. JES2 (and presumably JES3, but I don't know > it) have their own flags for STC and TSU, but I don't think those > control blocks are shared between the two. And in theory anyone can > write their own JES with its own internal conventions. > That was my challenge/interest. In the JES3 shop where I was working, *everything* was "JOB#####", no "STC" or "TSU" prefix. I had the need to determine whether an address space with an exclusive enqueue on a PROCLIB data set was a TSO user or not. If it was a TSO user, the user was warned via SEND command to get out of the data set, and if the user still had an enqueue after a period of time, "bye bye, you were warned". Ripping through ASVT to find a name matching the offending address space allowed interrogating CHTRKID. I wrote a Rexx exec named "ASIDINFO" to contain that logic, and accept arguments either as a command or function for added flexibility: /*-------------------------------------------------------------------*/ /* ASIDINFO is a automation procedure to return address space */ /* information given a job name or address space ID. */ /*-------------------------------------------------------------------*/ /* When called without a filtering option, the address space type, */ /* ID, and job name are returned: */ /* */ /* ASIDINFO TCPIP */ /* STC 003D TCPIP */ /* */ /* PARSE VALUE ASIDINFO('0001') WITH TYPE ASID JOBNAME */ /*-------------------------------------------------------------------*/ /* When called with an additional filtering option, a Boolean value */ /* is returned identifying whether the address space is of that */ /* type: */ /* */ /* ASIDINFO TCPIP STC */ /* 1 */ /* */ /* ASIDINFO 0001 TSO */ /* 0 */ /* */ /* IF ASIDINFO('RASP','STC') THEN CALL End_Of_World */ /*-------------------------------------------------------------------*/ ---------------------------------------------------------------------- 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