How to redirect output of query to text file

BobMc

ADSM.ORG Member
Joined
Dec 14, 2005
Messages
28
Reaction score
0
Points
0
Website
Visit site
I'm wanting to have the results of a query be redirected to an txt file. I know I can run the command listed below from the admin console and it works fine. However I want to run the same command as scheduled task in my Administrative Schedules say at 7am. When I attempt this it fails saying the > is in vaild.



q vol * stgpool=archivepool > c:\archivepool.txt



Thanks in advance..



Bob
 
I don't know if theres a way to do that within TSM, but you can use WinAT to schedule a command-line session and redirect that output to a file.



-Aaron
 
Haven't foud a way yet, either. I help myself with a client command schedule running the dsmadmc command. But of course id and pa show up in the script. Fortunately cl=analyst does suffice for queries.



Cheers

Peter
 
The re-direction should work.



TSM> q vol stg=genpool > c:\vollist.txt



works for me.



Just make sure you give space on both sides of ">".



If still does not work, it may be something to do with the client version (though I don't think so).



Ravi
 
Hello:

try: q sys -outfile=/.../my.txt

or

dsmadmc -id=sullivan -password=secret -consolemode -outfile=save.out



You might try creating a macro or script and calling it from the schedule.

Will
 
Back
Top