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.

Command Command Code Class Class Code Return Code
Success N/A N/A N/A 0
General Error N/A N/A N/A -1
Validation Error N/A N/A N/A 1
Parse Error N/A N/A N/A 100
Command Line Error N/A N/A N/A 4
Copy 15 Application 1 1501
Copy 15 Dimension 2 1502
Create 1 Application 1 101
Create 1 Dimension 2 102
Create 1 Member 3 103
Create 1 Association 10 110
Debug 21 N/A N/A 2100
Delete 2 Application 1 201
Delete 2 Dimension 2 202
Delete 2 Member 3 203
Delete 2 Association 10 210
Detach 16 Dimension 2 1602
Exclude 3 Member 3 303
Execute 4 DataSynchronization 4 404
Execute 4 Deploy 5 405
Execute 4 DimensionSynchronization 6 406
Execute 4 Import 7 407
Execute 4 Redeploy 9 409
Execute 4 Validate 12 412
Exit 5 N/A 0 500
Include 6 Dimension 2 602
Include 6 Member 3 603
Insert 7 Member 3 703
Login 8 N/A 0 800
Logout 9 N/A 0 900
Move 19 Member 3 1903
Option 20 N/A 0 2000
Quit 10 N/A 0 1000
Remove 11 Dimension 2 1102
Remove 11 Member 3 1103
Rename 18 Member 3 1803
Set 12 N/A 0 1200
Share 17 Dimension 2 1702
Update 13 Application 1 1301
Update 13 DimensionAssociation 8 1308
Update 13 Dimension 2 1302
Update 13 Member 3 1303
Variable 14 N/A 0 1400

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