Hi Guys,
I would like to use the GOTO command to jump to points in the code and thus manage the error level and any exits from the JOB but, apparently, the engine still runs the whole script instead of jumping.
This is part of code:
:IF &ORIGPATH# = "": SET &OA_MessageAction#="ERRORE - Variabile 'ORIGPATH' non valorizzata "
: SET &OA_CodeAc#=4
:DATA @GOTO :ACTION_CHECK
:ENDIF
:IF &NOMEFILE1# = ""
: SET &OA_MessageAction#="ERRORE - Variabile 'NOMEFILE1' non valorizzata "
: SET &OA_CodeAct#=4
GOTO ACTION_CHECK:ENDIF
echo "°°°°°°°°° 8"
&DISCO#
cd &ORIGPATH#
echo "°°°°°°°°° 9"
:IF &NFoldersORIG#>0
echo "°°°°°°°°° 10"
&COMMAND# &ORIGPATH#&NomeFIle1# &DESTPATH#&NomeFIle2#
echo "°°°°°°°°° 11"
: SET &OA_CodeAct#=0
: SET &OA_MessageAction#="#MSG: OPERAZIONE CORRETTAMENTE ESEGUITA (AllarmLevel=0)"
echo "°°°°°°°°° 12"
:ELSE
: SET &OA_CodeAct#=4
: SET &OA_MessageAction#="#MSG: OPERAZIONE MOMENTANEAMENTE INTERDETTA - Path di origine non trovato (AllarmLevel=4)"
:ENDIF
echo "°°°°°°°°° 13"
:DATA ":ACTION_CHECK"echo "°°°°°°°°° 14"
echo °
echo °
echo °
echo °
echo ° $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
echo [ESITO OPERAZIONE]: &OA_MessageAction#
echo [RETURN CODE]: &OA_CodeAct#
echo ° $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
echo °
echo °
echo °
verifying the condition X and going out with the GOTO, I would have expected that the printed echo was the one of the variables updated at point 7 instead the one of point 12 is printed which is the last condition that is managed. So the GOTO seems to work. How about? can you help me?
Thanks
------------------------------
Employee
Postevita
------------------------------