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


  • Subject: Re: Need HELP WITH NULL HANDLING IN SQLRPGLE ---
  • From: "R. Bruce Hoffman, Jr." <rbruceh@xxxxxxxxxxxxx>
  • Date: Fri, 29 Sep 2000 08:46:50 -0400

Jeff,

you showed us the wrong part, we need to change the fetch...

into ...   :LMBRAM :isNullField, ...

you need someplace for the retreive to tell you that the field is null, that
is the indicator variable in the fetch, separated by no comma, this field
will be -1 if the field is null.



===========================================================
R. Bruce Hoffman, Jr.
 -- IBM Certified Specialist - AS/400 Administrator
 -- IBM Certified Specialist - RPG IV Developer

"Those who would give up essential Liberty,
  to purchase a little temporary Safety,
  deserve neither Liberty nor Safety."

     - The Papers of Ben Franklin

-----Original Message-----
From: Jeffrey Silberberg <jsilberberg@mindspring.com>
To: MIDRANGE-L@midrange.com <MIDRANGE-L@midrange.com>
Date: Thursday, September 28, 2000 11:45 PM
Subject: Need HELP WITH NULL HANDLING IN SQLRPGLE ---


>I have an SQLRPGLE  that will not run. The Left outer Join results in a
Null
>Field for LBRNAM
>when there is no LMBR present and I can not figure out how to make LMBRAM a
>Null
>Capable Field in this Data structure.  ??
>
>
>I Get the following in the Joblog each time it runs:
>
>"Message ID . . . . . . :   SQL0305
>Date sent  . . . . . . :   09/28/00      Time sent  . . . . . . :
22:08:06
>
>Message . . . . :   Indicator variable required.
>
>Cause . . . . . :   A FETCH, an embedded SELECT, a CALL or a SET or VALUES
>  INTO statement has resulted in a null value, but an indicator variable
was
>  not specified for host variable LMBRAM.  The relative position of the
host
>  variable in the INTO clause or parameter list is 14. If the host variable
>  name is *N, an SQLDA was specified.
>Recovery  . . . :   Specify an indicator variable, and precompile the
>program
>  again.
>"
>
>    Every time i trya nd run it. And between the Info Center and the Books
I
>can not find an
>answer on how to get this to work. Can someone give me a hint please !!
>0001.00 H ALWNULL(*USRCTL)
>< S N I P >
>0013.00 DHostRec          DS
>0014.00 D LREGSQ                         9  0 INZ(0)
>0015.00 D LMBRID                         9  0 INZ(0)
>< SN I P >
>0026.00 D LDTCRT                         8S 0 INZ(0)
>0027.00 D LMBRAM                         7P 2
>0029.00 C**
>0030.00 C/Exec Sql
>0031.00 C+ DECLARE C1 CURSOR FOR SELECT LREG.LREGSQ, LREG.LMBRID,
>0032.00 C+ LREG.LFNAME, LREG.LLNAME, LREG.LADDR1, LREG.LZIPC5, LREG.LZIPC4,
>0033.00 C+ LREG.LPAYCD, LREG.LREGDO, LREG.LREGAM, LREG.LCCNM, LREG.LEXDT,
>0034.00 C+ LREG.LDTCRT, LMBR.LMBRAM FROM MEMLIB1/lreg LEFT OUTER JOIN
>0035.00 C+ memlib1/lmbr ON lreg.lregsq = lmbr.lmbrsq WHERE LREG.LDTCRT =
>0036.00 C+ :DateSlt FOR READ ONLY
>0037.00 C/End-Exec
>
>
>TIA,,
>JMS....
>
>
>
>+---
>| This is the Midrange System Mailing List!
>| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
>| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
>| To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
>| Questions should be directed to the list owner/operator:
david@midrange.com
>+---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.