|Powered by QM on a Linux server|
KnowledgeBase 00087: Using Inline Prompts to Process a Select List
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.
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
00036: Inline Prompts