I want to use QCMDEXC to execute a command via CL. I'm using variables to build the command string (&command with a CHGVAR to TCAT everything needed). This works perfectly. I don't however understand how the length variable is determined. Here's an example: I'm starting messenger plus. The command is MPLUS/STRMP. I can build this string perfectly, but don't know how I determine the length of the command. As a result, I don't know what to make the &length parm on the QCMDEXC command.
In your CL, the variable is declared as a fixed length. You can pass the full length of the field, or you can calculate the position of the last character in the string and pass that value. In CL, it is usually easier to pass the full length of the variable.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
Dig Deeper on RPG iSeries programming
Related Q&A from John Brandt
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.