×
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.
It's in good practice (IMHO) to always use IFNULL, when the possibility of
null values can appear.
That way you your query won't bomb, and you can have a fall-back value if
it is null.
David
David L. Mosley, Jr.
Technical Solutions Architect
Dancik International, Ltd.
2000 CentreGreen Way, Suite 250
Cary, NC 27513
www.dancik.com
"Monahan, Kevin" <KMonahan@xxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/18/2010 11:36 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
<rpg400-l@xxxxxxxxxxxx>
cc
Subject
SQLRPGLE Fetch with Null field values
Hi all, I need help!
I'm trying to run a SQLRPGLE program with a Fetch Into clause with
possible null values.
The Select statement (skinnied down) is as follows:
Sel = 'Select oh, +
a.WHSE, a.SKU, a.HANDLCDE, a.COORDGRP, a.OH#MMS, +
From @SISYNWRK a left join @synppoh1d on a.sku = icmpno +
Where ( a.Flg_01 = '' '' and a.flg_08 = '' '') +
and a.Whse = ? and a.sku not in (select isetno from sethdr) ';
The Fetch is
Fetch Next from SelectStmt into :DSSis800
The host variable DSSis800 is defined as
d DSSis800 e ds extname(@SIS800WPF)
and the field OH is defined in DDS as 6S 0 with ALWNULL and DFT(0)
When I run the program I get a message "Indicator variable required."
and no data is copied.
How can I get this to populate the external data structure (I run the
Fetch through a Do Loop and write to the file), or how do I define an
"Indicator variable" for the null-capable field?
Thanks,
Kevin Monahan
Systems Analyst
Casual Male Retail Group
781-828-9300 x2785
kmonahan@xxxxxxxx
Confidentiality Note: This e-mail, and any attachment to it, contains
privileged and confidential information intended only for the use of the
individual(s) or entity named on the e-mail. If the reader of this e-mail
is not the intended recipient, or the employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that
reading it is strictly prohibited. If you have received this e-mail in
error, please immediately return it to the sender and delete it from your
system. Thank you.
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.