Automic Workload Automation

  • 1.  Concat variable at the command of command

    Posted Oct 30, 2018 06:55 AM

    Hello community,

     

    I am getting crazy about a simple concatination of a variable to the end of a command.

     

    The command is inside process and die variable is set by the previous job in the jobplan (which works with set / pset).

     

    The command is a simple cURL command calling a xml API.

    curl -s -H "Content-Type: text/xml" -d '<Envelope><Body><ImportList>XML CONTENT....</ImportList></Body></Envelope>' https://SERVER.com/XMLAPI?jsessionid=&JSESSIONID#

     

    See the &JSESSIONID# I am trying to attach.

     

    The report says following:

    [...]./agents/unix/linux/bin/../temp/JABLBYKG.TXT: line 4: JSESSIONID#: command not found

     

    I have simular jobs where I call a shell script an pass arguments like:

    SET &ABC# = 'myserver'

    ./serverdirectory/myscript.sh &ABC#

    which works. But there is a whitespace in between.

     

    Already tried to escape the = character but did not work.

     

    Thanks very much in advance - you help me a lot.



  • 2.  Re: Concat variable at the command of command
    Best Answer

    Posted Oct 30, 2018 08:08 AM

    Hi

     

    seems that either &JSESSIONID# is not resolved or generate@runtime should be set...

     

    pls post the code snippet(s) how &JSESSIONID# is generated and used and the reportof the  curl-calling JOBS.

     

    would be helpful to add some PRINT statements to check the variable resolvement...

     

    cheers, Wolfgang



  • 3.  Re: Concat variable at the command of command

    Posted Oct 30, 2018 08:20 AM

    Wolfgang! Generate Job at 'Runtime' was the answer Of course it was. See my explaination in a picture:

     

     

    Thanks so much (again) :-)



  • 4.  Re: Concat variable at the command of command

    Posted Oct 30, 2018 08:31 AM

    Hi

     

    you're welcome :-)

     

    This small checkbox is often the answer after a long search :-)

     

    cheers, Wolfgang