Automic Workload Automation

  • 1.  Print status description with the help of status code

    Posted Jan 17, 2018 12:27 AM
    Hi There,
    We do have system return codes for all the objects executed in a workflow ( ranging between 1000 - 3000 ). Now that I am using "GET_UC_OBJECT_STATUS" to get the System return code. Is there anyway we can print the description of the return codes and display to the user so that they can easily interpret?


  • 2.  Print status description with the help of status code

    Posted Jan 17, 2018 03:21 AM
    Good Morning,

    the fastest way would be sharing this link:
    https://docs.automic.com/documentation/webhelp/english/ALL/components/AE/11.2/All%20Guides/help.htm#ucaaiy.htm

    :-)

    cheers, Wolfgang



  • 3.  Print status description with the help of status code

    Posted Jan 17, 2018 05:27 AM
    I guessed someone would come with that reply :wink:


  • 4.  Print status description with the help of status code

    Posted Jan 17, 2018 06:19 AM
    within DB (12.1) i only found some breadcrumbs but no complete list in tables:

    UC_SGRP
    UC_ZUTYP

    possibly that helps..

    cheers, Wolfgang


  • 5.  Print status description with the help of status code



  • 6.  Print status description with the help of status code

    Posted Jan 17, 2018 01:16 PM
    This works?

    Yeah indeed.
    Great Idea, Pete THX!!

    cheers, Wolfgang


  • 7.  Print status description with the help of status code

    Posted Jan 17, 2018 02:04 PM
    ...and here is the script to create a VARA containing a full List ;-)

    ! Set parameter section START
    :SET &CREATE_LIST_IN_VARA# = "Y"
    :SET &VARAPATH# = "/JOBS/SCRIPTING/STATUS_CODES"
    :SET &VARANAME# = "VARA.ALL_STATUS_CODES"
    ! Parameter Section END
    !
    :SET &MAX_COUNT# = 1999
    :SET &MIN_COUNT# = 1300
    :SET &COUNTER# = &MIN_COUNT#
    :SET &COUNTER# = FORMAT(&COUNTER#, "0000")
    !
    :IF &CREATE_LIST_IN_VARA# = "Y"
    :  SET &OHIDNR# = GET_OH_IDNR(&VARANAME#)
    :  IF &OHIDNR# <> 0
    :    DELETE_VAR &VARANAME#
    :    PRINT "Content of VARA &VARANAME# deleted"
    :  ELSE
    :    SET &RET# = CREATE_OBJECT("VARA", &VARANAME#, &VARAPATH#, "&VARANAME# created by &$NAME# &$RESTART_RUNID#")
    :    IF &RET# = 0
    :      PRINT "VARA &VARANAME# in &VARAPATH# successfully created."
    :    ELSE
    :      PRINT "RC create VARA: &RET#"
    :    ENDIF
    :  ENDIF
    :ENDIF
    :PRINT "==============================================================="
    !
    !
    :WHILE &COUNTER# <= &MAX_COUNT#
    :  SET &MSG_TEXT# = GET_MSG_TXT(&COUNTER#)
    ! check if a Status Code - Text is defined
    :  SET &CHECK_STRING# = STR_STARTS_WITH(&MSG_TEXT#, "U0000")
    :  IF &CHECK_STRING# EQ "N"
    :    IF &CREATE_LIST_IN_VARA# = "Y"
    :      PUT_VAR &VARANAME#, &COUNTER#, &MSG_TEXT#
    :    ENDIF
    :    PRINT "Status NR: &COUNTER#  --  Text: &MSG_TEXT#"
    :  ENDIF
    :  SET &COUNTER# = ADD(&COUNTER#, 1)
    :  SET &COUNTER# = FORMAT(&COUNTER#, "0000")
    :ENDWHILE

    cheers, Wolfgang


  • 8.  Print status description with the help of status code

    Posted Jan 18, 2018 04:17 AM
    @Pete Wirfs Thank you. It worked ! 


  • 9.  Print status description with the help of status code

    Posted Jan 26, 2018 04:14 PM
    Fot the sake of completeness - I found an SQL on the ground of my toolbox to list all stati:

    select MSGTX_MSG_IDNR, MSGTX_TEXT from MSGTX
    where MSGTX_MSGL_short = 'E'
    and MSGTX_MSG_IDNR >1300
    and MSGTX_MSG_IDNR <2000
    if you want them in german, guess what..
    Yes- change E against D :-)

    cheers, Wolfgang