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



Hi all!

I have weird behaviore of DDS defined DATE field so I need help.

In DDS described PF field is defined as follows:

A            DATUMFILE       L         DATFMT(*ISO)


In RPG in control spec I coded DATFMT(*ISO) and I have defined

D datum0          S               d   inz(D'1902-01-01')

variable to hold default value in case that DATUMFILE field value can't be 
calculated.

Thi is example of code where DATUMFILE is evaluated:

/free
....
....
        If datumOK;
                DATUMFILE=calculatedDate;
        Else;
                DATUMFILE=datum0;
        EndIf;
....
....
        write record;
....
/end-free

After procession well calculated dates have expected values but, at other 
side, dates evaluated with datum0 are represented (in SQL) with ++++ 
signs. *ISO date year has range 0001-9999 so I can't gess why default 
dates aren't displayed correctly. What is more confusing when thise dates 
are importted to DB table on MS SQL server, all ++++ dates on DB2 has 
0001-01-01 value on MSSQL.

Is it possibile that some system definition overrides program and DDS 
definitions maybe? My Admin says that RPG and DDS datum format definitions 
have higher priority than system definitions?!

Anyway is there something I missed?? The code is pretty trivial (as you 
see from example) so I can't figure why I cant get right value.

Thanks!
Igor Bešlić, dipl. ing. rač. 
VOLKSBANK d.d.
OJ Informatika
Varšavska 9, 10000 Zagreb
tel: +385 1 4801 895

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.