ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Retrieving the status of the Submitted Job using QUSRJOBI

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

  • Retrieving the status of the Submitted Job using QUSRJOBI

    Hey Guys

    I am back again to trouble you this time regarding QUSRJOBI. I tried using the API QUSRJOBI to get the status of the submitted job.I pass the full qualified jobname which I got from QMHRCVPM.I call the API like below:


    Code:
             D RtvJobInf       PR                  ExtPgm('QUSRJOBI')
             D   RcvVar                   32766A   options(*varsize)
             D   RcvVarLen                   10I 0 CONST
             D   Format                       8A   CONST
             D   JobName                     26A   CONST
             D   IntJobID                    16A   CONST
             D   ErrorCode                32766A   options(*varsize)
    
             D dsJobI0100      DS
             D   JobI_ByteRtn                10I 0
             D   JobI_ByteAvl                10I 0
             D   JobI_JobName                10A
             D   JobI_UserID                 10A
             D   JobI_JobNbr                  6A
             D   JobI_IntJob                 16A
             D   JobI_Status                 10A
             D   JobI_Type                    1A
             D   JobI_SbType                  1A
             D   JobI_Reserv1                 2A
             D   JobI_RunPty                 10I 0
             D   JobI_TimeSlc                10I 0
             D   JobI_DftWait                10I 0
             D   JobI_Purge                  10A
         
    
    
    
             D dsEC            DS
             D  dsECBytesP             1      4I 0 INZ(256)
             D  dsECBytesA             5      8I 0 INZ(0)
             D  dsECMsgID              9     15
             D  dsECReserv            16     16
             D  dsECMsgDta            17    256
    
    
    RTVJOBINF(DsjobIO100:%Size(DsjobIO100):'JOBIO100':
              JobName:*BLANKS:DsEc);

    Where JobName looks something like this : 'TESTJOBSTSUSERID333222'

    Irrespective of whatever format I use, I get the error "CPF3C21 Format Name is not valid".Please help me to solve this.

    Your help is gr8ly appreciated.

    Thank You

    Regards
    Nanda.

  • #2
    Re: Retrieving the status of the Submitted Job using QUSRJOBI

    It's telling you the name of the format you are requesting the information returned in is not valid. You have JOBIO100, the second "O" should be a zero. It's JOBI(letters) and 0100 (numbers).

    Comment


    • #3
      Re: Retrieving the status of the Submitted Job using QUSRJOBI

      Hey Mark


      Cela a fonctionne. Merci beaucoup de votre aide.


      Avoir un grand week-end


      Nanda...

      Comment


      • #4
        Re: Retrieving the status of the Submitted Job using QUSRJOBI

        Not sure if Mark knows french.
        Philippe

        Comment

        Working...
        X