This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
The CAAC has reviewed this IBM Idea and recommends that IBM view this as a high priority Idea that is important to be addressed. Although the suggested solution is complex and therefore not preferred as a solution for providing variable length parameters, we believe having variable length parameters in CL would be highly desirable for the IBM i Community. In addition, CL programs can be used to process commands that already have the capability of declaring variable length parameters. To make the handling of those parameters easier in CL, variable length declarations in CL would be very helpful.
Background: The COMMON Americas Advisory Council (CAAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CAAC has a key role in working with IBM i development to help assess the value and impact of individual IBM Ideas on the broader IBM i community, and has therefore reviewed your Idea.
For more information about CAAC, see www.common.org/caac
Nancy Uthke-Schmucki - CAAC Program Manager
IBM agrees with the request and a solution appears to be desirable and feasible. IBM intends to provide a solution. However, IBM's plans may change and no commitment is made that a solution will be provided.
.When passing a parameter as variable by CALLPRC, the variable type should be the same in the caller and callee. As the following simple program:
========= CL =========
PGM
DCL VAR(&NAME) TYPE(*CHAR) LEN(14)
DCL VAR(&LEN) TYPE(*INT) STG(*DEFINED) LEN(4) +
DEFVAR(&NAME)
CHGVAR VAR(%SST(&NAME 5 10)) VALUE('Danmark')
CHGVAR VAR(&LEN) VALUE(7)
CALLPRC PRC(SUBPRC1) PARM((&NAME *BYVAL))
ENDPGM
=====================
========= RPG =========
**free
ctl-opt nomain;
dcl-proc SUBPRC1 export;
dcl-pi *n;
name varchar(10:4) VALUE;
end-pi;
dsply ('hello ' + name);
return;
end-proc SUBPRC1;
======================
It works well.
I don't think *BYVAL2 or *BYVAL4 is necessary when passing variables as parameter.
For the part of providing a new data type of varying length character string, I prefer the following format.
DCL VAR(&VAR) TYPE(*VARCHAR2) LEN(100)
DCL VAR(&VAR) TYPE(*VARCHAR4) LEN(100)
IBM has received this requirement and is evaluating it. IBM will provide a response after evaluation is complete.
I can see that you have planned "Allow expressions in CL CALL and CALLPRC commands"
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=125376
for future release.
Thus it would be an idea to implement *BYVAL2 and *BYVAL4 in CALLPRC.
The resulting copy of the parameter could then automatically have the length set up.