If the “Command to run” string has a leading ?
like ?CALL &LIBRARY/&NAME
, then the command is displayed and editable before command is executed.
There are four varieties of Actions:
file
and ‘deploy first’ is enabled, deploy the workspace, then:If we have a “Call program” command with a “Command to run” string like this:
It will execute immediatly it is selected.
If the “Command to run” string has a leading ?
like ?CALL &LIBRARY/&NAME
, then the command is displayed and editable before command is executed.
For example, you might want to add PARM('Douglas' 'Adams')
to the end.
Rather than using the ”?”, you can have the Action prompt for values. The “Command to run” string can have embedded prompt string(s) to invoke prompting.
A “prompt string” has the format ${NAME|LABEL|[DEFAULTVALUE]}
where:
Suppose we have a “Call program, prompt for parms” action with the “Command to run” defined like this:
If we run the action it prompts like this:
If we complete the screen like this:
and click Execute a command like this is executed;
You can also use variables in the prompt string. If an action is defined like this:
&CURLIB will be substituted and the prompt will look like this when executed:
Here’s a more complex example of a “Run CRTBNDRPG (inputs)” action. The ‘Command to run” string is defined like this:
When executed, it prompts like this: