Hi Eric, '-tab' does the magic: [~]$ dsmadmc -tab -se=TSM -id=admin -pa=admin -dataonly=yes "SELECT CAST (float(used_space_mb)*100/total_space_mb AS DECIMAL(4,2)) FROM log" 0.98
[~]$ dsmadmc -se=TSM -id=admin -pa=admin -dataonly=yes "SELECT CAST(float (used_space_mb)*100/total_space_mb AS DECIMAL(4,2)) FROM log" 0.98 Bye Martin Janosik "ADSM: Dist Stor Manager" <ADSM-L@VM.MARIST.EDU> wrote on 01/25/2017 10:01:51 AM: > From: "Loon, Eric van (ITOPT3) - KLM" <eric-van.l...@klm.com> > To: ADSM-L@VM.MARIST.EDU > Date: 01/25/2017 10:06 AM > Subject: [ADSM-L] How to prevent leading spaces in SQL output > Sent by: "ADSM: Dist Stor Manager" <ADSM-L@VM.MARIST.EDU> > > 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! > 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 > ******************************************************** >