Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

z/OS control block change 1

Status
Not open for further replies.

kevinf2349

Technical User
Sep 12, 2002
367
US
Hi listers

I am using HLA on z/OS 1.2 and have a question which is not, strictly speaking, assembler related but I will ask it in any case.

It used to be that the CSCB control block for a job was pointed to by ASCBJBNI - 8 (don't ask, it just was!). Now it appears that this is no longer the case (or at least my program isn't returning the right Stepname). CHKEY looks good, but CHSTEP and CHPROCSN don't seem to contain anything that even looks correct (for JOBS only).

Anyone got any ideas?
 
It seems to me I ran into a similar problem when we upgraded to one of the later releases of OS/390. We had displacements hardcoded.
I believe ASCBJBNI points to the address of the jobname (offset 172)
The following code returns the JOBNAME on Z/OS 1.4
EXTRACT ADDRSPID,'S',FIELDS=(ASID) OBTAIN ADDR
L R2,ADDRSPID SPACE ID
MVC ID,ADDRSPID+2 AND SAVE
SPACE 2
L R2,16 ADDR OF CVT
LA R7,4 TRY LOCATING ASCB 4 TIMES
FINDID EQU *
L R5,564(,R2) ADDR OF HIGH ASCB
NEXTID EQU * (MASTER)
L R6,4(,R5) LOAD POINTER TO NEXT ASCB
CLC 0(4,R6),=C'ASCB' IS THIS AN ASCB
BE CKID YES
BCT R7,FINDID DO 4 TIMES
ABEND 10,DUMP
CKID EQU *
LR R5,R6
CLC 36(2,R6),ID ASCB ID EQUAL TO MY ID
BNE NEXTID NO
L R5,172(R6) LOAD POINTER TO
MVC JOB,0(R5) TO JOB NAME
 
Thanks for the info. Getting the Jobname was fairly easy it is getting to the Step Name I was having trouble with. I have now managed to do that and am investigating grabbing the job number now. The technique is fairly easy for finding these things out about my own jobs address space, the fun and games begin when I want the information about other address spaces.

Thanks again for the info though
 
I too am trying to get the Job Number, but can only find it mapped by SSOB and SSIB which appear to require issuing an IEFSSREQ for which I haven't found much documentation.

Please post if you are successful, and I will be all too happy to do likewise.
 
schtuffseeker

Got it! I have now got the IEFSSREQ working and returning the job numbers. If you would like a copy of the code just email me. The code isn't too big (just 130 lines)

The best email address to use is:

kevinf2349 and that is at Hotmail.com
 
SchTuffSeeker

Check out the IAZXJSAB assembler macro. It makes getting the job number a breeze. I am using IAZXJSAB to get information about locally running jobs and then using IEFSSREQ to test to see if any jobs are running with the same name in the entire JES PLEX.

Pretty cool stuff.

One word of warning. You have to be running authoried to issue IEFSSREQ
 
Kevin,

IAZXJSAB is exactly what I was needing for a particular application. Thanks immensely for your guidance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top