× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Right. DATFMT, and presumably TIMFMT do not actually exist in memory in the
format we specify. I am aware of that. But when I say internal, I mean what
the program sees, and when I say external, I mean what the user sees. The
program does see things in DATFMT and TIMFMT format. Constants must be
specified in these formats. And DATFMT and TIMFMT do limit what the field
can hold. That is more true for DATFMT than TIMFMT. Specifically you cannot
put d'0001-01-01' into a date field defined with DATFMT(*MDY). I really
don't care much about how IBM i stores it below the MI. There is no easy
way for me to get to that. Even in debug when I am looking at a memory dump
I see the data in DATFMT or TIMFMT format. But since I am using *ISO for
dates, I want to, and do, use *ISO for times as well.

On Mon, Jan 29, 2018 at 3:45 PM, <MichaelQuigley@xxxxxxxxxx> wrote:

"WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx> wrote on 01/26/2018 01:00:01 PM:
----- Message from Mark Murphy <jmarkmurphy@xxxxxxxxx> on Fri, 26
Jan 2018 11:41:57 -0500 -----

To:

"Rational Developer for IBM i / Websphere Development Studio Client
for System i & iSeries" <wdsci-l@xxxxxxxxxxxx>

Subject:

[WDSCI-L] Time Constant Errors

RDi - 9.6.0.1
IBM i - 7.1

I have the following code

**free
ctl-opt Option(*SrcStmt : *NoDebugIo: *NoUnref)
DatFmt(*ISO) TimFmt(*ISO)
DftActGrp(*No) ActGrp(*New)
BndDir('JCS')
Main(JCUPDFLCYR);

...

dcl-s RunTime Time Inz(t'02.03.00');

. . .
. . .
. . .


If I change my default time format to *HMS, and the time literal to
t'02:03:00', then RDi is happy (it also compiles properly). But I prefer
to
keep my dates and times in *ISO format internally.

I would agree LPEX error checking should be accurate. But just to be clear
. . .

I believe when you specify a time field (or any timedate field), the
system does not store it internally as *ISO, *HMS, or any other string
representation. When the field is 'externalized', it converts the value to
whatever format you've specified. So you can input a field as *HMS, and
move it to *ISO (or any other desired format) and the system handles the
conversion for you.

At least this is true when DB2 (or Db2) stores the data. I believe the
same holds true in RPG and COBOL.

Michael Quigley
Computer Services
The Way International
--
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/wdsci-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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.