Author: "Loon, Eric van (ITOPT3) - KLM" <Eric-van.Loon AT KLM DOT COM>
Date: Wed, 25 Jan 2017 09:01:51 +0000
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
Author: Martin Janosik <martin.janosik AT CZ.IBM DOT COM>
Date: Wed, 25 Jan 2017 11:03:43 +0100
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
Author: Sasa Drnjevic <Sasa.Drnjevic AT SRCE DOT HR>
Date: Wed, 25 Jan 2017 11:03:26 +0100
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 Rega
Author: "Loon, Eric van (ITOPT3) - KLM" <Eric-van.Loon AT KLM DOT COM>
Date: Wed, 25 Jan 2017 12:53:12 +0000
Hi Martin! Again, thank you very much for your help! Kind regards, Eric van Loon Air France/KLM Storage Engineering Hi Eric, '-tab' does the magic: [~]$ dsmadmc -tab -se=TSM -id=admin -pa=admin -data
Author: "Harris, Steven" <steven.harris AT BTFINANCIALGROUP DOT COM>
Date: Thu, 26 Jan 2017 21:52:18 +0000
Hi Eric There are also the STRIP and TRIM sql functions - same function for these but slightly different syntax. SELECT strip(cast(float(used_space_mb)*100/total_space_mb AS DECIMAL(4,2))) FROM log H
Author: "Loon, Eric van (ITOPT3) - KLM" <Eric-van.Loon AT KLM DOT COM>
Date: Fri, 27 Jan 2017 11:59:11 +0000
Hi Steven! Thanks for your reply! As suggested by Martin adding the -tab switch to the dsmadmc does the trick as well as adding the varchar_format function: SELECT varchar_format(CAST(round(float(use