O'Reilly logo

Complete CL: The Definitive Control Language Programming Guide, Fourth Edition by Ron Hawkins, Doug Pence, Ted Holt, Kevin Forsythe, Ernie Malaga

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Advanced Topics

Selective prompting is one example of an advanced technique. With selective prompting, you activate the prompter for a command from within a CL procedure. In other words, a CL procedure can contain an instruction that causes the procedure to stop, display the command prompter for a particular command, and wait for the user to enter parameter values and press the Enter key. When the user presses Enter, the CL procedure continues to execute.

How to Code Selective Prompting

The key to selective prompting is a question mark (?) placed immediately before the command name. See Figure 13.1.

Table 13.1. An example of selective prompting.

PGM

   DCL &a          *CHAR    2
   ?SNDMSG
   CALL pgm1 (&a)

ENDPGM

The procedure shown in Figure 13.1 stops at ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required