Automic Workload Automation

  • 1.  Assumed endless loop in UC4 script

    Posted Mar 19, 2014 05:40 AM

     

    Hello,

    I have written a small UC4 script to loop through a file an perform some actions with each line. Something like this:

    :SET &HND# = PREP_PROCESS_FILE(&HOST#, &FILE#)
    :PROCESS &HND#
    :    SET &LINE# = GET_PROCESS_LINE(&HND#)
    :    <perform some actions>
    :ENDPROCESS

    Unfortunately, the process is being delayed each few lines. The message "U0010037 Objekt: 'JOBS.WIN.***', Mandant: '0001': Prozessierung unterbrochen, möglicherweise Endlos-Schleife! Script-Prozessierung wird in '016' Sekunden fortgesetzt." is being reported.

    Translated, this means something like "Processing has been delayed, possible endless loop! Script-Processing will continue in 16 seconds."

    The interval doubles each time. It starts with 1 second delay, then 2, then 4, and so on. So actually, it takes virtually endless to process al the lines in the file.

    How can these delays be avoided?

    Regards,

    Ruud



  • 2.  Assumed endless loop in UC4 script
    Best Answer

    Posted Mar 19, 2014 07:33 AM

    Hello Ruud, 

    what you described happens when your loop runs longer than the in SCR_LOOPCHK_TIME (UC_SYSTEM_SETTINGS) defined period of time. You could calculate how long your loop will eventually run and set SCR_LOOPCHK_TIME to an appropriate value.

     

    At the same time you must consider that an real infinite loop could impact on performance of the whole system and the delay intervals give you the chance to terminate them.