|
Hey Scott,
A thought just hit me, what if I passed in the keys for the data in the
original file, did a chain and then tested for the *NULLIND locally in the
procedure?
The only difference is I am adding some overhead for the file lookup local
to the procedure.
Thoughts?
From: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date: 12/31/2009 12:36 PM
Subject: Re: Passing a Null Date to a Procedure
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
Hi Doug,
You need to declare options(*NULLIND) on the prototype. When you do
that, RPG will automatically pass the null indicator with the parameter.
However, bear in mind that it's not possible to declare a field on
D-spec with a null indicator. That means parameters passed to this
subprocedure have to be externally defined variables coming from
null-capable PFs declared on an F-spec. That severely limits the
reusability of your subprocedure. Personally I would give that a lot of
thought before using options(*NULLIIND)
Doug Palme wrote:
Is there any way to define a date value in a procedure interface asbeing
null capable?
I have checked the reference manual and so far have come up empty handed
on this.this
We have a file that allows for null capable dates and I have to pass
value to a procedure for some processing, but it does not like the usage
of the %NULLIND parm.
*RNF0342 20 3 The parameter for %NULLIND is not valid; %NULLIND is
ignored
*RNF0342 20 259 008812 Parameter WENDDATE for %NULLIND is not null
capable
%NULLIND is ignored.
Suggestions?
Douglas
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.