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



Igor,
        In STRSQL, press F13 and then select option 1.  Look for that date 
format.  Change it to anything but *MDY or *YMD.  The system has a problem 
showing dates out side the range of 1940 to 2039 in short date formats.  

        Since you do not mention who you import in to MSSQL, I will assume you 
are using an ODBC connection (probably IBM's?) to connect and get the data. You 
have to also specify the date format for the connection.  If you have client 
access, it has a MS Excel connection piece that allows you to test ODBC type 
transfers. 

Thank you,
Matt Tyler
WinCo Foods, LLC
mattt@xxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On 
Behalf Of Igor.Beslic@xxxxxxxxxxxx
Sent: Thursday, January 12, 2006 4:10 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: DATE field wont accept value '1902-01-01'

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-Ups:

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.