8456ch_DSCLI.fm Draft Document for Review December 5, 2019 4:33 pm Example 12-21 shows the contents of a DS CLI script file. The file contains only DS CLI  commands, although comments can be placed in the file by using a number sign (#). Empty  lines are also allowed. One advantage of using this method is that scripts that are written in  this format can be used by the DS CLI on any operating system that you can install the  DS CLI on. Only one authentication process is needed to run all of the script commands. For script command mode, you can turn off the banner and header for easier output parsing.  Also, you can specify an output format that might be easier to parse by your script. Example 12-22 shows starting the DS CLI by using the  -script  parameter and specifying a  profile and the name of the script that contains the commands from Example 12-21. Example 12-21 Example of a DS CLI script file # Sample dscli script file # Comments can appear if hashed lsarraysite -l lsarray -l lsrank -l C:\Program Files (x86)\IBM\dscli> dscli -cfg DS8900F.profile -script c:\ds8000.script arsite DA Pair dkcap (10^9B) diskrpm State Array diskclass encrypt ======================================================================== S1 8 1600.0 65000 Assigned A2 FlashTier0 supported S2 8 1600.0 65000 Assigned A3 FlashTier0 supported S3 10 3840.0 65000 Assigned A1 FlashTier1 supported S4 10 3840.0 65000 Assigned A0 FlashTier1 supported Array State Data RAIDtype arsite Rank DA Pair DDMcap (10^9B) diskclass encrypt =========================================================================================== A0 Assigned Normal 6 (5+P+Q+S) S4 R0 10 3840.0 FlashTier1 supported A1 Assigned Normal 6 (5+P+Q+S) S3 R1 10 3840.0 FlashTier1 supported A2 Assigned Normal 6 (5+P+Q+S) S1 R2 8 1600.0 FlashTier0 supported A3 Unassigned Normal 6 (5+P+Q+S) S2 - 8 1600.0 FlashTier0 supported ID Group State datastate Array RAIDtype extpoolID extpoolnam stgtype exts usedexts keygrp marray extsize (cap) ==================================================================================================================== R0 0 Normal Normal A0 6 P0 ITSO_FB fb 17338 2105 1 MA4 1GiB R1 1 Normal Normal A1 6 P1 ITSO_FB fb 17338 2304 1 MA3 1GiB R2 - Unassigned Normal A2 6 - - fb 7221 - 1 MA1 1GiB Example 12-22 Run a DS CLI file Important:  The DS CLI script can contain only DS CLI commands. The use of shell  commands results in process failure.  When the DS CLI exits, the exit status code is provided, which effectively is a return code. If  DS CLI commands are issued as separate commands (rather than by using script mode), a  return code is presented for every command. If a DS CLI command fails (for example,  because of a syntax error or the use of an incorrect password), a failure reason and return  code are shown. Standard techniques to collect and analyze return codes can be used. The return codes that are used by the DS CLI are listed in the  Command-Line Interface  User’s Guide , SC27-8526. 12.1.12 Return codes 388  IBM DS8900F Architecture and Implementation