🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.as400.misc
Article #142

Re: Interesting Problem with Dates

#142
From: Dale Berta
Date: Mon, 12 Feb 2001 14:11
46 lines
2591 bytes
Not 100% sure about this, but I think you need to put a compiler option on
CRTBNDRPG or CRTRPGMOD to handle null-capable fields. (ALWNULL in the DDS
was correct.) Then, in the program, when you read a record with null-capable
fields (like your date field), I think the null-field map is in the INFDS
somewhere (I could be wrong). Anyway, what you would do then is to set the
NULL-switch for your date field on before you write the record.

I suppose it might be easier if you used embedded SQL. If that's an option
for you, you could set the field to NULL directly in the INSERT statement.

"ricko" <ricko@softlad.co.uk> wrote in message
news:3a87c97a$1@d2o313.teliauk.com...
> Hi
>
> I am trying to populate a Sequel Database with Data from an AS400 File
> (ODBC). The AS400 file
> contains several DATE Fields that have the field date property assigned.
> (L).
>
> I do not always need the dates to contain a date i.e. I need them to be
> Null. However, When I run
> my RPG Program to populate the AS400 file, the Date fields default to
> 1940/01/01 (*ISO Default).
>
> This is causing a problem because the Application that uses the Sequel
> database displays these dates
> to the users and I need them to be Blank.
>
> The ALWNULL and DFT Keywords do nothing to help. I have changed the DDS to
> be a 6 char numeric
> field but then Sequel detects that its not a date field and rejects my
file
> transfer.
>
> I am trying to automate the entire process without and 'manual'
> intervention.
>
> Is there a solution??
>
> Thanks in Advance!
>
> Paul Cullen
>
>
>
>
Technical Details
Message-ID: <t8frjcrcm3d612@corp.supernews.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
References: <3a87c97a$1@d2o313.teliauk.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10e4c1,ba345bdd3e2c6d4
X-Google-Attributes: gid10e4c1,public
X-Google-Thread: 104581,ba345bdd3e2c6d4
X-Google-Attributes: gid104581,public
X-Google-Thread: 1077ec,ba345bdd3e2c6d4
X-Google-Attributes: gid1077ec,public
X-Google-ArrivalTime: 2001-02-12 06:09:27 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: "Dale Berta" <daleb@fast.net>
Newsgroups: comp.sys.ibm.as400.misc,es.comp.os.as400,it.comp.as400
Subject: Re: Interesting Problem with Dates
Date: Mon, 12 Feb 2001 09:11:56 -0500
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <t8frjcrcm3d612@corp.supernews.com>
References: <3a87c97a$1@d2o313.teliauk.com>
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Complaints-To: newsabuse@supernews.com
Lines: 48