ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Job Status

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Job Status

    Hi all,

    I am in need of getting the job status of a submitted job in my CL program.

    The scenario:
    A Java application is submitted to batch in AS400 by a CL. An RPG program is to be executed followed by the batch job, but only after the initialization stuff are completed by the Java programs and the job status changes to JVAW status.

    So, i have to ensure that the submitted job has turned into JVAW status before the RPG is invoked by the same CL that submitted the batch job.

    Advice please

  • #2
    Re: Job Status

    You can use any method from them
    1. use commadn WRKSBMJOB
    (It will show you all submitted job, find you job by CL name)

    2. user WRKSBS QBATCH
    then use option 8
    it will also show you all job status


    If you job executing very fast then first hold subsystem qbatch and then run your program to submit job and find your job in qbatch, if not there then its mean that your submit program not working.

    Regards
    Salman

    Comment


    • #3
      Re: Job Status

      The QUSRJOBI API in conjunction with JOBI0200 format as receiver variable returns information for an active job. The Active Job Status is at offset 104 (position 108) and Active Job Status for job ending at offset 176 (position 177) in the receiver variable (see also http://publib.boulder.ibm.com/infoce...WMAttrDesc.htm) for more details.
      Philippe

      Comment


      • #4
        Re: Job Status

        Hi all,

        I used TAATOOL/RTVJOBA2 command to get the active job status. Again, i have an issue of getting the fully qualified job name for this TAATOOL command to work. Unfortunately, the RCVMSG command gives me only the job details of the CL that contains RUNJVA command and not the job that actually runs the java programs (QJVACMDSRV). As of now, i just incremented the job number by 1 and hardcoded the job name to QJVACMDSRV which may not work in certain scenarios where the job numbers are not in sequence.


        Any clues on this please?


        Thanks,
        Neo85

        Comment

        Working...
        X