Hello. I can use a combo of these from the link you sent for what I need to do.
SELECT current date FROM sysibm.sysdummy1
SELECT current time FROM sysibm.sysdummy1
SELECT current timestamp FROM sysibm.sysdummy1
Thanks so much.
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Alex Paschal
Sent: Tuesday, December 18, 2012 12:26 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] tsm scripts time of day
Hi, Jeannie. No, actually, there isn't. CURRENT_TIMESTAMP is a built
in function that returns the timestamp of the current time. DB2 has DATE
and TIME functions for getting pieces of the timestamp. Here is a good
URL for basic DB2 time functions. Some subset of these apply to TSM's
selects.
http://www.ibm.com/developerworks/data/library/techarticle/0211yip/0211yip3.html
Just for fun, you'll note that instead of selecting from the STATUS
table, which is a TSM-specific real one-row table, in other DB2
applications they use SYSIBM.SYSDUMMY1, which is, as the name implies, a
dummy one-row table.
On 12/18/2012 8:32 AM, Jeannie Bruno wrote:
> Is there a 'current_day' column on the status table? just curious, it's
> giving me invalid column name, so I thought I had the wrong name.
>
> When I do select * from status, I don't even see column current_time. (I'm
> wearing my glasses too!)
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf
> Of Bob Levad
> Sent: Monday, December 17, 2012 5:42 PM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: [ADSM-L] tsm scripts time of day
>
> Something like this? I haven't tested it, but it should be close.
>
> select current_time from status where time(current_time)>'23:00:00.0000'
> if (rc_ok) goto today
> yesterday:
> query actlog search= " anxxxxe ***" begind=today-1 endd=today begint=18:00
> endt=now
> goto exit
> today:
> query actlog search= " anxxxxe ***" begind=today endd=today begint=18:00
> endt=now
> exit:
> exit
>
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf
> Of Tim Brown
> Sent: Monday, December 17, 2012 4:01 PM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: [ADSM-L] tsm scripts time of day
>
> The reason I wanted to check time is that I want to query the actlog under
> certain conditions.
>
> If its before midnight I want to issue query actlog search= " anxxxxe ***"
> with begind=today endd=today begint=18:00 endt=now
>
> and after midnight with begind=today-1 endd=today today begint=18:00
> endt=now
>
> Possible?
>
> Thanks,
>
>
> Tim
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf
> Of Prather, Wanda
> Sent: Thursday, 13 December, 2012 1:36 PM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: tsm scripts time of day
>
> Yep.
> Select current_date from status
> select current_timestamp from status
>
> (Doesn't have to be from the status table, that's just a convenient one.)
>
>
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf
> Of Tim Brown
> Sent: Thursday, December 13, 2012 11:44 AM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: [ADSM-L] tsm scripts time of day
>
> Is there a check the time of day within a tsm script ?
>
> Thanks,
>
> Tim Brown
> Supervisor Computer Operations
> Central Hudson Gas & Electric
> 284 South Ave
> Poughkeepsie, NY 12601
> Email: tbrown AT cenhud DOT com<mailto:tbrown AT cenhud DOT com>
> <<mailto:tbrown AT cenhud DOT com>>
> Phone: 845-486-5643
> Fax: 845-486-5921
> Cell: 845-235-4255
>
>
> "This message contains confidential information and is only for the intended
> recipient. If the reader of this message is not the intended recipient, or an
> employee or agent responsible for delivering this message to the intended
> recipient, please notify the sender immediately by replying to this note and
> deleting all copies and attachments."
> This electronic transmission and any documents accompanying this electronic
> transmission contain confidential information belonging to the sender. This
> information may be legally privileged. The information is intended only for
> the use of the individual or entity named above. If you are not the intended
> recipient, you are hereby notified that any disclosure, copying,
> distribution, or the taking of any action in reliance on or regarding the
> contents of this electronically transmitted information is strictly
> prohibited.
>
|