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.
See this idea on ideas.ibm.com
Currently CL variables whose storage is defined inside another variable (known in RPG as a data structure) cannot be qualified to that variable. CL modules are getting more and more complex given the expanded features IBM has introduced. The number of variables are getting larger and so are the number of data structure sub-fields and they must have unique names within the module. It is getting harder and harder to devise self-documenting field names with only 10 characters to work with, which was the problem that RPG had for many years before IBM allowed for qualified data structures.
Current workaround: There is no work-around. Unique sub-field names have to be devised and heavily documented so that other programmers will know what is going on.
Proposed resolution: I propose changing the DEFVAR parameter in the DCL command to have a 3rd element. It would have a default of *UNQUAL (for an unqualified sub-field) and it would allow a 2nd value of *QUAL (for a qualified sub-field).
DCL VAR(&QUALNAME) TYPE(*CHAR) LEN(20)
DCL VAR(&NAME) TYPE(*CHAR) STG(*DEFINED) LEN(10) +
DEFVAR(&QUALNAME 1 *QUAL)
DCL VAR(&LIB) TYPE(*CHAR) STG(*DEFINED) LEN(10) +
DEFVAR(&QUALNAME 11 *QUAL)
Variables declared this way can only be referenced with the qualifying name they're defined in, like so:
CHGVAR VAR(&QUALNAME:&NAME) VALUE('MYOBJ')
CHGVAR VAR(&QUALNAME:&LIB) VALUE('*LIBL')
This way other CL data structures can be defined with the same sub-fields:
DCL VAR(&OUTQ) TYPE(*CHAR) LEN(20)
DCL VAR(&NAME) TYPE(*CHAR) STG(*DEFINED) LEN(10) +
DEFVAR(&OUTQ 1 *QUAL)
DCL VAR(&LIB) TYPE(*CHAR) STG(*DEFINED) LEN(10) +
DEFVAR(&OUTQ 11 *QUAL)
CHGVAR VAR(&OUTQ:&NAME) VALUE('MYOUTQ')
CHGVAR VAR(&OUTQ:&LIB) VALUE('MYLIB')
(In RPG the separator character is a period(.) but in CL it's a valid character in variable names, so another character was needed. The best fit for this seemed to be the colon(:) character.)
Of course, if need be the entire data structure can also be referenced as:
CHGVAR VAR(&QUALNAME) VALUE('MYOBJ *LIBL')
Idea priority | Medium |
By clicking the "Post Comment" or "Submit Idea" button, you are agreeing to the IBM Ideas Portal Terms of Use.
Do not place IBM confidential, company confidential, or personal information into any field.
You want to have more and more features of RPG in the CL language. It would be more helpful and productive to use RPG instead and add the ability to issue a CL command directly from within RPG, without QCMDEXC.
Commands that use return variables will be more comfortable in RPG.
The cost to implement would not be worth the benefit.
A group of 3 RFEs are related enhancements that COMMON Americas Advisory Council (CAAC) believes would work well together to enhance the CL language capabilities, so I am linking them together: 127728, 127731, 127732.
Nancy Uthke-Schmucki - CAAC Program Manager
The CAAC has reviewed this requirement and recommends that IBM view this as a high priority requirement that is important to be addressed. This would add to the ability to work with APIs by expanding the relatively new *DEFINED declarations to be able to qualify variable names, and then have multiple instances of a data structure.
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 RFEs on the broader IBM i community, and has therefore reviewed your RFE.
For more information about CAAC, see www.common.org/caac
For more details about CAAC's role with RFEs, see http://www.ibmsystemsmag.com/Blogs/i-Can/May-2017/COMMON-Americas-Advisory-Council-%28CAAC%29-and-RFEs/
Nancy Uthke-Schmucki - CAAC Program Manager
IBM has modified some of the information in this request. In particular, the Source was updated to indicate this RFE came from the COMMON User Group. Please contact us if you have any questions.
The CL language is lacking a lot behind HLL like RPG.
Instead of adding one function or two, it would be more wise to add the ability to execute CL commands directly from within RPG. Like SQL. and have everything in one language. It a bit silly to have a CL program for just one or 2 lines, like RTVSYSVAL or CPYF.
Just add EXEC CL from within RPG, similar to EXEC SQL.
An additional suggestion of *FIRST and *NEXT values for the position parameter would be helpful.
I would suggest using the same syntax as when there are multiple files declared in a CL program where the field names for a file are prefixed by the OPNID parameter value and an underscore. So the qualified field names of a data structure would be:
DCL VAR(&OUTQ) TYPE(*CHAR) LEN(20)
DCL VAR(&NAME) TYPE(*CHAR) STG(*DEFINED) LEN(10) DEFVAR(&OUTQ 1 *QUAL)
DCL VAR(&LIB) TYPE(*CHAR) STG(*DEFINED) LEN(10) DEFVAR(&OUTQ 11 *QUAL)
CHGVAR VAR(&OUTQ_NAME) VALUE('MYOUTQ')
CHGVAR VAR(&OUTQ_LIB) VALUE('MYLIB')