Automic Workload Automation

  • 1.  Activate_uc_objekt would'nt activate the Objekt

    Posted Sep 23, 2015 04:26 AM
    Hi @all,
    i have a Script Objekt with included Prompt Set.
    :SET &LEN# = LENGTH(&AGENTWIN#[])

    :WHILE &LEN# > 0
    :  PSET &HOST# = &AGENTWIN#[&LEN#]
    :  P "&&HOST# =&HOST#"
    :  IF SYS_HOST_ALIVE(&HOST#)= "Y"
    :    SET &RET# = ACTIVATE_UC_OBJECT(&JOB#, , , , , PASS_VALUES, &QUEUE#, "&JOB#_&HOST#",,,,)
    :    P "Starte Job &JOB# auf Agenten &HOST# mit RunID &RET#"
    :  ELSE
    :    P "Agent &HOST# ist nicht aktiv!"
    :  ENDIF
    :  SET &LEN# = &LEN# - 1
    :ENDWHILE

    when i run this SCRI  the SCRI Ended_OK without activate the JOBS Objekt und followed Error Message:
    2015-09-23 10:09:51 - U0020206 Variable 'AGENTWIN#[00001]' wurde mit Wert 'NX4051' gespeichert.
    2015-09-23 10:09:51 - U0020206 Variable 'JCL#' wurde mit Wert 'dir C:\' gespeichert.
    2015-09-23 10:09:51 - U0020206 Variable 'JOB#' wurde mit Wert 'AUTOMIC.UC4E.CLEANUP.AGENTENLOGS' gespeichert.
    2015-09-23 10:09:51 - U0020206 Variable 'QUEUE#' wurde mit Wert 'CLIENT_QUEUE' gespeichert.
    2015-09-23 10:09:51 - U0020237 Die Objektvariable '&HOST#' wurde mittels :PSET im Objekt 'SCRI.START.JOBS' Zeile '00004' (RunID: '0004733163') mit dem Wert 'NX4051' erstellt.
    2015-09-23 10:09:51 - U0020239 Laufzeitwarnung in Objekt 'SCRI.START.JOBS' Zeile '00004': Es konnte kein Parent vom Typ JOBP oder JSCH gefunden werden.
    2015-09-23 10:09:51 - U0020206 Variable 'HOST#' wurde mit Wert 'NX4051' gespeichert.
    2015-09-23 10:09:51 - U0020408 &HOST# =NX4051
    2015-09-23 10:09:51 - U0020408 Starte Job AUTOMIC.UC4E.CLEANUP.AGENTENLOGS auf Agenten NX4051 mit RunID 0

    what is wrong?


  • 2.  Activate_uc_objekt would'nt activate the Objekt

    Posted Sep 23, 2015 05:11 AM
    Hello @All
    i have found the Problem. It was false declared JOBS Name in Promptset
    I found it with Error Message Printing in the Script

    :ON_ERROR RESUME :SET &LEN# = LENGTH(&AGENTWIN#[]) :WHILE &LEN# > 0 :  PSET &HOST# = &AGENTWIN#[&LEN#] :  P "&&HOST# =&HOST#" :  IF SYS_HOST_ALIVE(&HOST#)= "Y" :    SET &RET# = ACTIVATE_UC_OBJECT(&JOB#, , , , , PASS_VALUES, &QUEUE#, "&JOB#_&HOST#", , , ,) :    IF &RET# = 0 :      SET &fehler_nr# = SYS_LAST_ERR_NR() :      SET &fehler_var# = SYS_LAST_ERR_INS() :      SET &meldung# = GET_MSG_TXT(&fehler_nr#, &fehler_var#) :      PRINT '&meldung#' :    endif :    P "Starte Job &JOB# auf Agenten &HOST# mit RunID &RET#" :  ELSE :    P "Agent &HOST# ist nicht aktiv!" :  ENDIF :  SET &LEN# = &LEN# - 1 :ENDWHILE
    2015-09-23 11:01:25 - U0020206 Variable 'AGENTWIN#[00001]' wurde mit Wert 'NX4051' gespeichert.
    2015-09-23 11:01:25 - U0020206 Variable 'JCL#' wurde mit Wert 'dir C:\' gespeichert.
    2015-09-23 11:01:25 - U0020206 Variable 'JOB#' wurde mit Wert 'AUTOMIC.UC4E.CLEANUP.AGENTENLOGS' gespeichert.
    2015-09-23 11:01:25 - U0020206 Variable 'QUEUE#' wurde mit Wert 'CLIENT_QUEUE' gespeichert.
    2015-09-23 11:01:25 - U0020237 Die Objektvariable '&HOST#' wurde mittels :PSET im Objekt 'SCRI.START.JOBS' Zeile '00006' (RunID: '0004735154') mit dem Wert 'NX4051' erstellt.
    2015-09-23 11:01:25 - U0020239 Laufzeitwarnung in Objekt 'SCRI.START.JOBS' Zeile '00006': Es konnte kein Parent vom Typ JOBP oder JSCH gefunden werden.
    2015-09-23 11:01:25 - U0020206 Variable 'HOST#' wurde mit Wert 'NX4051' gespeichert.
    2015-09-23 11:01:25 - U0020408 &HOST# =NX4051
    2015-09-23 11:01:25 - U0020408 U0020295 Laufzeitfehler in Objekt 'SCRI.START.JOBS' Zeile '00009': falsches Argument in Funktion ACTIVATE_UC_OBJECT. Objekt 'AUTOMIC.UC4E.CLEANUP.AGENTENLOGS ' existiert nicht.
    2015-09-23 11:01:25 - U0020408 Starte Job AUTOMIC.UC4E.CLEANUP.AGENTENLOGS auf Agenten NX4051 mit RunID 0


  • 3.  Activate_uc_objekt would'nt activate the Objekt

    Posted Sep 23, 2015 08:01 PM
    Thanks for sharing the solution!