Results 1 to 3 of 3
  1. #1
    Newcomer
    Join Date
    Jul 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question 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.

  2. #2
    Member
    Join Date
    May 2006
    Posts
    191
    Thanks
    3
    Thanked 6 Times in 5 Posts

    Default

    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

  3. #3
    Newcomer
    Join Date
    Jul 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  1. Replies: 4
    Last Post: 03-08-2012, 11:43 PM
  2. Replies: 1
    Last Post: 12-08-2011, 04:40 PM
  3. select output to one line
    By influx in forum Scripting
    Replies: 1
    Last Post: 02-29-2008, 04:32 AM
  4. Command line SQL query TSM
    By snapbean in forum Scripting
    Replies: 2
    Last Post: 02-19-2008, 05:42 AM
  5. Replies: 1
    Last Post: 10-15-2003, 07:17 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •