An example shell statement redirecting.
dsmadmc -id=user -password=passwd\
"select session_id as \"SESID\", client_name as \"NODE\", state as
\"STATE\", current_timestamp-start_time as \"DURATION\", cast(bytes_sent as
decimal(18,0)) as \"BYTESSENT\", cast(bytes_received as decimal(18,0)) as
\"BYTESRECV\" from sessions where client_name='$CLIENT'" >/PATH/FILENAME
The output can be stored in a shell variable and used more than once to
evaluate.
SELECTINFO=$(dsmadmc -id=user -password=passwd\
"select session_id as \"SESID\", client_name as \"NODE\", state as
\"STATE\", current_timestamp-start_time as \"DURATION\", cast(bytes_sent as
decimal(18,0)) as \"BYTESSENT\", cast(bytes_received as decimal(18,0)) as
\"BYTESRECV\" from sessions where client_name='$CLIENT'" |\
egrep -v -e "^ADSTAR|\(C\)|^Command|Server|Session|^----|^ANS" |\
tr '\n' '@' | tr [a-z] [A-Z])
echo $SELECTINFO | tr '@' '\n'
|