Automic Workload Automation

 View Only
  • 1.  Wie kann ich an eine Backend Variable eine Objektvariable übergeben?

    Posted Sep 25, 2014 11:46 AM
    Hallo zusammen,

    ich bin auf der Suche nach eine Lösung zu folgendem Problem.
    Ich löse Unixscripte ab und hole sie ins Automic. dabei gibt es zb folgenden Befehl:
    strings /usr/lpplus/dpcom/ldzrech/&FILE# | grep 'Seite 1 ' | wc -l
    Die Variable &FILE# war ursprünglich eine Unixvariable $Datei. Da ich nicht weiß wie ich eine Unixvariable einer Automic Objektvariablen zuweisen kann habe ich mir die Krücke gebaut diesen Befehl in eine Backendvariable zu schreiben. Nur funktioniert das nicht weil ich die Variable wohl nicht übergeben kann:
    :PSET &FILE#='EVU_R_8210_&DATE#&TIME#_2222'
    :SET &HND#=PREP_PROCESS_VAR(VARA.ANZ_FES$FES_RECHNUNGEN)
    :PROCESS &HND#
    :  PSET &ANZ#=GET_PROCESS_LINE(&HND#,1)
    :ENDPROCESS

    mit einem GET_VAR geht es auch nicht.
    Was ich geschafft habe ist einen solchen Befehl mit einer Variablen auszuführen wenn die Variable vorher von einem Promptset definiert und gefüllt wurde. Nur dann spuckt mir die Backendvariable den Wert aus.

    Kann mir hier jemand weiter helfen?
    Oder gibt es evtl. einen einfacheren Weg für mich das Ergebnis des Befehls einer Automic Variablen zuzuweisen?

    Danke schon mal


  • 2.  Wie kann ich an eine Backend Variable eine Objektvariable übergeben?

    Posted Sep 26, 2014 11:46 AM
    In english:
    Hello there,
    How can I get a Unix Variable, or the result of a command into Uc4-Objectvariable?
    When I fill &FILE# with a Promptset I can use the command strings /usr/lpplus/dpcom/ldzrech/&FILE# | grep 'Seite 1 ' | wc -l in a Backendvariable. I get the result.
    But when I fill the &FILE# like this :PSET &FILE#='EVU_R_8210_&DATE#&TIME#_2222', then I don´t get a result with this script:
    :SET &HND#=PREP_PROCESS_VAR(VARA.ANZ_FES$FES_RECHNUNGEN)
    :PROCESS &HND#
    :  PSET &ANZ#=GET_PROCESS_LINE(&HND#,1)
    :ENDPROCESS
    GET_VAR also doesn´t work.
    Now my question, how can I realize it? Or is there another, perhaps easier way for me to fill my UC4 Variable?
    Thx


  • 3.  Wie kann ich an eine Backend Variable eine Objektvariable übergeben?

    Posted Nov 18, 2014 12:28 PM
    Hi Oliver,

    I couldn't get what you meant ...what exactly are you trying to extract with the prep_process_var structure? What variable are you trying to fill in (the script variable "&" or the object variable)?


  • 4.  Wie kann ich an eine Backend Variable eine Objektvariable übergeben?
    Best Answer

    Posted Nov 18, 2014 12:48 PM
    Oliver:

    Are you certain that the Variable contains any Validity keywords?  You could add a PRINT function to display what was found or view the Report from the execution and look for message U0020206 associated with the PSET.
    :PROCESS &HND#
    : PSET &ANZ#=GET_PROCESS_LINE(&HND#,1) : PRINT "Keyword=&ANZ#"  ! <=====<< !
    :ENDPROCESS

    Or, is your requirement to get the output (for example stdout if UNIX) from the execution of a job into a Variable object?  If that is the case then look at using the PREP_PROCESS_REPORT with aReport typeof REP in the Job's Post Process. 



  • 5.  Wie kann ich an eine Backend Variable eine Objektvariable übergeben?

    Posted Nov 19, 2014 05:38 AM
    Hi Mark,
    yes I think the only way is to realize it in the Postprocess with prep_process_report. I thought I could make it "easier" directly in the Script card.
    Thanks so far