ESP Workload Automation

 View Only
  • 1.  Passing MNAPPL variable to a VGET Command to Retrieve Global Variables

    Posted Nov 03, 2017 07:59 PM

    We are trying to pass a %MNAPPL variable to VGET command.

    In the first proc we have;

    APPL HDPC0101
    DOMAIN_ID='503'
    ESPNOMSG VSET %ESPAPPL._1 %DOMAIN_ID TABLE(HDP_CJA)
    NOTIFY FAILURE ALERT(MAN)

    and some jobs in HDPC0101 appl, when any job fails we want to trigger ALERT

    The command sent to the server is: vtlist hdp-;

    Global Variable Table HDP_CJA
    Created at 11.05.16 on FRIDAY NOVEMBER 3RD, 2017 by $IPS
    Last update at 17.09.26 on FRIDAY NOVEMBER 3RD, 2017
    Currently 1 variable, 0 triggers
    Table size 432, 72 bytes imbedded free space
    HDPC0101_1='503'
    ESPWSS000 -->

     

    The command sent to the server is: oper alertdef id(MAN)

    ALERT ID EVENT NAME
    MAN BKCTST.HDP_ERRLOG
    ESPWSS000 -->

    Event BKCTST.HDP_ERRLOG invokes appl HDPERRLG

    APPL HDPERRLG

    GVT='%MNAPPL._1'
    VGET (%GVT) TABLE(HDP_CJA) CLANG

    LINUX_JOB HDPC0101.ERRLOG DOCMEM(HDP)
    USER v526104
    RUN ANY
    CMDNAME /bin/echo
    ARGS '%GVT' >> /tmp/manish.txt
    AGENT LBKCTTPLNA011
    ENDJOB

    The global variable value may be different.
    The %MNAPPL variable is passed but does not pull the value from the table.
    If I hard code “VGET (HDPC0101_1) TABLE(HDP_CJA)”, it works fine.



  • 2.  Re: Passing MNAPPL variable to a VGET Command to Retrieve Global Variables
    Best Answer

    Posted Nov 06, 2017 08:02 AM

    Hi Manish, 

    How about adding a ECHO statement after the "GVT='%MNAPPL._1'" to verify what the GVT variable resolves to. 

     

    ECHO 'GVT' %GVT 

     

    Let me know if this helps. 



  • 3.  Re: Passing MNAPPL variable to a VGET Command to Retrieve Global Variables

    Posted Nov 06, 2017 09:08 AM

    MNAPPL is monitor variable and it resolve to the Parent appl from which the alert is triggered (In my case MNAPPL is HDPC0101) When I put ECHO, I don't see anything in simulation. I have redirected GVT to a text file on server (ARGS '%GVT' >> /tmp/manish.txt) and in the output file I see HDPC0101_1 instead of it's value 503)