logo
Powered by QM on a Rpi server

KnowledgeBase 00087: Using Inline Prompts to Process a Select List

Last updated: 22 Jul 2016
Applies to: All versions
Search  
Top level index       Full Index Search Tips
Previous article     Next article

This article was originally published as a Tip of the Week.

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,

   <<Ln,ID>> 
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.


Example

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.

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


Related Articles

00036: Inline Prompts



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