Gary, Not sure what you are trying to do this is the command I ran and the results dsmadmc -id=ron -passw=ron -comma -datao=yes "SELECT rtrim(node_name), rtrim(filespace_name), filespace_id, rtrim(filespace_type), daTE(backup_end) as back_up_DATE FROM filespaces WHERE DAYS(current_date)-DAYS(backup_end)>10"
AMORKITO,\\amorkito\d$,1,NTFS,2015-05-04 AMORKITO,\\amorkito\e$,10,NTFS,2015-05-04 AMORKITO,\\amorkito\h$,9,NTFS,2015-05-04 AMORKITO,\\amorkito\v$,8,NTFS,2015-05-04 AMORKITO,\\amorkito\f$,7,NTFS,2015-05-04 AMORKITO,\\amorkito\i$,6,NTFS,2015-05-04 AMORKITO,\\amorkito\j$,5,NTFS,2015-05-04 AMORKITO,\\amorkito\c$,4,NTFS,2015-05-04 AMORKITO,\\amorkito\g$,3,NTFS,2015-05-04 if you are sending this to a file I would add a command before that. For this example we are sending the data to a file called Testtrim.csv: @echo off @cls echo Node,filespace,FS_ID,FS_type,last backup" > c:\temp\testtrim.csv dsmadmc -id=ron -passw=ron -comma -datao=yes "SELECT rtrim(node_name), rtrim(filespace_name), filespace_id, rtrim(filespace_type), daTE(backup_end) as back_up_DATE FROM filespaces WHERE DAYS(current_date)-DAYS(backup_end)>10" >> c:\temp\testtrim.csv c:\Program Files\Tivoli\TSM\baclient>type c:\temp\testtrim.csv Node,filespace,FS_ID,type,last backup AMORKITO,\\amorkito\d$,1,NTFS,2015-05-04 AMORKITO,\\amorkito\e$,10,NTFS,2015-05-04 AMORKITO,\\amorkito\h$,9,NTFS,2015-05-04 AMORKITO,\\amorkito\v$,8,NTFS,2015-05-04 AMORKITO,\\amorkito\f$,7,NTFS,2015-05-04 AMORKITO,\\amorkito\i$,6,NTFS,2015-05-04 AMORKITO,\\amorkito\j$,5,NTFS,2015-05-04 AMORKITO,\\amorkito\c$,4,NTFS,2015-05-04 AMORKITO,\\amorkito\g$,3,NTFS,2015-05-04 keep the command line as one line, turn off your word wrap in the editor. Again, not knowing what you are attempting to do, sending the data to a comma delimited file and opening in excel opens a lot of different options for displaying the output. Best Regards, _________________________________________________________ email: [email protected] From: "Lee, Gary" <[email protected]> To: [email protected] Date: 06/02/15 12:59 Subject: [ADSM-L] trouble trimming collumns in select Sent by: "ADSM: Dist Stor Manager" <[email protected]> Have the following script, but when I run on a 6.2.5 server using a 6.4.2 command line client no trimming is done. Lines are thousands of characters long. Script follows: SELECT rtrim(node_name), - rtrim(filespace_name), - filespace_id, - rtrim(filespace_type), - DATE(backup_end) as "backup DATE" - FROM filespaces WHERE - DAYS(current_date)-DAYS(backup_end)> $1 What have I missed?
