Modifying a VMSTIMESTAMP in a field
Fyfield, Derek
DEREK.FYFIELD at orbit.net
Tue Aug 16 01:57:16 CDT 2005
Hi John,
In QTP, this routine will add a fraction to a VMSdate temporary. The bit of
Quiz helps to see what's happening with the timestamp. The samples run on
VMS 7.10 G.
set proc lim 100
run TEST_RUN
glob temp G_TODAY vmsdate init vmstimestamp
request TEST_DATE
access *eof_test
temp T_INCREMENT num
item T_INCREMENT init .000001
temp T_COUNT num
item T_COUNT count
temp T_STAMP vmsdate
item T_STAMP init G_TODAY &
= date(T_INCREMENT, T_STAMP)
subfile date_test keep include t_stamp, t_count
go
QUIZ:_
acc *date_test
sho ite
define d_time num = dateextract(t_stamp, time)
report t_stamp d_time pic '^^:^^:^^.^^^' t_count pic '^^^'
go
Results:-
T_STAMP D_TIME T_COUNT
16/08/2005 6:50:20.940 1
16/08/2005 6:50:21.020 2
16/08/2005 6:50:21.100 3
16/08/2005 6:50:21.180 4
16/08/2005 6:50:21.260 5
16/08/2005 6:50:21.340 6
16/08/2005 6:50:21.420 7
16/08/2005 6:50:21.500 8
16/08/2005 6:50:21.580 9
The size of the increment can be tuned to give smaller or intervals.
Regards,
Derek Fyfield
Bahrain HO
SMS Development & Report Writing
x3718
_____
From: John Stires [mailto:pencarver at sbcglobal.net]
Sent: Monday, August 15, 2005 6:12 PM
To: powerh-l at lists.sowder.com
Subject: Modifying a VMSTIMESTAMP in a field
Due to a system problem, a number of records were not created when they
should have been created. Now we are trying to create these missing records
for that date that have a time stamp for that day. The value normally placed
in that field is VMSTIMESTAMP which is normally never manipulated or
displayed. When we went with the VMSTIMESTAMP value field, I told my boss
that we would never be able to look at it or manipulate it; all it would do
was to force records into a chronological order and make the indexes unique.
To that end, we are having only minor duplicate problems that we are
handling during the batch process that creates these records.
Now, we have a number of records to create, in the hundreds, but need to
have an appropriate value for the VMSTIMESTAMP for a day in the past. We can
take another record containing a time stamp for that day. So far so good.
Then if we could increment the time component by some value, we do not care
what, so long as it ends up still for that day and we are not creating
duplicate indexed records...a bad thing to do with unique indexes. I know
that the smallest increment coming out of a VMSTIMESTAMP is 100th of a
second, but what do I have to add to be in that ball park is the question.
Does anyone have anything in their bag of tricks that you can come up with
that may be of some help??? We are running on OpenVMS 6.2 with 7.10e6
PowerHouse with an RDB database.
Thanks for any help anyone can give.
John
This message and any attachments (the 'message') is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender. Any use not in accord with its
purpose, any dissemination or disclosure, either whole or partial, is
prohibited, except with formal approval. The Internet cannot guarantee the
integrity of this message. Orbit (and its subsidiaries) shall therefore not
be liable for the message, if modified. Orbit accepts no liability for any
damage caused by any error or virus transmitted by this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20050816/dd6863b0/attachment.htm
More information about the powerh-l
mailing list