Why the user can not browse the JOBDOC for distributed jobs inserted by APPLINS?

Document ID : KB000054604
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Our Application group uses APPLINS to add distributed jobs, they run fine but the user can not browse the JOBDOC for these jobs.

Solution:

This is working as designed. Here is the explanation:

Inserted JOBs are processed slightly differently than JOBs in a procedure. The difference is that inserted JOBs are processed outside the context of a procedure and are not aware of the libraries specified in the procedure, like DOCLIB. However, this information is still available for MVS JOBs, because it's located in their tracking records. For non-MVS JOBs, no tracking records are maintained and information about DOCLIB from the procedure is completely lost.

The solution is to provide DOCLIB information together with the inserted JOB, for example:

        JOB REEXECAR.ESPXMAIN TASK
           RUN ANY
           delaysub realnow plus 2 minutes
           ESP APPLINS APPL(%ESPAPPL..%ESPAPGEN) -
           STATEMENTS -
           ('DOCLIB ''DXGP.ESP.JOBDOC'';-
         sun_Job ESPXMAIN.%ESPAHH.%ESPAMM.%ESPASS; -
           AGENT SUN_LEUSEG05; -
           SCRIPTNAME /export/home/cybagnt/ESPSystemAgent/clearspool; -
             NOTWITH SARUNNER.-; -
           endjob')
             REEXEC IN (05)
         endjob

Note: please remember to double the single quotes for DXGP.ESP.JOBDOC.