|
"For instance, as I understand it, a date field is only 4 somethings in
length."
I was simply trying to point out that it is only on disk that dates are 4
bytes long. By the time they have been "surfaced" by the OS they are an 8
or 10 byte character field and can (through redefinition) be manipulated as
such. Not relevant to the OP's ? - but I wanted to clarify for the record.
On 2014-07-09, at 1:47 PM, Booth Martin <booth@xxxxxxxxxxxx> wrote:
Dang. Another learning opportunity for me. Best not to waste it.what you wrote and what I wrote. I am betting that what I am not seeing is
OK. I admit to total confusion. I do not see the difference between
significant. :)
way though - they are surfaced to the program as character fields.
On 7/9/2014 12:25 PM, Jon Paris wrote:
No Booth - that is only on the database - we can never see them that
instance, as I understand it, a date field is only 4 somethings in length.
On 2014-07-09, at 1:15 PM, Booth Martin <booth@xxxxxxxxxxxx> wrote:
D, T, and Z fields are not stored in any format useful to us. For
These fields know what they are and we don't care what they are. We only
care how we see them. In other words, QTSTAMP is not a z field so you
can't slip a z field in to it. If QTSTAMP is a new field in the file, why
not change the field's definition to being a timestamp field?
hhmmss as decimals. I am trying to create a time stamp field from them.
On 7/9/2014 11:40 AM, Dale Janus wrote:
I have an old file that contains a date in yyyymmdd and time in
when I go to write the record, I get CPF5035, Data mapping error on member
d newdate s D inz(d'2012-10-10')
d newtime s T inz(t'23.30.59')
D myts s z
c eval newdate = %date(gqtdten:*iso)
c eval newtime = %time(gqttime:*hms)
c eval myts = newdate + newtime
c
c eval qtstamp = myts
My debug calcs looks like I created the time stamp correctly, but
QUOTEHIST code 17, bad date, time, timestamp.
'F2F0F1F360F1F160F2F560F0F74BF5F84BF1F24BF0F0F0F0F0F0'XI dumped the program and the field looks like this:
QTSTAMP TIMESTAMP(26) '2013-11-25-07.58.12.000000'
VALUE IN HEX
get the error on the first recordQTSTAT CHAR(2) 'OH' 'D6C8'X
QTTIME PACKED(6,0) 075812. '0075812F'X
I can step through the program with debug, but when I go to write, I
new time stamp. it looks good to me. but something is wrong.
C WRITE QThREC
I thought I was doing good moving this stuff around and creating a
decimal. The only other field is a record id. The new file is defined by
There is only one timestamp field, all other fields are character or
DDL and contains a unique record id that I am assuming the system will
generate.
around the Sun.--
---Dale
Booth Martin
www.martinvt.com
(802)461-5349
Skype: booth.martin
Living on Earth may be expensive, but it includes an annual free trip
(RPG400-L) mailing list--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing listTo post a message email: RPG400-L@xxxxxxxxxxxxJon Paris
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
www.partner400.com
www.SystemiDeveloper.com
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.