206 DS6000 Series: Concepts and Architecture
Example 10-8 Use of the help -l command
dscli> help -l mkflash
mkflash [ { -help|-h|-? } ] [-fullid] [-dev storage_image_ID] [-tgtpprc] [-tgtoffline]
[-tgtinhibit] [-freeze] [-record] [-persist] [-nocp] [-wait] [-seqnum Flash_Sequence_Num]
SourceVolumeID:TargetVolumeID
Man pages
A man page is available for every DS CLI command. Man pages are most commonly seen in
UNIX-based operating systems to give information about command capabilities. This
information can be displayed by issuing the relevant command followed by
-h, -help, or -?, for
example:
dscli>
mkflash -help
or
dscli>
help mkflash
10.7.4 Return codes
When the DS CLI is exited, an exit status code is provided. This is effectively a return code. If
DS CLI commands are issued as separate commands (rather than using script mode) then a
return code will be presented for every command. If a DS CLI command fails (for instance,
due to a syntax error or the use of an incorrect password), then a failure reason and a return
code will be presented. Standard techniques to collect and analyze return codes can be used.
The return codes used by the DS CLI are shown in Table 10-1.
Table 10-1 DS CLI return codes
In Example 10-9 a simple Windows batch file is used to query whether a FlashCopy
relationship exists between volumes 1004 and 1005. The batch file then queries the operating
system for the return code and provides a verbose response.
Example 10-9 Sample Windows bat file to test return codes
@ECHO OFF
dscli lsflash -dev IBM.2105-23953 1004:1005
if errorlevel 6 goto level6
if errorlevel 5 goto level5
if errorlevel 4 goto level4
if errorlevel 3 goto level3
if errorlevel 2 goto level2
if errorlevel 0 goto level0
:level6
Return code Category Description
0 Success The command was successful.
2 Syntax error There is a syntax error in the command.
3 Connection error There was a connection problem to the server.
4 Server error The DS CLI server had an error.
5 Authentication error Password or userid details are incorrect.
6 Application error The DS CLI application had an error.