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



CREATE PROCEDURE TEST/GETLIB
(IN out_loc CHARACTER (4),
OUT div_lib VARCHAR(10)
)

LANGUAGE SQL
DETERMINISTIC
READS SQL DATA

P1: BEGIN
SELECT MAX(lclib) INTO div_lib
FROM test/locf
WHERE lcwhse = out_loc
AND lcbas IN ('S','V');
END P1

I have GETLIB in debug break on END P1
This works as I expect: EVAL *GETLIB.OUT_LOC:S
Returning: *GETLIB.OUT_LOC:S = "82 "

This fails: EVAL *GETLIB.DIV_LIB:S
As does this: EVAL *GETLIB.DIV_LIB:C
And this: EVAL *GETLIB.DIV_LIB:x 10
All return: Pointer type error occurred.

This does 'work' (kinda): EVAL %localvars
Returning:
EVAL %localvars
argc = 4
argv = SPP:FDF64C5B78009BE0
GETLIB.OUT_LOC = SPP:FDF64C5B78009CE0
GETLIB.SQLP_I1 = 0
GETLIB.DIV_LIB.LEN = 10
GETLIB.DIV_LIB.DAT = SPP:FDF64C5B78009CE8

Thanks to Chuck for the hint about typing HELP on the debug cmd line,
but I did not see anything like VARCHAR - but apparently DIV_LIB is
NOT a 'string' type ? and GETLIB.DIV_LIB.DAT, using my System/370
Reference Summary, does not decode into anything meaningful to me.

After about 10 presses of F10 I return to my SQLRPGLE where,
surprisingly SQLCOD = 0, but, not surprisingly, the library name
returned is blank.

Additional Message Information
Message ID . . . . . . : CPF7E18 Severity . . . . . . . : 40
Message type . . . . . : Diagnostic
Date sent . . . . . . : 09/03/14 Time sent . . . . . . : 13:00:13

Message . . . . : Pointer type error occurred.
Cause . . . . . : The identifier in position 21 of the input buffer is not a
pointer.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.