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




Use either a null indicator or use COALESCE function to replace null value
with some other value. Such as



D Field1 s 10
D Field1NullInd s 5I 0


declare c1 cursor for
select b.field1 from file1 a
left join file2 b on keyfield

open c1

fetch c1 into :field1 :field1nullind
etc...

Or change the select to select coalesce(b.field1, ' ') from ...




--

Michael Schutte
Admin Professional



Bob Evans Holiday Farmhouse Feast, Serves 6-8 l $74.99
A complete homestyle meal TO GO, ready to heat at home, serve & enjoy!
Perfect for Thanksgiving, Christmas or holiday entertaining.
For more information, visit www.FarmhouseFeast.com





Tomasz Skorża
<t.skorza@agriplu
s.pl> To
Sent by: midrange-l@xxxxxxxxxxxx
midrange-l-bounce cc
s@xxxxxxxxxxxx
Subject
Wrapped message queue during
03/22/2010 09:21
AM


Please respond to
Midrange Systems
Technical
Discussion
<midrange-l@midra
nge.com>






Hi

I have some program SQLRPGLE which enter data into one file.

When I call this program in batch I get message that message queue ais
wrapped and then if I looking to job que I see that there are maaany
messages:

Additional Message Information

Message ID . . . . . . : SQL0305 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 03/22/10 Time sent . . . . . . :
14:03:59

Message . . . . : Indicator variable required.
Cause . . . . . : A FETCH, embedded SELECT, CALL, GET DESCRIPTOR, or
a SET
or VALUES INTO statement has resulted in a null value, but an indicator
variable was not specified for host variable PSALPH. The relative
position
of the host variable in the INTO clause or parameter list is 23. If
the host
variable name is *N, a descriptor area was specified.
If this error occurs on a GET DESCRIPTOR statement, the null value is
being returned but the INDICATOR item was not specified on the GET
DESCRIPTOR statement.
Recovery . . . : Specify an indicator variable, and precompile the
program
again.
If this is a GET DESCRIPTOR statement, specify both the DATA item
and the

INDICATOR item. Precompile the program again.

My program has statements:

DECLARE CURSOR
OPEN CURSOR
FETCH NEXT
some RPG code
FETCH NEXT
CLOSE CURSOR

My SQL return some rows where PSALPH (from left joined file) are NULL.
How to avoid this error?

--
Regards

Tomek

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.