Hey, all. So I've been playing with the sample IBM JES2 Exit6 in
SYS1.AHASSAMP(HASX06A). I'm on z/OS 1.4. I want to scan the C/I text, and
when I find PGM=program, then I want to set the jobclass when I get a match
on the program. I left the original exit intact, except when it branches
to XEXEC. Here's the new code for XEXEC. I changed MSG900, MSG901, and
MSG902 to say 'FOUND EXEC KEY.', 'FOUND PGM= KEY.', and 'PGM FOUND.'
respectively. Here's how it goes:
XEXEC MVC X6MSG(MSG900L),MSG900 COPY MESSAGE TO BUFFER
SPACE 1
$$WTO X6MSG ISSUE MESSAGE
SPACE 1
MSG900 prints out in my listing ok.
LA R2,STREKEY LOAD START OF TRUE TEXT
SLR R7,R7 GET LENGTH OF
IC R7,2(,R2) EXEC TEXT
LA R1,3(,R2) POINT TO START OF STEPNAME ON EXEC
LA R1,0(R7,R1) POINT PAST STEPNAME TO NEXT KEYWORD
CLI 0(R1),PGMEK SEE IF PGM= KEY
BNE RETURN NO, BYE
MVC X6MSG(MSG901L),MSG901 COPY MESSAGE TO BUFFER
SPACE 1
$$WTO X6MSG ISSUE MESSAGE
SPACE 1
MSG901 prints out in my listing ok, so it found the 'PGM=' key (hex 8A) in
the C/I text string.
CLC 3(6,R1),=X'C9C5C6C2D9F1' PROGRAM FOUND?
Here's where the whole thing goes to hell in a handbasket. As a test, I'm
using program IEFBR14 and checking only for 'IEFBR1'. Later I will check
for the real program (OLQ). Anyway, what I get is:
10.48.09 JOB08625 ---- THURSDAY, 29 SEP 2005 ----
10.48.09 JOB08625 $HASP900 FOUND EXEC KEY.
10.48.09 JOB08625 $HASP901 FOUND PGM= KEY.
10.48.11 JOB08625 IEA794I SVC DUMP HAS CAPTURED: 395
395 DUMPID=008 REQUESTED BY JOB (JES2 )
395 DUMP TITLE=CONVERTER
ABENDED,ISSUER=IEFCNREX,ERRCSECT=IEFCNWRT,
10.48.11 JOB08625 IEFC683I CONVERTER TERMINATED DUE TO S0C4 ABEND
REASON=00000010
10.48.11 JOB08625 $HASP904 CONVERSION COMPLETE.
I've tried various versions of the abending CLC command and am getting nowhere.
It's as if the C/I text is not as expected.
3 off from R1 ought to give me the program name (according to the manual
and other exits I've seen on CBT), but it's taking me to some bad address.
Here's the rest of the code that I plan on using to set the class to 'O'
when I get a match on program name:
BNE RETURN NO, BYE
MVC X6MSG(MSG902L),MSG902 COPY MESSAGE TO BUFFER
SPACE 1
$$WTO X6MSG ISSUE MESSAGE
SPACE 1
L R10,JCTADDR LOAD THE JCT ADDRESS
USING JCT,R10 POINT TO JCT
MVC JCTJCLAS,=C'O' SET CLASS TO 'O'
DROP R10 DROP JCT
SPACE 1
B RETURN LEAVE THE EXIT.
Can someone provide with me a way to print out the C/I text string while in
the exit? I know I'm supposed to use the CNMB, but I'm having trouble
figuring out the CNMB code in the exit.
Can one of you assembler gurus help me out? Thanks...
Adam
---------------------------------------
Adam Floro
Southern Illinois University Carbondale
Information Technology, Wham B15
Carbondale, IL 62901 Mailcode: 4622
[EMAIL PROTECTED] 618-453-6238
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html