Hi Joni, You don't need the quotes around the SELECT statement. Also, when specifying the complete command in batch mode, I don't think using the hyphen (-) for command continuation will work, since it is the OS command line processor that sees the hyphen, not the admin client.
Try putting your SELECT statement into a separate text file called, for example, select.macro: select entity as node_name, date(start_time) as date, - cast(activity as varchar(10)) as activity, - time(start_time) as start, time(end_time)as end, - cast(bytes/1024/1024 as decimal(6,0)) as megabytes, - cast(affected as decimal(7,0)) as files, successful - from summary - where date(start_time)> date(current_timestamp - 1 day) and - (entity like 'HM%' or entity like 'PAB%' or - entity like 'VMS%' or entity like 'GEOHMKLG%') and - activity='BACKUP' order by successful Then invoke the macro like this: dsmadmc -se=blah -id=admin -pa=xxx -displaymode=table macro select.macro Regards, Andy Andy Raibeck IBM Software Group Tivoli Storage Manager Client Development Internal Notes e-mail: Andrew Raibeck/Tucson/[EMAIL PROTECTED] Internet e-mail: [EMAIL PROTECTED] The only dumb question is the one that goes unasked. The command line is your friend. "Good enough" is the enemy of excellence. "ADSM: Dist Stor Manager" <ADSM-L@VM.MARIST.EDU> wrote on 2005-01-19 10:31:17: > Hi Andy! > > You have a very good point of showing my command. Without it is kind of > difficult. Here is the exact command that I am entering (I'm just going to > use admin admin as id and password and xxxxx as the servername): > > dsmadmc -server=xxxxx -id=admin -password=admin -displaymode=table 'select > entity as node_name, date(start_time) as date, - > cast(activity as varchar(10)) as activity, time(start_time) as > start, time(end_time)as end, cast(bytes/1024/1024 as decimal(6,0)) as > megabytes, - > cast(affected as decimal(7,0)) as files, successful - > from summary > where date(start_time)> date(current_timestamp - 1 day) - > and (entity like 'HM%' or entity like 'PAB%' or entity like 'VMS%' > or entity like 'GEOHMKLG%') - > and activity='BACKUP' order by successful' > > I've just been entering this on the command-line, so I don't have any - > within the command. That's when I receive the following: > > ksh: 0403-057 Syntax error: `(' is not expected. > /home/lidzr8v (chrs144:lidzr8v) > > Do I not need the quotes around the select statement? Thank you in > advance! > > ******************************** > Joni Moyer > Highmark > Storage Systems > Work:(717)302-6603 > Fax:(717)302-5974 > [EMAIL PROTECTED] > ******************************** > > > > "Andrew Raibeck" > <[EMAIL PROTECTED] > OM> To > Sent by: "ADSM: ADSM-L@VM.MARIST.EDU > Dist Stor cc > Manager" > <[EMAIL PROTECTED] Subject > .EDU> Re: select statement: help! > > > 01/19/2005 11:34 > AM > > > Please respond to > "ADSM: Dist Stor > Manager" > <[EMAIL PROTECTED] > .EDU> > > > > > > > Joni, > > The -displaymode=table option should give you the desired format (that is > the specific purpose of this option). > > Your note suggests you omitted the -ID and -PASSWORD options. > > It would help if you would post (via copy & paste) the actual command you > issued along with the results, so we can see what you are seeing. > > Regards, > > Andy > > Andy Raibeck > IBM Software Group > Tivoli Storage Manager Client Development > Internal Notes e-mail: Andrew Raibeck/Tucson/[EMAIL PROTECTED] > Internet e-mail: [EMAIL PROTECTED] > > The only dumb question is the one that goes unasked. > The command line is your friend. > "Good enough" is the enemy of excellence. > > "ADSM: Dist Stor Manager" <ADSM-L@VM.MARIST.EDU> wrote on 2005-01-19 > 06:54:49: > > > Hello, > > > > I went out and tried the following: > > > > dsmadmc -servername=server -displaymode=table select statement and it > > didn't work. Do you have to put the statement within single quotes? > > Thanks! > > > > ******************************** > > Joni Moyer > > Highmark > > Storage Systems > > Work:(717)302-6603 > > Fax:(717)302-5974 > > [EMAIL PROTECTED] > > ******************************** > > > > > > > > "PAC Brion > > Arnaud" > > <[EMAIL PROTECTED] To > > ALPINA.COM> ADSM-L@VM.MARIST.EDU > > Sent by: "ADSM: cc > > Dist Stor > > Manager" Subject > > <[EMAIL PROTECTED] Re: select statement: help! > > .EDU> > > > > > > 01/19/2005 08:16 > > AM > > > > > > Please respond to > > "ADSM: Dist Stor > > Manager" > > <[EMAIL PROTECTED] > > .EDU> > > > > > > > > > > > > > > Joni, > > > > Maybe this http://msgs.adsm.org/cgi-bin/get/adsm0109/730.html will help > > you ! > > Cheers. > > > > > > Arnaud > > > > ************************************************************************ > > ****** > > Panalpina Management Ltd., Basle, Switzerland, CIT Department > > Viadukstrasse 42, P.O. Box 4002 Basel/CH > > Phone: +41 (61) 226 11 11, FAX: +41 (61) 226 17 01 > > Direct: +41 (61) 226 19 78 > > e-mail: [EMAIL PROTECTED] > > ************************************************************************ > > ****** > > > > -----Original Message----- > > From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of > > Joni Moyer > > Sent: Wednesday, 19 January, 2005 14:00 > > To: ADSM-L@VM.MARIST.EDU > > Subject: Re: select statement: help! > > > > Hey! > > > > I have one other simple question. Is there a way that the output of > > this select statement will be able to go on one line so that it isn't so > > hard to read? The output currently looks like this, but I would rather > > have it all fit on one line. Thanks! > > > > NODE_NAME: VMSNW05 > > DATE: 2005-01-18 > > ACTIVITY: BACKUP > > START: 10:31:15 > > END: 12:05:51 > > MEGABYTES: 12 > > FILES: 140 > > SUCCESSFUL: NO > > > > ******************************** > > Joni Moyer > > Highmark > > Storage Systems > > Work:(717)302-6603 > > Fax:(717)302-5974 > > [EMAIL PROTECTED] > > ******************************** > > > > > > > > "Andrew Raibeck" > > <[EMAIL PROTECTED] > > OM> > > To > > Sent by: "ADSM: ADSM-L@VM.MARIST.EDU > > Dist Stor > > cc > > Manager" > > <[EMAIL PROTECTED] > > Subject > > .EDU> Re: select statement: help! > > > > > > 01/18/2005 12:42 > > PM > > > > > > Please respond to > > "ADSM: Dist Stor > > Manager" > > <[EMAIL PROTECTED] > > .EDU> > > > > > > > > > > > > > > Maybe something like: > > > > select entity as node_name, date(start_time) as date, cast(activity as - > > varchar(10)) as activity, time(start_time) as start, time(end_time) as > > end, - > > cast(bytes/1024/1024 as decimal(6,0)) as megabytes, cast(affected as - > > decimal(7,0)) as files, successful - > > from summary - > > where date(start_time)> date(current_timestamp - 1 day) - > > and (entity like 'HM%' or entity like 'GEO%') - > > order by successful > > > > Andy Raibeck > > IBM Software Group > > Tivoli Storage Manager Client Development Internal Notes e-mail: Andrew > > Raibeck/Tucson/[EMAIL PROTECTED] Internet e-mail: [EMAIL PROTECTED] > > > > The only dumb question is the one that goes unasked. > > The command line is your friend. > > "Good enough" is the enemy of excellence. > > > > "ADSM: Dist Stor Manager" <ADSM-L@VM.MARIST.EDU> wrote on 01/18/2005 > > 10:33:11: > > > > > Hello All! > > > > > > I have been trying, what seems like forever, to get this select > > statement > > > to work and I am just not sure what I am doing wrong... Any > > suggestions? > > I > > > am trying to get a list of the backups of all of the servers that > > > begin with hm* and geo* within the past 24 hours and if they were > > > successful, missed or failed. Thank you in advance! Here is what I > > > have so far, > > but > > > it doesn't seem to work: > > > > > > select entity as node_name, date(start_time) as date, cast(activity as > > > varchar(10)) as activity, time(start_time) as start, time(end_time) as > > end, > > > cast(bytes/1024/1024 as decimal(6,0)) as megabytes, cast(affected as > > > decimal(7,0)) as files, successful > > > from summary > > > where date(start_time) > current_timestamp - 1 day > > > and entity like 'hm*,geo*' > > > group by entity > > > order by successful > > > > > > ******************************** > > > Joni Moyer > > > Highmark > > > Storage Systems > > > Work:(717)302-6603 > > > Fax:(717)302-5974 > > > [EMAIL PROTECTED] > > > ********************************