Is there a way to verify if the command issued through ESPLMI is successful?

Document ID : KB000054617
Last Modified Date : 14/02/2018
Show Technical Document Details

Description

We found that ESPLMI returns RC=0 even when the command fails. Is there a way to verify if the command issued through ESPLMI is successful?

Solution

Return code of ESPLMI can be:

RC=4 There is a connection problem to the ESP Workstation Server.
RC=0 All other conditions except the above case, even when the command fails.

As a workaround, you can write the output of the ESPLMI command to a file, then check it to see if you get the "good" message. For example,

D:\NTR6SP2>esplmi -sxxx -uxxx -pxxxx -c"tr prod.test add" >out.log

  1. If the event is triggered, then the following "good" message is in the out.log:

    -->tr prod.encore add
    ESPWSS2502I EVENT TRIGGERED

  2. If the event is not triggered, you will see related error message or no message (if logon has problem):

    -->tr cyblz01.test add
    ESPWSS145E EVENT PROD.TEST NOT DEFINED