Powered by QM on a Linux server
Help and Support

KnowledgeBase 00087: Using Inline Prompts to Process a Select List

Last updated: 27 Dec 2018
Applies to: All versions
Top level index       Full Index Search Tips
Previous article     Next article

The L Control Element

Inline prompts allow information to be inserted into a command dynamically as a sentence, paragraph or menu is executed. This information may come from a prompt displayed to the user, the command line, a data record, or various other places. The L control element of an inline prompt directs the command processor to take data from a select list. For example,

The optional n following the L control code is the select list number and defaults to 0.

In this example, the prompt text element (ID) is not strictly necessary unless the extracted value is to be used more than once. Simply using a second inline prompt would read the next item from the select list.

An inline prompt using the L control code returns a null string when the list is exhausted.


The paragraph below builds a select list of all object code items in the file identified on the command line or in response to a prompt. It then reads items from this list, cataloguing the program in global mode with an asterisk prefix.

   SELECT <<I2,File>>.OUT 
      IF "<<L,ID>>" = "" THEN STOP 
      CATALOGUE <<File>> *<<ID>> 

Related Articles

00036: Inline Prompts

Please tell us if this article was helpful
Very     Slightly     Not at all
Email (optional)