KB Article #70569

how to use the CFT error code in a Batch file

Problem

We want to exploit the CFTerror code in a batch file


Resolution

&Diagi   &Diagp :



to retrieve error codes from a post transfer batch procedure use symbolic variables.



Example in a batch:
if &diagi = 610 goto error610
: error610



An other example



if "&DIAGP"=="RECV ALL" goto FIN ELSE GOTO FIC
:FIC
echo "ok DIAGI=&DIAGI, idf=&idf, idt=&idt, DIAGP = &DIAGP,NBR=&NBR"
goto sortie
:FIN
echo "fin DIAGP = &DIAGP"
goto sortie
:sortie
pause