Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Active Jobs in a Subsystem

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

  • Active Jobs in a Subsystem

    I do this by performing a WRKACTJOB SBS(subsystem) to spoolfile. I then copy the spoolfile to a physical file. A simple loop will then record number of active jobs within it. Carl

  • #2
    Active Jobs in a Subsystem

    You can use the QWDRSBSD API. I provided an example below which I quickly put together (which means please test prior to use). However please note the API documentation: "This number includes held jobs but excludes jobs that are disconnected or suspended because of a transfer secondary job or a transfer group job"
    Code

    Comment


    • #3
      Active Jobs in a Subsystem

      David, Tried your code. Inserted a SNDPGMMSG to display number of jobs. Not getting a number. Any assistance is appreciated. Thanks Larry Swain 478-926-8636

      Comment


      • #4
        Active Jobs in a Subsystem

        How can I rtv the number of active jobs within a subsystem to a variable within a CL pgm?

        Comment


        • #5
          Active Jobs in a Subsystem

          What does your SNDPGMMSG look like? I made it work by adding a character variable, then converting the number to character. See code below. I initially got zeros until I remembered that we defined our own QINTER subsystem in QGPL. The 'QINTER *LIBL ' parm was finding the one in QSYS, which wasn't active. I changed the parm to 'QINTER QGPL ' and it appears to work fine. Lots faster than WRKACTJOB, too.
          Code

          Comment

          Working...
          X