In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

VERBatim - V39

Subroutine to do ? processing at TCL. Passed single value in which is returned 1 for EXIT and 0 for continue. Sentence to be analysed is in @SENTENCE. For the (many) subscribers who have not used G2.B - this is a little used feature tucked away on page J-12 of the "Advanced Revelation Technical Reference Manual" where it says "? - Causes TCL to prompt for information as the batch process is being run".

The ? processor has more features than this though. If you wish to devise simple reports to prompt the user for values to be entered at runtime and a collector window seems excessive then this is for you.

Simply, anything processed by RTP18 which includes question marks will be passed to V39 for processing. V39 will expand these question marks and return the new @SENTENCE to RTP18 for further processing. This could be used in any TCL command, EG

         CLEARFILE ?File to Clear?

COPY VOC ?old name? TO:?alias?

however it has its greatest use when used with the LIST command. Thus if a list of all amounts on file greater than a user specified amount was required, the following command could be used

LIST STOCK WITH AMTS > ?Quantity to be GT?

V39 would automatically add in the word "Enter" and prompt the user to "Enter Quantity to be GT"? If the user typed in 100, the system would execute the TCL sentence

LIST STOCK WITH AMTS > 100

Note that the amount entered by the user was not enclosed in quotes so this would not be effective for literal comparisons. To achieve literal comparisons enclose the text within the question marks in quotes, eg

LIST STOCK WITH COLOUR = ?"colour of item"?

Note that as this routine is being called directly from RTP18, @SENTENCE is not modified on the TCL stack so F2 would not show the expanded version.

If the user types END or presses Esc the report will abort.

A special case exists where in place of a literal message, the dictionary name of a valid item in the current file (or the dict of VOC) can be substituted. EG

LIST STOCK WITH COLOUR = ?"COLOUR"?

This then prompts the user with the message in field 12 or field 3 of the dictionary item. If the user enters a question mark, the system will display the help information on line 14 of the dictionary item, and if the user enters two question marks the system will display the edit patterns.

If more than one set of prompts are included on an RLIST sentence eg

LIST VOC WITH F1 = ?F1? AND WITH F4 = ?F4?

then typing in ^ or TOP will return prompting to the first prompt in the sentence.

A final special case is where it is required to prompt the user for several values, for example where a report on several colours is required. In this case just append three periods to the closing question mark and the system will prompt for additional values until a null value is entered eg

LIST STOCK WITH COLOUR = ?COLOUR?...

This would produce a report equivalent to

LIST STOCK WITH COLOUR = "C1" "C2" "C3" .....

(Volume 1, Issue 7, Pages 7,8)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel