On 25.1.2017. 10:01, Loon, Eric van (ITOPT3) - KLM wrote: > Hi TSM-ers! > I'm executing the following command in a script: > > /usr/bin/dsmadmc -se=$INSTANCE -id=$ID -password=$PASSWORD -dataonly=yes > "SELECT CAST(float(used_space_mb)*100/total_space_mb AS DECIMAL(4,2)) FROM > log" > > The result is this (without quotes): > > ' 0.49' > > I'm looking for a way to remove the leading spaces, so the output is just > '0.49'. I know I can do it in the script itself, but I'm just wondering if > there is a way to remove all formatting through the SQL statement itself. > Thanks for any help in advance!
I don't know the exact way, but either of the following options for dsmadmc will work as a workaround in this case only, where you have only one number as a result: -TABdelimited -COMMAdelimited Regards, -- Sasa Drnjevic www.srce.unizg.hr > Kind regards, > Eric van Loon > Air France/KLM Storage Engineering > > ******************************************************** > For information, services and offers, please visit our web site: > http://www.klm.com. This e-mail and any attachment may contain confidential > and privileged material intended for the addressee only. If you are not the > addressee, you are notified that no part of the e-mail or any attachment may > be disclosed, copied or distributed, and that any other action related to > this e-mail or attachment is strictly prohibited, and may be unlawful. If you > have received this e-mail by error, please notify the sender immediately by > return e-mail, and delete this message. > > Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its > employees shall not be liable for the incorrect or incomplete transmission of > this e-mail or any attachments, nor responsible for any delay in receipt. > Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch > Airlines) is registered in Amstelveen, The Netherlands, with registered > number 33014286 > ******************************************************** >