String Parameters of Various Lengths
May 29, 2002 Timothy Prickett Morgan
Hey, Ted:
I have an RPG IV subprocedure that I call from several different programs. I use what I call the QCMDEXC method to pass a character string to it. That is, I pass two parameters–the character string and the length of the character string. I would like to eliminate the second parameter.
The subprocedure would have to determine the length of the character string that is passed to it. Is that possible?
— Karen
Yes, it’s possible. Your subprocedure needs the operational descriptor of the parameter. Here’s what you need to do.
Add the OPDESC keyword to the parameter