Q
Problem solve Get help with specific problems with your technologies, process and projects.

Use QCMDEXC to execute a command via CL

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

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close