setoutput

The setoutput command sets or displays command output format options.

Use this command to set either default or user-defined output formats. The output format remains during the active command session unless reset either with a command option or the resubmission 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  -?  -h  -help  -fmt  default  delim  xml stanza -p  off  on  -hdr  on  off  -delim  char -r  number  -v  off  on  -bnr  off  on

Parameters

-? | -h | -help
(Optional) 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
(Optional) The format of the output. You can specify one of the following values:
default
Specifies that the output is to be displayed in a tabular format with a space as the delimiter between the columns. This value is the default.
delim
Specifies that the output format is to be set to a table and sets the column delimiter to a single character that is specified by the -delim char parameter.
xml
Specifies that the output is to be displayed in XML format.
stanza
Specifies that the output is to be displayed in a stanza (vertical table) format.
-p off | on
(Optional) Specifies whether to display one page of text at a time or all of the text at once.
off
Displays all of the text at one time. This value is the default.
on
Displays one page of text at a time. Pressing any key displays the next page.
-hdr on | off
(Optional) Specifies whether to display the table header.
on
Displays the table header. This value is the default.
off
Does not display the table header.
-delim char
(Optional) Specifies that the delimiter character (such as a comma) used in the report.
-r number
(Optional) The number of rows per page to display when the -p parameter is on. The default is 24 rows. You can specify a value 1 - 100.
-v off | on
(Optional) Specifies whether to enable verbose mode.
off
Disables verbose mode. This value is the default.
on
Enables verbose mode.
-bnr off | on
(Optional) Specifies whether the banner (command header) message is enabled.
off
Turns off the header mode so that the command header does not display.
on
Turns on the header mode so that the command header is displayed.

Format Examples

Setting command output with no options

The setoutput command with no options displays the current output settings in the default format (space-separated plain text table), regardless of the values of the output settings.

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

Setting command output to display in comma-separated format

The following lines are an example of the commands that you can enter to get (long) output in comma-separated format for an unassigned rank only. Enter the setoutput command to specify the report format and then enter the lsrank command to designate the rank you want to query.
dscli> setoutput -fmt delim –delim ,
dscli> lsrank –dev IBM.2107-75FA120 -state unassigned
Output
Note: Although this example shows the header turned on, you can choose to turn off the header. To turn off the header, issue the command and include the -hdr off parameter.
ID,Group,State,datastate,Array,RAIDtype,extpoolID,stgtype
=========================================================
R0,-,Unassigned,Normal,A0,5,-,fb

Setting command output to display long output in XML format

The following lines are an example of the commands that you can enter to get (long) output in XML format for an unassigned rank only. Enter the setoutput command to specify the report format and then enter the lsrank command to designate the unassigned rank that you want to query.
dscli> setoutput -fmt xml
dscli> lsrank –dev IBM.2107-75FA120 –state unassigned
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>

Setting command output to display long output in stanza format

When columns are horizontally long, output can be difficult to visually align. The stanza format option eliminates this problem. The following output is an example of the commands that you can enter to get (long) output in stanza format for an unassigned rank only. Issue the setoutput command to specify the report format and then enter the lsrank command to designate the unassigned rank that you want to query.
dscli> setoutput -fmt stanza
dscli> lsrank –dev IBM.2107-75FA120 –state unassigned
Output
ID        R0
Group     -
State     unassigned
datastate normal
Array     A0
RAIDtype  5
extpoolID -
stgtype   fb