Just a comment about dates
A date is always stored as numeric value (scaliger no). But nobody can read
this scaliger no.
A date format is only used to make the scaliger no readable.
In an SQL environment the date format to make the scaliger no readable is
taken from the job or current connection.
If you try to insert, update or delete a date in an SQL environment, it is
automatically translated into the scaliger no and the scaliger no is
inserted/updated in the table.
Even though the date cannot be displayed (correctly) due to the environment
date format.
Just try it by using the HEX SQL function to see the HEX value.
In RPG the scaliger no is always translated into a character representation
and not before the update translated back into the scaliger no.
Because it is translated, you may get an error if you try to move a date
with a 4 digit year into a field with a 4 digit year.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John
Yeung
Sent: Donnerstag, 21. Dezember 2017 21:04
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Valid dates allowed by the operating system
On Thu, Dec 21, 2017 at 8:46 AM, Paul Nelson <nelsonp@xxxxxxxxxxxxx> wrote:
They are real date fields. That DSPPFM can't handle them is weird.
When working with real date fields (as well as times and timestamps), it is
sometimes useful to remember that the system goes to a certain amount of
trouble to shield you from the true, low-level representation of these data.
DSPFD, DSPFFD, and DSPPFM cannot detect that *on disk* a true date field is
only 4 bytes, for example.
Instead, it looks like 8 or 10 bytes, depending on format.
John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.