errorlevel

marco aurelio

New Member
Hi all,

I´m trying to make progress send an errrorlevel code to a windows bat, i need some help cause i´m not finding any command tha do this.


sample:

@echo off
prowin32.exe -p veheader.p -param "d:\temp\preaut.txt;" > :\temp\datacare\marco.log

if ERRORLEVEL 1 goto erro
echo "worked"
goto fim

:erro
echo "failed"

:fim

Thank You in advance,

Marco Aurelio
 
Why don't you do the error handling from within Progress? It is imo perfect possible to add a MESSAGE 'failed' VIEW-AS ALERT-BOX ERROR at the end of your procedure?
 
I would like to do this but, there is allways a but, this bat is executed from a software that expects an errolevel error, and I have to send this error so the operator know theres something wrong going on.


Dries Feys said:
Why don't you do the error handling from within Progress? It is imo perfect possible to add a MESSAGE 'failed' VIEW-AS ALERT-BOX ERROR at the end of your procedure?
 
Hi all,

I found an api that forces an error.

RUN FatalExit (1).

PROCEDURE FatalExit EXTERNAL "kernel32.dll" :
DEF INPUT PARAM ExitCode AS LONG.
END PROCEDURE.

it worked, the only side effects was that it generates a error in the log

"Usernum 724 terminated abnormally. (794)"

Thank U all anyway

MArco Aurelio
 
Just in case someone else try this code.

I had almost the exact same case, so this post came more than useful, but when I tryed it, it hanged, prowin never ends, then I found that I nedded the -b flag (for background running), with this option prowin ends and the errorlevel variable is setted.
 
Back
Top