home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RBBS-PC QUESTIONNAIRE FACILITIES 19-1
-
-
- 19. RBBS-PC QUESTIONNAIRE FACILITIES
- ------------------------------------
- RBBS-PC provides a script-driven questionnaire facility. RBBS-PC will
- process a questionnaire when a NEW caller logs in, before any caller logs
- off, or the user can select a questionnaire from a menu. To ask new users
- questions the file named in CONFIG parameter 84 must exist. To ask
- questions of users when they say G>oodbye the file named in CONFIG
- parameter 85 must exist. Questionnaires can also raise or lower the user's
- security level based on his/her responses. Answers to the questionnaire
- are appended to a file specified in each questionnaire script.
-
- RBBS-PC will only activate the corresponding script files if they exist,
- otherwise the functions are bypassed.
-
- The questionnaire script processor supports:
-
- - Branch to labels (forward and back branching)
- - Display lines
- - Display line and get response
- - Response validation (Multiple choice)
- - Numeric validation
- - Raising and lowering user security level
- - Aborting the questionnaire
- - Chaining to another questionnaire
- - Invoke a macro from within a questionnaire
- - "Turbo" key can be turned on from within a questionnaire
-
- The first line in every script file must contain the file name where the
- responses to the script will be appended, and the maximum security level a
- user can be raised to. The rest of each script file contains script
- commands. Script commands are 1 character in length and must be in column
- 1 of each script line.
-
- Following is a list and description of valid script commands:
-
- : A colon indicates a label command
- * An asterisk indicates a display data command
- ? A question mark indicates a display and wait for response command
- = An equal sign indicates a multiple choice branch command
- > A greater than symbol indicates a goto command
- + A plus sign indicates a raise security level command
- - A minus sign indicates a lower security level command
- @ An "at" sign means to abort questionnaire and do not write results
- & An ampersand means to establish a questionnaire chain
- T The letter "T" turns on the "turbo" key mode
- M The letter "M" executes a "macro"
- > Assigns a value to a work variable
-
- CONFIG parameter 94 controls the maximum number of work variables that can
- be handled by questionnaires.
-
- RBBS-PC questionnaires even support "graphics" versions of the
- questionnaires. Graphics versions use the standard convention of ending
- the filename with "C" for color graphics and "G" for ansi graphics. E.g.
- HLPRBBSC.DEF and HLPRBBSG.DEF are graphics versions of HLPRBBS.DEF.
-
-
-
- RBBS-PC 17.3A TECHNICAL REFERENCE MANUAL 19-2
-
-
- 19.1 Branching to Labels
- ------------------------
- : Colon (Label command)
- This command is used to provide labels that can be branched to from =
- and > commands.
-
- :QUESTION1
-
- Numeric labels are not recommended because they are easy to confuse with
- work variables. SmartText variables will be interpreted as such, eg.
- ":-{FN" will substitute the user's first name. SmartText and Work
- Variables are dynamically substituted into all questionnaire lines. For
- example,
-
- >-.[8].-
-
- will substitute the value of work variable 8 for "[8]", so that if 8 has
- "edit" as its value, it will go to the label "-.edit.-".
-
- The ability to get and substitute values, and to have graphics versions,
- means that questionnaires can support many of the features of full screen
- editing, including transmitting a template, then overlaying values into the
- template. An example that shows the power of questionnaires is
-
- ?29Change what field (1,2,...20)
- ?[29]Change field [29]. from [[29]] to
-
- This asks which field to change and stores answer in work variable 29 (i.e.
- value of work variable 29 is "7"). The second question then stores the
- answer in the value of work variable 29, displays the name of the work
- field being changed, and then displays the old value of the work variable.
- Suppose that the value of work variable 7 is "Yes". Then the series of
- substitutions RBBS-PC makes into the second line before executing it are:
-
- ?7Change field [29]. from [[29]] to
- ?7Change field 7. from [[29]] to
- ?7Change field 7. from [7] to
- ?7Change field 7. from Yes to
-
- 19.2 Display Data Command
- -------------------------
- * Asterisk (Display data command)
- This command is used to send data to the user. SmartText and Macro
- commands are interpreted before display (see section 7.8). "*/FL" will not
- display the "/FL" because it is interpreted as a macro command. If you
- want to work variables to overlay a display template, keeping it's length
- (e.g. for columnar display), put "/FL" after the "*". E.g. if variable 1
- has value "12345" and 2 has "abcdef", then
-
- */FL.[1]....[2]......
-
- will display ".12345..abcdef...", whereas
-
- *.[1]....[2]......
-
- will display ".12345....abcdef......".
-
- One of the more useful capabilities of macros that questionnaires can make
- use of is the ability to append data to any work file, where work variables
-
-
-
- RBBS-PC QUESTIONNAIRE FACILITIES 19-3
-
-
- are merged into a form. This allows the questionnaire data to be saved in
- virtually any format desired.
-
- The other extremely useful macro capability that questionnaires can utilize
- is the ability to retrieve data from a file into a form, in effect adding a
- data based file retrieval capability.
-
- 19.3 Display Data And Get Response
- ----------------------------------
- ? Question mark (Display data and get response)
- This command is used to send data to the user and wait for a response.
- The user will be required to input a response. The ENTER key alone is an
- invalid response. No other checks are made.
-
- ?DO YOU OWN YOUR OWN PC? (Y/N)
-
- The prompt command accepts an optional number which is interpreted as the
- number of the Work Variable to store the answer in. For example, "
-
- ?8Enter Dept
-
- will store the answer not only in the regular way for a questionnaire but
- also in work variable 8.
-
- 19.4 Multiple Choice Response
- -----------------------------
- = Equal sign (Response validation - Multiple choice)
- This command is used in conjunction with the ? command and must
- immediately follow the ? command for which it applies. This command allows
- for checking/editing of single character responses to the preceding ?
- command and allows branch logic to be exercised based on the response
- given. Multiple = commands must be coded on the same line. The format
- follows:
-
- =AXXXXXXXXX=BYYYYYYYYY= ZZZZZZZZZZ
-
- = Indicates that a single character comparison value follows
- A Is the comparison value
- X Is the label to branch to if the response is "A"
- = Indicates that a single character comparison value follows
- B Is the comparison value
- Y Is the label to branch to if the response is "B"
- = Indicates that a single character comparison value follows (SPACE)
- This is a special comparison value that is always used as the last
- comparison value and means "INVALID" response given
- Z Is the label to branch to if an invalid response is given
-
- Maximum line length is 255 characters and the last = on the line "MUST"
- have a comparison value of " " (SPACE).
-
- :QUESTION1
- ?Do you run a BBS system. (Y/N)
- =YQUESTION2=NQUESTION2= QUESTION1E
- :QUESTION1E
- *Please respond Y or N
- >QUESTION1
- :QUESTION2
-
-
-
- RBBS-PC 17.3A TECHNICAL REFERENCE MANUAL 19-4
-
-
- There is an additional format for the = command, where the comparison
- value of # (Pound sign) is used. This is used as a numeric check and
- encompasses 0-9, (), - and space. This format requires two entries.
- The first is to test for numerics and the second is the invalid response
- branch label (e.g. "=#QUESTION3= QUESTION2E").
-
- 19.5 Forward And Backward Branching
- -----------------------------------
- > Greater than sign (Forward and backward branching)
- This command is used to branch to specific labels within the script
- file.
-
- >QUESTION4
-
- 19.6 Raise/Lower User's Security Level
- --------------------------------
- + Plus sign (Raise user security level)
-
- This command will add the value in columns 2-6 to the default security
- level given new users or the current security level of old users.
-
- +5
-
- - Minus sign (Lower user security level)
-
- This command will subtract the value in columns 2-6 to the default
- security given new users or the current security level of old users.
-
- -1
-
- 19.7 Abort Questionnaire
- ------------------------
- @ At sign (Abort questionnaire)
-
- This command will terminate the questionnaire and NOT write the response
- to the output file as in the following example.
-
- :QUESTION1
- ?Have you answered the questionnaire before. (Y/N)
- =YQUESTION2=NQUESTION3= QUESTION1E
- :QUESTION1E
- *Please respond Y or N
- >QUESTION1
- :QUESTION2
- @
- :QUESTION3
-
- 19.8 Chain Questionnaire
- ------------------------
- & Ampersand (Chain questionnaire)
-
- This command will establish the next questionnaire in the chain. The file
- named in columns 2-80 will be used as a continuation to the current
- questionnaire when the current questionnaire reaches its last line.
- i.e. &L:\RBBS\QUESCONT.DEF
-
- 19.9 Turbo Keys
- ---------------
- T Turbo Key
-
-
-
- RBBS-PC QUESTIONNAIRE FACILITIES 19-5
-
-
- This is used to turn on Turbo Key for a prompt where a single keystroke is
- expected. TurboKey causes the next keystroke to be taken as the answer
- immediately without having to press Enter, if the caller has TurboKey on.
-
- 19.10 Macro Execute
- -------------------
- M Macro Execute
-
- This command is used to execute a specified macro named after the command,
- e.g. "M C:\RBBS\FIZ.IMC". Control returns to the questionnaire after a
- macro is executed. One of the most important capabilities macros add to
- questionnaires is the ability to append data to any file in any format
- desired. Hence the data in questionnaires can be saved where ever desired
- in whatever format desired. If a macro saves the data and you do not want
- the normal output on completion of the questionnaire, just abort the
- questionnaire at the end. Macros also have the ability to retrieve data
- from files and then display on the screen.
-
- 19.11 Assign Value
- ------------------
- < Macro Assign
-
- This command assigns a value to a work variable. For example, "<2 XT"
- assigns value "XT" to work variable 2.
-
-