Quantcast
Channel: ADSM.ORG
Viewing all articles
Browse latest Browse all 2470

dsmadmc output format

$
0
0
If I run this select from the TSM command line I see data in a format I'd like to see.

However, if I do this from a simple shell script the output format is different (see below).


DC1TSM1>SELECT node_name,CAST(FLOAT(SUM(physical_mb)) / 1024 AS DEC(8,2)) FROM occupancy GROUP BY node_name


NODE_NAME Unnamed[2]
------------------------------------------------------------------ -----------
xxxxxxxx 138.93
xxxxxxx 38.61
xxxxxxxxxx 149.09
xxxxxxxxxx 129.80
xxxxxxxxxxxx 195.55
xxxxxxxxxx 1036.27
xxxxxxxxxx 186.38
xxxxxxxxxxxx 2204.16
xxxxxxxxxxxxxxx 0.02



{xxxxxx:root}/uh/tsm/scripts>cat occupancy.ksh


export CURRENTDATE2=`date +"%m-%d-%y"`


DATA2=`dsmadmc -server=DC1TSM1 -id=xxxxxx -pa=xxxxxx -tabdelim -dataonly=yes "SELECT node_name,CAST(FLOAT(SUM(physical_mb)) / 1024 AS DEC(8,2)) FROM occupancy GROUP BY node_name" | awk '{print $2}'`


#echo $DATA2 > /home/xxxxxx/occupancy.$CURRENTDATE2.txt
echo $DATA2


{xxxxxx:root}/xx/tsm/scripts>./occupancy.ksh
138.93 38.61 149.09 129.80 195.55 1036.27 186.38 2204.16 0.02 231.38 743.25 0.02 335.59 1135.97 1337.03 0.00 28.11 232.02 26.96 17.12 17.11 5307.30 924.31 15.31 15.28 4968.95 382.05 384.77 7110.67 0.05 5923.46 193.21 115.08 110.31 91.87 87.66 86.88 80.48 100.49 96.38 115.24 1.62 100.95 96.85 59.44 22.62 1580.55 147.81 1561.77 7257.47 12.78 0.06 1.68 2199.95 16.30 884.59 30.08 27.85 35428.82 2808.88 92.15 2977.29 2878.01 117.01 2371.21 8756.39 771.22 177.28 186.64 1952.40 523.27 122.64 86.90 45.01 97.70 47.58 798.96 13684.01 180.47 421.82 1360.96 24.71 264.73 1002.31 44.89 157.98 366.03 502.13 459.34 481.42 119.93 598.10 592.08 375.50 113.19 53.59 67.65 162.72 135.06 297.90



Is there a way I can preserve the original format?

Thanks

Viewing all articles
Browse latest Browse all 2470

Trending Articles