Format output

daveisme

ADSM.ORG Member
Joined
Dec 15, 2006
Messages
66
Reaction score
0
Points
0
Is there any way I can define the formatting of the output of a query command when I redirect it to a file on my unix server. When I issue the command q event * t=a f=d > /tmp/somefile.txt "----" are added on a line and the text is wrapped making the output confusing to some operators.
 
Not within the command itself. You can process the txt file with a perl script to rip out the stuff you dont want and format it in a more readable fashion
 
Is there any way I can define the formatting of the output of a query command when I redirect it to a file on my unix server. When I issue the command q event * t=a f=d > /tmp/somefile.txt "----" are added on a line and the text is wrapped making the output confusing to some operators.

What are you using to view the resulting text file? Notepad? Have you turned off word wrap? I don't have an issue looking at the result.
 
I have the same issue. When I perform a command (for example) q event, q schedul.
In the column "Schedule Name" and the column "Node_name" are wrapped lines.
Does anyone know the new solution?
 
Issue the command from a shell instead of the TSM prompt.

If you want the output in a table use:
Code:
dsmadmc -id=admin -pa=password -se=servername -dataonly=yes -comma -outfile=/tmp/events.txt q event * t=a f=d

If you want the output to be comma separated so it can be opened later as a spreadsheed, use:
Code:
dsmadmc -id=admin -pa=password -se=servername -dataonly=yes -comma -outfile=/tmp/schedules.csv select * from schedules

Note that you can do this on any machine that has the TSM Admin Command line install, the output goes on the machine it was run under. I have it installed on my laptop, so when I run dsmadmc on my laptop, the output goes on my laptop. So instead the syntax looks like:
Code:
cd /d "c:\program files\tivoli\tsm\baclient"
dsmadmc -id=admin -pa=password -tcps={hostname of tsm server} -dataonly=yes -comma -outfile="C:\My Outputs\schedules.csv" * from schedules
 
Back
Top