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



Have you tried changing &VALID to type *LGL?

On Dec 4, 2007 9:28 AM, Terry Anderson <terrya@xxxxxxxxxxxx> wrote:

Greetings List,
I have a subprocedure that I have been using since 2002 and it works
flawlessly when called from an RPG program. When I call it from a CL
program, it give me the "Pointer not set for location referenced" error.
Usually this happens when I forget to pass a parm or the parm being
passed is not the same size or data type as defined in the prototype.
However, when I run the program in debug I find that the error is not on
the variables being passed in, but on the variable being returned. The
return variable in the CL and the variable being returned by the
subprocedure are both one position character fields.

Has anyone ever seen this before? The fields in the prototype are
defined as CONST. Do I need to define the variables passed by the CL
differently to account for this? We are running V5R4.

The prototype is listed below along with the call from the CL.
&BUDBAKNAME is a field in file VCMBUDCPYF. It is defined as 10A.


D EXISTS PR 1
D POBJECT 10 CONST
D POBJECTTYPE 10 CONST
D POBJECTILIB 10 CONST OPTIONS(*NOPASS)



PGM PARM(&VCMLIB)

DCL VAR(&VCMLIB) TYPE(*CHAR) LEN(10)
DCL VAR(&OBJLIB) TYPE(*CHAR) LEN(10)
DCL VAR(&OBJTYPE) TYPE(*CHAR) LEN(10)
DCL VAR(&VALID) TYPE(*CHAR) LEN(1)
DCLF FILE(VCMBUDCPYF)

CHGVAR VAR(&OBJLIB) VALUE(&VCMLIB)

LOOP: RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(ENDCLPGM))

CHGVAR VAR(&OBJTYPE) VALUE('*FILE ')
CALLPRC PRC(EXISTS) PARM((&BUDBAKNAME) (&OBJTYPE) +
(&OBJLIB)) RTNVAL(&VALID)


Thanks,


Terry Anderson
Programming Manager
Citation Corporation
Switchboard 1.251.867.5481 ext 212
Direct Line 1.251.809.2312
Fax 251.867.0525
Cell 1.251.363.4975



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