HI, If you open up dsmc with -comma parameter, all output will be put in a csv file - perfect for perl scripting (and you can redirect your output). We do that every night to mail out a report of backups nightly - also to automatically mail a report of tapes ejecting for offsite storage , and then an hour later, automatically ejects them.
dsmadmc -comma -id=admin -pa=password "select a.domain_name,a.description, a.num_nodes,b.node_name from domains a,nodes b where a.domain_name = b.domain_na me order by 1,3" | sed 1,9d | grep -v "ANS8002I" | grep -i -E "[a-z]" > ${DATADIR}/client.table.data (scripts supplied by Suad Musovich) Hope that helps, Jane ----- Original Message ----- From: "Williams, Tim P {PBSG}" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 8:52 AM Subject: Re: Redirecting Commands in Scripts > I put in a marketing requirement a couple of years ago....FYI > > req00072775 redirection is not supported for commands in a script file > (just as redirection is not supported for > commands run from the server console). > > -----Original Message----- > From: Gerhard Wolkerstorfer [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 12, 2002 5:26 AM > To: [EMAIL PROTECTED] > Subject: Redirecting Commands in Scripts > > > Hello all, > I found questions like this in the archives, but no answers...... > > One more try => > I want to run a script, where one line should look like this: > QUERY SYSTEM > DSM.OUTPUT.QSYSTEM > where DSM.OUTPUT.QSYSTEM is a S390 Filename I want to take to the OFFSITE > Location. > (This Command works great on the command line, but I want to have it in a > script!) > > However - I tried to do it like this: > def script test desc='Test' > upd script test "QUERY SYSTEM > DSM.OUTPUT" > > Result: > ANR1454I DEFINE SCRIPT: Command script TEST defined. > ANR2002E Missing closing quote character. > ANS8001I Return code 3. > > Any hints how to route an output to a file in a script ? > I guess, the problem is, that TSM wants to direct the Output of the Update > Stmt > to a file - and when doing this, one quote is missing, of course > > We are running TSM 3.7.5 on S390 (I know, not supported, but I guess this > should > work on all versions) > > Regards > Gerhard Wolkerstorfer >