Results 1 to 3 of 3
-
07-30-2012, 08:51 AM #1Newcomer
- Join Date
- Jul 2012
- Posts
- 2
- Thanks
- 0
- Thanked 0 Times in 0 Posts
TSM query creating extra line feeds randomly
All,
I am currently writing some scripts that output data from TSM and input them into a database table on a webserver for a monitoring suite. So far everything has been going well, until I came across this anomaly.
To simplify the issue, the problem can be replicated as below.
If I run the following I get a file created that is TAB delimited of the SELECT statement.
dsmadmc -id=XXXX-pa=XXXX-dataonly=y -displaymode=table -tabdelimited ' select VOLUME_NAME,NODE_NAME,FILESPACE_NAME,FILE_NAME,FIL E_SIZE,SEGMENT,FILESPACE_ID,COPIED,DAMAGED from CONTENTS' >testfile
The strange thing happens on a few lines during the output. Instead of having just a TAB after the file name, a LINEFEED is inserted before the TAB. Below is an example where the issue is with file3.
A00001 hostname /gpfs/filesystem01 /dir1/dir2/file1 21770 1/1 1 No No
A00002 hostname /gpfs/filesystem01 /dir1/dir2/file2 6332 1/1 1 No No
A00003 hostname /gpfs/filesystem01 /dir1/dir2/file3
472 1/1 1 No No
A00004 hostname /gpfs/filesystem01 /dir1/dir2/log/file4 10038 1/1 1 No No
A00005 hostname /gpfs/filesystem01 /dir1/dir2/log/file5 6332 1/1 1 No No
The problem does not occur after a certain amount of lines or characters, but occurs at the same place every time the script is run.
Has anyone seen this before or know of an issue?Last edited by Arledge; 07-30-2012 at 09:34 AM.
-
07-30-2012, 10:03 AM #2Member
- Join Date
- May 2006
- Posts
- 173
- Thanks
- 3
- Thanked 5 Times in 4 Posts
Have you tried to run this with the -outfile=filename option instead of > testfile? I ran across a problem like this once where I had to add
"-outfile=filename.csv -outfile" to the options to get it to work. Got that recommendation from TSM advanced support. Not sure why -outfile has to be there twice, once with and once without a file name, but that solved my output problems.
-Rowl
-
07-30-2012, 10:37 AM #3Newcomer
- Join Date
- Jul 2012
- Posts
- 2
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Hi Rowl,
I have tried this with output=filename and still get the same result.
I have however noticed that for the files that are playing up, there are two entries in the TSM database. Apart from the TAB being LF-TAB & the file sizes being different the entries look the same.
When I then look at files using the command "select * from contents where file_name='/dir1/dir2/file3' there is only 1 entry.
Maybe I have a corrupt database.
Similar Threads
-
TSM QUERY vs SELECT statement provides different results
By eviemorgan in forum ScriptingReplies: 4Last Post: 03-08-2012, 11:43 PM -
TSM 6.2.1.SELECT query on CONTENTS table returns 'Yes' for AGGREGATED column
By gshiman in forum TSM ServerReplies: 1Last Post: 12-08-2011, 04:40 PM -
select output to one line
By influx in forum ScriptingReplies: 1Last Post: 02-29-2008, 04:32 AM -
Command line SQL query TSM
By snapbean in forum ScriptingReplies: 2Last Post: 02-19-2008, 05:42 AM -
How can I query TSM user's directories/subdirectories/files in detail from server's command line?
By alixf in forum ScriptingReplies: 1Last Post: 10-15-2003, 07:17 PM


Reply With Quote
