×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Hi Murugesh

The rule is that all date literals must be in the format specified on the H
spec - NOT in the format of the date field against which they are being
used.

So, no matter where you use a date literal in your program, it must be in
the format specified on the H spec (which defaults to *ISO, if you don't
specify it).

HTH

Paul Tuohy

----- Original Message -----
From: "Paramasivam Murugesan , Gurgaon" <ParamasivamM@xxxxxxxxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Monday, July 07, 2003 8:24 AM
Subject: INZ the Date Variable


>
>
> Hi all,
>
> In RPG cycle, at What point of time, the Initialization of variables take
> place?  The DATFMT keyword in D spec overrides the DATFMT Keyword in H
spec.
> I believe i am right. If the date variable DAT1 is initialized with a
valid
> date value and it has the format specified in the D spec.
>
> I know, the DATFMT keyword specified in the D spec will have the effect on
> that date variable in the calculation time.
> but, I dont understand, why the compiler does not consider the DATFMT
> keyword in D spec while doing initialization.
>
>
> 0000.40  1 H DATFMT(*ISO)
> 0000.41      2 D DAT1            S               D
> DATFMT(*MDY)INZ(D'07/25/03')
> 0000.42                                                        ======>a
> 0000.43
> ======>bbbbbbbbbbb
> 0000.44 *RNF0305 20 a 000100  The value D'07/25/03' is not a valid *ISO-
> Date literal.
> 0000.45 *RNF3492 20 b 000100  Initialization value D'0001-01-01' for field
> DAT1 is not in
> 0000.46                            years 1940 - 2039.
>
>
>
> Any idea?
>
> Thanks in advance
> Murugesh



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-2026 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.