ADSM-L

Re: how to select events?

2002-09-23 03:49:40
Subject: Re: how to select events?
From: Zlatko Krastev/ACIT <acit AT ATTGLOBAL DOT NET>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 23 Sep 2002 10:47:39 +0300
Working one:
select node_name from events where scheduled_start>='2002-09-12'
Not working one (!!!):
select node_name from events where scheduled_start>=cast(current_date-10
days as timestamp)

It looks like when you supply where clause with constant it works. But if
you try to use calculated value it does not. In June I've posted a select
which worked on TSM v3.7 but unfortunately it does not on v4.2:
select <whatever> from events -
where date(scheduled_start) <= current_date - cast(1 as interval day)

As a workaround I was able to create the following select:
select 'select <whatever> from events where scheduled_start>=''' -
concat cast(current_date-10 days as char(10)) concat '''' as -
"*****************************************************************" -
from db
Output of this select is redirected to a file, file is processed outside
TSM (removed all but last line) and on the end is run as a TSM macro.

This is different from the behavior described in APAR IC28825. So maybe I
should open new APAR.


Zlatko Krastev
IT Consultant





Please respond to "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
Sent by:        "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
To:     ADSM-L AT VM.MARIST DOT EDU
cc:

Subject:        Re: how to select events?

I still can't get this to work. Could someone please provide a WORKING
example of a select command that would display all events for the last 10
days?

<Prev in Thread] Current Thread [Next in Thread>