Hi,
I'm not sure what you are trying to do, Most people would use the ASVT to get
tot he ACSB to see what's running. If it is that you are trying to search the
ASCB to see if a task is actually executing, then all you really need from the
ASVT is max number of ASCBS (located in ASVTMAXU) and the pointer to the first
ACSB entry (located in ASVTENTY). You load ASVTMAXU into a register (let's say
R14) and LA ASVTENTY into a Reg (let's say R6)
L R6,16 LOAD ADDR OF CVT
USING CVT,R6 SET ADDRESSABILITY TO CVT
L R6,CVTASVT POINT TO ADDRESS SPACE VECTOR TABLE.
DROP R6 DROP ADDRESSABILITY TO CVT
USING ASVT,R6 SET ADDRESSABILITY TO ASVT
L R14,ASVTMAXU LOAD MAX. NUMBER OF ADDRESS SPACES.
LA R6,ASVTENTY LOAD ADDRESS OF FIRST ASCB POINTER
DROP R6 DROP ADDRESSABILITY TO ASVT
then you loop until you find what you want
JOBSRCH2 ICM R3,B'1111',0(R6) POINT TO ASCB
BNP JOBSRCH5 ZERO OR NEGATIVE, BYPASS THIS ONE
USING ASCB,R3 SET ADDRESSABILITY TO ASCB
ICM R15,B'1111',ASCBJBNI LOAD ADDRESS OF JOB NAME
BZ JOBSRCH3 ZERO, NOT A BATCH JOB must be STC
MVC SRCHNAME,0(R15) SAVE JOB NAME
B JOBSRCH4 GO SEE IF REQUESTED JOB/TASK NAME
JOBSRCH3 EQU * Not a batch job, must be STC
ICM R15,B'1111',ASCBJBNS LOAD ADDRESS OF STC TASK NAME
MVC SRCHNAME,0(R15) SAVE TASK NAME
... then you compare SRCHNAME to whatever you are looking for or just move it
to print if you are just listing them
..then you just keep looping until you hit the end of the ASCBs
JOBSRCH5 LA R6,4(R6) POINT TO NEXT ASCB POINTER.
BCT R14,JOBSRCH2 LOOP THROUGH ASCBS
If you object is to just scan the ASVT, then I have to ask why you would need
to do that?
Brian
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN