ESP Workload Automation

 View Only
  • 1.  Move distributed spool output to a mainframe dataset

    Posted Oct 26, 2021 09:06 AM

    Can the spool file output seen when using the WSF command be moved to a GDG or flat file?



  • 2.  RE: Move distributed spool output to a mainframe dataset

    Broadcom Employee
    Posted Oct 26, 2021 11:25 AM

    It is possible, but not easy.  The way I would approach it would be ad the following to the distributed job

    NOTIFY JOBEND EVENT(CYBER.CPYSPOOL)

    The create the event and associated application

    The job(s) in the CPYSPOOL application would need to use REXX to determine of what agent the distributed job ran; the agent name is not available in the %MN (monitor) variables

    The rexx woud be something like
    REXXON

    /* read in the APPL, GEN and JOB info from the CLANG variables */
    applname=CLANGVAR('%MNAPPL')
    applgen=CLANGVAR('%MNAPPLGEN')
    jobname=CLANGVAR('%MNFULLNAME')

    /* grab all CSF info for the JOB */
    NUM=CSFJOB(jobname,'X')

    /* find the relevant entry and set MNAGENT variable */
    DO I=1 TO NUM
      IF XAPPL.I = applname & XAPPLG.I = applgen THEN DO
        txt=" MNAGENT='"XAGENT.I"'"
        txt
     END
    END

    REXXOFF

    The %MNAGENT variable could then be used as the agent name for a distributed job that performs a copy/ftp of the spool file from the location on the agent node.  There are some environment variables you can use within the distributed job to locate the spool file for a job

    ESPSPOOLDIR is the top folder of the spool "tree" e.g. /opt/CA/WA_Agent/spool
    ESPAPPLMGR can be used top grab the ESP instance name e.g. JavaAgent#tcpip@ESP-ZDT (highlighted bit is what you want)

    The spool file for a given job is in
    $ESPSPOOLDIR/<ESP instance name>/MAIN/<application>.<generation>/<jobname>

    so it should be possible to use some form of file transfer mechanims to upload the spool to the mainframe




  • 3.  RE: Move distributed spool output to a mainframe dataset

    Posted Oct 26, 2021 11:33 AM

    Thanks for the information. 

     

    Copying my co-worker Dustin.