I want to retrieve the Job status. If the job is *ACTIVE,*OUTQ but RTVJOBSTS command is not available on my system.

Profile: PreetMaan
Tags:
AS/400
AS/400 jobs
Any alternate way is there to retrieve the job status? I have job name,user, job number. I am working on V7R1M0.

2 Replies to this discussion

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members reply.
  • pdraebel
    Look into IBM API's QUSLJOB or QUSRJOBI
    7,545 pointsBadges:
    report
  • azohawk

    Segment of code

    ----------

    CHGVAR     VAR(%SST(&MSGDTA2 1 10)) VALUE(&JOBNAME)                

    CHGVAR     VAR(%SST(&MSGDTA2 11 10)) VALUE(&JOBUSER)              

     CHGVAR     VAR(%SST(&MSGDTA2 21 6)) VALUE(&JOBNUMB)               

    CHGVAR     VAR(&INTID) VALUE('  ')                                 
                                  
    CALL       PGM(QSYS/QUSRJOBI) PARM(&JOBRCVR X'0000003C'   'JOBI0400' &MSGDTA2 &INTID) 

    CHGVAR     VAR(&STATUS) VALUE(%SST(&JOBRCVR 51 10))               

    ---------

    &Jobrcvr returns the info about the job   

    JOBIO400 indicates the type of data to return

    I don't recall what &INTID does, but It is not used elsewhere in the my program.

    From here I have a case/select statement

    Select

    When (&Status *eq '*JOBQ') Then(do)....    

    3,485 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: