Given: create table qtemp/z (z timestamp)

The following LF DDS should make column L with data type DATE [L], become the key by the data type date for the timestamp data in column Z with data type TIMESTAMP [Z]:

<code>

R LOZR PFILE(QTEMP/Z)
TEXT('type L over Z')
Z
L L I RENAME(Z)
K L

</code>

Another suggestion was to map [via DDS] the Z to A and then use SST to substring the 10-byte date portion, but that is not a supported mapping; searching InfoCenter on logical file dds mapping yielded the a table under subject "Describing logical file record formats" which shows that mapping to character is not a supported mapping via DDS LF [in v5r3 and still, by v6r1]:
http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/dbp/rbafodrflf.htm
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/dbp/rbafodrflf.htm

Regards, Chuck

On 4/12/11 3:48 PM, Alan Shore wrote:

I keep forgetting to specify the release level we are on - which
is 5.4 so I can use neither of your suggestions

Because the file is in chronological order (timestamp) the order
number 1 may in fact be the millionth record on that particular
date, but if I can create a logical by date within that timestamp,
then order number, then order number 1 will be the first for that
date

I may have to create a temporary file, and populate a date field
I just thought that there may have been something equivalent to SST
for timestamp fields


Luis Rodriguez on Tuesday, April 12, 2011 4:33 PM wrote:

Are you running 6.1 or higher? If so, I wonder if using a derived
key would be of help?

Something in the order of

CREATE INDEX MYLIB/MYINDEX ON MYLIB/MYTABLE
(DATE(MY_TIMESTAMP) AS MY_DATE)

Unfortunately, we are stuck here in the dark ages (V5R3), but
maybe this would be doable...


On Tue, Apr 12, 2011 at 3:02 PM, Alan Shore<ashore@xxxxxxxx> wrote:

I have a physical file, that contains a timestamp field (type z) Is
there any way to create a logical over this physical but ONLY using
the date within that timestamp as part of the key?
As always, any and all responses MUCH appreciated


This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].