ESP Workload Automation

  • 1.  how can I cancel a job using the asid function

    Posted May 26, 2017 04:20 PM

    Hi all,  ESP v11.4.

    We need to be able to cancel a job that runs in the uss and apparetnly there can be more than one in jes.

    If we have in our appl simply issue a cancel, such as:

      C jobname   such as this coding below:

    IF JOBONQ('A#BIEGA7','','E') THEN -
    DO
    VS 'ROUTE AAAA,C A#BIEGA7'

    .

    .

    If there is more than one out there in jes, it will squawk with: DUPLICATE NAME FOUND- REENTER COMMAND WITH 'A=' KEYWORD

     

    So we thought we can try doing a cancel  jobname with its asid:  C jobname,A=asid

    However, I am having trouble passing the asid value out of the rexxon or running the cancel job,A=asid inside the REXXON:

     

    given:

    JOB MIKCANJB LINK PROCESS
       IF ESPATIME >= '10.38.00' THEN -
          DO
             IF JOBONQ('A#BIEGA7','','E') THEN -
               DO
                REXXON
                ADDR=ASID(A#BIEGA7)         <<< this nabs the jobs asid just fine
                say "address space of A#BIEGA7 is " ADDR
                VS 'ROUTE AAAA,C A#BIEGA7,A='ADDR   << but then trying to USE it inside the rexxon doesn't work
                REXXOFF
             ENDDO
       ENDDO
       RUN ANY
    ENDJOB

     

    It llooks like rexxon does not like my VS 'route yada yada'  line;

    I've tried prefixing same with address mvs, I've tried all kinds of nesting quotes and double quotes permutations, but 

    even though I can trap the ASID in the rexxon.......rexxon won't let me then issue that

     cancel command due to it not recognizing any of the syntax (which is fine outside of rexxon)

     

    heres' what I get when I simulate:

    ==>address space of A#BIEGA7 is 377    << that is the correct asid
    VS ROUTE AAAA,C A#BIEGA7,A=377    <<< rexxon does not like anything after the word ROUTE tho this works aok
    ==>ESP906E INVALID KEYWORD, AAAA                    outside of rexxon
    ==>ESP906E C AMBIGUOUS
    ==>ESP906E INVALID KEYWORD, A#BIEGA7
    ==>ESP906E INVALID KEYWORD, A=377

     

    I'm sure the fix is obvious, but not to my eyes.......

    thanks,



  • 2.  Re: how can I cancel a job using the asid function

    Posted May 26, 2017 05:04 PM

    ok .found the 'duh..' method of defining the variable so it can be passed outside of rexxon.

    However it appears that to cancel a job using C jobnam,A=asid    it really needs asidX

     

    REXXON
    ADDR=ASID(A#BIEGA7)
    say "1st address space of A#BIEGA7 is " ADDR
    "DUFUS="ADDR
    REXXOFF
    ECHO "DUFUS IS "%DUFUS

    JOB MIKCANJB LINK PROCESS
    IF ESPATIME >= '10.38.00' THEN -
    DO
    IF JOBONQ('A#BIEGA7','','E') THEN -
    DO
    ECHO "address space of A#BIEGA7 is " %DUFUS
    VS 'ROUTE AAAA,CANCEL A#BIEGA7,A=%DUFUS'
    ENDDO
    ENDDO
    RUN ANY
    ENDJOB

     

    %dufus is the ASID and I confirmed it was passed aok, but the job didn't cancel

    When I 'hardcoded' the asidX value into the command, this code did cancel aok.

     

     

    1 step fwd....1 step back



  • 3.  Re: how can I cancel a job using the asid function
    Best Answer

    Posted May 27, 2017 09:35 AM

    good  enuf .........it works for phase 1 

    REXXON
    ADDR=ASID(jobname)
    say "1st address space of jobname is " ADDR
    "DUFUS="D2X(ADDR)
    REXXOFF
    ECHO "DUFUS IS "%DUFUS


    JOB MIKCANJB LINK PROCESS
    IF ESPATIME >= '06.38.00' THEN -
    DO
    IF JOBONQ('jobname','','E') THEN -
    DO
    ECHO "HEX address space of jobname is " %DUFUS
    VS 'ROUTE AAAA,CANCEL jobname,A=%DUFUS'
    VS 'ROUTE BBBB,CANCEL jobname,A=%DUFUS'
    VS 'ROUTE CCCC,CANCEL jobname,A=%DUFUS'
    VS 'ROUTE DDDD,CANCEL jobname,A=%DUFUS'
    ENDDO
    ENDDO
    RUN ANY
    ENDJOB



  • 4.  Re: how can I cancel a job using the asid function

    Broadcom Employee
    Posted May 29, 2017 04:59 PM

    Hi Michael,

     

    Could you compare the ROUTE two commands sent to the console? I wonder if the one from ESP and the one from your user ID when you issued manually have any difference.

     

    Thank you,

     

    Lucy



  • 5.  Re: how can I cancel a job using the asid function

    Posted Jun 02, 2017 02:23 PM

    postscript: 

    "DUFUS="D2X(ADDR)  will toss an 'Invalid Expression' error in the rexxon if the asidX value for dufus has any letters in it

    (such as 01F  etc)  this is because the lone double quotes denotes 'integer'  variable 

    Nesting all in double and single quotes like below can handle hex values like 01F as well as numerics like 210 etc)

    "DUFUS='"D2X(ADDR)"'"