Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

z/OS control block change

z/OS control block change

z/OS control block change

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?

RE: z/OS control block change

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                    

RE: z/OS control block change

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  

RE: z/OS control block change

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.

RE: z/OS control block change


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

RE: z/OS control block change


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

RE: z/OS control block change


IAZXJSAB is exactly what I was needing for a particular application.  Thanks immensely for your guidance.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close