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



Kirt,
        I was able to do exactly what you say you cannot do with a MODS.  I
could only do it by referencing definitions using LIKE().  Explicit
definitions in a MODS did not work.  By using a MODS there is also an
assumption that you will be using the FOR x ROWS.  I think its these two
that are the problem when explicitly definition a MODS.  

        You DO NOT need to create a character field for a date in a MODS.
Just make sure the date field is LIKE() defined (from internal or external
definition) and make sure that the program and SQL date formats are the
same.  
        
        If you want I will send you my test source that works for me.

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


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Kurt Anderson
Sent: Tuesday, July 19, 2005 8:25 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Embedded SQL - fetching a date

Wanted to thank everyone for their input.

Also wanted to share what I've found, although it's not much.  :)

Going into it, I was aware that using a simple Select Into statement
allows you to dump a date format field into a program-defined date
format field.

Unfortunately using a Fetch into a MODS host structure doesn't allow for
a target date format subfield.  The target subfield must be defined as
an alpha field.  The SQL precompiler will not accept (or understand?) a
date format subfield.  


Kurt Anderson
Application Developer
Highsmith Inc


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.