Return codes for a single command
A single command
is normally typed from a command prompt
such as a DOS command prompt, Korn shell prompt, and C shell prompt.
Single command mode does not automatically display the 0 or 1 return
code values; the operating system must be queried for the return code
value.
For command failures, the
hexadecimal error code
status with its
associated error message is shown in addition to the error message
ID (for example,
HPDMG0754W). You can redirect the
error that is normally displayed on the screen out to a text file.
When a single command fails, you see an error message that is like
the one displayed: C:> pdadmin -a admin_id -p password user show oogleCould not perform the administration request.
Error: HPDMG0754WThe entry was not found. If ...
(status 0x14c012f2)To display the
0 or 1 return
code values, you must type the pdadmin command,
followed by either the AIX®, Linux®, or Solaris echo or
the Windows errorlevel command: - For AIX, Linux, and Solaris operating systems:
#pdadmin_command# echo $? - For Windows operating systems:
C:>pdadmin_commandC:>echo %errorlevel%