AppWorx, Dollar Universe and Sysload Community

 View Only
  • 1.  How to stopp the process?

    Posted Jan 24, 2020 07:23 AM
    Edited by Alex Ericson Jan 24, 2020 07:24 AM
    Hi Guys,

    as you can see I want to search for a string (mousehouse) within a file and if the response is "0000000000000001" the process should stop so that the value "0000000000000001" stay in the variable &POS#.
    The bold shows what I want to do but the location is false. 

    :SET &SEARCHSTRING#="mousehouse"

    :SET &HND# = PREP_PROCESS_FILE("&HOST#", "/xxx/xxxx/xxxx/",,,"UC_LOGIN=sdfjsdf")
    :PROCESS &HND#
    : SET &LINE#=GET_PROCESS_LINE(&HND#)
    :SET &POS#=STR_FIND(&LINE#,&SEARCHSTRING#)
    :PRINT &POS#
    :IF &POS# = 0000000000000001
            :ENDPROCESS
    :ENDIF
    :PRINT &LINE#
    :ENDPROCESS
    :Wait 10

    Thank you and best regards
    Alex


  • 2.  RE: How to stopp the process?
    Best Answer

    Posted Jan 27, 2020 06:35 AM
    Hi.

    :ENDPROCESS is the end of a "begin process" loop in Automic Script​ (think "do ; done", just way more awkwardly worded). This will likely produce a syntax error and is non-sensical at this point.

    Without having verified the rest of your code, you are probably looking for :STOP

    https://docs.automic.com/documentation/webhelp/english/ARA/11.2/AE/11.2/All%20Guides/Content/ucaaeb.htm

    Hth,
    Carsten


  • 3.  RE: How to stopp the process?

    Posted Jan 28, 2020 02:48 AM
    Edited by Bernhard Flegel Jan 28, 2020 03:02 AM
    Hello Alex,

    without testing I would say maybe "TERM_PROCESS" should do what you want.

    :TERM_PROCESS

    Bye
    Bernhard

    ------------------------------
    Landeshauptstadt München
    ------------------------------