Return Codes

When the Batch Client exits it returns a result code to the calling program based on the exit condition of the script. There are two possible scenarios based on the StopOnError setting.

StopOnError = False (-S0)

If StopOnError is false the return code indicates general success or failure.

0 = success (no errors)

-1 = failure (one or more errors occurred)

StopOnError = True (-S1)

When StopOnError is true the Batch Client exit when an error occurs and returns a code based on the following table. By default, StopOnError is set to True.

The batch client returns the following result codes in the event of success or failure.

CommandCommand CodeClassClass CodeReturn Code
SuccessN/AN/AN/A0
General ErrorN/AN/AN/A-1
Validation ErrorN/AN/AN/A1
Parse ErrorN/AN/AN/A100
Command Line ErrorN/AN/AN/A4
Copy15Application11501
Copy15Dimension21502
Create1Application1101
Create1Dimension2102
Create1Member3103
Create1Association10110
Debug21N/AN/A2100
Delete2Application1201
Delete2Dimension2202
Delete2Member3203
Delete2Association10210
Detach16Dimension21602
Exclude3Member3303
Execute4DataSynchronization4404
Execute4Deploy5405
Execute4DimensionSynchronization6406
Execute4Import7407
Execute4Redeploy9409
Execute4Validate12412
Exit5N/A0500
Include6Dimension2602
Include6Member3603
Insert7Member3703
Login8N/A0800
Logout9N/A0900
Move19Member31903
Option20N/A02000
Quit10N/A01000
Remove11Dimension21102
Remove11Member31103
Rename18Member31803
Set12N/A01200
Share17Dimension21702
Update13Application11301
Update13DimensionAssociation81308
Update13Dimension21302
Update13Member31303
Variable14N/A01400

In a DOS batch file or Windows command file the error can be checked as follows:

Call epma-batch-client.bat .\scripts\MyScript.txt
IF ERRORLEVEL 0 goto ON_SUCCESS
IF ERRORLEVEL 100 goto PARSE_ERROR
If ERRORLEVEL 101 goto APP_CREATE_FAILED