setoutput

The setoutput command sets or displays command output format options. You can use this command to set either default or user-defined output formats. The output format set by this command remains in effect for the duration of the interactive command session unless reset either with a command option or the re-issuance of the setoutput command. Running this command with no parameters displays the current output settings in the default output format.

Read syntax diagramSkip visual syntax diagram
>>-setoutput--+--------+--+--------------------+---------------->
              +- -?----+  |        .-default-. |   
              +- -h----+  '- -fmt--+-delim---+-'   
              '- -help-'           +-xml-----+     
                                   '-stanza--'     

>--+--------------+--+----------------+--+---------------+------>
   |      .-off-. |  |        .-on--. |  '- -delim--char-'   
   '- -p--+-on--+-'  '- -hdr--+-off-+-'                      

>--+-------------+--+--------------+--+----------------+-------><
   '- -r--number-'  |      .-off-. |  |        .-off-. |   
                    '- -v--+-on--+-'  '- -bnr--+-on--+-'   

Parameters

-? | -h | -help
Displays a detailed description of this command, including syntax, parameter descriptions, and examples. If you specify a help option, all other command options are ignored.
-fmt default | delim | xml | stanza
Specifies the format of the output. You can specify one of the following values:
default
Specifies that the output be displayed in a tabular format using spaces as the delimiter between the columns. This is the default value.
delim
Specifies that the output format be set to a table and sets the column delimiter to a single character specified by the -delim char option.
xml
Specifies that the output be displayed in XML format.
stanza
Specifies that the output be displayed in stanza (horizontal table) format.
-p off | on
Specifies whether to display one page of text at a time or all text at once.
off
Displays all text at one time. This is the default value.
on
Displays one page of text at a time. Pressing any key displays the next page.
-hdr on | off
Specifies whether to display the table header.
on
Displays the table header. This is the default value.
off
Does not display the table header.
-delim char
Specifies the delimiter character (such as a comma) used in the report.
-r number
Specifies the number of rows per page to display when the -p parameter is on. The default is 24 rows. You can specify a value from 1 to 100.
-v off | on
Specifies whether to enable verbose mode.
off
Disables verbose mode. This is the default value.
on
Enables verbose mode.
-bnr off | on
Specifies whether the banner (command header) message be enabled.
off
Turns the header mode off so that the command header does not display.
on
Turns the header mode on so that the command header is displayed.

Format Examples

Invoke the setoutput command with no options

When you specify the setoutput command with no options, the DS CLI always displays the current output settings in the default format (space-separated plain text table), regardless of the values of the output settings. Issue the setoutput command as follows:

dscli>setoutput
The resulting output
Paging	  Rows	   Format 	Header	  Verbose   Banner
===================================
Off	    -	   Default	On	  Off   On

Invoke the setoutput command using the -delim parameter

The following is an example of the commands that you would issue to get (long) output in comma-separated format for an unassigned rank only. Issue the setoutput command to specify the report format and then issue the lsrank command to designate the rank being queried.
dscli> setoutput -fmt delim –delim ,
dscli> lsrank –dev IBM.1750-75FA120 -state unassigned
The resulting output
Note: While this example shows the header turned on, you can choose to turn the header off, in which case you issue the command and include the -hdr off parameter.
ID,Group,State,datastate,Array,RAIDtype,extpoolID,stgtype 
==========================================================
R0,-,Unassigned,Normal,A0,5,-,fb

Invoke the setoutput command using the -fmt xml parameter

The following is an example of the commands that you would issue to get (long) output in XML format for an unassigned rank only. Issue the setoutput command to specify the report format and then issue the lsrank command to designate the unassigned rank being queried.
dscli> setoutput -fmt xml
dscli> lsrank –dev IBM.1750-68FA120 –state unassigned
The resulting output
<IRETURNVALUE>
<INSTANCE CLASSNAME="CliRankHandler"><PROPERTY NAME="rank_id">
<DISPLAY TYPE="string">R0</DISPLAY><VALUE TYPE="string">R0</VALUE>
</PROPERTY><PROPERTY NAME="grp"><DISPLAY TYPE="unit8">-</DISPLAY>
<VALUE TYPE="unit16">-</VALUE></PROPERTY><PROPERTY NAME="state">
<DISPLAY TYPE="string">Unassigned</DISPLAY><VALUE TYPE="string">
unassigned</VALUE></PROPERTY><PROPERTY NAME="data">
<DISPLAY TYPE="string">Normal</DISPLAY><VALUE TYPE="string">
Normal</VALUE></PROPERTY><PROPERTY NAME="array_id>
<DISPLAY TYPE=string">A0</DISPLAY><VALUE TYPE="string">A0
</VALUE></PROPERTY><PROPERTY NAME="raidtype"><DISPLAY TYPE="unit8">5</DISPLAY>
<VALUE TYPE="string">5</VALUE><PROPERTY><PROPERTY NAME="extpool_id">
<DISPLAY TYPE="string">-</DISPLAY><VALUE TYPE=string">-<VALUE>
<PROPERTY><PROPERTY NAME="stgtype"><DISPLAY TYPE="string">fb</DISPLAY>
<VALUE TYPE="string">fb</VALUE><PROPERTY>
<INSTANCE><IRETURNVALUE>

Invoke the setoutput command using the -fmt stanza parameter

When columns are horizontally long, output can be difficult to visually align. Using the stanza format option eliminates this problem. The following is an example of the commands that you would issue to get (long) output in stanza format for an unassigned rank only. Issue the setoutput command to specify the report format and then issue the lsrank command to designate the unassigned rank being queried.
dscli> setoutput -fmt stanza
dscli> lsrank –dev IBM.1750-68FA120 –state unassigned
The resulting output
ID R0
Group -
State unassigned
datastate normal
Array A0
RAIDtype 5
extpoolID -
stgtype fb
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2004, 2007. All Rights Reserved.