×
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.
I was having an issue with a program that calls a subprocedure where a
parameter is *Varsize.
I put together a sample module and program to recreate this (it's on V5R4,
I will test on V7R2 later tomorrow as well but I just wanted to get an idea
if there's something I'm missing.
Here's the module:
H NOMAIN
****************************************************************
* Prototypes *
****************************************************************
D #test_test PR 10I 0
D input 65535A options(*varsize)
D inputSize 10U 0 value
*//////////////////////////////////////////////////////////////*
* test
*//////////////////////////////////////////////////////////////*
P #test_test B Export
*--------------------------------------------------------------*
D #test_test PI 10I 0
D input 65535A options(*varsize)
D inputSize 10U 0 value
*--------------------------------------------------------------*
D inSize S 10U 0
*--------------------------------------------------------------*
/free
input = '?';
inSize = inputSize;
return inSize;
/end-free
*--------------------------------------------------------------*
P #test_test E
Here's the program:
D #test_test PR 10I 0
D input 65535A options(*varsize)
D inputSize 10U 0 value
*
D input1 S 257
D input2 S 1
D size S 10i 0
D rc S 10i 0
/free
input1 = '*';
input2 = '*';
size = %len(%trimr(input1));
rc = #test_test(input1:size);
size = %len(%trimr(input2));
rc = #test_test(input2:size);
*inlr = *on;
/end-free
When the first call to #test_test is done with a variable of 257 or larger,
it works as it should
When the second call to #test_test is done with a variable of 256 or lower,
it bombs with:
MCH3601 Escape 40 02/12/16 18:49:14.932384 QRNXIE
QSYS *STMT QRNXIE QSYS *STMT
From module . . . . . . . . :
QRNXMSG
From procedure . . . . . . :
_QRNX_SIGNAL_EXCP
Statement . . . . . . . . . : 1
Message . . . . : Pointer not set
for location referenced.
Cause . . . . . : A pointer was
used, either directly or as a basing
pointer, that has not been set to an
address.
Any ideas why this would be? I did a quick PTF search and came up with
nothing.
Brad
www.bvstools.com
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.