home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / sri314_b.zip / PART3 < prev    next >
Text File  |  1990-05-14  |  281KB  |  9,542 lines

  1.  
  2.      SR-Info/VP-Info Reference Manual           Page 226          SECTION 4
  3.  
  4.  
  5.  
  6.                                       FIND
  7.  
  8.      Find a record by its index in the selected data file.
  9.  
  10.      ╔════════════════════════════════════════════════════════════════════╗
  11.      ║ FIND <string>                                                      ║
  12.      ╚════════════════════════════════════════════════════════════════════╝
  13.  
  14.           FIND is one of a family of commands that finds a record in an
  15.      indexed data file by matching a given string with key values in the
  16.      index file:
  17.  
  18.           FIND positions the file on the first record in the index matching
  19.                the FIND string (no-find positions the file at the top of
  20.                file)
  21.           LAST positions the file on the last record in the index matching
  22.                the FIND string (VP-Info Professional only) (no-find
  23.                positions the file at the top of file)
  24.           NEAREST positions the file on the first record in the index equal
  25.                to or greater than the FIND string (VP-Info Professional
  26.                only)
  27.           SEEK is identical to FIND, except that it searches for the match
  28.                to the value of a character expression instead of a string
  29.                constant (VP-Info Professional only) (no-find positions the
  30.                file at the top of file)
  31.  
  32.           All forms allow a search to be made on a character expression
  33.      when the expression is preceded by the macro symbol "&".  When the
  34.      variable var='TAYLOR', all of the following command lines are
  35.      equivalent:
  36.  
  37.      FIND TAYLOR
  38.      FIND &var
  39.      SEEK var            (VP-Info Professional only)
  40.  
  41.           In Conversational SR-Info/VP-Info, just type FIND and the key.
  42.  
  43.           Examples:
  44.  
  45.      1>FIND TAYLOR
  46.      1>FIND TOM
  47.  
  48.           If <string> evaluates the same for two records, the second record
  49.      will never be found with FIND.
  50.  
  51.           If SET DELETE ON, deleted records will not be found.  (See the
  52.      command SET.)
  53.  
  54.           Numbers must always be treated as strings, even if the key
  55.      expression is a numeric field.  If NUM is a numeric field of width 2,
  56.      FIND 1 will not find 1, but FIND &STR(1,2) or FIND &' 1' will work.
  57.  
  58.  
  59.  
  60.  
  61.      FIND                        SRI  VPI  VPIN                        FIND
  62.      SR-Info/VP-Info Reference Manual           Page 227          SECTION 4
  63.  
  64.  
  65.           For the users' convenience, Conversational SR-Info/VP-Info
  66.      converts all command lines to upper case before execution.  So, to
  67.      find the inventory numbers that start with AB, type either of the
  68.      following two commands:
  69.  
  70.      1>FIND AB
  71.      1>FIND ab
  72.  
  73.           It follows that
  74.  
  75.      1>FIND Taylor
  76.  
  77.      is understood by SR-Info/VP-Info as FIND TAYLOR.  If you have to find
  78.      Taylor, use one of the following forms:
  79.  
  80.      1>FIND &'Taylor'
  81.      1>SEEK 'Taylor'        (VP-Info Professional only)
  82.  
  83.      or if name='Taylor' use one of the following forms:
  84.  
  85.      1>FIND &name
  86.      1>SEEK name            (VP-Info Professional only)
  87.  
  88.           In a SR-Info program, put the key in a memory variable <memvar>
  89.      and then use FIND &<memvar> to find the record.
  90.  
  91.           Example:
  92.  
  93.      name='Taylor'
  94.      FIND &name
  95.  
  96.           If FIND is successful, the value of the current record pointer
  97.      (as shown by the # and RECNO( functions) is set to the current record
  98.      number, and the system variable :NEAR is set to the same number.
  99.  
  100.           If the record is not found, the current record pointer will be
  101.      set to 0 and the value of :NEAR will be set to the number of the first
  102.      record in the index with a key greater than the FIND string; if the
  103.      index contains no key greater than the FIND string, :NEAR is set to
  104.      the bottom of file, and EOF is set to T (true).
  105.  
  106.           The command for "if not found" is:
  107.  
  108.      IF #=0 or
  109.      IF RECNO()=0
  110.  
  111.           In Conversational SR-Info/VP-Info or in programs with SET TALK
  112.      ON, SR-Info/VP-Info sends the message "NO FIND" when a search is
  113.      unsuccessful.
  114.  
  115.      Notes:
  116.  
  117.           * FIND only works on the active index of the selected data file.
  118.  
  119.  
  120.  
  121.      FIND                        SRI  VPI  VPIN                        FIND
  122.      SR-Info/VP-Info Reference Manual           Page 228          SECTION 4
  123.  
  124.  
  125.                If that index was created with a selection condition, some
  126.                records may be excluded from the index. (See INDEX.)
  127.  
  128.           * With SET EXACT ON (see the SET command) only exact matches are
  129.                found.  The FIND string must be the same length as the index
  130.                key, and match exactly;  if SET EXACT OFF, the find string
  131.                may be shorter.
  132.  
  133.           * An index may be made insensitive to capitalization by using the
  134.                uppercase functions !( or UPPER( in index creation.  This
  135.                makes use of the FIND command much easier in Conversational
  136.                SR-Info/VP-Info. (See INDEX command.)
  137.  
  138.           * The macro symbol (&) has a wider definition when used with
  139.                FIND, LAST, NEAREST and SEEK than with other SR-Info/VP-Info
  140.                command.  With this group of commands only, it alerts
  141.                SR-Info/VP-Info that the string expression following is to
  142.                be evaluated and used as the FIND string.  (Macros in all
  143.                other commands are limited to fields and variables;
  144.                dimensioned variables, functions and concatenation are not
  145.                allowed.)
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.      FIND                        SRI  VPI  VPIN                        FIND
  182.      SR-Info/VP-Info Reference Manual           Page 229          SECTION 4
  183.  
  184.  
  185.  
  186.                                      FLUSH
  187.  
  188.      Update the selected data file on the disk.
  189.  
  190.      ╔════════════════════════════════════════════════════════════════════╗
  191.      ║ FLUSH                                                              ║
  192.      ╚════════════════════════════════════════════════════════════════════╝
  193.  
  194.           The current record of the selected data file is updated on the
  195.      disk.  This may prevent accidental loss of data due to power failure.
  196.  
  197.           This command updates only the selected data file; it does not
  198.      update other data files in use, nor does it safeguard index files,
  199.      text files, or DOS files.  After a power failure it may be necessary
  200.      to reindex the selected file.
  201.  
  202.           Example:
  203.  
  204.      1>FLUSH
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.      FLUSH                       SRI  VPI  VPIN                       FLUSH
  242.      SR-Info/VP-Info Reference Manual           Page 230          SECTION 4
  243.  
  244.  
  245.  
  246.  
  247.  
  248.      Declare global variables.
  249.  
  250.      ╔════════════════════════════════════════════════════════════════════╗
  251.      ║ GLOBAL <memvar list>                                               ║
  252.      ║                                                                    ║
  253.      ║ <memvar list>  the list of memory variables to be declared global  ║
  254.      ╚════════════════════════════════════════════════════════════════════╝
  255.  
  256.           When a program is chained to another program, all the variables
  257.      that were defined as global by the GLOBAL command will be passed to
  258.      the new program.
  259.  
  260.           The GLOBAL command should be the first command of any program.
  261.      It should definitely precede any command that involves a memory
  262.      variable.
  263.  
  264.           There can be only one GLOBAL command in a program.  No part of
  265.      the GLOBAL command can be a macro.  A matrix variable cannot occur in
  266.      a GLOBAL command.
  267.  
  268.           This is how the command works.  In PROG1, you find at the
  269.      beginning
  270.  
  271.      GLOBAL a,b,c,d
  272.  
  273.      This places in the memory variable table (in the internal
  274.      SR-Info/VP-Info data space, see Appendix A) the variable names: A, B,
  275.      C, D, in that order.  The variables at this stage have no type or
  276.      data.  When in PROG1, A is encountered, that will attach type and a
  277.      pointer to a value to A.
  278.  
  279.           Now PROG1 is chained to PROG2.  For PROG2 to receive the values
  280.      associated in PROG1 with A, B, C, and D, start with the command:
  281.  
  282.      GLOBAL a,b,c,d
  283.  
  284.      Note, however, that the variable names do not have to match (although
  285.      type must).
  286.  
  287.      GLOBAL x,y,c,d
  288.  
  289.      will create the variable X with the contents of A, Y with the contents
  290.      of B, C and D retain their names and types.
  291.  
  292.           If you start PROG2 with
  293.  
  294.      GLOBAL a,b,c
  295.  
  296.      then A, B, and C are inherited.  If you specify in PROG2 more global
  297.      variables, for instance,
  298.  
  299.  
  300.  
  301.      GLOBAL                      SRI  VPI  VPIN                      GLOBAL
  302.      SR-Info/VP-Info Reference Manual           Page 231          SECTION 4
  303.  
  304.  
  305.  
  306.      GLOBAL a,b,c,d,e
  307.  
  308.      then A, B, C, and D inherit their values and types from PROG1; E
  309.      becomes the fifth entry in the memory variable table, with no type or
  310.      value.
  311.  
  312.           Example:
  313.  
  314.           PROG1 is chained to PROG2 with the command:
  315.  
  316.      CHAIN PROG2
  317.  
  318.           PROG1 wants to pass to PROG2 the values of the following
  319.      variables: TRANSACT, PROCESS, CUSTRANGE, TYPE.  To accomplish this,
  320.      start both PROG1 and PROG2 with the command:
  321.  
  322.      GLOBAL transact,process,custrange,type
  323.  
  324.  
  325.           Note that when the execution of PROG2 starts, only these four
  326.      memory variables exist.
  327.  
  328.           Now suppose that PROG2 is chained to PROG3, and wants to pass to
  329.      PROG3 the variables TRANSACT, PROCESS, CUSTRANGE, TYPE, and TRDATE.
  330.  
  331.           Then the first command of PROG1 should be:
  332.  
  333.      GLOBAL transact,process,custrange,type
  334.  
  335.      of PROG2:
  336.  
  337.      GLOBAL transact,process,custrange,type,trdate
  338.  
  339.      and of PROG3:
  340.  
  341.      GLOBAL transact,process,custrange,type,trdate
  342.  
  343.           Now if PROG3 chains to PROG1, the variables TRANSACT, PROCESS,
  344.      CUSTRANGE, TYPE are still passed on, but not TRDATE.
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.      GLOBAL                      SRI  VPI  VPIN                      GLOBAL
  362.      SR-Info/VP-Info Reference Manual           Page 232          SECTION 4
  363.  
  364.  
  365.  
  366.                                        GO
  367.                                       GOTO
  368.  
  369.      Set current record pointer to new value.
  370.  
  371.      ╔════════════════════════════════════════════════════════════════════╗
  372.      ║ <num const>                                                        ║
  373.      ║ GO <num exp>                                                       ║
  374.      ║ GOTO <num exp>                                                     ║
  375.      ║ GO RECORD <num exp>                                                ║
  376.      ║ GOTO RECORD <num exp>                                              ║
  377.      ║ GO TOP                                                             ║
  378.      ║ GOTO TOP                                                           ║
  379.      ║ GO BOTTOM                                                          ║
  380.      ║ GOTO BOTTOM                                                        ║
  381.      ║                                                                    ║
  382.      ║ <num exp>/<num const>   the number to be assigned to #             ║
  383.      ╚════════════════════════════════════════════════════════════════════╝
  384.  
  385.           The commands GO and GOTO are identical.  They assign a new value
  386.      to #, the current record pointer (see Section 3.4).  The data file is
  387.      repositioned to the record with the new record number.
  388.  
  389.           The forms:
  390.  
  391.      GO <num exp>
  392.      GOTO <num exp>
  393.      GO RECORD <num exp>
  394.      GOTO RECORD <num exp>
  395.  
  396.      evaluate the numeric expression <num exp>, throw away any fractional
  397.      part, and assign the value to the current record pointer, #. So, any
  398.      one of the following commands:
  399.  
  400.      1>2
  401.      1>GO 2
  402.      1>GOTO 2
  403.      1>GO (2+2)/2
  404.  
  405.      accomplishes the same: the record pointer (#) is set to 2.  Note that
  406.  
  407.      1>(2+2)/2
  408.  
  409.      is not allowed.
  410.  
  411.           If the selected file is indexed, the index is adjusted
  412.      accordingly.
  413.  
  414.           GO TOP, GOTO TOP and GO BOTTOM, GOTO BOTTOM are used to position
  415.      the current record pointer to the top and bottom of the current data
  416.      file.  If there is no index in use, the TOP is Record 1, and BOTTOM is
  417.      the last record.  If an index is in use, then the TOP and BOTTOM are
  418.  
  419.  
  420.  
  421.      GO/GOTO                     SRI  VPI  VPIN                     GO/GOTO
  422.      SR-Info/VP-Info Reference Manual           Page 233          SECTION 4
  423.  
  424.  
  425.      the first and last records according to the index.
  426.  
  427.           Examples:
  428.  
  429.      1>USE employee
  430.      1>GOTO 2
  431.      1>DISPLAY name
  432.            2  Steiner
  433.      1>5
  434.      1>DISPLAY name
  435.            5  Poyner
  436.      1>GOTO 1
  437.      1>DISPLAY name
  438.            1  Marek
  439.      1>GO BOTTOM
  440.      1>DISPLAY name
  441.            6  Wilson
  442.      1>GO TOP
  443.      1>DISPLAY name
  444.            1  Marek
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.      GO/GOTO                     SRI  VPI  VPIN                     GO/GOTO
  482.      SR-Info/VP-Info Reference Manual           Page 234          SECTION 4
  483.  
  484.  
  485.  
  486.                                       HELP
  487.  
  488.      Request for information on SR-Info/VP-Info commands and related
  489.      topics.
  490.  
  491.      ╔════════════════════════════════════════════════════════════════════╗
  492.      ║ HELP [<string>]                                                    ║
  493.      ╟────────────────────────────────────────────────────────────────────╢
  494.      ║ Option:                                                            ║
  495.      ║                                                                    ║
  496.      ║ <string>   the topic for which help is wanted                      ║
  497.      ╚════════════════════════════════════════════════════════════════════╝
  498.  
  499.           The HELP command provides information on the syntax (format
  500.      rules) and use of the commands of SR-Info/VP-Info, and some related
  501.      topics; it is available only in Conversational SR-Info/VP-Info.
  502.  
  503.           The command
  504.  
  505.      1>HELP
  506.  
  507.      displays all the topics for which HELP is available.  Type HELP and
  508.      the topic description.
  509.  
  510.           The text is contained in the file SRI.HLP, VPI.HLP or VPIN.HLP,
  511.      which must be in the same directory as your version's MSG file, either
  512.      in the current directory or on the DOS path.  If the file is not
  513.      found, SR-Info/VP-Info will so advise the user.
  514.  
  515.           Examples:
  516.  
  517.           1.
  518.  
  519.      1>HELP
  520.  
  521.      displays the following screen:
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.      HELP                        SRI  VPI  VPIN                        HELP
  542.      SR-Info/VP-Info Reference Manual           Page 235          SECTION 4
  543.  
  544.  
  545.  
  546. ──────────────────────────────────────────────────────────────────────────────
  547. GENERAL HELP
  548.                               VP-Info Help
  549.  
  550. Use the arrow keys to move the lightbar and select a topic from the list
  551. below, then press the <ENTER> key.  You may also move the lightbar to the
  552. bottom of the screen and type the name of a specific command or function.
  553.  
  554.                               1. Commands List
  555.                               2. Functions List
  556.                               3. Color Attribute Table
  557.                               4. Command and Field Redirection
  558.                               5. Date Input Formats
  559.                               6. Date Output Formats
  560.                               7. Editing Keys
  561.                               8. Format Strings
  562.                               9. Get Tables
  563.                              10. REPORT Command
  564.                              11. TEXT
  565.                              12. Variables
  566.  
  567.  
  568. ────────────────────────────────────────────────────────────────────────────────
  569. Selection Bar . Select with ┘, Exit with <Esc>, or Enter command....
  570.             Enter topic ░░░░░░░░░░░░░░░
  571. ──────────────────────────────────────────────────────────────────────────────
  572.  
  573.           A selection bar can be moved with up and down arrows to any of
  574.      the 12 topics listed, or moved beyond the topic listing (up or down)
  575.      to the topic-entry window. Fill in any command or function name and
  576.      press <ENTER> for one or more screens of explanation, like this for
  577.      REPLACE:
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.      HELP                        SRI  VPI  VPIN                        HELP
  602.      SR-Info/VP-Info Reference Manual           Page 236          SECTION 4
  603.  
  604.  
  605.  
  606. ──────────────────────────────────────────────────────────────────────────────
  607. ROPEN(
  608.  
  609. Sequential file-opening function: opens a file for reading. Once you've
  610. opened a file with ROPEN(, you can use other file-handling functions to
  611. find and read data from the file; e.g., GET(, IN(, READ(, SEEK(, and
  612. SSEEK(.  To close the file, use the function CLOSE(.
  613.  
  614. Form: ROPEN(<filename>[,<file number]>)
  615.  
  616. Type: LOGICAL (DOS file handling)
  617.  
  618. In: <filename>  - a string or string expression: the file to open; if no
  619.      extension is given, VP-Info assumes TXT.
  620.  
  621.     <file number> - (optional) a number from 1 to 4: assigns a file number
  622.     to the DOS file being opened. Other file-handling functions can refer to
  623.     this file by number (default 1).
  624.  
  625. Out: The file is opened for reading. The function itself returns true (T) if
  626.      the action is successful, false (F) if not.
  627.  
  628.  
  629. ────────────────────────────────────────────────────────────────────────────────
  630. Previous Screen - <PgUp>, Exit with <Esc>, or Enter command............
  631.             Enter topic ░░░░░░░░░░░░░░░
  632. ──────────────────────────────────────────────────────────────────────────────
  633.  
  634.  
  635.           2.
  636.  
  637.      1>HELP ROPEN(
  638.  
  639.      displays the screen on ROPEN(, exactly as shown above.  Press <Pg Dn>
  640.      to get to the additional screens if available, <Pg Up> to get to
  641.      previous screen, or <Esc> to get to the command prompt.
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.      HELP                        SRI  VPI  VPIN                        HELP
  662.      SR-Info/VP-Info Reference Manual           Page 237          SECTION 4
  663.  
  664.  
  665.                                        IF
  666.  
  667.      Conditional execution of SR-Info/VP-Info program segment.
  668.  
  669.      ╔════════════════════════════════════════════════════════════════════╗
  670.      ║ IF <cond>                                                          ║
  671.      ║                                                                    ║
  672.      ║ <cond>     the condition to be evaluated; if true, segment is      ║
  673.      ║            executed                                                ║
  674.      ╚════════════════════════════════════════════════════════════════════╝
  675.  
  676.           The IF command allows conditional execution of a program segment.
  677.      The general form of this command is:
  678.  
  679.      IF <cond>
  680.         <program segment>
  681.      [ELSE
  682.         <ELSE program segment>]
  683.      ENDIF
  684.  
  685.           This works as follows: When the IF command is found, the
  686.      condition <cond> is evaluated.  If <cond> is true, the <program
  687.      segment> (a number of program lines) is executed.  The end of the
  688.      <program segment> is at the ELSE or at the ENDIF (whichever comes
  689.      first).
  690.  
  691.           If <cond> is false, SR-Info/VP-Info looks for ELSE.  If ELSE is
  692.      found, the <ELSE program segment> is executed.
  693.  
  694.           The execution continues with the program line following the
  695.      ENDIF.
  696.  
  697.           Note that ELSE is optional.
  698.  
  699.           There can be an IF command within an IF command; this is called
  700.      nesting.  Many level of nesting is permitted; however, too many levels
  701.      of nesting will give a compile-time error message: Stack overflow.
  702.  
  703.           Care should be taken to nest the IF commands properly in a DO
  704.      WHILE, DO CASE, or REPEAT program structure.  When editing with the
  705.      internal SR-Info/VP-Info programming editor (see WRITE command), Alt-F
  706.      reformats the file with all structures properly indented, making it
  707.      easy to see unbalanced structures.
  708.  
  709.           IF may not take a macro.  Since a line with a macro is not
  710.      compiled until runtime, SR-Info/VP-Info will be unable to handle
  711.      nesting properly if a macro is used, resulting in the error message
  712.      "ENDIF implies IF" or "ELSE implies IF."  For an alternative, see
  713.      example 4 below.
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.      IF                          SRI  VPI  VPIN                          IF
  722.      SR-Info/VP-Info Reference Manual           Page 238          SECTION 4
  723.  
  724.  
  725.  
  726.           Examples:
  727.  
  728.           1.
  729.  
  730.      IF count>5
  731.         STORE T TO ok
  732.      ELSE
  733.         IF count<2
  734.            STORE F TO ok
  735.         ENDIF
  736.         ? 'ok'
  737.      ENDIF
  738.  
  739.  
  740.           Indenting the program lines helps to show the level of nesting of
  741.      the structures.  In WRITE, Alt-F indents the lines and capitalizes the
  742.      command verbs.
  743.  
  744.           2. Rewrite:
  745.  
  746.      do while count<5
  747.      if name='DAVID'
  748.      name=name+fname
  749.      enddo
  750.      endif
  751.  
  752.      as follows:
  753.  
  754.      DO WHILE count<5
  755.         IF name='DAVID'
  756.            name=name+fname
  757.         ENDIF
  758.      ENDDO
  759.  
  760.  
  761.           3. Consider the following simple program:
  762.  
  763.      IF num=1
  764.         name='DAVID'
  765.      ELSE
  766.         IF num=2
  767.            name='GEORGE'
  768.         ELSE
  769.            IF num=3
  770.               name='TOM'
  771.            ELSE
  772.               name='UNKNOWN'
  773.            ENDIF
  774.         ENDIF
  775.      ENDIF
  776.  
  777.  
  778.  
  779.  
  780.  
  781.      IF                          SRI  VPI  VPIN                          IF
  782.      SR-Info/VP-Info Reference Manual           Page 239          SECTION 4
  783.  
  784.  
  785.           This series of nested IF commands (often called "cascading IFs")
  786.      is equivalent to the following DO CASE structure:
  787.  
  788.      DO CASE
  789.      CASE num=1
  790.         name='DAVID'
  791.      CASE num=2
  792.         name='GEORGE'
  793.      CASE num=3
  794.         name='TOM'
  795.      OTHERWISE
  796.         name='UNKNOWN'
  797.      ENDCASE
  798.  
  799.           The DO CASE form is much easier to understand.
  800.  
  801.           4.   If <cond> must be a macro, use the following technique
  802.      instead:
  803.  
  804.      cond2=' '                     ;make sure cond2 exists
  805.      cond2=&condition              ;assign macro to pre-existing variable
  806.      IF cond2                      ;now IF does not have a macro
  807.         ...
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.      IF                          SRI  VPI  VPIN                          IF
  842.      SR-Info/VP-Info Reference Manual          Page 240          SECTION 4
  843.  
  844.  
  845.                                      INDEX
  846.  
  847.      Create an index file.
  848.  
  849.      ╔════════════════════════════════════════════════════════════════════╗
  850.      ║ INDEX ON <str exp> TO <file> [FOR <cond>]                          ║
  851.      ║                                                                    ║
  852.      ║ <str exp>  the expression providing the key                        ║
  853.      ║ <file>     the name of the index file                              ║
  854.      ╟────────────────────────────────────────────────────────────────────╢
  855.      ║ Option:                                                            ║
  856.      ║                                                                    ║
  857.      ║ FOR <cond> a selction; only records for which <cond> is true are   ║
  858.      ║               included in the index.                               ║
  859.      ╚════════════════════════════════════════════════════════════════════╝
  860.  
  861.           The INDEX command creates an index file.  Index files are used:
  862.  
  863.           A.   To organize records into an apparent order according to some
  864.                key for listing, reporting, browsing, editing, etc.
  865.  
  866.           B.   To locate records quickly using the FIND, POST and UPDATE
  867.                commands (and in VP-Info Professional by NEAREST, LAST and
  868.                SEEK).  Each key must have a separate index file.
  869.  
  870.           C.   To make the file act as though it had only records matching
  871.                a given selection condition and had an apparent order
  872.                according to some key.
  873.  
  874.           The expression <str exp> must evaluate to a string of length at
  875.      most 60; otherwise, an error message is sent.  In addition, the
  876.      condition itself must be no more than 100 characters long.
  877.  
  878.           (Do not use COMP for the first four letters of an index file;
  879.      SR-Info/VP-Info is unable to open such a file.)
  880.  
  881.           Once an index file exists, the data file can be opened for use
  882.      with the index file; see the USE <data file> INDEX <index file>
  883.      command.  The commands: APPEND, BROWSE, CHANGE, EDIT, REPLACE, READ
  884.      automatically update the index files in use.  There can be many index
  885.      files in use, all are updated by these commands, but only one index
  886.      file works with FIND.
  887.  
  888.           If SET TALK ON, INDEX will output progress reports showing the
  889.      completion of each 100 records, and the total number of records
  890.      indexed.  Large files create temporary files which are then merged to
  891.      create the ultimate index.
  892.  
  893.           Index expressions should be of type string, but a numeric field
  894.      (not a numeric expression) can also be used.  If you wish to index on
  895.      a numeric expression, use the key STR(<num exp>) or PIC(<num exp>,
  896.  
  897.  
  898.  
  899.  
  900.  
  901.      INDEX ON                    SRI  VPI  VPIN                    INDEX ON
  902.      SR-Info/VP-Info Reference Manual          Page 241          SECTION 4
  903.  
  904.  
  905.      <format)) to convert the values to strings.  See the functions STR(
  906.      and PIC(.
  907.  
  908.           It is often helpful to use the upper-case functions, !( or
  909.      UPPER(, for string expression that mix upper-case letters and lower-
  910.      case letters, such as names, addresses, and so on.  This way, the data
  911.      is arranged in alphabetical order instead of the ASCII code order
  912.      which is often confusing.  See the functions CHR( and RANK(.
  913.  
  914.           On a network with SET NETWORK ON in VP-Info Professional Network
  915.      Edition, attempting to create an index while another user is accessing
  916.      a file with the same name will cause a LOCK error.
  917.  
  918.           See also the REINDEX command.
  919.  
  920.           Examples:
  921.  
  922.           1.
  923.  
  924.      1>USE employee
  925.      1>FIND B
  926.      27. File is not indexed.
  927.      1>INDEX ON name TO employee
  928.            6 RECORDS IN TOTAL INDEXED
  929.      1>LIST name
  930.            2  Balzer
  931.            1  Marek
  932.            5  Poyner
  933.            4  Rayme
  934.            3  Steiner
  935.            6  Wilson
  936.      1>FIND R
  937.      1>DISP name
  938.            4  Rayme
  939.  
  940.           Note that once the data file is indexed, you can use FIND.
  941.  
  942.           2.
  943.  
  944.           A data file has a numeric field AMOUNT containing numbers from 1
  945.      to 5,000; to index the file in decreasing order use the key:
  946.  
  947.      STR(10000-amount,6)
  948.  
  949.           3.
  950.  
  951.           A mailing list has 50,000 records, including about 250 from Utah.
  952.      An efficient way to select and print a listing of all those in Utah
  953.      is:
  954.  
  955.      USE maillist
  956.  
  957.  
  958.  
  959.  
  960.  
  961.      INDEX ON                    SRI  VPI  VPIN                    INDEX ON
  962.      SR-Info/VP-Info Reference Manual          Page 242          SECTION 4
  963.  
  964.  
  965.      INDEX ON zip TO utah FOR state='UT'
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.      INDEX ON                    SRI  VPI  VPIN                    INDEX ON
  1022.      SR-Info/VP-Info Reference Manual          Page 242.1        SECTION 4
  1023.                                    INDEX FROM
  1024.  
  1025.      Create an index file, using the index key of an existing Info, dBASE
  1026.      or Clipper index file.
  1027.  
  1028.      ╔════════════════════════════════════════════════════════════════════╗
  1029.      ║ INDEX FROM <filename> [TO <file>] [FOR <cond>]                     ║
  1030.      ║                                                                    ║
  1031.      ║ <filename>  the name of an existing Info, dBASE or Clipper index   ║
  1032.      ║               file                                                 ║
  1033.      ╟────────────────────────────────────────────────────────────────────╢
  1034.      ║ Options:                                                           ║
  1035.      ║                                                                    ║
  1036.      ║ <file>      the name of the Info index file to be created with     ║
  1037.      ║               the same key expression as <filename>; default is    ║
  1038.      ║               same as original <filename>                          ║
  1039.      ║ FOR <cond>  a selection; only records for which <cond> is true are ║
  1040.      ║               included in the index                                ║
  1041.      ╚════════════════════════════════════════════════════════════════════╝
  1042.  
  1043.           The INDEX FROM command creates an index file using the index
  1044.      expression of an existing index, even if the existing index is corrupt
  1045.      or even from any version of dBASE (II, III, or IV) or Clipper.  If no
  1046.      new name is given with the TO clause, the original file is
  1047.      overwritten.
  1048.  
  1049.           Index files are discussed more fully in the Index TO command
  1050.      below.
  1051.  
  1052.           When making an index from one created in dBASE or Clipper, be
  1053.      aware that some expressions from these languages are not permitted in
  1054.      Info; if an invalid expression is encountered, an error message is
  1055.      sent.  In addition, the <cond> used with the optional FOR clause must
  1056.      be no more than 100 characters long.
  1057.  
  1058.           For users with existing applications which must be retained in
  1059.      dBASE or Clipper, you may use the FILES ... ENDFILES structure to
  1060.      point to data and index files in your dBASE or Clipper directory.  To
  1061.      avoid confusion between dBASE and Info index files, which both use the
  1062.      default extension NDX, you will probably want to specify an extension
  1063.      such as KEY in Info.  See example 2 below for a program that uses a
  1064.      FILES ... ENDFILES structure and the DIR( function to search for index
  1065.      files in a dBASE directory to be used as templates for Info index
  1066.      files using the same data files.
  1067.  
  1068.           (Note: You may not use COMP for the first four letters of a data
  1069.      or index file; Info is unable to open such a file with the USE
  1070.      command.)
  1071.  
  1072.           Once an index file exists, the data file can be opened for use
  1073.      with the index file; see the USE <data file> INDEX <index file>
  1074.  
  1075.  
  1076.  
  1077.  
  1078.      INDEX ON                    SRI  VPI  VPIN                    INDEX ON
  1079.  
  1080.      SR-Info/VP-Info Reference Manual             Page 242.2       SECTION 4
  1081.  
  1082.  
  1083.      command.  The commands: APPEND, BROWSE, CHANGE, EDIT, REPLACE, READ
  1084.      automatically update the index files in use.  There can be many index
  1085.      files in use, all are updated by these commands, but only one index
  1086.      file works with FIND.
  1087.  
  1088.           If SET TALK ON and in Conversational Info, INDEX FROM will output
  1089.      progress reports showing the completion of each 100 records, and the
  1090.      total number of records indexed.  Large files create temporary files
  1091.      which are then merged to create the ultimate index.
  1092.  
  1093.           On a network with SET NETWORK ON in VP-Info Professional Network
  1094.      Edition, attempting to create an index while another user is accessing
  1095.      a file with the same name will cause a LOCK error.
  1096.  
  1097.           See also the INDEX ON and REINDEX commands.
  1098.  
  1099.           Examples:
  1100.  
  1101.           1.
  1102.  
  1103.      1>USE employee
  1104.      1>INDEX FROM emplnum TO emplnum
  1105.            6 RECORDS IN TOTAL INDEXED
  1106.      1>INDEX FROM emplnum
  1107.            6 RECORDS IN TOTAL INDEXED
  1108.      1>INDEX FROM emplnum TO empmarry FOR married
  1109.            4 RECORDS IN TOTAL INDEXED
  1110.  
  1111.           2.
  1112.  
  1113.           An application written in dBASE keeps its data and index files in
  1114.      C:\DATA.  The following FILES ... ENDFILES structure is in the CNF
  1115.      files executed when Info was started:
  1116.  
  1117.      FILES
  1118.      *.dbf,c:\data\
  1119.      *.ndx,c:\data\
  1120.      *.key,c:\info\key\
  1121.      *.frm,c:\info\
  1122.      ENDFILES
  1123.  
  1124.           This allows the following program to work properly, assuming that
  1125.      C:\DATA has no more than 60 data files and all index files share the
  1126.      first four letters with the data file on which they are created (an
  1127.      excellent practice):
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.      INDEX ON                    SRI  VPI  VPIN                    INDEX ON
  1139.  
  1140.      SR-Info/VP-Info Reference Manual             Page 242.3      SECTION 4
  1141.  
  1142.  
  1143.  
  1144.      ─────────────────────────────────────────────────────────────────────────
  1145.      **********************************************************************
  1146.      *  dBASEndx.prg   demonstration program for the INDEX FROM command
  1147.      *                 to allow automatic maintenance of INFO indexes with
  1148.      *                 the same keys as the indexes dBASE itself maintains
  1149.      *     Note the use of DIRF command to display directory of files
  1150.      *        according to FILES table set by FILES ... ENDFILES structure
  1151.      *     Note also that all variables have an off prefix (qz_) as a
  1152.      *        safeguard against confusing INFO if a data file has a field
  1153.      *        name identical to a variable name (FNAME is frequent, QZ_FNAME
  1154.      *        is improbable)
  1155.      *  (C) 1990 Sub Rosa Publishing Inc.  (Author: Sidney L. Bursten)
  1156.      **********************************************************************
  1157.      SET talk on      ;so you can see the indexing in progress
  1158.      WINDOW
  1159.      ERASE
  1160.      *name any data file in next line, so INFO compiler knows one will be opened
  1161.      USE E:TRANS COMPILE
  1162.      CLS
  1163.      DIRF *.dbf      ;get directory using FILES...ENDFILES structure
  1164.      SCREEN 1,2      ;save directory as screen display
  1165.      DO WHILE t
  1166.         SCREEN 2,1   ;restore saved screen
  1167.         ? '     In entering file names, do not use period or extension'
  1168.         ACCEPT 'Enter name of data file (RETURN only exits) ... ' to qz_fname
  1169.         IF qz_fname=' '
  1170.            @ 24,0    ;erase last line of screen
  1171.            CANCEL    ;end program
  1172.         ENDIF
  1173.         USE &qz_fname
  1174.         CLS
  1175.         qz_mask=TRIM(left(qz_fname,4))+'*.ndx'  ;build search mask for DIRF
  1176.         DIRF &qz_mask      ;get directory using FILES...ENDFILES structure
  1177.         SCREEN 1,3         ;store this screen, too
  1178.         DO WHILE t
  1179.            SCREEN 3,1      ;restore directory screen after every execution
  1180.            ? '     In entering file names, do not use period or extension'
  1181.            ACCEPT 'Enter name of index file (RETURN only exits) ... ' to
  1182.      qz_iname
  1183.            IF qz_iname=' '
  1184.               BREAK        ;get back into outer loop for next data file
  1185.            ENDIF
  1186.            qz_iname=trim(qz_iname)
  1187.      * add extension to output name so file goes into current directory
  1188.            qz_kname=qz_iname+'.key'
  1189.            INDEX FROM &qz_iname TO &qz_kname ;original file unchanged
  1190.            WAIT                           ;pause to display results
  1191.         ENDDO
  1192.      ENDDO
  1193.      ─────────────────────────────────────────────────────────────────────────
  1194.  
  1195.  
  1196.  
  1197.  
  1198.      INDEX ON                    SRI  VPI  VPIN                    INDEX ON
  1199.  
  1200.      SR-Info/VP-Info Reference Manual             Page 242.4       SECTION 4
  1201.  
  1202.  
  1203.  
  1204.           When run, the program displays the appropriate files, inputs a file
  1205.      name, and acts accordingly:
  1206.  
  1207.      ─────────────────────────────────────────────────────────────────────────
  1208.  
  1209.      APPTEST.DBF      734  9-06-90 10:07p   AVTEST.DBF       522  5-18-88  2:23p
  1210.      BIGKEY.DBF      8798  6-12-88  8:59a   BUG809.DBF      7347  8-09-90  9:46a
  1211.      CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-91  5:11p
  1212.      COMMS2.DBF      6342  1-07-91  1:00p   CUSTJUNK.DBF    7062  9-17-90  3:57p
  1213.      CUSTOMER.DBF     734 11-29-90 10:43p   DB4.DBF          406  9-10-90  1:38p
  1214.      EXPORT.DBF    635959 11-08-90  2:53p   F1.DBF          1249  1-07-91  6:56p
  1215.      F2.DBF          1187  1-07-91  6:56p   F3.DBF           505  1-07-91  6:56p
  1216.      FUNC.DBF        2832  1-07-91  7:38p   FUNC2.DBF        258  1-07-91  7:33p
  1217.      JOE.DBF          792  9-09-90 11:36a   JUNK.DBF       43254  1-14-91  8:21p
  1218.      JUNK2.DBF       5286  1-14-91 11:08a   JUNK8.DBF        121  9-18-90  7:52a
  1219.      JUNK9.DBF       1073  9-18-90  7:51a   LONG.DBF        1137  7-17-90 11:26a
  1220.      MATRIX.DBF      4130  9-04-90  1:50p   MTEST.DBF        522  7-28-88 10:27a
  1221.      NEWTEST.DBF      682  7-27-88 12:01p   NEWTEXT.DBF      522  7-27-88 10:48a
  1222.      PAINT2.DBF      4130  8-06-90 11:09a   PAINT3.DBF      4130  8-06-90 11:10a
  1223.      PAINTMEM.DBF    4130  8-06-90 11:09a   POS1.DBF       12830  5-28-88  9:58a
  1224.      PTEST.DBF        570  7-28-88 10:26a   SEN.DBF            1  9-06-90  9:36a
  1225.      SHARETST.DBF    6271  9-08-90  6:18p   SID.DBF        18432  9-02-90  6:28p
  1226.      SID2.DBF          66  6-03-88 11:38a   TEST.DBF        3312  1-14-91  8:18p
  1227.      TEST2.DBF        372  2-10-91  5:33p   TESTTEST.DBF    2094  3-17-90 12:40p
  1228.      THREE.DBF        189  6-12-88  9:21a   TRANSACT.DBF       2  5-02-88  2:48p
  1229.      VAITEST.DBF      552  7-28-88 12:32p   HELP.DBF         234  4-08-91  4:47p
  1230.  
  1231.      795837 bytes in 42 files.
  1232.      1724416 bytes remaining.
  1233.         ? '     In entering file names, do not period or use extension'
  1234.      Enter name of data file (RETURN only exits) ... customer
  1235.      ─────────────────────────────────────────────────────────────────────────
  1236.  
  1237.      CUSTNAME.NDX    1028 11-30-90  5:36p   CUSTNUM.NDX     1024  4-17-91 11:10a
  1238.      CUST1.NDX       1028  3-19-91  6:51p   CUST2.NDX       1028  3-19-91  6:51p
  1239.  
  1240.      4108 bytes in 4 files.
  1241.      1724416 bytes remaining.
  1242.         ? '     In entering file names, do not period or use extension'
  1243.      Enter name of index file (RETURN only exits) ...  cust2
  1244.             4 RECORDS READ
  1245.             4 RECORDS INDEXED
  1246.      WAITING
  1247.  
  1248.      ─────────────────────────────────────────────────────────────────────────
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.      INDEX ON                    SRI  VPI  VPIN                    INDEX ON
  1259.  
  1260.      SR-Info/VP-Info Reference Manual          Page 243          SECTION 4
  1261.  
  1262.  
  1263.  
  1264.                                      INPUT
  1265.  
  1266.      Input request for data of any type.
  1267.  
  1268.      ╔════════════════════════════════════════════════════════════════════╗
  1269.      ║ INPUT ['<string>'] TO <memvar>                                     ║
  1270.      ╟────────────────────────────────────────────────────────────────────╢
  1271.      ║ Option:                                                            ║
  1272.      ║                                                                    ║
  1273.      ║ '<string>'     prompt message                                      ║
  1274.      ╚════════════════════════════════════════════════════════════════════╝
  1275.  
  1276.           The command INPUT is used to enter string, numeric, or logical
  1277.      data into a memory variable, <memvar>.  It works the same way as the
  1278.      command ACCEPT (see ACCEPT), except that string input needs quotation
  1279.      marks.
  1280.  
  1281.           The type of the <memvar> is determined as follows:
  1282.  
  1283.           If the data typed in is in quotation marks, it is a string;
  1284.      <memvar> is of character type.
  1285.  
  1286.           If the data is a number, <memvar> is of numeric type.
  1287.  
  1288.           If the data is Y, y, N, n, T, t, F, or f, <memvar> is of logical
  1289.      type.
  1290.  
  1291.           The optional character string is used as a prompt.  A character
  1292.      expression cannot be used, but a macro is permitted, provided the
  1293.      macro expression includes quotation marks.
  1294.  
  1295.           ACCEPT is the preferred way to enter strings, since ACCEPT does
  1296.      not require quotation marks as delimiters.
  1297.  
  1298.           <memvar> cannot be a matrix variable.
  1299.  
  1300.           Examples:
  1301.  
  1302.      1>INPUT 'Your name: ' TO name
  1303.      Your name: 'Cathy'
  1304.      1>INPUT 'Your age: ' TO age
  1305.      Your age: 32
  1306.      1>INPUT 'Are you telling the truth? ' TO truth
  1307.      Are you telling the truth? n
  1308.      1>LIST MEMO
  1309.  
  1310.      Name          Type    Width    Contents
  1311.      NAME            C       5      Cathy
  1312.      AGE             N       8      32
  1313.      TRUTH           L       2      .F.
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.      INPUT                       SRI  VPI  VPIN                       INPUT
  1320.  
  1321.      SR-Info/VP-Info Reference Manual          Page 244          SECTION 4
  1322.  
  1323.  
  1324.      ** Total **  3  variables, 15  bytes
  1325.  
  1326.           The following illustrates use of a variable instead of a string
  1327.      as the prompt:
  1328.  
  1329.  
  1330.      1>prompt='"This is a prompt: "'
  1331.      1>INPUT &prompt TO hello
  1332.      This is a prompt:  4
  1333.      1>LIST MEMORY
  1334.  
  1335.      Name          Type    Width    Contents
  1336.      PROMPT          C      20      "This is a prompt: "
  1337.      HELLO           N       8      4
  1338.      ** Total ** 2  variables... 28  bytes
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.      INPUT                       SRI  VPI  VPIN                       INPUT
  1381.      SR-Info/VP-Info Reference Manual          Page 245          SECTION 4
  1382.  
  1383.  
  1384.  
  1385.                                       LAST
  1386.  
  1387.      Find the last record matching a given FIND string by its index in the
  1388.      selected data file.
  1389.  
  1390.      ╔════════════════════════════════════════════════════════════════════╗
  1391.      ║ LAST <string>                                                      ║
  1392.      ║                          VP-Info Professional only                 ║
  1393.      ║                                                                    ║
  1394.      ║ <string>   the characters to match in the current master index     ║
  1395.      ╚════════════════════════════════════════════════════════════════════╝
  1396.  
  1397.           LAST is one of a family of commands that finds a record in an
  1398.      indexed data file by matching a given string with key values in the
  1399.      index file:
  1400.  
  1401.           LAST positions the file on the last record in the index matching
  1402.                the FIND string (VP-Info Professional only) (no-find
  1403.                positions the file at the top of file)
  1404.           FIND positions the file on the first record in the index matching
  1405.                the LAST string (no-find positions the file at the top of
  1406.                file)
  1407.           NEAREST positions the file on the first record in the index equal
  1408.                to or greater than the FIND string (VP-Info Professional
  1409.                only)
  1410.           SEEK is identical to FIND, except that it searches for the match
  1411.                to the value of a character expression instead of a string
  1412.                constant (VP-Info Professional only) (no-find positions the
  1413.                file at the top of file)
  1414.  
  1415.           All forms allow a search to be made on a character expression
  1416.      when the expression if preceded by the macro symbol "&".  When the
  1417.      variable var='TAYLOR', both of the following command lines are
  1418.      equivalent:
  1419.  
  1420.      LAST TAYLOR
  1421.      LAST &var
  1422.  
  1423.           In Conversational SR-Info/VP-Info, just type LAST and the key.
  1424.  
  1425.           Examples:
  1426.  
  1427.      1>LAST TAYLOR
  1428.      1>LAST TOM
  1429.  
  1430.           If SET DELETE ON, deleted records will not be found.  (See the
  1431.      command SET.)
  1432.  
  1433.           Numbers must always be treated as strings, even if the key
  1434.      expression is a numeric field.  If NUM is a numeric field of width 2,
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.      LAST                           VPI  VPIN                          LAST
  1441.      SR-Info/VP-Info Reference Manual          Page 246          SECTION 4
  1442.  
  1443.  
  1444.      LAST 1 will not find 1, but LAST &STR(1,2) or LAST &' 1' will be
  1445.      successful.
  1446.  
  1447.           For the users' convenience, Conversational SR-Info/VP-Info
  1448.      converts all command lines to upper case before execution.  So, to
  1449.      find the inventory numbers that start with AB, type either of the
  1450.      following two commands:
  1451.  
  1452.      1>LAST AB
  1453.      1>LAST ab
  1454.  
  1455.           It follows that
  1456.  
  1457.      1>LAST Taylor
  1458.  
  1459.      is understood by SR-Info/VP-Info as LAST TAYLOR.  If you have to find
  1460.      Taylor, either use the string directly with the macro symbol:
  1461.  
  1462.      1>LAST &'Taylor'
  1463.  
  1464.      or if name='Taylor' use the following:
  1465.  
  1466.      1>LAST &name
  1467.  
  1468.           In a SR-Info program, FIND the key in the file, use the LIMIT
  1469.      command to limit the scope of all positioning commands to those
  1470.      records matching the FIND string, and GOTO BOTTOM.
  1471.  
  1472.           When LAST is successful, the value of the current record pointer
  1473.      (as shown by the # and RECNO( functions) is set to the current record
  1474.      number, and the system variable :NEAR is set to the same number.
  1475.  
  1476.           If the record is not found, the current record pointer will be
  1477.      set to 0 and the value of :NEAR will be set to the number of the first
  1478.      record in the index with a key greater than the FIND string; if the
  1479.      index contains no key greater than the FIND string, :NEAR is set to
  1480.      the bottom of file, and EOF is set to T (true).
  1481.  
  1482.           For a fuller discussion, see the FIND command.
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.      LAST                           VPI  VPIN                          LAST
  1501.      SR-Info/VP-Info Reference Manual          Page 247          SECTION 4
  1502.  
  1503.  
  1504.  
  1505.                                      LIMIT
  1506.  
  1507.      Limit the records available within the current master index to those
  1508.      matching all or part of the current record's index key.
  1509.  
  1510.      ╔════════════════════════════════════════════════════════════════════╗
  1511.      ║ LIMIT <num exp>                                                    ║
  1512.      ║ LIMIT <key exp>                                                    ║
  1513.      ║ LIMIT                                                              ║
  1514.      ╟────────────────────────────────────────────────────────────────────╢
  1515.      ║ Options:                                                           ║
  1516.      ║                                                                    ║
  1517.      ║ <num exp>    the number of characters in the key expression of     ║
  1518.      ║                 the current master index                           ║
  1519.      ║ <key exp>    the string expression to match in the current master  ║
  1520.      ║                 index                                              ║
  1521.      ╚════════════════════════════════════════════════════════════════════╝
  1522.  
  1523.           When the current file has an index, SR-Info/VP-Info can be made
  1524.      to treat the file as though it includes only those records matching
  1525.      the current record's key expression, or some leftmost part of it.
  1526.      When a LIMIT is in effect, no SR-Info/VP-Info command can access a
  1527.      record outside that limit.
  1528.  
  1529.           You can most quickly implement this command by using the
  1530.      <num exp> option.  The effect is to have SR-Info/VP-Info set the LIMIT
  1531.      to the leftmost <num exp> characters of the key expression of the
  1532.      master index.
  1533.  
  1534.           If <num exp> exceeds the length of the key, the effect is
  1535.      identical to setting the LIMIT to the entire index expression.
  1536.      (Maximum index-key length is 60 characters.)
  1537.  
  1538.           When LIMIT is used with no option, or when <num exp> is zero, the
  1539.      limit is deactivated.
  1540.  
  1541.           Using LIMIT with <key exp> requires precision in its use to avoid
  1542.      problems that may become extremely serious. Note that the <key exp>
  1543.      expression must be the same as the master index key in use at the
  1544.      moment, or some LEFT( portion of it. Do not attempt to use an
  1545.      expression that does not meet this requirement.
  1546.  
  1547.           Cautions:
  1548.  
  1549.           A.   FIND should not be used on a file with an active limit.  If
  1550.                you choose to do so, be certain that the FIND will be
  1551.                successful.  An unsuccessful FIND places the record pointer
  1552.                on record 0 which is by definition not in the index.  This
  1553.                causes an error, suspends operation of a program, and turns
  1554.                off the LIMIT.
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.      LIMIT                       SRI  VPI  VPIN                       LIMIT
  1561.      SR-Info/VP-Info Reference Manual          Page 248          SECTION 4
  1562.  
  1563.  
  1564.  
  1565.           B.   Do not use REPLACE ALL on a field included in an active
  1566.                limit expression, since upon completion, no records will be
  1567.                included in the limit; the result is the same as above.
  1568.  
  1569.           C.   Do not use APPEND, APPEND BLANK or BROWSE APPEND, or enter
  1570.                "append mode" in EDIT, while a limit is active unless you
  1571.                are sure to make all new records equal to the current LIMIT
  1572.                key before leaving the new records.  Doing so causes the
  1573.                record pointer to move outside the LIMIT; the result is the
  1574.                same as above.
  1575.  
  1576.           D.   LIMIT should be used with extreme care, and left in effect
  1577.                for the minimum number of commands possible.  For instance,
  1578.                if used with BROWSE, LIMIT should be invoked immediately
  1579.                before the BROWSE command and canceled immediately
  1580.                afterward.
  1581.  
  1582.           E.   LIMIT is automatically canceled when the index or the file
  1583.                with which it is active is closed, or the master index is
  1584.                changed with SET INDEX TO n.
  1585.  
  1586.           F.   LIMIT cannot be used with a string constant instead of a
  1587.                <key exp>.  The <key exp> can be implemented with a macro.
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.      LIMIT                       SRI  VPI  VPIN                       LIMIT
  1621.      SR-Info/VP-Info Reference Manual          Page 249          SECTION 4
  1622.  
  1623.  
  1624.  
  1625.                                       LIST
  1626.  
  1627.      List expressions from selected records.
  1628.  
  1629.      ╔════════════════════════════════════════════════════════════════════╗
  1630.      ║ LIST [<scope>] [FOR <cond>] [<exp list>] [OFF]                     ║
  1631.      ╟────────────────────────────────────────────────────────────────────╢
  1632.      ║ Options:                                                           ║
  1633.      ║                                                                    ║
  1634.      ║ <scope>        select by scope (default scope: ALL)                ║
  1635.      ║ FOR <cond>     select by condition                                 ║
  1636.      ║ <exp list>     items to list                                       ║
  1637.      ║ OFF            do not print the record numbers                     ║
  1638.      ╚════════════════════════════════════════════════════════════════════╝
  1639.  
  1640.           This command lists the whole selected data file (including the
  1641.      records flagged as DELETED, unless the command SET DELETE ON is
  1642.      given).  If the data file is indexed, the listing is by the indexed
  1643.      order.
  1644.  
  1645.           The records to be listed can be selected by scope and/or by a
  1646.      condition.  To list only selected fields of the records, use an
  1647.      expression list.
  1648.  
  1649.           Examples:
  1650.  
  1651.  
  1652.      1>USE employee
  1653.      1>LIST
  1654.            1  Marek           Joe        231 River Drive      Broomsdale
  1655.            2  Balzer          Joan       2407 E 38th Street   Broomsdale
  1656.            3  Steiner         Tom        114 North Pitt St.   Lakewood
  1657.            4  Rayme           Pamela     42368 Wedgewood Dr.  Broomsdale
  1658.            5  Poyner          Roger      2757 Regency Road    Florington
  1659.            6  Wilson          Robert     16255 Ventura Street Broomsdale
  1660.      1>GO TOP
  1661.      1>LIST NEXT 3 fname,name
  1662.            1  Joe        Marek
  1663.            2  Joan       Balzer
  1664.            3  Tom        Steiner
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.      LIST                        SRI  VPI  VPIN                        LIST
  1681.      SR-Info/VP-Info Reference Manual          Page 250          SECTION 4
  1682.  
  1683.  
  1684.  
  1685.                                    LIST FILES
  1686.  
  1687.      List files from the directory.
  1688.  
  1689.      ╔════════════════════════════════════════════════════════════════════╗
  1690.      ║ LIST FILES [LIKE <file format>] [ON <drive letter>]                ║
  1691.      ╟────────────────────────────────────────────────────────────────────╢
  1692.      ║ Options:                                                           ║
  1693.      ║                                                                    ║
  1694.      ║ LIKE <file format>   limit to those files matching the file format ║
  1695.      ║                         specification (default .DBF)               ║
  1696.      ║ ON <drive letter>    show only files on named disk (colon optional)║
  1697.      ╚════════════════════════════════════════════════════════════════════╝
  1698.  
  1699.           This command lists the data files, with the default extension
  1700.      DBF, from the current or other specified disk drive.  LIST FILES is
  1701.      provided only for compatibility with earlier versions of VP-Info; DIR
  1702.      should be used instead.
  1703.  
  1704.           If the LIKE clause is used, the type of file required can be
  1705.      specified; the wild cards * and ? (see the DIR command) can be used
  1706.      just as in the operating system command DIR.
  1707.  
  1708.           If the ON <drive letter> clause is used, only the files from the
  1709.      drive specified are listed.
  1710.  
  1711.           See the SR-Info/VP-Info command DIR.
  1712.  
  1713.           Examples:
  1714.  
  1715.  
  1716.      1>LIST FILES
  1717.      CCUST.DBF       1024 10-24-89  1:07a   COMMS.DBF       1024 10-24-89  1:07a
  1718.      COMMS.DBF        757  8-31-89 11:30p   CUSTJUNK.DBF     653  9-06-89  9:02a
  1719.      CUSTOMER.DBF    1024 10-24-89  1:07a   RUST2.DBF     342058 11-29-89  8:25p
  1720.      SUBDUE.DBF      2027 11-29-89  7:21p   SUBDUE2.DBF     1168 11-29-89  2:29a
  1721.      WAY_BUSI.DBF  506022 10-24-89  2:24a   WAY_PHON.DBF   45525 10-24-89  1:29a
  1722.      WAY_DBFS.DBF    1291 10-24-89  3:15a   WAY_RES.DBF   406175 10-24-89  1:05a
  1723.  
  1724.      1024349 bytes in 12 files.
  1725.      5251072 bytes remaining.
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.      LIST FILES                  SRI  VPI  VPIN                  LIST FILES
  1741.      SR-Info/VP-Info Reference Manual          Page 251          SECTION 4
  1742.  
  1743.  
  1744.      1>LIST FILES ON A
  1745.      THREE.DBF        189  6-12-88  9:21a   TRANSACT.DBF       2  5-02-88  2:48p
  1746.      VAITEST.DBF      552  7-28-88 12:32p
  1747.  
  1748.      795603 bytes in 41 files.
  1749.      51072 bytes remaining.
  1750.      1>LIST FILE LIKE c*.*
  1751.      CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-90  5:11p
  1752.      COMMS2.DBF      6342  1-07-90  1:00p   CUSTJUNK.DBF    7062  9-17-89  3:57p
  1753.      CUSTOMER.DBF     734 11-29-89 10:43p
  1754.  
  1755.      21206 bytes in 5 files.
  1756.      5251072 bytes remaining.
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.      LIST FILES                  SRI  VPI  VPIN                  LIST FILES
  1801.      SR-Info/VP-Info Reference Manual          Page 252          SECTION 4
  1802.  
  1803.  
  1804.  
  1805.                                   LIST MEMORY
  1806.  
  1807.      List the memory variables.
  1808.  
  1809.      ╔════════════════════════════════════════════════════════════════════╗
  1810.      ║ LIST MEMORY                                                        ║
  1811.      ╚════════════════════════════════════════════════════════════════════╝
  1812.  
  1813.           The command LIST MEMORY displays a listing of all non-matrix
  1814.      memory variables and their contents, and a separate listing of the
  1815.      matrix variables and their dimensions.
  1816.  
  1817.           Examples:
  1818.  
  1819.      1>LIST MEMO
  1820.  
  1821.      Name          Type    Width    Contents
  1822.      ** Total **  0  Variables used  0  Bytes used
  1823.      1>name='David'
  1824.      1>number=12.78
  1825.      1>LIST MEMO
  1826.  
  1827.      Name          Type    Width    Contents
  1828.      NAME            C       5      David
  1829.      NUMBER          N       8      12.78
  1830.      ** Total **  2  Variables used  13  Bytes used
  1831.      1>DIM NUM a[12]
  1832.      1>DIM CHAR table[2,12]
  1833.      1>LIST MEMO
  1834.  
  1835.      Name          Type    Width    Contents
  1836.      NAME            C       5      David
  1837.      NUMBER          N       8      12.78
  1838.  
  1839.      Matrix Name   Type    Width    Dimensions
  1840.      A               N       8      [12]
  1841.      TABLE           C      10      [2,12]
  1842.      ** Total **  4  Variables used  33  Bytes used
  1843.  
  1844.           Note that matrix variables are stored in high memory (see
  1845.      Appendix A).  The number of "bytes used" message does not take this
  1846.      into account.  To see the usage of high memory, use the STATUS
  1847.      command.  See also DIM.
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.      LIST MEMORY                 SRI  VPI  VPIN                 LIST MEMORY
  1861.      SR-Info/VP-Info Reference Manual          Page 253          SECTION 4
  1862.  
  1863.  
  1864.  
  1865.                                  LIST STRUCTURE
  1866.  
  1867.      List the structure of the selected file.
  1868.  
  1869.      ╔════════════════════════════════════════════════════════════════════╗
  1870.      ║ LIST STRUCTURE                                                     ║
  1871.      ╚════════════════════════════════════════════════════════════════════╝
  1872.  
  1873.           The command LIST STRUCTURE displays the structure of the selected
  1874.      data file.
  1875.  
  1876.           Examples:
  1877.  
  1878.      1>USE employee
  1879.      1>LIST STRU
  1880.      Data file:           EMPLOYEE.DBF
  1881.      Number of records:       6
  1882.      File number:             1
  1883.      Field   Name       Type Width   Dec
  1884.        1     NAME         C     15
  1885.        2     FNAME        C     10
  1886.        3     ADDR         C     20
  1887.        4     CITY         C     20
  1888.        5     STATE        C      2
  1889.        6     ZIP          C      5
  1890.        7     TEL_NO       C      8
  1891.        8     MARRIED      L      1
  1892.        9     SALARY       N      9      2
  1893.       10     YEAR_EMP     N      4
  1894.       11     DEPT         C     15
  1895.      ** Record Length **       110
  1896.      1>USE#5 order
  1897.      1>LIST#5 STRU
  1898.      Data file:           ORDER.DBF
  1899.      Number of records:       3
  1900.      File number:            #5
  1901.      Field   Name       Type Width   Dec
  1902.        1     ORDER:NO     C      6
  1903.        2     CUST:NO      C      6
  1904.        3     INVEN:NO     C      6
  1905.        4     STYLE:NO     C      4
  1906.        5     COLOR        C      2
  1907.        6     CATEGORY     C      2
  1908.        7     DESCR        C     30
  1909.        8     SLSMAN:NO    C      3
  1910.        9     PRICE        N      9      2
  1911.       10     QTY          N      9      2
  1912.       11     COST         N      9      2
  1913.       12     AMOUNT       N      9      2
  1914.      ** Record Length **        96
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.      LIST STRUCTURE              SRI  VPI  VPIN              LIST STRUCTURE
  1921.      SR-Info/VP-Info Reference Manual          Page 254          SECTION 4
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.      LIST STRUCTURE              SRI  VPI  VPIN              LIST STRUCTURE
  1981.      SR-Info/VP-Info Reference Manual          Page 255          SECTION 4
  1982.  
  1983.  
  1984.  
  1985.                                   LIST SYSTEM
  1986.  
  1987.      List the function key definitions and system variables.
  1988.  
  1989.      ╔════════════════════════════════════════════════════════════════════╗
  1990.      ║ LIST SYSTEM                                                        ║
  1991.      ╚════════════════════════════════════════════════════════════════════╝
  1992.  
  1993.           The command LIST SYSTEM displays the current contents of the 10
  1994.      function keys and system variables (see Sections 1.2 and 2.6).
  1995.  
  1996.           Example:
  1997.  
  1998.      1>LIST SYST
  1999.      Name          Type    Width    Contents
  2000.      :F1             C       5      HELP
  2001.      :F2             C      10      LIST STRU;
  2002.      :F3             C       6      WRITE
  2003.      :F4             C      10      LIST MEMO;
  2004.      :F5             C       7      BROWSE;
  2005.      :F6             C       5      STAT;
  2006.      :F7             C      12      ^wCONT;EDIT;
  2007.      :F8             C      11      LOCATE FOR
  2008.      :F9             C       5      FIND
  2009.      :F10            C       5      EDIT;
  2010.      :TIME           C       8      22:53:43
  2011.      :DATE           C      24      Thursday, March 19, 1991
  2012.      :VERSION        C       4      510
  2013.      :SERIAL         C      10      5108796982
  2014.      :COMPANY        C      34      Sub Rosa Publishing Inc.
  2015.      :PICTURE        C      10      9999999.99
  2016.      :TITLE          C       1
  2017.      :UNDOC          C       1
  2018.      :KEY            N       8      13
  2019.      :AVAIL          N       8      0
  2020.      :FIELD          N       8      0
  2021.      :ERROR          N       8      0
  2022.      :MESSAGE        C       1
  2023.      :RETRY          N       8      25
  2024.      :USER           N       8      1
  2025.      :DIR            C      11      C:\VPI
  2026.      :NEAR           N       8      0
  2027.      :COLOR          N       8      48
  2028.      ** Total ** 28  variables... 244  bytes
  2029.  
  2030.           To set the system variables to suit your needs, use the SRI.CNF
  2031.      file or the VPI.CNF file as appropriate, see Section 1.
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.      LIST SYSTEM                 SRI  VPI  VPIN                 LIST SYSTEM
  2041.      SR-Info/VP-Info Reference Manual          Page 256          SECTION 4
  2042.  
  2043.  
  2044.  
  2045.                                      LOCATE
  2046.  
  2047.      Search for a record that satisfies the condition.
  2048.  
  2049.      ╔════════════════════════════════════════════════════════════════════╗
  2050.      ║ LOCATE [<scope>] FOR <cond>                                        ║
  2051.      ╟────────────────────────────────────────────────────────────────────╢
  2052.      ║ Option:                                                            ║
  2053.      ║                                                                    ║
  2054.      ║ <scope>   search only within the scope (default scope: ALL)        ║
  2055.      ╚════════════════════════════════════════════════════════════════════╝
  2056.  
  2057.           The command LOCATE searches for records by a condition.  This
  2058.      command works quicker if there is no index file.
  2059.  
  2060.           If a match is found with SET TALK ON,
  2061.  
  2062.      Record n
  2063.  
  2064.      informs the user of the record number (n).
  2065.  
  2066.           The LOCATE command line cannot be more than 128 characters.  The
  2067.      keyword FOR cannot be in a macro.
  2068.  
  2069.           The CONTINUE command continues the search after the current
  2070.      record using the condition of the last LOCATE.
  2071.  
  2072.           Normally, the selected file should not be indexed.  The command
  2073.      LOCATE executes about three time slower in an indexed file.  If an
  2074.      index file is in use, the search will take place in the indexed order.
  2075.  
  2076.           The preferred way to locate a record in an indexed file is with
  2077.      the FIND command.
  2078.  
  2079.           With the default scope ALL, LOCATE starts at the top of file and
  2080.      scans either until the first record matching the condition is found,
  2081.      or the end of file is reached; an unsuccessful LOCATE sets the EOF
  2082.      flag to T (true).
  2083.  
  2084.           You can use an alternate scope, NEXT or WHILE, to have LOCATE
  2085.      begin with the record after the current record.  Unlike all other uses
  2086.      of scope in SR-Info/VP-Info, however, LOCATE does not require anything
  2087.      other than the keyword to make the scope act in this way.  Example:
  2088.  
  2089.      LOCATE NEXT FOR cust>'M'      ;looks for a matching record anywhere in
  2090.                                    the file, starting with the next record.
  2091.      LOCATE WHILE FOR cust>'M'     ;works exactly the same
  2092.  
  2093.  
  2094.           Examples:
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.      LOCATE FOR                  SRI  VPI  VPIN                  LOCATE FOR
  2101.      SR-Info/VP-Info Reference Manual          Page 257          SECTION 4
  2102.  
  2103.  
  2104.  
  2105.      1>USE employee
  2106.      1>LIST name, salary
  2107.            1  Marek
  2108.            2  Balzer
  2109.            3  Steiner
  2110.            4  Rayme
  2111.            5  Poyner
  2112.            6  Wilson
  2113.      1>GO TOP
  2114.      1>LOCATE FOR salary > 20000
  2115.      Record 1
  2116.      1>? name, salary
  2117.      Marek            25800.00
  2118.      1>CONT
  2119.      Record 3
  2120.      1>? name, salary
  2121.      Steiner          35780.00
  2122.      1>CONT
  2123.      Record 4
  2124.      1>? name, salary
  2125.      Rayme            79110.00
  2126.      1>CONT
  2127.      Record 6
  2128.      1>? name, salary
  2129.      Wilson           33870.00
  2130.      1>CONT
  2131.      1>? EOF
  2132.      T
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.      LOCATE FOR                  SRI  VPI  VPIN                  LOCATE FOR
  2161.      SR-Info/VP-Info Reference Manual          Page 258          SECTION 4
  2162.  
  2163.  
  2164.  
  2165.                                       LOCK
  2166.  
  2167.      Lock the current record.
  2168.  
  2169.      ╔════════════════════════════════════════════════════════════════════╗
  2170.      ║ LOCK                                                               ║
  2171.      ║                   VP-Info Professional Network Edition only        ║
  2172.      ╚════════════════════════════════════════════════════════════════════╝
  2173.  
  2174.           In VP-Info Professional Network Edition, this command locks the
  2175.      current record to all other users so that you can safely make changes
  2176.      to a record key while the file is open in SHARE mode.
  2177.  
  2178.           If SET NETWORK OFF, LOCK is ignored.
  2179.  
  2180.           In SR-Info and VP-Info Professional, LOCK has no effect, but is
  2181.      accepted for program compatibility across versions.
  2182.  
  2183.           See the SET NETWORK command on how to get into the multi-user
  2184.      mode.  See also UNLOCK.
  2185.  
  2186.           Example:
  2187.  
  2188.      mcust=cust
  2189.      FIND &mcust
  2190.      LOCK
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.      LOCK                             VPIN                             LOCK
  2221.      SR-Info/VP-Info Reference Manual          Page 259          SECTION 4
  2222.  
  2223.  
  2224.  
  2225.                                   LOCK INDEXES
  2226.  
  2227.      Lock the current record.
  2228.  
  2229.      ╔════════════════════════════════════════════════════════════════════╗
  2230.      ║ LOCK INDEXES                                                       ║
  2231.      ║                   VP-Info Professional Network Edition only        ║
  2232.      ╚════════════════════════════════════════════════════════════════════╝
  2233.  
  2234.           In VP-Info Professional Network Edition this command locks all
  2235.      indexes attached to the current data file so that you can safely make
  2236.      changes to a record's key while the file is open in SHARE mode.
  2237.  
  2238.           Like the LOCK command (which locks records in a data file), and
  2239.      SET LOCK ON (which automatically locks each record as it is used),
  2240.      LOCK INDEX should be used only when files are opened in SHARE mode on
  2241.      a network.
  2242.  
  2243.           LOCK INDEXES allows only one person to change the index files,
  2244.      though any number of others can access the indexes if they open the
  2245.      data file in either SHARE or READ mode.  UNLOCK INDEXES will unlock
  2246.      the all the index file.
  2247.  
  2248.           See the SET NETWORK command on how to get into the multi-user
  2249.      mode.  See also UNLOCK INDEXES.
  2250.  
  2251.           In SR-Info and VP-Info Professional, LOCK INDEXES has no effect,
  2252.      but is accepted for program compatibility across versions.
  2253.  
  2254.           Example:
  2255.  
  2256.      mcust=cust
  2257.      FIND &mcust
  2258.      LOCK INDEXES
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.      LOCK INDEXES                     VPIN                     LOCK INDEXES
  2281.      SR-Info/VP-Info Reference Manual          Page 260          SECTION 4
  2282.  
  2283.  
  2284.  
  2285.                                       LOOP
  2286.  
  2287.      Jump to the top of the DO WHILE loop.
  2288.  
  2289.      ╔════════════════════════════════════════════════════════════════════╗
  2290.      ║ LOOP                                                               ║
  2291.      ╚════════════════════════════════════════════════════════════════════╝
  2292.  
  2293.           When the LOOP command is found in a DO WHILE <cond> loop, program
  2294.      execution jumps to the top of loop (evaluates the condition).  See
  2295.      also DO WHILE and BREAK.
  2296.  
  2297.           Example:
  2298.  
  2299.      USE cust
  2300.      USE#2 trans INDEX trans1
  2301.      DO WHILE T
  2302.         ACCEPT 'Enter the customer number ' TO mcust
  2303.         IF TRIM(mcust)=' '
  2304.            BREAK
  2305.         ENDIF
  2306.         FIND#2 &mcust
  2307.         IF RECNO(2)=0
  2308.            LOOP
  2309.         ENDIF
  2310.         SELECT 2
  2311.         DO WHILE custn=mcust .AND. .NOT. EOF
  2312.            ? date,descript,amount
  2313.            SKIP
  2314.         ENDDO
  2315.         SELECT 1
  2316.      ENDDO
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.      LOOP                        SRI  VPI  VPIN                        LOOP
  2341.      SR-Info/VP-Info Reference Manual          Page 261          SECTION 4
  2342.  
  2343.  
  2344.  
  2345.                                       MAX
  2346.  
  2347.      Scan selected records for the highest values of one or more numeric
  2348.      expressions.
  2349.  
  2350.      ╔════════════════════════════════════════════════════════════════════╗
  2351.      ║ MAX [<scope>] <num exp list> [TO <memvar list>] [FOR <cond>]       ║
  2352.      ║                                                                    ║
  2353.      ║ <num exp list>    the numeric expressions to sum                   ║
  2354.      ╟────────────────────────────────────────────────────────────────────╢
  2355.      ║ Options:                                                           ║
  2356.      ║                                                                    ║
  2357.      ║ <scope>           select by scope (default scope: ALL)             ║
  2358.      ║ <memvar list>     store the results in these memory variables      ║
  2359.      ║ FOR <cond>        select by condition                              ║
  2360.      ╚════════════════════════════════════════════════════════════════════╝
  2361.  
  2362.           The command MAX evaluates numeric expressions for selected
  2363.      records of the selected data file, determining the highest value
  2364.      encountered for each expression.  Up to 10 expressions can be scanned
  2365.      with one command.
  2366.  
  2367.           Optionally, the results can be stored in numeric memory
  2368.      variables; the expression list and the numeric memory variable list
  2369.      must have the same number of entries.  <memvar list> cannot contain
  2370.      numeric matrix variables.
  2371.  
  2372.           Records flagged as DELETED are not scanned.  See also MIN, SUM,
  2373.      COUNT and AVERAGE.
  2374.  
  2375.           Example:
  2376.  
  2377.           The highest hourly wages, the highest annual earnings, and the
  2378.      highest number of hours worked in the year:
  2379.  
  2380.      1>USE employee
  2381.      1>MAX hourly,ydt_earned,ytd_hours
  2382.            6 RECORDS CHECKED
  2383.           32.57,  51579.65,   2632.65
  2384.      1>SET TALK OFF
  2385.      1>MAX hourly,ydt_earned,ytd_hours TO maxrate,maxearned,maxhours
  2386.      1>?  maxrate,maxearned,maxhours
  2387.           32.57   51579.65    2632.65
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.      MAX                         SRI  VPI  VPIN                         MAX
  2401.      SR-Info/VP-Info Reference Manual          Page 262          SECTION 4
  2402.  
  2403.  
  2404.  
  2405.                                     MEMORY=
  2406.  
  2407.      Request a specific memory configuration for VP-Info Professional.
  2408.  
  2409.      ╔════════════════════════════════════════════════════════════════════╗
  2410.      ║ MEMORY=<blocks>                                                    ║
  2411.      ║          VP-Info Professional only             VPI.SET file only   ║
  2412.      ║                                                                    ║
  2413.      ║ <blocks> number of 1K blocks of memory to reserve for high memory  ║
  2414.      ╚════════════════════════════════════════════════════════════════════╝
  2415.  
  2416.           The command MEMORY= in the VPI.SET file allocates a specific
  2417.      amount of high memory for use of VP-Info Professional rather than the
  2418.      default of 128K.
  2419.  
  2420.           The number of blocks can be as little as 32, although VP-Info
  2421.      Professional can be expected to be sluggish in performance at that
  2422.      level, and there will be little space available for matrixes and
  2423.      background screens.
  2424.  
  2425.           High memory is used for a wide variety of tasks in
  2426.      SR-Info/VP-Info, including storage of index blocks, print spooling,
  2427.      background screen storage, matrixes, table storage, program swap area,
  2428.      etc.  Requesting 32 to 127 blocks decreases the space available for
  2429.      these tasks, but increases the space available for storing binary
  2430.      files to be executed with the CALL command (see BINSPACE= command) and
  2431.      for running programs in DOS (see RUN command).
  2432.  
  2433.           If large amounts of memory are required for matrixes, you may
  2434.      need to request more than 128 blocks.  Requesting more memory than
  2435.      available will not cause an error; VP-Info Professional always takes
  2436.      all the memory there is or the amount requested, whichever is less.
  2437.  
  2438.           See Appendix A for more about organization of memory.
  2439.  
  2440.           Example:
  2441.  
  2442.      MEMORY=96
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.      MEMORY=                        VPI  VPIN                       MEMORY=
  2461.      SR-Info/VP-Info Reference Manual          Page 263          SECTION 4
  2462.  
  2463.  
  2464.                                       MIN
  2465.  
  2466.      Scan selected records for the lowest values of one or more numeric
  2467.      expressions.
  2468.  
  2469.      ╔════════════════════════════════════════════════════════════════════╗
  2470.      ║ MIN [<scope>] <num exp list> [TO <memvar list>] [FOR <cond>]       ║
  2471.      ║                                                                    ║
  2472.      ║ <num exp list>    the numeric expressions to sum                   ║
  2473.      ╟────────────────────────────────────────────────────────────────────╢
  2474.      ║ Options:                                                           ║
  2475.      ║                                                                    ║
  2476.      ║ <scope>           select by scope (default scope: ALL)             ║
  2477.      ║ <memvar list>     store the results in these memory variables      ║
  2478.      ║ FOR <cond>        select by condition                              ║
  2479.      ╚════════════════════════════════════════════════════════════════════╝
  2480.  
  2481.           The command MIN evaluates numeric expressions for selected
  2482.      records of the selected data file, determining the lowest value
  2483.      encountered for each expression.  Up to 10 expressions can be scanned
  2484.      with one command.
  2485.  
  2486.           Optionally, the results can be stored in numeric memory
  2487.      variables; the expression list and the numeric memory variable list
  2488.      must have the same number of entries.  <memvar list> cannot contain
  2489.      numeric matrix variables.
  2490.  
  2491.           Records flagged as DELETED are not scanned.  See also MAX, SUM,
  2492.      COUNT and AVERAGE.
  2493.  
  2494.           Example:
  2495.  
  2496.           The lowest hourly wages, the lowest annual earnings, and the
  2497.      lowest number of hours worked in the year:
  2498.  
  2499.      1>USE employee
  2500.      1>MIN hourly,ydt_earned,ytd_hours
  2501.            6 RECORDS CHECKED
  2502.            5.57,   1579.65,    232.65
  2503.      1>SET TALK OFF
  2504.      1>MIN hourly,ydt_earned,ytd_hours TO maxrate,maxearned,maxhours
  2505.      1>?  maxrate,maxearned,maxhours
  2506.            5.57,   1579.65,    232.65
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.      MIN                         SRI  VPI  VPIN                         MIN
  2521.      SR-Info/VP-Info Reference Manual          Page 264          SECTION 4
  2522.  
  2523.  
  2524.  
  2525.                                      MODIFY
  2526.  
  2527.      Modify the structure of a data file.
  2528.  
  2529.      ╔════════════════════════════════════════════════════════════════════╗
  2530.      ║ MODIFY [STRUCTURE]                                                 ║
  2531.      ╚════════════════════════════════════════════════════════════════════╝
  2532.  
  2533.           The command MODIFY (or MODIFY STRUCTURE) modifies the structure
  2534.      of the selected file.  The display is the same as in CREATE, the keys
  2535.      retain their meaning.  Each field is represented by four editing
  2536.      fields.
  2537.  
  2538.           All records in the file will be automatically appended.  If any
  2539.      types or names are changed, the contents of the affected fields will
  2540.      be lost.
  2541.  
  2542.      Restrictions:
  2543.  
  2544.           A.   Do not use MODIFY in a program
  2545.  
  2546.           B.   Do not use MODIFY merely to change the name of a field.
  2547.                Fields may be renamed instantaneously with the RENAME FIELD
  2548.                command.
  2549.  
  2550.           Editing keys:
  2551.  
  2552.      <Left> or Ctrl-S        moves the cursor back one character
  2553.      <Right> or Ctrl-D       moves the cursor forward one character
  2554.      Ctrl-<Left>             moves to the beginning of the editing field
  2555.      Ctrl-<Right>            moves to the end of the editing field
  2556.      <Ins> or Ctrl-V         puts you in insert mode: what you type gets
  2557.                                 inserted  (normally, you are in overtype
  2558.                                 mode: what you type overtypes the existing
  2559.                                 text); pressing <Ins> or Ctrl-V again, puts
  2560.                                 you back into overtype mode
  2561.      <BACKSPACE>             deletes the character to the left of the
  2562.                                 cursor
  2563.      <Del> or Ctrl-G         deletes the character on the cursor
  2564.      Ctrl-Y                  deletes the rest of the editing field
  2565.  
  2566.      <Up> or Ctrl-E          moves the cursor to the previous editing field
  2567.      <Dn> or Ctrl-X          moves the cursor to the next editing field
  2568.  
  2569.      Ctrl-Q                  quits and does not modify the file
  2570.      <End> or Ctrl-W         quits and modifies the file
  2571.  
  2572.      Ctrl-K                  moves back to the top of the previous page
  2573.      Ctrl-L                  moves to the top of the next page
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.      MODIFY                      SRI  VPI  VPIN                      MODIFY
  2581.      SR-Info/VP-Info Reference Manual          Page 265          SECTION 4
  2582.  
  2583.  
  2584.      Ctrl-N                  inserts a new line
  2585.      Ctrl-T                  deletes the line
  2586.  
  2587.           To be safe, make a back up copy of the file to be modified before
  2588.      the MODIFY command is given.  After the MODIFY, the new fields will be
  2589.      blank, the deleted fields disappear.  All deleted records will also be
  2590.      lost.
  2591.  
  2592.           If <Esc> or Ctrl-Q is pressed at any time in MODIFY before the
  2593.      appending of records is completed, MODIFY will be aborted and the data
  2594.      file closed.  No changes already made will be saved.
  2595.  
  2596.           Changing the characteristics of a field (say the width) effects
  2597.      the field the same way as in APPEND FROM.
  2598.  
  2599.           On a network with SET NETWORK ON in VP-Info Professional Network
  2600.      Edition, attempting to MODIFY an index while another user is accessing
  2601.      a file with the same name will cause a LOCK error.  Always open a file
  2602.      in LOCK mode before modifying it.
  2603.  
  2604.           Example:
  2605.  
  2606.           Change the FNAME field in EMPLOYEE.DBF from 10 characters to 15
  2607.      characters.
  2608.  
  2609.      1>USE employee
  2610.      1>COPY employee to temp                    making a backup copy
  2611.      1>MODIFY
  2612.  
  2613. ──────────────────────────────────────────────────────────────────────────────
  2614. Thursday, March 22, 1990
  2615.                                  VP-Info Modify               EMPLOYEE.DBF
  2616. Name         Type    Width   Dec        Name         Type    Width   Dec
  2617.  
  2618. NAME          C       15      0
  2619. FNAME         C       10      0
  2620. ADDR          C       20      0
  2621. CITY          C       20      0
  2622. STATE         C        2      0
  2623. ZIP           C        6      0
  2624. TEL_NO        C       10      0
  2625. MARRIED       L        1      0
  2626. SALARY        N        9      2
  2627. YEAR_EMP      N        4      0
  2628. DEPT          C       15      0
  2629.  
  2630.  
  2631. ┌─────────────────────────────────────────────────────────────────────────────┐
  2632. │ UP/DOWN           COLUMN MOVE  ROW             SAVE STRUCTURE    C..Strings │
  2633. │ previous. <PgUp>  left... ^K   insert... ^N    update... <End>   N..Numbers │
  2634. │ next..... <PgDn>  right.. ^L   delete... ^T    nochange. ^Q      L..Yes/No  │
  2635. └─────────────────────────────────────────────────────────────────────────────┘
  2636. ──────────────────────────────────────────────────────────────────────────────
  2637.  
  2638.  
  2639.  
  2640.      MODIFY                      SRI  VPI  VPIN                      MODIFY
  2641.      SR-Info/VP-Info Reference Manual          Page 266          SECTION 4
  2642.  
  2643.  
  2644.  
  2645.  
  2646.           Now change 10 to 15:
  2647.  
  2648.  
  2649. ──────────────────────────────────────────────────────────────────────────────
  2650. Thursday, March 22, 1990
  2651.                                  VP-Info Modify               EMPLOYEE.DBF
  2652. Name         Type    Width   Dec        Name         Type    Width   Dec
  2653.  
  2654. NAME          C       15      0
  2655. FNAME         C       15      0
  2656. ADDR          C       20      0
  2657. CITY          C       20      0
  2658. STATE         C        2      0
  2659. ZIP           C        6      0
  2660. TEL_NO        C       10      0
  2661. MARRIED       L        1      0
  2662. SALARY        N        9      2
  2663. YEAR_EMP      N        4      0
  2664. DEPT          C       15      0
  2665.  
  2666.  
  2667. ┌─────────────────────────────────────────────────────────────────────────────┐
  2668. │ UP/DOWN           COLUMN MOVE  ROW             SAVE STRUCTURE    C..Strings │
  2669. │ previous. <PgUp>  left... ^K   insert... ^N    update... <End>   N..Numbers │
  2670. │ next..... <PgDn>  right.. ^L   delete... ^T    nochange. ^Q      L..Yes/No  │
  2671. └─────────────────────────────────────────────────────────────────────────────┘
  2672. ──────────────────────────────────────────────────────────────────────────────
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.      MODIFY                      SRI  VPI  VPIN                      MODIFY
  2701.      SR-Info/VP-Info Reference Manual          Page 267          SECTION 4
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.      MODIFY                      SRI  VPI  VPIN                      MODIFY
  2761.      SR-Info/VP-Info Reference Manual          Page 268          SECTION 4
  2762.  
  2763.  
  2764.                                     NEAREST
  2765.  
  2766.      Find the first record whose index key is equal to or greater than a
  2767.      given FIND string by its index in the selected data file.
  2768.  
  2769.      ╔════════════════════════════════════════════════════════════════════╗
  2770.      ║ NEAREST <string>                                                   ║
  2771.      ║                          VP-Info Professional only                 ║
  2772.      ║                                                                    ║
  2773.      ║ <string>   the characters to match in the current master index     ║
  2774.      ╚════════════════════════════════════════════════════════════════════╝
  2775.  
  2776.           NEAREST is one of a family of commands that finds a record in an
  2777.      indexed data file by matching a given string with key values in the
  2778.      index file:
  2779.  
  2780.           NEAREST positions the file on the first record in the index equal
  2781.                to or greater than the FIND string (VP-Info Professional
  2782.                only).  If no key in the index is equal to or greater than
  2783.                the FIND string, the current record pointer and :NEAR are
  2784.                set to the bottom of file, and EOF is set to T (true)
  2785.           FIND positions the file on the first record in the index matching
  2786.                the LAST string (no-find positions the file at the top of
  2787.                file)
  2788.           LAST positions the file on the last record in the index matching
  2789.                the FIND string (VP-Info Professional only) (no-find
  2790.                positions the file at the top of file)
  2791.           SEEK is identical to FIND, except that it searches for the match
  2792.                to the value of a character expression instead of a string
  2793.                constant (VP-Info Professional only) (no-find positions the
  2794.                file at the top of file)
  2795.  
  2796.           All forms allow a search to be made on a character expression
  2797.      when the expression if preceded by the macro symbol "&".  When the
  2798.      variable var='TAYLOR', both of the following command lines are
  2799.      equivalent:
  2800.  
  2801.      NEAREST TAYLOR
  2802.      NEAREST &var
  2803.  
  2804.           In Conversational SR-Info/VP-Info, just type NEAREST and the key.
  2805.  
  2806.           Examples:
  2807.  
  2808.      1>NEAREST TAYLOR
  2809.      1>NEAREST TOM
  2810.  
  2811.           If SET DELETE ON, deleted records will not be found.  (See the
  2812.      command SET.)
  2813.  
  2814.           Numbers must always be treated as strings, even if the key
  2815.      expression is a numeric field.  If NUM is a numeric field of width 2,
  2816.  
  2817.  
  2818.  
  2819.  
  2820.      NEAREST                        VPI  VPIN                       NEAREST
  2821.      SR-Info/VP-Info Reference Manual          Page 269          SECTION 4
  2822.  
  2823.  
  2824.      NEAREST 1 will not find 1, but NEAREST &STR(1,2) or NEAREST &' 1' will
  2825.      be successful.
  2826.  
  2827.           For the users' convenience, Conversational SR-Info/VP-Info
  2828.      converts all command lines to upper case before execution.  So, to
  2829.      find the inventory numbers that start with AB, type either of the
  2830.      following two commands:
  2831.  
  2832.      1>NEAREST AB
  2833.      1>NEAREST ab
  2834.  
  2835.           It follows that
  2836.  
  2837.      1>NEAREST Taylor
  2838.  
  2839.      is understood by SR-Info/VP-Info as NEAREST TAYLOR.  If you have to
  2840.      find Taylor, either use the string directly with the macro symbol:
  2841.  
  2842.      1>NEAREST &'Taylor'
  2843.  
  2844.      or if name='Taylor' use the following:
  2845.  
  2846.      1>NEAREST &name
  2847.  
  2848.           By definition, NEAREST is always successful (unless the file is
  2849.      empty).  If an exact match is found, both the current record pointer
  2850.      (as shown by the # and RECNO( functions) and the system variable :NEAR
  2851.      are set to the first matching record.
  2852.  
  2853.           If an exact match is not found, the current record pointer and
  2854.      the value of :NEAR will be set to the number of the first record in
  2855.      the index with a key greater than the FIND string; if the index
  2856.      contains no key greater than the FIND string, the current record
  2857.      pointer and :NEAR are set to the bottom of file, and EOF is set to T
  2858.      (true).
  2859.  
  2860.           To position the record pointer to the record equal to or
  2861.      immediately less than the FIND string, do the following:
  2862.  
  2863.      NEAREST &findstring
  2864.      IF keyexpr<findstring
  2865.         SKIP -1
  2866.      ENDIF
  2867.  
  2868.  
  2869.           Note to SR-Info programmers: In a SR-Info program, you can
  2870.      approximate the actions of NEAREST when FIND fails by shortening the
  2871.      FIND string one character at a time until either the FIND is
  2872.      successful or the FIND string disappears. For example, if the FIND
  2873.      string is stored in VAR:
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.      NEAREST                        VPI  VPIN                       NEAREST
  2881.      SR-Info/VP-Info Reference Manual          Page 270          SECTION 4
  2882.  
  2883.  
  2884.      finder2=finder
  2885.      DO WHILE len(finder2)>0
  2886.         FIND &finder2
  2887.         IF #>0
  2888.            BREAK
  2889.         ENDIF
  2890.         finder2=LEFT(finder2,LEN(finder2)-1)
  2891.      ENDDO
  2892.      IF #=0
  2893.         GOTO TOP
  2894.      ENDIF
  2895.  
  2896.           For a fuller discussion, see the FIND command.
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.      NEAREST                        VPI  VPIN                       NEAREST
  2941.      SR-Info/VP-Info Reference Manual          Page 271          SECTION 4
  2942.  
  2943.  
  2944.  
  2945.                                    NOEFFECTS
  2946.  
  2947.      Suppress special effects.
  2948.  
  2949.      ╔════════════════════════════════════════════════════════════════════╗
  2950.      ║ NOEFFECTS                                                          ║
  2951.      ║                                                                    ║
  2952.      ║          VP-Info Professional only             VPI.SET file only   ║
  2953.      ║                                                                    ║
  2954.      ╚════════════════════════════════════════════════════════════════════╝
  2955.  
  2956.           This command in the VPI.SET file suppresses the special screen
  2957.      and sound effects used for the sign-on screen, as well as for the
  2958.      SCREEN, SOUND, and RING commands.
  2959.  
  2960.           Examples:
  2961.  
  2962.      NOEFFECTS
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.      NOEFFECTS                      VPI  VPIN                     NOEFFECTS
  3001.      SR-Info/VP-Info Reference Manual          Page 272          SECTION 4
  3002.  
  3003.  
  3004.  
  3005.                                       NOTE
  3006.  
  3007.      Add notes to SR-Info/VP-Info programs.
  3008.  
  3009.      ╔════════════════════════════════════════════════════════════════════╗
  3010.      ║ NOTE [<string>]                                                    ║
  3011.      ╟────────────────────────────────────────────────────────────────────╢
  3012.      ║ Option:                                                            ║
  3013.      ║                                                                    ║
  3014.      ║ <string>   any text line: the comment                              ║
  3015.      ╚════════════════════════════════════════════════════════════════════╝
  3016.  
  3017.           This is the same as the command * (see *).  Any SR-Info/VP-Info
  3018.      command line that starts with NOTE is ignored by SR-Info/VP-Info.
  3019.  
  3020.           Notes can also be added with semicolon(;) to any SR-Info/VP-Info
  3021.      command line
  3022.  
  3023.           Since notes are not compiled, they have no effect on the
  3024.      execution of programs.  Comments should be used liberally to help you
  3025.      (and possibly others) understand your programs later.  If programs are
  3026.      very large, however, some comments may have to be shortened or
  3027.      eliminated to allow the compiler and/or WRITE to load them properly.
  3028.  
  3029.           Examples:
  3030.  
  3031.      NOTE This is the start of the main menu display
  3032.      IF cust=mcust ;the start of the processing for the current customer
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.      NOTE                        SRI  VPI  VPIN                        NOTE
  3061.      SR-Info/VP-Info Reference Manual          Page 273          SECTION 4
  3062.  
  3063.  
  3064.  
  3065.                                     NOUPDATE
  3066.  
  3067.      Do not write changes made to the current record back to the disk.
  3068.  
  3069.      ╔════════════════════════════════════════════════════════════════════╗
  3070.      ║ NOUPDATE                                                           ║
  3071.      ╚════════════════════════════════════════════════════════════════════╝
  3072.  
  3073.           Whenever a change is made to the current record in an open data
  3074.      file, leaving the record or closing the file causes the changes to be
  3075.      written to the disk.  This automatic action can be overridden by the
  3076.      NOUPDATE command, which tells SR-Info/VP-Info to ignore the changes.
  3077.  
  3078.           This is essentially what happens when Ctrl-Q is pressed during
  3079.      EDIT and BROWSE.
  3080.  
  3081.           Example in a program:
  3082.  
  3083.           Suppose full-screen editing is in effect with the READ command,
  3084.      and you want to ignore any changes made to the record if the user
  3085.      presses Ctrl-Q or an erroneous key like Ctrl-T and Ctrl-U.  Using the
  3086.      :KEY system variable that stores the key number of the key pressed to
  3087.      terminate the last process:
  3088.  
  3089.      DO WHILE t
  3090.         READ
  3091.         IF :key=17 .OR. :key=20 .OR. :key=21  ;key numbers of ^Q, ^T and ^U
  3092.            NOUPDATE
  3093.            LOOP
  3094.         ENDIF
  3095.         DO CASE
  3096.         CASE :key=...                         ;check a key
  3097.            ...                                ;action based on :key value
  3098.         ENDCASE
  3099.      ENDDO
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.      NOUPDATE                    SRI  VPI  VPIN                    NOUPDATE
  3121.      SR-Info/VP-Info Reference Manual          Page 274          SECTION 4
  3122.  
  3123.  
  3124.  
  3125.                                     ON ERROR
  3126.  
  3127.      Tell SR-Info/VP-Info what to do if an error is encountered during
  3128.      program execution.
  3129.  
  3130.      ╔════════════════════════════════════════════════════════════════════╗
  3131.      ║ ON ERROR                                                           ║
  3132.      ╚════════════════════════════════════════════════════════════════════╝
  3133.  
  3134.           The command ON ERROR starts the ON ERROR/ENDON structure.  There
  3135.      can be any program segment between ON ERROR and ENDON, except that no
  3136.      data files should be opened or closed, and no new variables created or
  3137.      released.  This program segment is executed whenever the program
  3138.      encounters an error.
  3139.  
  3140.           The ON ERROR is in effect in the program from the point where it
  3141.      is located.  It remains in effect until another ON ERROR structure is
  3142.      found, or until execution leaves the current module, either on a
  3143.      RETURN or DO command.
  3144.  
  3145.           ON ERROR has no effect within a subroutine called by the DO
  3146.      command; if the subroutine needs the same ON ERROR structure, repeat
  3147.      the structure in the subroutine.
  3148.  
  3149.           Since the ON ERROR structure has no effect after returning to a
  3150.      calling program from a subroutine, you should consider putting this
  3151.      structure (possibly together with the ON ESCAPE structure) into a
  3152.      procedure that is performed at the beginning of the program, and after
  3153.      every DO command.
  3154.  
  3155.           ON ERROR should normally include a RETURN, CHAIN, CANCEL, or QUIT
  3156.      command to allow execution to leave the current program.  Do not
  3157.      RETURN from a main return, or CHAIN from a subroutine.
  3158.  
  3159.           When editing with the internal SR-Info/VP-Info programming editor
  3160.      (see WRITE command), Alt-F reformats the file with all structures
  3161.      properly indented, making it easy to see unbalanced structures.
  3162.  
  3163.           Example:
  3164.  
  3165.      ON ERROR
  3166.         ? 'Aborting program execution because Error',:error,'encountered'
  3167.         ? :message      ;  :error contains the latest error number, and
  3168.         ?               ;  :message contains its meaning
  3169.         RING
  3170.         CANCEL
  3171.      ENDON
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.      ON ERROR                    SRI  VPI  VPIN                    ON ERROR
  3181.      SR-Info/VP-Info Reference Manual          Page 275          SECTION 4
  3182.  
  3183.  
  3184.  
  3185.                                    ON ESCAPE
  3186.  
  3187.      Tell SR-Info/VP-Info what to do if the user presses <Esc>.
  3188.  
  3189.      ╔════════════════════════════════════════════════════════════════════╗
  3190.      ║ ON ESCAPE                                                          ║
  3191.      ╚════════════════════════════════════════════════════════════════════╝
  3192.  
  3193.           The command ON ESCAPE starts the ON ESCAPE/ENDON structure.
  3194.      There can be any program segment between ON ESCAPE and ENDON, except
  3195.      that no data files should be opened or closed, and no new variables
  3196.      created or released.  This program segment is executed whenever the
  3197.      user presses <Esc>.
  3198.  
  3199.           The ON ESCAPE is in effect in the program from the point where it
  3200.      is located.  It remains in effect until another ON ESCAPE structure is
  3201.      found, or until execution leaves the current module, either on a
  3202.      RETURN or DO command.
  3203.  
  3204.           ON ESCAPE has no effect within a subroutine called by the DO
  3205.      command; if the subroutine needs the same ON ESCAPE structure, repeat
  3206.      the structure in the subroutine.
  3207.  
  3208.           Since the ON ESCAPE structure has no effect after returning to a
  3209.      calling program from a subroutine, you should consider putting this
  3210.      structure (possibly together with the ON ERROR structure) into a
  3211.      procedure that is performed at the beginning of the program, and after
  3212.      every DO command.
  3213.  
  3214.           ON ESCAPE should normally include a RETURN, CHAIN, CANCEL, or
  3215.      QUIT command to allow execution to leave the current program.
  3216.  
  3217.           When editing with the internal SR-Info/VP-Info programming editor
  3218.      (see WRITE command), Alt-F reformats the file with all structures
  3219.      properly indented, making it easy to see unbalanced structures.
  3220.  
  3221.           Example:
  3222.  
  3223.      ON ESCAPE
  3224.         ? 'Aborting program execution because <Esc> key pressed.'
  3225.         RING
  3226.         CANCEL
  3227.      ENDON
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.      ON ESCAPE                   SRI  VPI  VPIN                   ON ESCAPE
  3241.      SR-Info/VP-Info Reference Manual          Page 276          SECTION 4
  3242.  
  3243.  
  3244.  
  3245.                                     ON FIELD
  3246.  
  3247.      Control the processing of data input during execution of the full-
  3248.      screen editing commands: READ, EDIT, APPEND, and BROWSE.
  3249.  
  3250.      ╔════════════════════════════════════════════════════════════════════╗
  3251.      ║ ON FIELD                                                           ║
  3252.      ╚════════════════════════════════════════════════════════════════════╝
  3253.  
  3254.           The command ON FIELD starts the ON FIELD/ENDON structure.  There
  3255.      can be any program segment between ON FIELD and ENDON, except that no
  3256.      data files should be opened or closed, and no new variables created or
  3257.      released.
  3258.  
  3259.           Inside the ON FIELD structure is a number of FIELD statements,
  3260.      each telling SR-Info/VP-Info what to do when the user leaves a
  3261.      specific field, enters a new record, or leaves the record.  There can
  3262.      be one FIELD statement for each input field in a Get Table, in
  3263.      addition to the two FIELD statements controlling entry and exit from
  3264.      READ (or the current record in EDIT and BROWSE).
  3265.  
  3266.            (Note that the term editing field does not refer in this case
  3267.      only to fields, but to the on-screen area where you're expected to
  3268.      enter or edit data; an editing field may be a "window into" a data-
  3269.      file field, a memory variable, or a system variable.  An element in a
  3270.      matrix cannot be accessed with the full-screen editing commands, so
  3271.      cannot be tied to an editing field.)
  3272.  
  3273.           ON FIELD is used primarily for the following three functions:
  3274.  
  3275.           A.   To verify data input.  If the value entered does not meet a
  3276.                condition, the cursor can be directed back to the current
  3277.                field with the :FIELD=FIELD(fieldname) command.
  3278.  
  3279.           B.   To do data lookups from the selected or other files. For
  3280.                example, suppose the first field in the screen is mcust;
  3281.                when a customer number is entered FIND &mcust is executed
  3282.                and the proper record found in the current file.  If an
  3283.                invoice number is entered, data can be retrieved from the
  3284.                proper invoice with a FIND into another indexed file.
  3285.  
  3286.           C.   To change the order in which the cursor goes to the next
  3287.                field.  For example, a TEXT can have three columns of input
  3288.                figures; SR-Info/VP-Info normally goes left to right on each
  3289.                line, and then top to bottom, but appropriate use of the
  3290.                :FIELD system variable can direct the cursor to do one
  3291.                column at a time.
  3292.  
  3293.           The form of the ON FIELD structure:
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.      ON FIELD                    SRI  VPI  VPIN                    ON FIELD
  3301.      SR-Info/VP-Info Reference Manual          Page 277          SECTION 4
  3302.  
  3303.  
  3304.  
  3305.      ON FIELD
  3306.      FIELD 0
  3307.         <initiating command sequence>   ;The FIELD 0 code is executed when
  3308.                                           READ is entered or whenever a new
  3309.                                           record is entered in BROWSE OFF,
  3310.                                           EDIT OFF, etc.
  3311.      Field 1
  3312.         <command sequence 1>            ;The FIELD 1 code is executed when
  3313.                                           the cursor leaves the first
  3314.                                           editing field (and again when the
  3315.                                           current record is exited provided
  3316.                                           SET EXECUTE ON).
  3317.      Field 2
  3318.         <command sequence 2>            ;The FIELD 2 code is executed when
  3319.                                           the cursor leaves the second
  3320.                                           editing field (and again when the
  3321.                                           current record is exited provided
  3322.                                           SET EXECUTE ON).
  3323.      Field <n>
  3324.         <command sequence <n>>          ;The FIELD <n> code is executed
  3325.                                           when the cursor leaves the nth
  3326.                                           (final) editing field (and again
  3327.                                           when the current record is exited
  3328.                                           provided SET EXECUTE ON).
  3329.      Field 65
  3330.         <command sequence 65>           ;The FIELD 1 code is executed when
  3331.                                           the cursor leaves READ or when
  3332.                                           the current record is exited in
  3333.                                           BROWSE OFF, EDIT OFF, etc.
  3334.      ENDON
  3335.  
  3336.           Fields 1 through 64 may be referenced either by number of by the
  3337.      name of the field or variable being edited.  Names are usually more
  3338.      understandable and always more flexible, since a field can later be
  3339.      added or omitted without having to renumber the entire ON FIELD
  3340.      structure.
  3341.  
  3342.           You can force SR-Info/VP-Info to execute the entire set of FIELD
  3343.      commands from 1 through 64 by SET EXECUTION ON.  The default is OFF.
  3344.      Do not use ON if there is a possibility of creating an endless loop
  3345.      which doesn't allow a graceful exit.
  3346.  
  3347.           The Get Table is usually canceled as soon as execution leaves the
  3348.      current program, even when just executing a subroutine with the DO
  3349.      command.  You can SET GET ON to maintain the Get Table, provided it is
  3350.      not cleared in the sub-program.  (A Get Table is cleared either with
  3351.      the CLEAR GETS command, or by creating a GET with TEXT or an @ GET
  3352.      command after a READ command.)  The default is SET GET OFF.
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.      ON FIELD                    SRI  VPI  VPIN                    ON FIELD
  3361.      SR-Info/VP-Info Reference Manual          Page 278          SECTION 4
  3362.  
  3363.  
  3364.           When editing with the internal SR-Info/VP-Info programming editor
  3365.      (see WRITE command), Alt-F reformats the file with all structures
  3366.      properly indented, making it easy to see unbalanced structures.
  3367.  
  3368.           Example:
  3369.  
  3370.      date1=date(1)
  3371.      CLS
  3372.      TEXT
  3373.      .. date1,99/99/99
  3374.                     Enter game date (must be a Wednesday)
  3375.  
  3376.                                 @date1
  3377.      ENDTEXT
  3378.      ON FIELD
  3379.      FIELD date1
  3380.         IF DATE(FULL,date1)<>"W"
  3381.            :field=FIELD(date1)          ;use FIELD( to get correct number
  3382.         ENDIF
  3383.      ENDON
  3384.      DO WHILE t
  3385.         READ
  3386.         <command modules>
  3387.      ENDDO
  3388.  
  3389.           Note the placement of the three elements: the TEXT with its input
  3390.      macro and the ON FIELD come before the READ or other full-screen
  3391.      editing command, and are usually outside the DO WHILE loop unless the
  3392.      screen is rewritten elsewhere inside the loop.
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.      ON FIELD                    SRI  VPI  VPIN                    ON FIELD
  3421.      SR-Info/VP-Info Reference Manual          Page 279          SECTION 4
  3422.  
  3423.  
  3424.  
  3425.                                    OTHERWISE
  3426.  
  3427.      Introduce the optional clause in a DO CASE program structure.
  3428.      ╔════════════════════════════════════════════════════════════════════╗
  3429.      ║ OTHERWISE                                                          ║
  3430.      ╚════════════════════════════════════════════════════════════════════╝
  3431.  
  3432.           In a DO CASE program structure, if no condition is true,
  3433.      SR-Info/VP-Info executes the program segment following the OTHERWISE
  3434.      command, if any.  Only one OTHERWISE command is permitted within any
  3435.      DO CASE structure; it is equivalent to CASE t (true).
  3436.  
  3437.           See under DO CASE.
  3438.  
  3439.  
  3440.  
  3441.  
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.      OTHERWISE                   SRI  VPI  VPIN                   OTHERWISE
  3481.      SR-Info/VP-Info Reference Manual          Page 280          SECTION 4
  3482.  
  3483.  
  3484.  
  3485.                                   OVERWRITE TO
  3486.  
  3487.      Copy the fields from a record in one data file directly into the
  3488.      current record of another data file.
  3489.  
  3490.      ╔════════════════════════════════════════════════════════════════════╗
  3491.      ║ OVERWRITE TO [<filenum>]                                           ║
  3492.      ║                           VP-Info Professional only                ║
  3493.      ║                                                                    ║
  3494.      ║ <filenum>   any number of the data file containing the record to   ║
  3495.      ║               be overwritten                                       ║
  3496.      ╚════════════════════════════════════════════════════════════════════╝
  3497.  
  3498.           The OVERWRITE TO command is primarily used to implement
  3499.      transaction processing and to avoid lengthy record locks while records
  3500.      are being edited in a network environment.  Its companion command is
  3501.      APPEND TO.
  3502.  
  3503.          The technique in both cases is essentially the same, utilizing a
  3504.      main, indexed file and a small, unindexed personal file for each
  3505.      operator.
  3506.  
  3507.          The operator edits only in the personal file, adding records as
  3508.      required and verifying that everything is correct before moving the
  3509.      data back into the main file.  If the records already exist in the
  3510.      main file, OVERWRITE TO is used to put the corrected records back
  3511.      where they came from; if new records were appended to the personal
  3512.      file, APPEND TO is used to add them to the end of the main file.
  3513.  
  3514.           The two files do not need to have the same structures.  Any
  3515.      fields which do not exist in both files will be unaffected; any that
  3516.      are smaller in one than the other create risks of losing some data due
  3517.      to string truncation or numeric overflow.
  3518.  
  3519.           Executing OVERWRITE TO is much faster than a long series of
  3520.      REPLACE commands.
  3521.  
  3522.           Example in a program with SET NETWORK ON (VP-Info Professional
  3523.      Network Edition only):
  3524.  
  3525.      USE customer INDEX custnum,custname SHARE
  3526.      USE#2 personal
  3527.      SET FUNCTION OFF
  3528.      DO WHILE t
  3529.         SET SAVE OFF
  3530.         EDIT TEXT customer      ;use formatted EDIT
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.      OVERWRITE TO                   VPI  VPIN                  OVERWRITE TO
  3541.      SR-Info/VP-Info Reference Manual          Page 281          SECTION 4
  3542.  
  3543.  
  3544.         IF usedby<>0
  3545.            WINDOW 20,30,22,75 DOUBLE   ;pop up a window for message
  3546.            recnum=RECNO(1)
  3547.            TEXT
  3548.      .. recnum,'999,999'
  3549.      .. usedby,999
  3550.          Record &recnum is in use by user &usedby
  3551.  
  3552.          Press any key to skip to next record...
  3553.            ENDTEXT
  3554.            junk=INKEY()               ;wait to keystroke
  3555.            SKIP
  3556.            LOOP
  3557.         ENDIF
  3558.         IF :key=324                   ;F10 means edit this record
  3559.            REPLACE usedby with :USER  ;mark record as in use by you
  3560.            OVERWRITE TO 2             ;then move into personal file
  3561.            SELECT 2                   ;select personal file
  3562.            SET SAVE ON                ;allow changes to be saved
  3563.            CLS                        ;clear the screen
  3564.            TEXT custedit              ;with "CHANGES PERMITTED" message
  3565.            READ
  3566.            WINDOW 20,30,22,75 DOUBLE  ;pop up a window for confirmation
  3567.            ans='No '
  3568.            recnum=RECNO(1)
  3569.            TEXT
  3570.      .. recnum,'999,999'
  3571.      ..,ans,!xx
  3572.          Changes may have been made to record #recnum
  3573.  
  3574.               Save all changes (Yes/No)  @ans
  3575.            ENDTEXT
  3576.            IF ans='Y'
  3577.               OVERWRITE to 1
  3578.            ENDIF
  3579.            REPLACE usedby with 0      ;free the record for other users
  3580.         ENDIF
  3581.      ENDDO
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600.      OVERWRITE TO                   VPI  VPIN                  OVERWRITE TO
  3601.      SR-Info/VP-Info Reference Manual          Page 282          SECTION 4
  3602.  
  3603.  
  3604.  
  3605.                                       PACK
  3606.  
  3607.      Remove deleted records from the selected file.
  3608.  
  3609.      ╔════════════════════════════════════════════════════════════════════╗
  3610.      ║ PACK [TRUNCATE]                                                    ║
  3611.      ╟────────────────────────────────────────────────────────────────────╢
  3612.      ║ Option:                                                            ║
  3613.      ║                                                                    ║
  3614.      ║ TRUNCATE   reduce the DOS size of the file                         ║
  3615.      ╚════════════════════════════════════════════════════════════════════╝
  3616.  
  3617.           This command removes records that have been marked for deletion
  3618.      by the DELETE command or the Ctrl-U of the EDIT and BROWSE commands.
  3619.  
  3620.           All the index files in use are automatically reindexed after
  3621.      PACK. (See INDEX and REINDEX.)
  3622.  
  3623.           Make sure you have a back up copy of the file before packing it.
  3624.      If PACK is interrupted, the file may be corrupt or contain duplicate
  3625.      records.
  3626.  
  3627.           PACK does not release disk space unless the TRUNCATE option is
  3628.      used.  If a file frequently gets large, has many records deleted and
  3629.      then grows again, it may be more efficient to PACK without TRUNCATE,
  3630.      so that DOS is not constantly adding disk clusters and recovering them
  3631.      again.
  3632.  
  3633.           On a network with SET NETWORK ON in VP-Info Professional Network
  3634.      Edition, attempting to PACK or create an index while another user is
  3635.      accessing the data file or an index file with the same name as any of
  3636.      the current indexes will cause a LOCK error.  Always LOCK the data
  3637.      file before attempting to PACK.
  3638.  
  3639.           Examples:
  3640.  
  3641.      1>USE employee
  3642.      1>GO 2
  3643.      1>DELETE
  3644.            1 DELETE(S)
  3645.      1>LIST name
  3646.            1  Marek
  3647.            2 *Balzer
  3648.            3  Steiner
  3649.            4  Rayme
  3650.            5  Poyner
  3651.            6  Wilson
  3652.      1>PACK
  3653.            5 TOTAL PACKED
  3654.      1>LIST name
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660.      PACK                        SRI  VPI  VPIN                        PACK
  3661.      SR-Info/VP-Info Reference Manual          Page 283          SECTION 4
  3662.  
  3663.  
  3664.            1  Marek
  3665.            2  Steiner
  3666.            3  Rayme
  3667.            4  Poyner
  3668.            5  Wilson
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.  
  3716.  
  3717.  
  3718.  
  3719.  
  3720.      PACK                        SRI  VPI  VPIN                        PACK
  3721.      SR-Info/VP-Info Reference Manual          Page 284          SECTION 4
  3722.  
  3723.  
  3724.  
  3725.                                     PERFORM
  3726.  
  3727.      Execute a procedure.
  3728.  
  3729.      ╔════════════════════════════════════════════════════════════════════╗
  3730.      ║ PERFORM <procedure>                                                ║
  3731.      ║                                                                    ║
  3732.      ║ <procedure>      the name of the procedure                         ║
  3733.      ╚════════════════════════════════════════════════════════════════════╝
  3734.  
  3735.           The command PERFORM is used to execute a procedure, <procedure>,
  3736.      defined in the current program; <procedure> cannot be a macro.  The
  3737.      procedure is defined with the PROCEDURE command (see PROCEDURE).
  3738.  
  3739.           The procedure is compiled where it is first called with PERFORM.
  3740.      If the procedure makes references to fields, the structure and order
  3741.      of the files in use must be the same any time the procedure is used.
  3742.      The same comment also applies to memory variables.  Normally,
  3743.      procedures perform tasks that are independent of the environment
  3744.      (files in use and memory variables) or they are always invoked in the
  3745.      same environment.
  3746.  
  3747.           If you need the same procedure in different environments, write
  3748.      the procedure as a separate program, and invoke it as a subroutine
  3749.      with the DO command.  See the command DO.
  3750.  
  3751.           Performing procedures is a very fast way of executing the same
  3752.      program segment from many places in the program.  The procedures
  3753.      themselves must be at the end of the program.
  3754.  
  3755.           Example:
  3756.  
  3757.      PERFORM header
  3758.      DO WHILE .NOT. EOF
  3759.         ...
  3760.         line=line+1
  3761.         IF line>55
  3762.           PERF header
  3763.         ENDIF
  3764.      ENDDO
  3765.      CHAIN menu
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779.  
  3780.      PERFORM                     SRI  VPI  VPIN                     PERFORM
  3781.      SR-Info/VP-Info Reference Manual          Page 285          SECTION 4
  3782.  
  3783.  
  3784.      PROCEDURE header
  3785.         TEXT
  3786.      &:DATE                             &:COMPANY                Page &page
  3787.                                       Sales Journal
  3788.  
  3789.      Date    Invoice #  Description                     Units     Dollars
  3790.  
  3791.         ENDTEXT
  3792.         line=6
  3793.      ENDPROCEDURE
  3794.  
  3795.  
  3796.  
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.      PERFORM                     SRI  VPI  VPIN                     PERFORM
  3841.      SR-Info/VP-Info Reference Manual          Page 286          SECTION 4
  3842.  
  3843.  
  3844.  
  3845.                                       POST
  3846.  
  3847.      Post the FROM (transaction) file to the POSTING file (selected file
  3848.      with index).
  3849.  
  3850.      ╔════════════════════════════════════════════════════════════════════╗
  3851.      ║ POST ON <str exp> FROM <file> [FIELDS <mixed field list>] [<scope>]║
  3852.      ║      [FOR <cond>]                                                  ║
  3853.      ║                                                                    ║
  3854.      ║ <str exp>   the expression that is the key for finding the records ║
  3855.      ║                in the FROM file                                    ║
  3856.      ║ <file>      the FROM file                                          ║
  3857.      ╟────────────────────────────────────────────────────────────────────╢
  3858.      ║ Options:                                                           ║
  3859.      ║                                                                    ║
  3860.      ║ FIELDS <mixed field list>  the fields to be totalled in the        ║
  3861.      ║                       FROM file and added to the fields            ║
  3862.      ║                       in the POSTING file (the selected file);     ║
  3863.      ║                       <field> WITH <num exp> can add an expression ║
  3864.      ║ <scope>            selection restricted by scope                   ║
  3865.      ║                       (default scope: ALL)                         ║
  3866.      ║ FOR <cond>         selection restricted by <cond>                  ║
  3867.      ╚════════════════════════════════════════════════════════════════════╝
  3868.  
  3869.           The selected file, called the POSTING file, must be indexed by
  3870.      <str exp>, an expression formed from fields of the FROM file, called
  3871.      the FROM file, and constants and memory variables.
  3872.  
  3873.           This procedure takes all the appropriate records (that is, the
  3874.      first record satisfying the <cond> and within the scope) of the FROM
  3875.      file, one at a time.  It picks the first appropriate record, and
  3876.      evaluates <str exp> in the FROM file.  Next it finds the matching
  3877.      record in the POSTING file.  If the find is not successful, an error
  3878.      message POST ERROR" is sent.
  3879.  
  3880.           If the find is successful, the procedure posts.  Posting consists
  3881.      of one of two actions, depending on whether a field name is listed
  3882.      alone in the mixed field list, or if a field name has a WITH clause
  3883.      attached.
  3884.  
  3885.           A.   If the field is named alone, the value of that field in the
  3886.                FROM file is added to the value already in the POSTING
  3887.                file.; that is, it adds the fields in the <field list> of
  3888.                the current record of the FROM file to the fields of the
  3889.                same name in the current record of the POSTING file.
  3890.  
  3891.           B.   In a mixed field list, the clause <field> WITH <num exp>
  3892.                allows adding any numeric expression <field> to the field in
  3893.                the POSTING file.  <num exp> is formed using the fields of
  3894.                the FROM file, and optionally fields from other files
  3895.                (including the POSTING file), variables, and constants.
  3896.  
  3897.  
  3898.  
  3899.  
  3900.      POST                        SRI  VPI  VPIN                        POST
  3901.      SR-Info/VP-Info Reference Manual          Page 287          SECTION 4
  3902.  
  3903.  
  3904.  
  3905.           If a find is unsuccessful and SET ADD ON, a record will be
  3906.      appended to the POSTING file, the non-numeric fields of the POSTING
  3907.      file record will be replaced by the matching fields in the FROM file
  3908.      record, and, finally, the procedure posts as above.
  3909.  
  3910.           The procedure continues with the next appropriate record of the
  3911.      FROM file.
  3912.  
  3913.           If there is no FIELDS clause, POST simply checks whether there is
  3914.      a record in the POSTING file for each value of <str exp> in the FROM
  3915.      file.  This is valuable to check whether every record in the FROM file
  3916.      has a matching record in the POSTING file without changing any fields.
  3917.  
  3918.           If SET PRINT OFF (the default), the error messages appear on the
  3919.      screen; otherwise, they are echoed to (printed on) the printer (or to
  3920.      the alternate text file, if SET ALTERNATE ON).
  3921.  
  3922.           Deleted records are not posted, irrespective of SET DELETED.
  3923.  
  3924.           Important programming note: The POST command automatically opens
  3925.      the FROM file in its internal work area; if the FROM file is already
  3926.      open in another work area, the compiler will assume it is closed when
  3927.      the POST command is passed during execution, even if that command is
  3928.      in an IF, CASE or other structure module that is not executed!
  3929.  
  3930.           Therefore, if there is any reference to the FROM file later in
  3931.      the program, open the file in the proper work area again immediately
  3932.      after the POST command.  If it is not actually needed after the POST
  3933.      is executed (e.g., the program exits after the POST), open it with the
  3934.      COMPILE keyword.  Example:
  3935.  
  3936.      USE#4 invoices COMPILE
  3937.  
  3938.           See also the related commands: TOTAL and UPDATE.
  3939.  
  3940.           Example:
  3941.  
  3942.           Use the data files SALESMEN and ORDER (see Appendix), to record
  3943.      the amount of merchandise sold.
  3944.  
  3945.      1>SET TALK ON
  3946.      1>USE salesmen
  3947.      1>INDEX ON slsman:no TO salesmen
  3948.            2 RECORDS IN TOTAL INDEXED
  3949.      1>POST ON slsman:no FROM order FIELDS amount FROM order
  3950.                                     2 ** POST ERROR ** 4
  3951.            5 POST(S)
  3952.      1>LIST
  3953.            1  1   Smith           John              4386.00
  3954.            2  5   Willson         Tom              14679.50
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.      POST                        SRI  VPI  VPIN                        POST
  3961.      SR-Info/VP-Info Reference Manual          Page 288          SECTION 4
  3962.  
  3963.  
  3964.  
  3965.           The error message POST ERROR indicates that in the ORDER file
  3966.      there is a record (number 2) with a salesman code ("4") not found in
  3967.      the SALESMEN file.
  3968.  
  3969.           Note that the amount for Smith is 2709.00 (the amount that was in
  3970.      the SALESMEN file) +1677.00 (the amount in ORDER record 5).
  3971.  
  3972.           The amount for Willson is 12089.00 (the amount that was in the
  3973.      SALESMEN file) +597.50 (the amount in order 1) +559.00 (the amount in
  3974.      order 3) +1434.00 (the amount in order 4).
  3975.  
  3976.           Of course, the most typical example of the use of the command
  3977.      POST is posting to a general ledger (the POSTING file) from a journal
  3978.      (the transaction file).
  3979.  
  3980.  
  3981.  
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.      POST                        SRI  VPI  VPIN                        POST
  4021.      SR-Info/VP-Info Reference Manual          Page 289          SECTION 4
  4022.  
  4023.  
  4024.  
  4025.                                    PROCEDURE
  4026.  
  4027.      Procedure (subroutine) definition.
  4028.  
  4029.      ╔════════════════════════════════════════════════════════════════════╗
  4030.      ║ PROCEDURE <procedure>                                              ║
  4031.      ║                                                                    ║
  4032.      ║ <procedure>   the name of the procedure                            ║
  4033.      ╚════════════════════════════════════════════════════════════════════╝
  4034.  
  4035.           The PROCEDURE command indicates the start of a procedure
  4036.      definition, the ENDPROCEDURE command indicates the end of the
  4037.      procedure:
  4038.  
  4039.      PROCEDURE <procedure>
  4040.        <program segment>
  4041.      ENDPROCEDURE
  4042.  
  4043.           Procedures should be used for all SR-Info/VP-Info program
  4044.      segments that are used more than once in a program.  However, if the
  4045.      procedure makes references to fields, the structure and order of the
  4046.      files in use must be the same any time the procedure is used.  The
  4047.      same comment also applies to memory variables.  Normally, procedures
  4048.      perform tasks that are independent of the environment (files in use
  4049.      and memory variables) or they are always invoked in the same
  4050.      environment.
  4051.  
  4052.           If the whole program will not fit in memory, then replace the
  4053.      procedures by subroutines invoked by the DO command.  (See CHAIN,
  4054.      PERFORM, PROCEDURE.
  4055.  
  4056.           The procedure name, <procedure>, follows the same rules as
  4057.      variable names  (see Section 2); <procedure> cannot be a macro.
  4058.      Procedures must be placed at the end of the program.  A procedure can
  4059.      perform other procedures.
  4060.  
  4061.           A procedure is compiled at the first PERFORM invoking it.  (See
  4062.      Example 1 in Appendix A)
  4063.  
  4064.           Hint: If the same procedure must be used in more than one
  4065.      subroutine, add a digit (1, 2, 3, etc.) to the name in the various
  4066.      subroutines.  Example: if a procedure called BELL is needed in main
  4067.      program ENTER and subroutines ENTER1 and ENTER2, call it BELL, BELL1
  4068.      and BELL2 in the three program modules respectively.
  4069.  
  4070.           Examples:
  4071.  
  4072.           1. A simple label printing procedure.
  4073.  
  4074.      INPUT 'Enter the number of labels to print ' TO nlabel
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.      PROCEDURE                   SRI  VPI  VPIN                   PROCEDURE
  4081.      SR-Info/VP-Info Reference Manual          Page 290          SECTION 4
  4082.  
  4083.  
  4084.      REPEAT nlabel TIMES
  4085.         PERFORM label
  4086.         SKIP
  4087.      ENDREPEAT
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.      PROCEDURE                   SRI  VPI  VPIN                   PROCEDURE
  4141.      SR-Info/VP-Info Reference Manual          Page 291          SECTION 4
  4142.  
  4143.  
  4144.      PROCEDURE label  ; prints 5 lines of data and 4 blank lines
  4145.         ? name        ; on standard labels one across
  4146.         ? add:1
  4147.         ? add:2
  4148.         ? add:3
  4149.         ? postal
  4150.         ?
  4151.         ?
  4152.         ?
  4153.         ?
  4154.      ENDPROCEDURE   ; end of label printing
  4155.  
  4156.           2. A procedure to clear screen, make border, set standard
  4157.      heading, and create reverse video black for menu choices.  This
  4158.      procedure would be called before any menu display in the program.
  4159.  
  4160.      PROCEDURE MENUSCREEN
  4161.         ERASE
  4162.         WINDOW 2,1,23,77 DOUBLE
  4163.         COLOR 112, 6, 4, 22, 74
  4164.         @ 3,0 SAY CEN(:COMPANY, 80)
  4165.         @ 5,0 SAY CEN('Enter your choice below:',80)
  4166.      ENDPROCEDURE menuscreen
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.      PROCEDURE                   SRI  VPI  VPIN                   PROCEDURE
  4201.      SR-Info/VP-Info Reference Manual          Page 292          SECTION 4
  4202.  
  4203.  
  4204.  
  4205.                                       QUIT
  4206.  
  4207.      Leave SR-Info/VP-Info.
  4208.  
  4209.      ╔════════════════════════════════════════════════════════════════════╗
  4210.      ║ QUIT [<errorlevel>]                                                ║
  4211.      ║                                                                    ║
  4212.      ╟────────────────────────────────────────────────────────────────────╢
  4213.      ║ Option:                                                            ║
  4214.      ║ <errorlevel>    a value passed to DOS, which allows batch files    ║
  4215.      ║                   to control their execution with the              ║
  4216.      ║                   IF ERRORLEVEL command                            ║
  4217.      ╚════════════════════════════════════════════════════════════════════╝
  4218.  
  4219.           The command QUIT exits from SR-Info/VP-Info.  It closes all the
  4220.      files and gives you the prompt of the operating system.
  4221.  
  4222.           If SR-Info/VP-Info is running unattended in a batch file, a
  4223.      program can pass an "errorlevel" to DOS indicating if some condition
  4224.      was encountered during execution.  For instance, if there is an error
  4225.      reading a data file, you can QUIT to DOS with an errorlevel of 1,
  4226.      which the batch file can detect so that the tape backup is not run.
  4227.      The command in this case wound be QUIT 1. Consult your DOS reference
  4228.      manual for the IF ERRORLEVEL batch program command.
  4229.  
  4230.           Example:
  4231.  
  4232.      DO CASE
  4233.         CASE ans='0'
  4234.            QUIT
  4235.         CASE ans='2'
  4236.            CHAIN prog1
  4237.         ...
  4238.         OTHERWISE
  4239.            QUIT 1        ;tells DOS an error encountered by SR-Info/VP-Info
  4240.      ENDCASE
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.      QUIT                        SRI  VPI  VPIN                        QUIT
  4261.      SR-Info/VP-Info Reference Manual          Page 293          SECTION 4
  4262.  
  4263.  
  4264.  
  4265.                                       READ
  4266.  
  4267.      Enter full-screen editing and data entry specified by the @ GET and
  4268.      TEXT commands.
  4269.  
  4270.      ╔════════════════════════════════════════════════════════════════════╗
  4271.      ║ READ                                                               ║
  4272.      ╚════════════════════════════════════════════════════════════════════╝
  4273.  
  4274.           The READ command activates the input aspect of the @ GET commands
  4275.      (including the @ and % macros in a TEXT).  The @ GET command displays
  4276.      the variable at the specified location and format.  The READ command
  4277.      puts the screen in full-screen editing mode with the current values of
  4278.      all fields and memory variables shown, and the new values of all the
  4279.      variables in the @ GET (and the @ and % macros in TEXT) commands can
  4280.      be entered.
  4281.  
  4282.           If the READ changes any key of a record in an index file in use,
  4283.      then the index files are updated.
  4284.  
  4285.           The READ command clears all the pending GET commands.
  4286.  
  4287.           Example:
  4288.  
  4289.      @ SAY 20,0 'Enter your choice: ' GET ans
  4290.      READ
  4291.  
  4292.      is the same as:
  4293.  
  4294.      ACCEPT 'Enter your choice: ' TO ans
  4295.  
  4296.      except that @ SAY does not create ANS, ACCEPT does; @ SAY directs the
  4297.      query to a specific location on the screen.
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.      READ                        SRI  VPI  VPIN                        READ
  4321.      SR-Info/VP-Info Reference Manual          Page 294          SECTION 4
  4322.  
  4323.  
  4324.  
  4325.                                      RECALL
  4326.  
  4327.      Undelete selected deleted records in the selected file.
  4328.  
  4329.      ╔════════════════════════════════════════════════════════════════════╗
  4330.      ║ RECALL [<scope>] [FOR <cond>]                                      ║
  4331.      ╟────────────────────────────────────────────────────────────────────╢
  4332.      ║ Options:                                                           ║
  4333.      ║                                                                    ║
  4334.      ║ <scope>       select by scope (default scope: current record)      ║
  4335.      ║ FOR <cond>    select by condition                                  ║
  4336.      ╚════════════════════════════════════════════════════════════════════╝
  4337.  
  4338.           Records are flagged as DELETED either with Ctrl-U in BROWSE, or
  4339.      EDIT, or with the DELETE command (see the commands BROWSE, DELETE, and
  4340.      EDIT).  The command RECALL reverses the DELETED flag.
  4341.  
  4342.           The command PACK physically removes all records flagged for
  4343.      deletion.  After a PACK, the records can no longer be recalled.
  4344.  
  4345.           Note that if SET DELETE ON, then RECALL will work only on a
  4346.      deleted record only if it is also the current record.  Normally SET
  4347.      DELETE OFF before using RECALL.
  4348.  
  4349.           Examples:
  4350.  
  4351.      1>USE employee
  4352.      1>GO 2
  4353.      1>DELETE
  4354.            1 DELETE(S)
  4355.      1>LIST name
  4356.            1  Marek
  4357.            2 *Steiner
  4358.            3  Rayme
  4359.            4  Poyner
  4360.            5  Poyner
  4361.            6  Wilson
  4362.      1>GO 2
  4363.      1>RECALL
  4364.            1 RECALL(S)            ;record 2 was recalled
  4365.      1>RECALL                     ;the default is the current record
  4366.            0 RECALL(S)
  4367.      1>DELETE RECORD 2
  4368.            1 DELETE(S)
  4369.      1>DELETE RECORD 4
  4370.            1 DELETE(S)
  4371.      1>DELETE RECORD 6
  4372.            1 DELETE(S)
  4373.      1>RECALL ALL
  4374.            3 RECALL(S)            Note: Records 2, 4, 6 are recalled
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.      RECALL                      SRI  VPI  VPIN                      RECALL
  4381.      SR-Info/VP-Info Reference Manual          Page 295          SECTION 4
  4382.  
  4383.  
  4384.      1>GO TOP
  4385.      1>DELETE
  4386.            1 DELETE(S)
  4387.      1>DELETE RECORD 3
  4388.            1 DELETE(S)
  4389.      1>DELETE RECORD 5
  4390.            1 DELETE(S)
  4391.      1>LIST name
  4392.            1 *Marek
  4393.            2  Steiner
  4394.            3 *Rayme
  4395.            4  Poyner
  4396.            5 *Poyner
  4397.            6  Wilson
  4398.      1>GO TOP
  4399.      1>RECALL NEXT 4
  4400.            2 RECALL(S)            Note: Records 1 and 3 are recalled
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.  
  4430.  
  4431.  
  4432.  
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.      RECALL                      SRI  VPI  VPIN                      RECALL
  4441.      SR-Info/VP-Info Reference Manual          Page 296          SECTION 4
  4442.  
  4443.  
  4444.  
  4445.                                     REINDEX
  4446.  
  4447.      Reindex all index files in use.
  4448.  
  4449.      ╔════════════════════════════════════════════════════════════════════╗
  4450.      ║ REINDEX [FOR <cond>]                                               ║
  4451.      ╟────────────────────────────────────────────────────────────────────╢
  4452.      ║ Option:                                                            ║
  4453.      ║                                                                    ║
  4454.      ║ FOR <cond>    select by condition                                  ║
  4455.      ╚════════════════════════════════════════════════════════════════════╝
  4456.  
  4457.           This command takes all the index files currently in use for the
  4458.      selected data file, and rebuilds each index file.
  4459.  
  4460.           In Conversational SR-Info/VP-Info, and in programs with SET TALK
  4461.      ON, REINDEX will output the key, the progress of the indexing
  4462.      procedure, showing the completion of each 100 records, and the total
  4463.      number of records indexed.
  4464.  
  4465.           A FOR clause can be used to limit the records in the index(es) to
  4466.      those for which <cond> is true.  See INDEX.
  4467.  
  4468.           On a network with SET NETWORK ON in VP-Info Professional Network
  4469.      Edition, attempting to REINDEX while another user is accessing an
  4470.      index file with the same name as one of the current file's indexes
  4471.      will cause a LOCK error.
  4472.  
  4473.           Examples:
  4474.  
  4475.           The commands:
  4476.  
  4477.      1>USE employee
  4478.      1>INDEX on name+fname TO employee
  4479.  
  4480.      accomplish the same as the following:
  4481.  
  4482.      1>USE employee INDEX employee
  4483.      1>REINDEX
  4484.  
  4485.           Note that for REINDEX, you do not have to specify the key
  4486.      (name+fname) or the name of the index file (EMPLOYEE.NDX).
  4487.  
  4488.           In a program:
  4489.  
  4490.      USE employee INDEX employee,empl1,empl2
  4491.      REINDEX
  4492.  
  4493.      will rebuild three index files: EMPLOYEE.NDX,EMPL1.NDX,EMPL2.NDX.
  4494.  
  4495.  
  4496.  
  4497.  
  4498.  
  4499.  
  4500.      REINDEX                     SRI  VPI  VPIN                     REINDEX
  4501.      SR-Info/VP-Info Reference Manual          Page 297          SECTION 4
  4502.  
  4503.  
  4504.           The following uses a FOR clause to limit the index to current
  4505.      employee only, based on date of termination being blank:
  4506.  
  4507.      USE employee INDEX employee,empl1,empl2
  4508.      REINDEX FOR terminated=' '
  4509.  
  4510.  
  4511.  
  4512.  
  4513.  
  4514.  
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.      REINDEX                     SRI  VPI  VPIN                     REINDEX
  4561.      SR-Info/VP-Info Reference Manual          Page 298          SECTION 4
  4562.  
  4563.  
  4564.  
  4565.                                     RELEASE
  4566.  
  4567.      Erase memory variables.
  4568.  
  4569.      ╔════════════════════════════════════════════════════════════════════╗
  4570.      ║ RELEASE [<memvar list>/EXCEPT <memvar list>/ALL]                   ║
  4571.      ╟────────────────────────────────────────────────────────────────────╢
  4572.      ║ Options:                                                           ║
  4573.      ║                                                                    ║
  4574.      ║ <memvar list>          the memory variables to be released,        ║
  4575.      ║                           separated by commas                      ║
  4576.      ║ EXCEPT <memvar list>   the memory variables not to be released,    ║
  4577.      ║                           separated by commas                      ║
  4578.      ║ ALL                    release ALL                                 ║
  4579.      ╚════════════════════════════════════════════════════════════════════╝
  4580.  
  4581.           The command RELEASE erases memory variables; it releases memory
  4582.      space for new memory variables.  You can make a list of the memory
  4583.      variables you want removed, use the parameter ALL to remove them all,
  4584.      or use the parameter EXCEPT <memvar list> to remove all except those
  4585.      on the list.
  4586.  
  4587.           This command should be used in programs only with the utmost
  4588.      care.  Compiled programs set pointers to memory variables.  If the
  4589.      memory variables are released, the release must be absolute, not
  4590.      dependent on some conditions.
  4591.  
  4592.           Since 128 memory variables can be used at any one time, and any
  4593.      number of them may be matrix variables, it is best not to RELEASE
  4594.      during a program.  When programs are chained, SR-Info/VP-Info will do
  4595.      a CLEAR, which includes a RELEASE ALL.
  4596.  
  4597.           RELEASE does not affect the values of the function keys and the
  4598.      system variables.
  4599.  
  4600.           Examples:
  4601.  
  4602.           1. In Conversational SR-Info/VP-Info:
  4603.  
  4604.      1>LIST MEMO
  4605.  
  4606.      Name          Type    Width    Contents
  4607.      ** Total **  0  variables, 0  bytes
  4608.      1>name='David'
  4609.      1>age='11'
  4610.      1>LIST MEMO
  4611.  
  4612.      Name          Type    Width    Contents
  4613.      NAME            C       5      David
  4614.      AGE             C       2      11
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.      RELEASE                     SRI  VPI  VPIN                     RELEASE
  4621.      SR-Info/VP-Info Reference Manual          Page 299          SECTION 4
  4622.  
  4623.  
  4624.      ** Total **  2  variables, 7  bytes
  4625.      1>RELEASE age
  4626.      1>LIST MEMO
  4627.  
  4628.      Name          Type    Width    Contents
  4629.      NAME            C       5      David
  4630.      ** Total **  1  variables, 5  bytes
  4631.      1>RELEASE                             ;RELEASE by itself does nothing
  4632.      1>LIST MEMO
  4633.  
  4634.      Name          Type    Width    Contents
  4635.      NAME            C       5      David
  4636.      ** Total **  1  variables, 5  bytes
  4637.      1>age=11
  4638.      1>LIST MEMO
  4639.  
  4640.      Name          Type    Width    Contents
  4641.      NAME            C       5      David
  4642.      AGE             N       8      11
  4643.      ** Total **  2  variables, 13  bytes
  4644.      1>RELEASE ALL
  4645.      1>LIST MEMO
  4646.  
  4647.      Name          Type    Width    Contents
  4648.      ** Total **  0  variables, 0  bytes
  4649.  
  4650.           2. In programming, from a program you might DO a number of
  4651.      subroutines; each uses a number of memory variables, most of which are
  4652.      unique to it, but which in total exceed the 128 memory variable limit.
  4653.      In this case, decide which variables needed to be retained, and use
  4654.      the RELEASE EXCEPT after each subroutine as follows:
  4655.  
  4656.      @ 20,30 SAY ' Enter your choice: ' GET choice PICTURE'!'
  4657.      DO CASE choice                     ;menu choices
  4658.         CASE choice='A'
  4659.            DO proga
  4660.            RELEASE EXCEPT choice,cust,due,amount
  4661.         CASE choice='B'
  4662.            DO progb
  4663.            RELEASE EXCEPT choice,cust,due,amount
  4664.         CASE choice='C'
  4665.            DO progc
  4666.            RELEASE EXCEPT choice,cust,due,amount
  4667.         ENDCASE
  4668.      ENDDO                              ;menu choices
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.      RELEASE                     SRI  VPI  VPIN                     RELEASE
  4681.      SR-Info/VP-Info Reference Manual          Page 300          SECTION 4
  4682.  
  4683.  
  4684.  
  4685.                                      REMARK
  4686.  
  4687.      Display message on screen or printer.
  4688.  
  4689.      ╔════════════════════════════════════════════════════════════════════╗
  4690.      ║ REMARK ['<text line>']                                             ║
  4691.      ╟────────────────────────────────────────────────────────────────────╢
  4692.      ║ Option:                                                            ║
  4693.      ║                                                                    ║
  4694.      ║ '<text line>'       the text line to be displayed                  ║
  4695.      ╚════════════════════════════════════════════════════════════════════╝
  4696.  
  4697.           Same as the command ?.  <text line> may be an expression list.
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.      REMARK                      SRI  VPI  VPIN                      REMARK
  4741.      SR-Info/VP-Info Reference Manual          Page 301          SECTION 4
  4742.  
  4743.  
  4744.  
  4745.                                      RENAME
  4746.  
  4747.      Rename a file.
  4748.  
  4749.      ╔════════════════════════════════════════════════════════════════════╗
  4750.      ║ RENAME <file> TO <new file>                                        ║
  4751.      ║                                                                    ║
  4752.      ║ <file>        the file name to be changed (default extension DBF)  ║
  4753.      ║ <new file>    the new name for the file   (default extension DBF)  ║
  4754.      ╚════════════════════════════════════════════════════════════════════╝
  4755.  
  4756.           This command is similar to the RENAME command of the operating
  4757.      system: a file is renamed.  No wild card characters are allowed.
  4758.  
  4759.           If the file name has no extension, the extension DBF is assumed.
  4760.      (Do not rename a data or index file to a name starting with the
  4761.      letters COMP; SR-Info/VP-Info is unable to open such a file.)
  4762.  
  4763.           Examples:
  4764.  
  4765.      1>RENAME employee TO empl
  4766.  
  4767.      Renames EMPLOYEE.DBF to EMPL.DBF.
  4768.  
  4769.      1>RENAME employee.dbf TO employee.xyz
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.      RENAME                      SRI  VPI  VPIN                      RENAME
  4801.      SR-Info/VP-Info Reference Manual          Page 302          SECTION 4
  4802.  
  4803.  
  4804.  
  4805.                                   RENAME FIELD
  4806.  
  4807.      Rename a field in a data file.
  4808.  
  4809.      ╔════════════════════════════════════════════════════════════════════╗
  4810.      ║ RENAME FIELD <field> TO <new fieldname>                            ║
  4811.      ║                                                                    ║
  4812.      ║ <field>          the field name to be changed                      ║
  4813.      ║ <new fieldname>  the new name for the field                        ║
  4814.      ╚════════════════════════════════════════════════════════════════════╝
  4815.  
  4816.           This command allows you to change the name of a field in a data
  4817.      file without doing a MODIFY, which potentially endangers the file and
  4818.      removes all deleted records, often necessitating a REINDEX.
  4819.  
  4820.           Examples:
  4821.  
  4822.      1>RENAME FIELD employee TO empl
  4823.  
  4824.      Renames the field EMPLOYEE to EMPL in the current data file.
  4825.  
  4826.      1>RENAME#3 FIELD cust TO customer
  4827.  
  4828.                Caution: All programs, report forms and index files that
  4829.           reference the old field name must be revised before they will
  4830.           work properly after a field is renamed.
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840.  
  4841.  
  4842.  
  4843.  
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860.      RENAME FIELD                SRI  VPI  VPIN                RENAME FIELD
  4861.      SR-Info/VP-Info Reference Manual          Page 303          SECTION 4
  4862.  
  4863.  
  4864.  
  4865.                                      REPEAT
  4866.  
  4867.      Repeat program segment a specified number of times.
  4868.  
  4869.      ╔════════════════════════════════════════════════════════════════════╗
  4870.      ║ REPEAT <num exp> TIMES [VARYING <num var>]                         ║
  4871.      ║                                                                    ║
  4872.      ║ <num exp>    a numeric expression; repeat the loop this many times ║
  4873.      ╟────────────────────────────────────────────────────────────────────╢
  4874.      ║ Option:                                                            ║
  4875.      ║                                                                    ║
  4876.      ║ VARYING <num var>   loop counter                                   ║
  4877.      ╚════════════════════════════════════════════════════════════════════╝
  4878.  
  4879.           The REPEAT command introduces the program structure:
  4880.  
  4881.      REPEAT <num exp> TIMES [VARYING <num var>]
  4882.         <program segment>
  4883.      ENDREPEAT
  4884.  
  4885.           The program lines in the <program segment> are repeated <num exp>
  4886.      times.  The end of the program segment is indicated by ENDREPEAT.
  4887.  
  4888.           The optional VARYING clause is used to vary a memory variable
  4889.      from 1 to <num exp>; at the start of the first loop, <num var> is
  4890.      initialized as 1; <num var> is incremented by 1 each time the top of
  4891.      the loop is reached.
  4892.  
  4893.           This command is especially useful to manipulate matrix variables.
  4894.  
  4895.           Repeats can be nested.
  4896.  
  4897.           The BREAK command is used in a REPEAT loop to exit at the bottom
  4898.      of the loop.  If there are nested loops, the exit is at the bottom of
  4899.      the innermost loop then being executed.
  4900.  
  4901.           The SR-Info/VP-Info keywords: TIMES and VARYING should not be in
  4902.      macros.  <num var> cannot be a matrix variable.
  4903.  
  4904.           Note that, if <program segment> contains commands that move the
  4905.      current record pointer (for instance, a SKIP command), REPEAT does not
  4906.      terminate if EOF becomes true.  Thus displaying a record and skipping
  4907.      in a file with 50 records, using REPEAT 100 TIMES, will display the
  4908.      last record in the file 51 times.  DO WHILE .NOT. EOF is the better
  4909.      construction for such a task.
  4910.  
  4911.           When editing with the internal SR-Info/VP-Info programming editor
  4912.      (see WRITE command), Alt-F reformats the file with all structures
  4913.      properly indented, making it easy to see unbalanced structures.
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.      REPEAT                      SRI  VPI  VPIN                      REPEAT
  4921.      SR-Info/VP-Info Reference Manual          Page 304          SECTION 4
  4922.  
  4923.  
  4924.           Examples:
  4925.  
  4926.      SET WIDTH TO 40
  4927.      DIM NUM num[10]
  4928.      REPEAT 10 TIMES VARYING count
  4929.         num[count]=POW(2,count)
  4930.      ENDREPEAT
  4931.      ? num
  4932.  
  4933.      This displays:
  4934.  
  4935.  
  4936.            2.00       4.00       8.00
  4937.           16.00      32.00      64.00
  4938.          128.00     256.00     512.00
  4939.         1024.00
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.      REPEAT                      SRI  VPI  VPIN                      REPEAT
  4981.      SR-Info/VP-Info Reference Manual          Page 305          SECTION 4
  4982.  
  4983.  
  4984.  
  4985.                                     REPLACE
  4986.  
  4987.      Replace field(s) in the selected data file.
  4988.  
  4989.      ╔════════════════════════════════════════════════════════════════════╗
  4990.      ║ REPLACE [<scope>] <field1> WITH <exp1> [,<field2> WITH <exp2> ... ]║
  4991.      ║      [FOR <cond>]                                                  ║
  4992.      ╟────────────────────────────────────────────────────────────────────╢
  4993.      ║ Options:                                                           ║
  4994.      ║                                                                    ║
  4995.      ║ <scope>                 select by scope                            ║
  4996.      ║                            (default scope: current record)         ║
  4997.      ║ <field> WITH <exp>...   list fields and expressions for replacement║
  4998.      ║ FOR <cond>              select by condition                        ║
  4999.      ╚════════════════════════════════════════════════════════════════════╝
  5000.  
  5001.           This command is used for changing some records in the selected
  5002.      data file.  The number of <field> WITH <exp> is only limited by the
  5003.      length of a command line (254 characters).
  5004.  
  5005.           The scope ALL can be used to change all the records in the data
  5006.      file.  This could be dangerous.  Consider backing up your data file
  5007.      before you use this command.
  5008.  
  5009.           This command is very useful, especially in conjunction with SET
  5010.      RELATION TO, so that the fields from which <exp> is formed may come
  5011.      from a number of data files.
  5012.  
  5013.           Examples:
  5014.  
  5015.      1>USE employee
  5016.      1>REPLACE name WITH 'Mareck'
  5017.      1>? name
  5018.      Mareck
  5019.      1>REPLACE ALL salary WITH salary*1.05
  5020.            6 REPLACE(S)
  5021.      1>LIST name,salary
  5022.            1  Mareck           27090.00
  5023.            2  Steiner          37569.00
  5024.            3  Rayme            83065.50
  5025.            4  Poyner            9145.50
  5026.            5  Poyner            9145.50
  5027.            6  Wilson           35563.50
  5028.      1>GO TOP
  5029.      1>REPLACE NEXT 4 salary WITH salary*1.06 FOR name < 'P'
  5030.            1 REPLACE(S)
  5031.      1>USE order
  5032.      1>USE#2 clothing
  5033.      1>SET RELATION ON inven:no TO 2
  5034.      1>REPLACE price WITH price#2
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.      REPLACE                     SRI  VPI  VPIN                     REPLACE
  5041.      SR-Info/VP-Info Reference Manual          Page 306          SECTION 4
  5042.  
  5043.  
  5044.  
  5045.  
  5046.  
  5047.  
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.  
  5100.      REPLACE                     SRI  VPI  VPIN                     REPLACE
  5101.      SR-Info/VP-Info Reference Manual          Page 307          SECTION 4
  5102.  
  5103.  
  5104.  
  5105.                                      REPORT
  5106.  
  5107.      The report generator.
  5108.  
  5109.      ╔════════════════════════════════════════════════════════════════════╗
  5110.      ║ REPORT [FORM] <form file> [<scope>] [FOR <cond>]                   ║
  5111.      ║                                                                    ║
  5112.      ║ <form file>       the name of the form file                        ║
  5113.      ╟────────────────────────────────────────────────────────────────────╢
  5114.      ║ Options:                                                           ║
  5115.      ║                                                                    ║
  5116.      ║ FOR <cond>         select by condition                             ║
  5117.      ║ <scope>            select by scope (default:ALL)                   ║
  5118.      ╚════════════════════════════════════════════════════════════════════╝
  5119.  
  5120.           The command REPORT is a very versatile report generator.  With a
  5121.      minimum of effort the user can generate a great variety of columnar
  5122.      reports.  The command takes care of the width of the report, the
  5123.      arrangement of the date, page numbering, title(s), the columns, the
  5124.      data in the columns, headings, subtotals (two levels), totals, and
  5125.      many other parameters.
  5126.  
  5127.           This command reports on the file(s) in use according to the
  5128.      format in the report form file <form file>.  The form file can be
  5129.      created  with the SR-Info/VP-Info editor (WRITE) or with any word
  5130.      processor; the default extension is FRM.
  5131.  
  5132.           SR-Info/VP-Info computes the necessary width as the minimum
  5133.      required to accommodate the title(s), headings, the expression list,
  5134.      and the company name.
  5135.  
  5136.           The report is automatically centered over 80, 112, or 132
  5137.      characters wide, whichever is equal to or greater than the width of
  5138.      the report body.  The SET WIDTH TO command also affects the heading,
  5139.      but not the width of the body.
  5140.  
  5141.           The following keywords can be used in a report form file:
  5142.  
  5143.  
  5144.      COMPRESS                           Sends code 15 to the printer for
  5145.                                           compressed printing on Epson and
  5146.                                           IBM Proprinter printers, sends
  5147.                                           code 18 after completion of the
  5148.                                           report to restore normal-width
  5149.                                           mode. For non-compatible
  5150.                                           printers, use SETUP.)
  5151.  
  5152.      DOUBLE                             Prints double spaced lines.
  5153.  
  5154.      EJECT                              Ejects a page after each subtotal.
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.      REPORT                      SRI  VPI  VPIN                      REPORT
  5161.      SR-Info/VP-Info Reference Manual          Page 308          SECTION 4
  5162.  
  5163.  
  5164.  
  5165.      FIELDS - <exp1>,<exp2>,...         The expressions for the columns of
  5166.                                           the report.
  5167.  
  5168.      FILE - <file> [INDEX <index file>] Opens the data file <file> and,
  5169.                                           optionally, the index file.
  5170.  
  5171.      HEADING - string1,string2,...      The headings for the expressions in
  5172.                                           the report.
  5173.  
  5174.      INDEX - <exp> TO <index file name> [FOR <cond>]
  5175.  
  5176.                                         Indexes on the expression <exp> to
  5177.                                           the specified file the last data
  5178.                                           file opened with the FILE
  5179.                                           keyword; a FOR clause is
  5180.                                           permitted (see INDEX).
  5181.  
  5182.      LENGTH - <num exp>                 Number of printed lines per page.
  5183.  
  5184.      MESSAGE - <str exp>                Introduces the message to be
  5185.                                           displayed for a subtotaled group
  5186.                                           (2 allowed).
  5187.  
  5188.      NODETAIL                           Shows only the totals and
  5189.                                           subtotals.
  5190.  
  5191.      PICTURE - <picture list>           Which expressions (in the FIELDS
  5192.                                           line) are to be totaled.
  5193.  
  5194.      PRINT                              Sends the report to the printer.
  5195.  
  5196.      RELATION - <exp> TO <file number>  Sets a relation between file 1 and
  5197.                                           the file <file number>.
  5198.  
  5199.      SELECT - <cond>                    Selects the records by condition
  5200.                                           <cond>.
  5201.  
  5202.      SETUP - <setup string>             A list of control codes to be sent
  5203.                                           to the printer before beginning
  5204.                                           page 1 (do not use without PRINT
  5205.                                           or SPOOL keywords).
  5206.  
  5207.      SPOOL - <file name>                Sends the report to the file <file
  5208.                                           name> (PRINT must not be used).
  5209.  
  5210.      SUBTOTAL - <exp>                   Subtotals be printed when the
  5211.                                           expression <exp> changes (2
  5212.                                           allowed).
  5213.  
  5214.      TITLE - string or <str exp>        The title of the report (2
  5215.                                           allowed).
  5216.  
  5217.  
  5218.  
  5219.  
  5220.      REPORT                      SRI  VPI  VPIN                      REPORT
  5221.      SR-Info/VP-Info Reference Manual          Page 309          SECTION 4
  5222.  
  5223.  
  5224.  
  5225.           Some of these keywords can be used more than once.  More detailed
  5226.      explanation follows in the subsection on keywords.
  5227.  
  5228.           The REPORT command is influenced by the commands previously
  5229.      given, such as USE, INDEX, SET PRINT ON.  Most of these can also be
  5230.      done from within the report form file.
  5231.  
  5232.           Commands influencing REPORT.  The REPORT command works on the
  5233.      selected file (if any). So
  5234.  
  5235.      1>SELECT 3
  5236.      3>REPORT salary
  5237.  
  5238.      means: report on file 3 using the report form file SALARY.FRM.  If no
  5239.      file is in use as file 3, the report form file will have to specify
  5240.      (with the FILE keyword) the data file(s) to use.
  5241.  
  5242.           Similarly, specifying the index file(s) to use with the data
  5243.      file(s) and reindexing can be done before the REPORT command is given.
  5244.  
  5245.           Here is a simple example:
  5246.  
  5247.      1>SELECT 2
  5248.      2>USE clients
  5249.      2>INDEX ON newdate TO newdate
  5250.      2>REPORT call
  5251.  
  5252.           The report can be directed to the screen, the printer, or to a
  5253.      text file.  To the printer:
  5254.  
  5255.      2>SET PRINT ON
  5256.  
  5257.      To a text file (TEMP.TXT):
  5258.  
  5259.      2>SPOOL temp
  5260.      2>SET PRINT ON
  5261.      2>REPORT call
  5262.      2>SET PRINT OFF
  5263.      2>SPOOL
  5264.  
  5265.           REPORT can use files related to each other:
  5266.  
  5267.      1>SELECT 1
  5268.      1>USE order INDEX order
  5269.      1>USE#2 client INDEX client
  5270.      1>SET RELATION ON client TO 2
  5271.      1>REPORT order
  5272.  
  5273.           REPORT can use linked files:
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.  
  5280.      REPORT                      SRI  VPI  VPIN                      REPORT
  5281.      SR-Info/VP-Info Reference Manual          Page 310          SECTION 4
  5282.  
  5283.  
  5284.      1>SELECT 1
  5285.      1>USE order index order
  5286.      1>USE#2 history1
  5287.      1>USE#3 history2
  5288.      1>SET LINK TO 2
  5289.      1>SET#2 LINK TO 3
  5290.      1>REPORT order1
  5291.  
  5292.           It may be necessary to send control characters to the printer to
  5293.      set up the desired printing mode.  Example:
  5294.  
  5295.      1>SET PRINT ON
  5296.      1>?? CHR(27)+CHR(121)+CHR(128)
  5297.  
  5298.           The system variables :COMPANY, :TITLE, and :DATE influence the
  5299.      report.  The company name in :COMPANY appears centered in the second
  5300.      line of the report.  The text in :TITLE becomes the title of the
  5301.      report unless the report form file specifies otherwise (with the
  5302.      keyword TITLE).  The date on the first line of the report comes from
  5303.      :DATE.
  5304.  
  5305.           The three system variables may be changed before REPORT.
  5306.  
  5307.           Much of what can be accomplished by setting the environment of
  5308.      REPORT before the command is given, can also be done in the report
  5309.      format file.  There are some exceptions: for instance, since SPOOL
  5310.      adds to the top of an existing file with the same name as the spool
  5311.      file, you may want to delete the existing file before doing the
  5312.      report, or alternately using the SPOOL command outside the report and
  5313.      the keyword PRINT inside the report.  You may also want to set page
  5314.      depth with SET LENGTH TO, the number of character over which the
  5315.      heading will be centered with SET WIDTH TO, the left margin with SET
  5316.      MARGIN TO, etc.  See also SET EJECT.
  5317.  
  5318.           The form of the REPORT command.  The selection criteria can be
  5319.      placed in the REPORT command and/or in the report form file.  If the
  5320.      REPORT command contains a FOR clause, and the report form file has a
  5321.      SELECT line, then the FOR clause of the REPORT command overrules the
  5322.      SELECT line of the report form file.
  5323.  
  5324.           You may restrict the range of records in the report by the LIMIT
  5325.      command or a scope; both must be invoked outside the REPORT form.  The
  5326.      WHILE <cond> form of the scope may be very useful when reporting on a
  5327.      very big file. As an example,
  5328.  
  5329.      1>USE orders INDEX clients
  5330.  
  5331.      In the current record the field CLIENT contains A234.  To report on
  5332.      all the orders by this client with part number > 1200:
  5333.  
  5334.      1>REPORT ship WHILE client='A234' FOR VAL(part:num)>1200
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.      REPORT                      SRI  VPI  VPIN                      REPORT
  5341.      SR-Info/VP-Info Reference Manual          Page 311          SECTION 4
  5342.  
  5343.  
  5344.  
  5345.      or
  5346.  
  5347.      1>LIMIT client
  5348.      1>REPORT ship FOR VAL(part:num)>1200
  5349.      1>LIMIT
  5350.  
  5351.      Note that without either the scope or the LIMIT command, processing
  5352.      would stop only after all the records of the file had been processed.
  5353.  
  5354.           Report form file.  Look at the examples of report form files
  5355.      given below.  In a report form file, the first word of a line has to
  5356.      be a keyword, followed by any modifiers separated from the keyword by
  5357.      a hyphen (-).  There are currently 18 keywords.
  5358.  
  5359.           Only the FIELDS line is required; all the others are optional.
  5360.      Some keywords can occur more than once.
  5361.  
  5362.  
  5363.           Keywords:
  5364.  
  5365.  
  5366.      TITLE - string/<str exp>
  5367.  
  5368.           This keyword is followed by the title of the report; the title
  5369.      appears centered as the third line of the report.  If no title is
  5370.      specified in the text file, then the string in the system variable
  5371.      :TITLE (if any) is used for the title.
  5372.  
  5373.           If a <str exp> is used, it will be evaluated, and used as the
  5374.      title.  If an invalid expression is used, it will be printed as a
  5375.      literal.
  5376.  
  5377.           SR-Info/VP-Info looks at the TITLE line; what appears to the
  5378.      right of the hyphen is evaluated as an expression.  If it is valid,
  5379.      then it is used as an expression.  If it is not, then it is printed
  5380.      "as is."
  5381.  
  5382.           So to get Annual Report as the title, simply use the line
  5383.  
  5384.      TITLE - Annual Report
  5385.  
  5386.      No quotation marks are needed.
  5387.  
  5388.           The TITLE keyword may be used twice:
  5389.  
  5390.      TITLE - string1
  5391.      TITLE - string2
  5392.  
  5393.      Then the title is in two lines, both centered.
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.      REPORT                      SRI  VPI  VPIN                      REPORT
  5401.      SR-Info/VP-Info Reference Manual          Page 312          SECTION 4
  5402.  
  5403.  
  5404.           If ASOF is a variable containing the date of the last accounts-
  5405.      receivable aging in the standard format, then
  5406.  
  5407.      TITLE - 'Accounts receivable as of '+DATE(FULL,asof)
  5408.  
  5409.      will display
  5410.  
  5411.              Accounts receivable as of Thursday, September 19, 1991
  5412.  
  5413.      FILE - <data file> [INDEX <index file>]
  5414.  
  5415.           This keyword opens the data file (as file 1, if there was a file
  5416.      open as file 1, it is first closed) and, optionally, the index file.
  5417.  
  5418.           This keyword may occur a number of times.  The second time it
  5419.      opens file 2, then file 3, and so on.  Since the reporting is done on
  5420.      the first data file opened by FILE, more than one file should be
  5421.      opened only if relations are used.
  5422.  
  5423.           If there is no FILE line, REPORT uses the current data file.  If
  5424.      none is open, an error message (usually: 2. Variable not found.) is
  5425.      given.
  5426.  
  5427.  
  5428.      INDEX - <exp> TO <index file name> [FOR <cond>]
  5429.  
  5430.           This keyword will index the last data file opened with the FILE
  5431.      keyword on the expression <exp> to the specified index file.  If this
  5432.      is only a temporary index, then you should specify a name such as
  5433.      TEMP.  A condition can be specified to limit the index to only those
  5434.      records matching the condition; this is often faster than using SELECT
  5435.      or a FOR clause on the REPORT command.
  5436.  
  5437.  
  5438.           Example:
  5439.  
  5440.      FILE - inventry
  5441.      INDEX - inven:no TO temp1 FOR type='G'
  5442.      FILE - supplier
  5443.      INDEX - suppl:code TO temp2
  5444.  
  5445.  
  5446.      opens up the data files: INVENTRY as file 1 and SUPPLIER as file 2,
  5447.      and indexes both, limiting the primary index and the report to those
  5448.      for which type='G'.
  5449.  
  5450.  
  5451.      FIELDS - <exp1>,<exp2>,...
  5452.  
  5453.           This is the expression list; these expressions fill the columns
  5454.      of the report.  Often, these expressions are just field names, though
  5455.      they may be arbitrary expression including fields (from various data
  5456.      files), variables, and constants.
  5457.  
  5458.  
  5459.  
  5460.      REPORT                      SRI  VPI  VPIN                      REPORT
  5461.      SR-Info/VP-Info Reference Manual          Page 313          SECTION 4
  5462.  
  5463.  
  5464.  
  5465.           If all the expressions do not fit on one line, then leave a comma
  5466.      at the end of the line and continue on the next line.
  5467.  
  5468.  
  5469.      HEADING - string1,string2,...
  5470.  
  5471.           These are the column headings for each expression in FIELDS line.
  5472.      Separate the strings with commas.  The spacing of each column is done
  5473.      by the program based on the largest of the following: the length of
  5474.      the heading, the width of the field, and the picture clause in the
  5475.      PICTURE line.  Blanks on the left and on the right of a heading are
  5476.      counted in the width.
  5477.  
  5478.           To move a column to the right, put spaces in front of the column
  5479.      heading.  To make a column wider, put spaces at the end of the column
  5480.      heading.  To move the column heading of a numeric field to the left,
  5481.      put spaces at the end of the column heading.
  5482.  
  5483.           If no heading is required for a column, it may be omitted, but
  5484.      its comma is required if any later columns are to have a heading; no
  5485.      trailing commas are permitted, since they would be understood as
  5486.      continuation characters merging the next keyword to the HEADING line..
  5487.  
  5488.           If the strings in the HEADING line do not fit on one line, then
  5489.      leave a comma at the end of the line and continue on the next line.
  5490.      Do not break a heading with a comma.
  5491.  
  5492.  
  5493.           Multi-line headings.  In the HEADING line, a semicolon (;) breaks
  5494.      the heading into more than one line.  At most three lines are
  5495.      permitted.
  5496.  
  5497.           For instance,
  5498.  
  5499.      HEADING - Last Name;=========,First Name;==========,
  5500.      Department;==========,Salary;======
  5501.  
  5502.  
  5503.      produces the headings:
  5504.  
  5505.      Last Name       First Name Department         Salary
  5506.      =========       ========== ==========         ======
  5507.  
  5508.  
  5509.           Note the use of the comma (,) at the end of the first line as a
  5510.      continuation character.
  5511.  
  5512.  
  5513.  
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519.  
  5520.      REPORT                      SRI  VPI  VPIN                      REPORT
  5521.      SR-Info/VP-Info Reference Manual          Page 314          SECTION 4
  5522.  
  5523.  
  5524.  
  5525.      PICTURE - <format list>
  5526.  
  5527.           The PICTURE keyword is used to indicate which expressions (in the
  5528.      FIELDS line) are to be totaled.  The PICTURE line also shows how the
  5529.      expressions and totals (and subtotals) are to be displayed.
  5530.  
  5531.           A format is some 9s and, optionally, a decimal point or other
  5532.      special characters used in the format clause for numbers (see the
  5533.      command @).  Examples:
  5534.  
  5535.      999
  5536.      999999.99
  5537.      9.9999
  5538.      999999.99-
  5539.      999999.99>
  5540.  
  5541.  
  5542.           A format list is a number of formats separated by commas.  Some
  5543.      formats may be missing, but the commas have to be there as long as
  5544.      formats are required to reach the last field requiring accumulation.
  5545.      no trailing commas are permitted, since they would be understood as
  5546.      continuation characters merging the next keyword to the picture line.
  5547.  
  5548.           Negative values can be displayed in any of three ways.  The
  5549.      default is to use a leading minus sign.  It is possible to surround
  5550.      negative values with pointed brackets, or to use trailing minus signs
  5551.      as follows:
  5552.  
  5553.           Indicator for Negatives    Example       Value        Displays
  5554.  
  5555.           None                       9999999.99    -19876.87     -19876.87
  5556.           Trailing minus sign        9999999.99-   -19876.87      19876.87-
  5557.           None                       9999999.99>   -19876.87     <19876.87>
  5558.  
  5559.           If a format includes a comma, that format must be enclosed in
  5560.      quotes.
  5561.  
  5562.           The following will all total the fourth and the fifth columns out
  5563.      of the eight (or more) specified in the FIELDS line:
  5564.  
  5565.      PICTURE - ,,,999.99,999999
  5566.      PICTURE - ,,,999.99,'999,999'
  5567.      PICTURE - ,,,999.99,'$$$,$$9.99'
  5568.      PICTURE - ,,,999.99-,'999,999-'
  5569.      PICTURE - ,,,999.99>,'$$$,$$9.99>'
  5570.  
  5571.           There can be no format for character fields in the PICTURE line,
  5572.      since no strings are carried from record lines to total lines.  To
  5573.      format a character field, use PIC( or other functions.
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.      REPORT                      SRI  VPI  VPIN                      REPORT
  5581.      SR-Info/VP-Info Reference Manual          Page 315          SECTION 4
  5582.  
  5583.  
  5584.  
  5585.      SUBTOTAL - <exp>
  5586.  
  5587.           This keyword causes subtotals to be printed when the expression
  5588.      <exp> changes.  Subtotaling is done for all numeric expressions that
  5589.      are specified in the PICTURE line.
  5590.  
  5591.           Of course, subtotaling produces erratic result if the data file
  5592.      is not sorted or indexed in a way to group all the items with the same
  5593.      <exp> in one group.  The command REPORT works whether or not this is
  5594.      the case.
  5595.  
  5596.  
  5597.      MESSAGE - <str exp>
  5598.  
  5599.           This keyword introduces the message to be displayed on the report
  5600.      lines at the start of a subtotaled group; e.g., 'Salesman - '+salesm.
  5601.  
  5602.  
  5603.           Two levels of subtotaling.  If there are two SUBTOTAL lines:
  5604.  
  5605.      SUBTOTAL - <exp1>              "inside level"
  5606.      MESSAGE - string1              message for the "inside level", footer
  5607.      SUBTOTAL - <exp2>              "outside level"
  5608.      MESSAGE - string2              message for the "outside level", header
  5609.  
  5610.      two levels of subtotaling is done.  <exp1> is the "inside" level (the
  5611.      sub-subtotal) and <exp2> is the "outside" level (the grand subtotal).
  5612.  
  5613.           The message for the outside level appears as a header; the
  5614.      message of the inside level appears with the sub-subtotal.  String1 is
  5615.      printed from the start of the line.  Make sure that there is enough
  5616.      room for string1 before the start of the first totaled column.
  5617.  
  5618.           For instance, if the file is indexed on salesman+style, then
  5619.      salesman is exp2, the outside level, and salesman+style is exp1, the
  5620.      inside level.  Thus one obtains a sales report grouped by salesman
  5621.      (outside level), and within salesman by style (inside level):
  5622.  
  5623.      SUBTOTAL - salesman+style
  5624.      MESSAGE - 'Style '+style
  5625.      SUBTOTAL - salesman
  5626.      MESSAGE - 'Salesman '+salesman
  5627.  
  5628.           Note that the inside subtotal expression in on salesman+style
  5629.      instead of by style alone; this is done because the last record for
  5630.      one salesman might be the same as the first record for the next
  5631.      salesman, thus giving confusing results.  Both subtotal expressions
  5632.      should be some leftmost part of the index expression, with the inside
  5633.      expression longer than the outside expression.
  5634.  
  5635.  
  5636.  
  5637.  
  5638.  
  5639.  
  5640.      REPORT                      SRI  VPI  VPIN                      REPORT
  5641.      SR-Info/VP-Info Reference Manual          Page 316          SECTION 4
  5642.  
  5643.  
  5644.  
  5645.      PRINT
  5646.  
  5647.           This will send the report to the printer.  It has the same effect
  5648.      as SET PRINT ON at the beginning of the report and SET PRINT OFF at
  5649.      the end.
  5650.  
  5651.  
  5652.      EJECT
  5653.  
  5654.           This keyword will cause a page eject after each subtotal.  If two
  5655.      levels of subtotals are specified, only the main level will cause a
  5656.      page eject.
  5657.  
  5658.           If SET EJECT OFF, instead of sending a form feed code to the
  5659.      printer, SR-Info/VP-Info will send enough carriage returns to move the
  5660.      paper in the printer to the form depth set by the SET LENGTH TO
  5661.      command (default is 66).
  5662.  
  5663.  
  5664.      RELATION - <str exp> TO <file number>
  5665.  
  5666.           This keyword sets a relation between file 1 and the file <file
  5667.      number>.  It is equivalent to the commands:
  5668.  
  5669.  
  5670.      1>SELECT 1
  5671.      1>SET RELATION ON <str exp> TO <file number>
  5672.  
  5673.           Example:
  5674.  
  5675.      RELATION - inven:no TO 2.
  5676.  
  5677.  
  5678.           There can be a number of these lines.  File 1 can be in relations
  5679.      to file 2, file 3, and so on.  The relations are always between file 1
  5680.      and another file.
  5681.  
  5682.  
  5683.      DOUBLE
  5684.  
  5685.           Print double spaced lines.
  5686.  
  5687.  
  5688.      COMPRESS
  5689.  
  5690.           Sends code 15 to the printer for compressed printing; and code 18
  5691.      after the report to discontinue compressed printing.  If the printer
  5692.      requires different codes, use the SETUP keyword or send them before
  5693.      and after the REPORT command with the function CHR(.
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.      REPORT                      SRI  VPI  VPIN                      REPORT
  5701.      SR-Info/VP-Info Reference Manual          Page 317          SECTION 4
  5702.  
  5703.  
  5704.  
  5705.      SETUP - <setup string>
  5706.  
  5707.           SETUP establishes a string of control characters to be sent to
  5708.      the printer when printing begins.  It should not be used if neither
  5709.      printing nor spooling is in effect.
  5710.  
  5711.           The setup string is a list of character descriptors, separated by
  5712.      commas. Each descriptor may be a number (the ASCII value of a
  5713.      character), a hex number followed by an "h" (the hex value of a
  5714.      character, or any alpha character.  Example
  5715.  
  5716.      SETUP - 27,W,1Bh,41h,3h
  5717.  
  5718.  
  5719.      SPOOL - <file name>
  5720.  
  5721.           This is an alternative to the PRINT keyword and SET PRINT ON, and
  5722.      should not appear if either of the others is present.  It sends the
  5723.      report to the file <file name> (default extension TXT).
  5724.  
  5725.           Spool a report if you want to pretty it up with your word
  5726.      processor, or include it in a document, or print it some other time.
  5727.      The SR-Info/VP-Info command SPOOL finename TO PRN or the operating
  5728.      system command PRINT can later print the report in the background mode
  5729.      from this file.
  5730.  
  5731.           Note that if <file name> already exists, the report will be added
  5732.      at its end; it will not be overwritten.  (Do not confuse the SPOOL
  5733.      keyword with the SPOOL command, which does overwrite existing files.)
  5734.  
  5735.  
  5736.      SELECT - <cond>
  5737.  
  5738.           Select by condition <cond>; the same as a FOR clause in the
  5739.      REPORT command.  If a FOR clause is used in the REPORT command, it
  5740.      overrides the selection of the SELECT line.  If a FILTER is in effect,
  5741.      only records which match both the filter and the select condition are
  5742.      included in the report.
  5743.  
  5744.  
  5745.      NODETAIL
  5746.  
  5747.           This modifies a report with subtotaling: only the totals and
  5748.      subtotals are shown.  The expressions from the FIELDS line and the
  5749.      column headings from the HEADING line are not displayed.
  5750.  
  5751.  
  5752.      LENGTH - <num exp>
  5753.  
  5754.           This sets the number of printed lines per page.  For instance,
  5755.  
  5756.  
  5757.  
  5758.  
  5759.  
  5760.      REPORT                      SRI  VPI  VPIN                      REPORT
  5761.      SR-Info/VP-Info Reference Manual          Page 318          SECTION 4
  5762.  
  5763.  
  5764.  
  5765.      LENGTH - 40
  5766.  
  5767.      will set the page length at 40.
  5768.  
  5769.           Comments.  The lines in the report form file can be separated by
  5770.      any number of blank lines to increase readability.
  5771.  
  5772.           A * can be put at the front a line to comment out (temporarily)
  5773.      that line.
  5774.  
  5775.           The lines can appear in just about any order.  The INDEX keyword
  5776.      must appear after the FILE keyword, and the MESSAGE keyword must
  5777.      appear after the SUBTOTAL keyword.
  5778.  
  5779.           Examples of report form files:
  5780.  
  5781.           Example 1. The simplest report form file, SALARY.FRM:
  5782.  
  5783.      FIELDS - name,fname,dept,salary
  5784.  
  5785.  
  5786.           Use it with the commands:
  5787.  
  5788.      1>USE employee INDEX name
  5789.      1>REPORT salary
  5790.  
  5791.           Example 2.  Using a multi-line heading (use it with the same
  5792.      commands as those for Example 1):
  5793.  
  5794.      HEADING - Last Name;=========,First Name;==========,
  5795.      Department;==========,Salary;======
  5796.      FIELDS - name,fname,dept,salary
  5797.  
  5798.           Example 3. Using two title lines (use it with the same commands
  5799.      as those for Example 1):
  5800.  
  5801.      TITLE - Salary Report
  5802.      TITLE - For the Third Quarter
  5803.      HEADING - Last Name,First Name,Department,Salary
  5804.      FIELDS - name,fname,dept,salary
  5805.  
  5806.           Example 4. A simple totaling using a string expression for the
  5807.      title; the memory variable QUARTER contains 'First', 'Second, 'Third',
  5808.      or 'Fourth' (use it with the same commands as those for Example 1):
  5809.  
  5810.      TITLE - Salary Report
  5811.      TITLE - 'For the '+quarter+' Quarter'
  5812.      HEADING - Last name,First name  ,Department,Salary
  5813.      FIELDS - name,fname,dept,salary
  5814.      PICTURE - ,,,9999999.99
  5815.  
  5816.  
  5817.  
  5818.  
  5819.  
  5820.      REPORT                      SRI  VPI  VPIN                      REPORT
  5821.      SR-Info/VP-Info Reference Manual          Page 319          SECTION 4
  5822.  
  5823.  
  5824.  
  5825.           Example 5. Subtotaling by department:
  5826.  
  5827.      TITLE - Salary Report
  5828.      HEADING - Last name,First name  ,Department,Salary
  5829.      FIELDS - name,fname,dept,salary
  5830.      SUBTOTAL - dept
  5831.      PICTURE - ,,,9999999.99
  5832.  
  5833.      Use it with the commands:
  5834.  
  5835.      1>USE employee
  5836.      1>INDEX ON dept TO dept
  5837.      1>REPORT salary
  5838.  
  5839.           Example 6. Subtotal with a message, appearing as a header for the
  5840.      group (use it with the same commands as those for Example 5):
  5841.  
  5842.      TITLE - Salary Report
  5843.      HEADING - Last name,First name  ,Salary
  5844.      FIELDS - name,fname,salary
  5845.      MESSAGE - 'Department: '+dept
  5846.      SUBTOTAL - dept
  5847.      PICTURE - ,,9999999.99
  5848.  
  5849.           Example 7. Two levels of subtotaling (use it with the same
  5850.      commands as those for Example 5):
  5851.  
  5852.      HEADING -  ,          ,Part,Date,Amount
  5853.      FIELDS - ' ',' ',part,date,amount
  5854.      PICTURE - ,,,,999999.99
  5855.      SUBTOTAL - salesman+part
  5856.      MESSAGE - 'Part '+trim(part)+' total: '
  5857.      SUBTOTAL - salesman
  5858.      MESSAGE - 'Salesman: '+salesman
  5859.  
  5860.           Example 8. Specifying files in use and a relation:
  5861.  
  5862.      FILE - sales INDEX sales
  5863.      FILE - abbrev INDEX abbrev
  5864.      RELATION - part TO 2
  5865.      HEADING -  ,               ,Part,Date,Amount
  5866.      FIELDS - ' ',' ',part,date,amount
  5867.      PICTURE - ,,,,999999.99
  5868.      SUBTOTAL - salesman+part
  5869.      MESSAGE - TRIM(descr#2)+' total: '
  5870.      SUBTOTAL - salesman
  5871.      MESSAGE - 'Salesman: '+salesman
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.      REPORT                      SRI  VPI  VPIN                      REPORT
  5881.      SR-Info/VP-Info Reference Manual          Page 320          SECTION 4
  5882.  
  5883.  
  5884.           Example 9.  A real-life example:
  5885.  
  5886.      TITLE - 'Report on '+trim(product)+' sales'
  5887.      TITLE - 'For month ending '+date(lchar,date(ymd))
  5888.      FILE - inven INDEX inven2
  5889.      INDEX - style TO inven2 FOR q1+q2+q3+q4+q5+q6+q7+q8>0
  5890.      HEADING - COLOR,DESCRIPTION,,ONE,XXS,XS,S,M,L,XL,QUANT
  5891.      FIELDS - color,descript,
  5892.      q1,q2,q3,q4,q5,q6,q7,q8,
  5893.      q1+q2+q3+q4+q5+q6+q7+q8
  5894.      SUBTOTAL - style
  5895.      MESSAGE - 'Style - '+style
  5896.      PICTURE - ,,9999,9999,9999,9999,9999,9999,9999,9999,99999
  5897.      EJECT
  5898.      PRINT
  5899.  
  5900.  
  5901.  
  5902.  
  5903.  
  5904.  
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940.      REPORT                      SRI  VPI  VPIN                      REPORT
  5941.      SR-Info/VP-Info Reference Manual          Page 321          SECTION 4
  5942.  
  5943.  
  5944.           Example 10. An example with expressions:
  5945.  
  5946.      TITLE - Inventory Listing
  5947.      *
  5948.      FILE - inven
  5949.      INDEX - style+color TO inven1
  5950.      *
  5951.      HEADING - STYLE,COLOR,DESCRIPTION,COST,
  5952.      ,ONE,XXS,XS,S,M,L,XL,
  5953.      QUANT,ORDER,PROG,AVAIL,OYTD,CYTD,SYTD
  5954.      *
  5955.      FIELDS - style,color,descript,cost,
  5956.      q1,q2,q3,q4,q5,q6,q7,q8,
  5957.      quant,order,progress,quant-order+progress,oytd,cytd,sytd
  5958.      *
  5959.      PICTURE - ,,,,9999,9999,9999,9999,9999,9999,9999,9999,99999,99999,
  5960.      99999,99999,99999,99999,99999
  5961.      *
  5962.      PRINT
  5963.      *
  5964.      SUBTOTAL - style
  5965.      MESSAGE - 'Style - '+style
  5966.  
  5967.  
  5968.                             A General Discussion on
  5969.                                Multi-File Reports
  5970.                         Using Relations and Subtotaling
  5971.  
  5972.           Since many database users come to SR-Info/VP-Info with some
  5973.      exposure to other database languages which cannot print reports using
  5974.      relations, this powerful tool is often overlooked by many users and
  5975.      even magazine reviewers.
  5976.  
  5977.           SR-Info/VP-Info allows any two data files to be linked together,
  5978.      either in a chain (1-to-2, 2-to-3, 3-to-4, etc.) or multiple-child
  5979.      relationship (1-to-2, 1-to-3, 1-to-4, etc., simultaneously).
  5980.  
  5981.           Let's say you want to print a list of all items sold today from
  5982.      your store.  Each item is described in ITEMS.DBF, customers are stored
  5983.      in CUST.DBF, and invoices list all items in a file called INVOICE.DBF.
  5984.  
  5985.           You can get the report you want, using the report specification
  5986.      in Figure 1, with the following command, either in a program or at the
  5987.      command prompt:
  5988.  
  5989.      REPORT invcdate FOR date=date(1)
  5990.  
  5991.      ──────────────────────────────────────────────────────────────────────
  5992.                                                             Figure 1
  5993.      * INVCDATE.FRM  report form for printing invoice details by date
  5994.      FILE - invoice INDEX invcdate
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.      REPORT                      SRI  VPI  VPIN                      REPORT
  6001.      SR-Info/VP-Info Reference Manual          Page 322          SECTION 4
  6002.  
  6003.  
  6004.      FILE - items INDEX itemcode
  6005.      FILE - cust INDEX custcode
  6006.      RELATION - itemcode TO 2
  6007.      RELATION - custcode TO 3
  6008.      FIELDS - date,custcode,name#3,itemcode#2,quant,price,price*quant
  6009.      HEADING - DATE,CUSTOMER,NAME,ITEM,QUANTITY,PRICE,TOTAL
  6010.      PICTURE - ,,,,,,$$$$$$9.99
  6011.      PRINT
  6012.      TITLE - 'Invoices Produced '+date(char)
  6013.  
  6014.      ──────────────────────────────────────────────────────────────────────
  6015.  
  6016.           This produces the report shown in Figure 2.
  6017.  
  6018.  
  6019.      SUBTOTALING
  6020.  
  6021.           Of course, the report could have been printed in order by
  6022.      customer or item code just as easily, and even grouped and subtotalled
  6023.      by either of them.  For example, adding these two lines after the
  6024.      PICTURE line,
  6025.  
  6026.      SUBTOTAL - custcode
  6027.      MESSAGE - name#3
  6028.  
  6029.      would print the name of the customer above all items he purchased, and
  6030.      show a total cost of all these items for each customer, as well as a
  6031.      grand total of all customers.
  6032.  
  6033.           SR-Info/VP-Info actually provides two levels of grouping and
  6034.      subtotaling, which we call the "inside" level and the "outside" level.
  6035.  
  6036.           Let's say our file in indexed on CUSTCODE+DATE to INVCCUST.NDX.
  6037.      Then we produce the report shown in Figure 3 by inserting the
  6038.      following four lines into our report specification after the PICTURE
  6039.      line:
  6040.  
  6041.      SUBTOTAL - custcode+date
  6042.      MESSAGE - blank(5)+date(dmy,date)
  6043.      SUBTOTAL - custcode
  6044.      MESSAGE - name#3
  6045.  
  6046.           The first two lines specify the inside level, while the last two
  6047.      set up the outside level.  You'll notice that there can be several
  6048.      days grouped inside a single customer; that's why date is the INSIDE
  6049.      grouping.
  6050.  
  6051.           Also notice that the "trigger expression" for the inside level is
  6052.      CUSTCODE+DATE and not DATE alone.  Remember that you want a date
  6053.      heading and subtotal printed whenever a customer changes, even if the
  6054.      next customer's purchase was on the same day.  The best rule is to
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.      REPORT                      SRI  VPI  VPIN                      REPORT
  6061.      SR-Info/VP-Info Reference Manual          Page 323          SECTION 4
  6062.  
  6063.  
  6064.      make sure that the trigger expression for the inside grouping is
  6065.      longer than, and includes all of, the outside trigger expression.
  6066.  
  6067.           (In actual practice, you would probably adjust the specification
  6068.      to remove the date and name#3 fields from the FIELDS line, since they
  6069.      are printed in the header and footer of the groups.)
  6070.  
  6071.  
  6072.      A FEW REPORT TIPS:
  6073.  
  6074.           Although the single command, REPORT invcdate FOR date=DATE(ymd),
  6075.      can produce the report shown above, there are a couple of better and
  6076.      faster -- but more complicated -- ways to get the same result.  The
  6077.      problem is that, over time, the invoice file will become very large,
  6078.      and the method shown above requires every single record to be
  6079.      processed, even though only a few are going to be printed.
  6080.  
  6081.           Better Method 1 is primarily for those who want to use the report
  6082.      from the command prompt.  Use these three lines instead,
  6083.  
  6084.      USE invoice
  6085.      INDEX ON item TO temp FOR date=date(ymd)
  6086.      REPORT invcdate
  6087.  
  6088.      thus making a special index which includes only the records you want
  6089.      to print.  Even with very large files, this is extremely quick.  Of
  6090.      course, you'll have to change the first line of your report file to
  6091.      read "FILE - invoice INDEX temp".
  6092.  
  6093.           Better Method 2 will be chosen by most programmers who can easily
  6094.      set up the files and relations to be used for the report in their
  6095.      program as follows:
  6096.  
  6097.      SELECT 1
  6098.      USE invoice INDEX invcdate
  6099.      USE#2 items INDEX itemcode
  6100.      USE#3 cust INDEX custcode
  6101.      SET RELATION ON itemcode TO 2
  6102.      SET RELATION ON custcode TO 3
  6103.      FIND &date(ymd)
  6104.      REPORT INVCDATE WHILE date=date(ymd)
  6105.  
  6106.           Of course, the FILE and RELATION lines would be omitted from
  6107.      INVCDATE.FRM.
  6108.  
  6109.  
  6110.      USING RELATION TO SHOW WHAT ISN'T THERE
  6111.  
  6112.           Relations aren't used just to show what is in another file.  In
  6113.      fact, one of these best uses is to highlight things that aren't there.
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.      REPORT                      SRI  VPI  VPIN                      REPORT
  6121.      SR-Info/VP-Info Reference Manual          Page 324          SECTION 4
  6122.  
  6123.  
  6124.           Remember that setting up a relation means that, every time the
  6125.      record number changes on the main file, a FIND is executed on the
  6126.      relation expression to the related file.  If no matching record is
  6127.      found, the related file is set to the mythical record zero, meaning
  6128.      that all character fields are blank and all numeric fields are zero.
  6129.  
  6130.           Say you have a data file with a customer code field, but you
  6131.      aren't sure that every code is correct.  You can set up a relation
  6132.      between the two files and print the report specified in Figure 4,
  6133.      showing all records for which NO customer was found in CUST.DBF.  It's
  6134.      the line "SELECT - custcode<>'   '" that causes only mismatched
  6135.      records to print.
  6136.  
  6137.           With all the power built into the SR-Info/VP-Info REPORT command
  6138.      -- relations and two levels of grouping -- it's rare even for full-
  6139.      time custom programmers to take the time to write a program to produce
  6140.      a report.  Once you get a little practice, you'll find that only a few
  6141.      minutes are needed to create complex and exciting reports.
  6142.  
  6143.  
  6144. ──────────────────────────────────────────────────────────────────────
  6145.                                                        Figure 2
  6146. Monday, February 13, 1991                                        Page 1
  6147.                   COMPUTER DISTRIBUTING EXTRORDINAIRE
  6148.                   Invoices Produced February 13, 1991
  6149.  
  6150. DATE   CUSTOMER NAME                 ITEM  QUANTITY    PRICE      TOTAL
  6151.  
  6152. 910213 SUB50    Sub Rosa Inc.        VPINF       10   199.00   $1990.00
  6153. 910213 CRE50    Create Computer      VPEXP        2   179.00    $358.00
  6154. 910213 PSI50    Paperback Software   VPPLA        1   149.00    $149.00
  6155. 910213 SUB50    Sub Rosa Inc.        VPPLU        2   249.00    $498.00
  6156. 910213 CRE50    Create Computer      VPINF       12   199.00   $2388.00
  6157. 910213 PSI50    Paperback Software   VPEXP       54   179.00   $9666.00
  6158. 910213 SUB50    Sub Rosa Inc.        VPPLA        1   149.00    $149.00
  6159. 910213 CRE50    Create Computer      VPPLU        5   249.00   $1245.00
  6160. 910213 PSI50    Paperback Software   VPINF        1   199.00    $199.00
  6161. 910213 CRE50    Create Computer      VPEXP       21   179.00   $3759.00
  6162. 910213 PSI50    Paperback Software   VPPLA      285   149.00  $42465.00
  6163. 910213 SUB50    Sub Rosa Inc.        VPPLU       85   249.00  $21165.00
  6164.                                                              ==========
  6165.                                                               $84031.00
  6166.  
  6167. ──────────────────────────────────────────────────────────────────────
  6168.  
  6169.  
  6170. ──────────────────────────────────────────────────────────────────────
  6171.                                                        Figure 3
  6172. Monday, February 13, 1991                                       Page 3
  6173.                   COMPUTER DISTRIBUTING EXTRAORDINAIRE
  6174.                   Invoices Produced February 13, 1991
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.      REPORT                      SRI  VPI  VPIN                      REPORT
  6181.      SR-Info/VP-Info Reference Manual          Page 325          SECTION 4
  6182.  
  6183.  
  6184.  
  6185. DATE   CUSTOMER NAME                 ITEM  UANTITY    PRICE      TOTAL
  6186. Create Computer
  6187. 910213 CRE50    Create Computer      VPEXP       2   179.00    $358.00
  6188. 910213 CRE50    Create Computer      VPINF      12   199.00   $2388.00
  6189. 910213 CRE50    Create Computer      VPPLU       5   249.00   $1245.00
  6190. 910213 CRE50    Create Computer      VPEXP      21   179.00   $3759.00
  6191.      13-Feb-1991                                              $7750.00
  6192.  
  6193.                                                             ----------
  6194.                                                               $7750.00
  6195. Paperback Software
  6196. 910213 PSI50    Paperback Software   VPPLA       1   149.00    $149.00
  6197. 910213 PSI50    Paperback Software   VPEXP      54   179.00   $9666.00
  6198. 910213 PSI50    Paperback Software   VPINF       1   199.00    $199.00
  6199. 910213 PSI50    Paperback Software   VPPLA     285   149.00  $42465.00
  6200.      13-Feb-1991                                             $52479.00
  6201.  
  6202.                                                             ----------
  6203.                                                              $52479.00
  6204. Sub Rosa Inc.
  6205. 910213 SUB50    Sub Rosa Inc.        VPINF      10   199.00   $1990.00
  6206. 910213 SUB50    Sub Rosa Inc.        VPPLU       2   249.00    $498.00
  6207. 910213 SUB50    Sub Rosa Inc.        VPPLA       1   149.00    $149.00
  6208. 910213 SUB50    Sub Rosa Inc.        VPPLU      85   249.00  $21165.00
  6209.      13-Feb-1991                                             $23802.00
  6210.  
  6211.                                                             ----------
  6212.                                                              $23802.00
  6213.                                                             ==========
  6214.                                                              $84031.00
  6215.  
  6216. ──────────────────────────────────────────────────────────────────────
  6217.  
  6218.  
  6219. ──────────────────────────────────────────────────────────────────────
  6220.                                                        Figure 4
  6221. * NOFIND.FRM    report form listing all invoices for customers
  6222. *               not found in CUST.DBF
  6223. FILE - invoice
  6224. FILE - cust INDEX custcode
  6225. RELATION - custcode TO 2
  6226. FIELDS - date,custcode,invoice,itemcode,quant,price,price*quant
  6227. HEADING - DATE,CUSTOMER,INVOICE,ITEM,QUANTITY,PRICE,TOTAL
  6228. PICTURE - ,,,,,,$$$$$$9.99
  6229. PRINT
  6230. TITLE - Invoices For Customers Not In Customer Data File
  6231. SELECT - custcode<>'   '
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.      REPORT                      SRI  VPI  VPIN                      REPORT
  6241.  
  6242.      SR-Info/VP-Info Reference Manual           Page 326          SECTION 4
  6243.  
  6244.  
  6245.  
  6246.  
  6247.                                     RESTORE
  6248.  
  6249.      Restore memory variables from file.
  6250.  
  6251.      ╔════════════════════════════════════════════════════════════════════╗
  6252.      ║ RESTORE FROM <file> [ADDITIVE]                                     ║
  6253.      ║                                                                    ║
  6254.      ║ <file>             name of memory variable file                    ║
  6255.      ╟────────────────────────────────────────────────────────────────────╢
  6256.      ║ Option:                                                            ║
  6257.      ║                                                                    ║
  6258.      ║ ADDITIVE           add new variables, update old ones              ║
  6259.      ╚════════════════════════════════════════════════════════════════════╝
  6260.  
  6261.           This command is used for restoring the memory and system
  6262.      variables that had previously been saved by the SAVE TO command.  This
  6263.      command erases all the variables that are currently in memory.  (See
  6264.      the command SAVE TO.)
  6265.  
  6266.           The ADDITIVE clause inhibits clearing of memory variables.  It
  6267.      adds the memory variables from the file to the memory variable table.
  6268.      If a memory variable occurs both in the table and the file, its value
  6269.      gets updated from the file.  With the ADDITIVE clause, the position of
  6270.      the existing variables in the memory variable table does not change,
  6271.      so pointers to them remain correct.  It is recommended that RESTORE
  6272.      FROM be always used with the ADDITIVE clause.
  6273.  
  6274.           This command should be used with the utmost care.  Compiled
  6275.      programs set pointers to memory variables.  If the memory variables
  6276.      are restored, the restore must be absolute, not dependent on some
  6277.      conditions.  (See Appendix A.  At compilation, the memory variable
  6278.      file must be present.)
  6279.  
  6280.           Example:
  6281.  
  6282.      1>LIST MEMO
  6283.  
  6284.      Name          Type    Width    Contents
  6285.      NAME            C       5      David
  6286.      AGE             N       8      11
  6287.      ** Total **  2  variables, 13  bytes
  6288.      1>SAVE TO child
  6289.      1>QUIT
  6290.      C:\>SRI
  6291.      1>RESTORE FROM child
  6292.  
  6293.  
  6294.  
  6295.  
  6296.  
  6297.  
  6298.  
  6299.  
  6300.      RESTORE                     SRI  VPI  VPIN                     RESTORE
  6301.  
  6302.      SR-Info/VP-Info Reference Manual           Page 327          SECTION 4
  6303.  
  6304.  
  6305.      1>LIST MEMO
  6306.  
  6307.      Name          Type    Width    Contents
  6308.      NAME            C       5      David
  6309.      AGE             N       8      11
  6310.      ** Total **  2  variables, 13  bytes
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.  
  6333.  
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.  
  6341.  
  6342.  
  6343.  
  6344.  
  6345.  
  6346.  
  6347.  
  6348.  
  6349.  
  6350.  
  6351.  
  6352.  
  6353.  
  6354.  
  6355.  
  6356.  
  6357.  
  6358.  
  6359.  
  6360.      RESTORE                     SRI  VPI  VPIN                     RESTORE
  6361.  
  6362.      SR-Info/VP-Info Reference Manual           Page 328          SECTION 4
  6363.  
  6364.  
  6365.  
  6366.                                      RETURN
  6367.  
  6368.      Return to the calling program.
  6369.  
  6370.      ╔════════════════════════════════════════════════════════════════════╗
  6371.      ║ RETURN                                                             ║
  6372.      ╚════════════════════════════════════════════════════════════════════╝
  6373.  
  6374.           The RETURN command returns the current program to the program
  6375.      from which it was called with the DO command.
  6376.  
  6377.           There may be any number of RETURN commands in a program. (See
  6378.      also the command DO.)
  6379.  
  6380.  
  6381.  
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407.  
  6408.  
  6409.  
  6410.  
  6411.  
  6412.  
  6413.  
  6414.  
  6415.  
  6416.  
  6417.  
  6418.  
  6419.  
  6420.      RETURN                      SRI  VPI  VPIN                      RETURN
  6421.  
  6422.      SR-Info/VP-Info Reference Manual           Page 329          SECTION 4
  6423.  
  6424.  
  6425.  
  6426.                                       RING
  6427.  
  6428.      Sound a beep on the computer speaker.
  6429.  
  6430.      ╔════════════════════════════════════════════════════════════════════╗
  6431.      ║ RING                                                               ║
  6432.      ╚════════════════════════════════════════════════════════════════════╝
  6433.  
  6434.           The RING command has different effects in SR-Info and VP-Info
  6435.      Professional; refer to the section applying to you.
  6436.  
  6437.           A.   In VP-Info Professional without the NOEFFECTS keyword in the
  6438.                VPI.SET file:
  6439.  
  6440.                RING uses one of the sound effects from its effect library,
  6441.                and does not send anything to the screen.
  6442.  
  6443.           B.   In SR-Info (and in VP-Info Professional with the NOEFFECTS
  6444.                keyword in the VPI.SET file):
  6445.  
  6446.                RING sends character 7 (the ASCII bell character) to the
  6447.                screen at the current cursor position.  If there is already
  6448.                a character in that position, it will be overwritten
  6449.                (erased).
  6450.  
  6451.           See the SOUND command.
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.      RING                        SRI  VPI  VPIN                        RING
  6481.  
  6482.      SR-Info/VP-Info Reference Manual           Page 330          SECTION 4
  6483.  
  6484.  
  6485.  
  6486.                                       RUN
  6487.  
  6488.      Execute DOS commands or run a program outside SR-Info/VP-Info.
  6489.  
  6490.      ╔════════════════════════════════════════════════════════════════════╗
  6491.      ║ RUN <command file>/<DOS command>                                   ║
  6492.      ║                                                                    ║
  6493.      ║ <command file>   an EXE, COM or BAT file to be executed            ║
  6494.      ║ <DOS command>    an internal DOS command (COMMAND.COM must be      ║
  6495.      ║                    in the current directory or in the PATH         ║
  6496.      ╚════════════════════════════════════════════════════════════════════╝
  6497.  
  6498.           Provided your computer has sufficient memory available, the RUN
  6499.      command allows you to execute DOS commands and run small programs
  6500.      outside SR-Info/VP-Info without leaving SR-Info/VP-Info.
  6501.  
  6502.           The amount of memory devoted to VP-Info is controlled by the
  6503.      MEMORY= command in the VPI.SET file, but cannot be changed from the
  6504.      default configuration in SR-Info.  The default is to use as much high
  6505.      memory as possible up to 128K.  See MEMORY= and BINSPACE= commands.
  6506.  
  6507.           Examples:
  6508.  
  6509.      1>RUN chkdsk                  ;check current disk...CHKDSK must be
  6510.                                    ;in current directory or path
  6511.  
  6512.      1>RUN editor test             ;use an editor on file TEST...EDITOR
  6513.                                    ;must be in current directory or path
  6514.  
  6515.      1>RUN mode com1:1200,n,8,1    ;configure the COM1: port...MODE must be
  6516.                                    ;in current directory or path
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.      RUN                         SRI  VPI  VPIN                         RUN
  6541.  
  6542.      SR-Info/VP-Info Reference Manual           Page 331          SECTION 4
  6543.  
  6544.  
  6545.  
  6546.                                       SAVE
  6547.  
  6548.      Save the memory variables to a file.
  6549.  
  6550.      ╔════════════════════════════════════════════════════════════════════╗
  6551.      ║ SAVE TO <file>                                                     ║
  6552.      ║                                                                    ║
  6553.      ║ <file>           the name of the memory variable file              ║
  6554.      ╚════════════════════════════════════════════════════════════════════╝
  6555.  
  6556.           This command is used to save the memory variables to a file.
  6557.      These can later be restored using the RESTORE FROM command. (See
  6558.      RESTORE FROM.)
  6559.  
  6560.           If no extension is given to the file name, the file will have
  6561.      extension MEM.
  6562.  
  6563.           During debugging, you may save the memory variables to a file for
  6564.      later analysis.
  6565.  
  6566.           Example:
  6567.  
  6568.      1>LIST MEMO
  6569.  
  6570.      Name          Type    Width    Contents
  6571.      ** Total **  0  variables, 0  bytes
  6572.      1>name='David'
  6573.      1>age=11
  6574.      1>LIST MEMO
  6575.  
  6576.      Name          Type    Width    Contents
  6577.      NAME            C       5      David
  6578.      AGE             N       8      11
  6579.      ** Total **  2  variables, 13  bytes
  6580.      1>SAVE TO child
  6581.      1>QUIT
  6582.      C:\>SRI
  6583.      1>RESTORE FROM child
  6584.      1>LIST MEMO
  6585.      Name          Type    Width    Contents
  6586.      NAME            C       5      David
  6587.      AGE             N       8      11
  6588.      ** Total **  2  variables, 13  bytes
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.      SAVE                        SRI  VPI  VPIN                        SAVE
  6601.  
  6602.      SR-Info/VP-Info Reference Manual           Page 332          SECTION 4
  6603.  
  6604.  
  6605.  
  6606.                                      SCOPE
  6607.  
  6608.      Limit the records available within the current master index to those
  6609.      matching all or part of the current records index key.  A synonym for
  6610.      LIMIT command.
  6611.  
  6612.      ╔════════════════════════════════════════════════════════════════════╗
  6613.      ║ SCOPE <num exp>                                                    ║
  6614.      ║ SCOPE <key exp>                                                    ║
  6615.      ║ SCOPE                                                              ║
  6616.      ╟────────────────────────────────────────────────────────────────────╢
  6617.      ║ Options:                                                           ║
  6618.      ║                                                                    ║
  6619.      ║ <num exp>     the number of characters in the key expression to    ║
  6620.      ║                 to match                                           ║
  6621.      ║ <key exp>     the string expression to match in the current master ║
  6622.      ║                 index                                              ║
  6623.      ╚════════════════════════════════════════════════════════════════════╝
  6624.  
  6625.           When the current file has an index, SR-Info/VP-Info can be made
  6626.      to treat the file as though it includes only those records matching
  6627.      the current record's key expression, or some leftmost part of it.
  6628.      When a SCOPE is in effect, no SR-Info/VP-Info command can access a
  6629.      record outside that limit.
  6630.  
  6631.           You can most quickly implement this command by using the
  6632.      <num exp> option.  The effect is to have SR-Info/VP-Info set the SCOPE
  6633.      to the leftmost <num exp> characters of the key expression of the
  6634.      master index. If <num exp> exceeds the length of the key, the effect
  6635.      is identical to setting the SCOPE to the entire index expression.
  6636.  
  6637.           When SCOPE is used with no option, or when <num exp> is zero, the
  6638.      limit is deactivated.
  6639.  
  6640.           Using SCOPE with <key exp> requires precision is its use to avoid
  6641.      problems that may become extremely serious. Note that the <key exp>
  6642.      expression must be the same as the master index key in use at the
  6643.      moment, or some LEFT( portion of it. Do not attempt to use an
  6644.      expression that does not meet this requirement.
  6645.  
  6646.           Cautions:
  6647.  
  6648.           A.   FIND should not be used on a file with an active limit.  If
  6649.                you choose to do so, be certain that the FIND will be
  6650.                successful.  An unsuccessful FIND places the record pointer
  6651.                on record 0 which is by definition not in the index.  This
  6652.                causes an error, suspends operation of a program, and turns
  6653.                off the SCOPE.
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.      SCOPE                       SRI  VPI  VPIN                       SCOPE
  6661.  
  6662.      SR-Info/VP-Info Reference Manual           Page 333          SECTION 4
  6663.  
  6664.  
  6665.           B.   Do not use REPLACE ALL on a field included in an active
  6666.                limit expression, since upon completion, no records will be
  6667.                included in the limit; the result is the same as above.
  6668.  
  6669.           C.   Do not use APPEND, APPEND BLANK or BROWSE APPEND, or enter
  6670.                "append mode" in EDIT, while a limit is active unless you
  6671.                are sure to make all new records equal to the current SCOPE
  6672.                key before leaving the new records.  Doing so causes the
  6673.                file to move outside the SCOPE; the result is the same as
  6674.                above.
  6675.  
  6676.           D.   SCOPE should be used with extreme care, and left in effect
  6677.                for the minimum number of commands possible.  For instance,
  6678.                if used with BROWSE, SCOPE should be invoked immediately
  6679.                before the BROWSE command and canceled immediately
  6680.                afterward.
  6681.  
  6682.           E.   SCOPE should be canceled before closing the index or the
  6683.                file with which it is active, or before the master index is
  6684.                changed with SET INDEX TO n.  If not done by the user or
  6685.                programmer, the SCOPE is automatically turned off by
  6686.                SR-Info/VP-Info.
  6687.  
  6688.           F.   SCOPE cannot be used with a string constant instead of a
  6689.                <key exp>.  The <key exp> can be implemented with a macro.
  6690.  
  6691.           G.   SCOPE is a synonym for the LIMIT command, and can be used
  6692.                interchangeably.
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.      SCOPE                       SRI  VPI  VPIN                       SCOPE
  6721.  
  6722.      SR-Info/VP-Info Reference Manual           Page 334          SECTION 4
  6723.  
  6724.  
  6725.  
  6726.                                      SCREEN
  6727.  
  6728.      Save and restore screen images between the displayed screen and up to
  6729.      three additional background screens.
  6730.  
  6731.      ╔════════════════════════════════════════════════════════════════════╗
  6732.      ║ One of three forms:                                                ║
  6733.      ║ 1. SCREEN <source>,<destination>                                   ║
  6734.      ║ 2. SCREEN <destination>                                            ║
  6735.      ║ 3. SCREEN <effect>                                                 ║
  6736.      ║                                                                    ║
  6737.      ║ <source>      the number of the screen to be transferred to        ║
  6738.      ║                 destination in form 1                              ║
  6739.      ║ <destination> screen number to which all screen output in to be    ║
  6740.      ║                 directed in form 1; the "active" screen in form 2  ║
  6741.      ║ <effect>      transfer the stored image of Screen 2 to Screen 1    ║
  6742.      ║                 (the visible screen) in form 3; transfer uses the  ║
  6743.      ║                 named effect in VP-Info Professional only if       ║
  6744.      ║                 NOEFFECTS not in CNF file                          ║
  6745.      ╚════════════════════════════════════════════════════════════════════╝
  6746.  
  6747.           Screen 1 is the screen the user can see, although screen output
  6748.      can be directed to any of three background screens, numbered 2 through
  6749.      4, and images can be transferred directly from any one to any other.
  6750.  
  6751.           In VP-Info Professional, the visual impact of these transfers can
  6752.      be enhanced by using any of seven special effects, each accompanied by
  6753.      a characteristic sound effect.  The seven special effects are achieved
  6754.      by naming it with one of these keywords:
  6755.  
  6756.           Keyword   Effect
  6757.  
  6758.           Tear      Push the current screen up and to the right
  6759.           Left      Push the current screen to the left
  6760.           Right     Push the current screen to the right
  6761.           Up        Push the current screen up
  6762.           Down      Push the current screen down
  6763.           Open      Expose Screen 2 gradually from the middle
  6764.           Close     Push the current screen into itself at the middle
  6765.  
  6766.           Shortcut: When specifying effect by name, only the first
  6767.           character is required.
  6768.  
  6769.           In all cases, these effects move screen 2 to Screen 1; in order
  6770.      to see to effect, the active screen should be Screen 1.
  6771.  
  6772.           In its default mode, color attributes and cursor positions are
  6773.      stored and restored automatically.  SET SCREEN OFF to allow color
  6774.      attributes and cursor position to be unaffected by the SCREEN command.
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.      SCREEN                      SRI  VPI  VPIN                      SCREEN
  6781.  
  6782.      SR-Info/VP-Info Reference Manual           Page 335          SECTION 4
  6783.  
  6784.  
  6785.  
  6786.           Example in a program:
  6787.  
  6788.      SCREEN 2          ;direct output to background screen
  6789.      <commands>        ;draw the background screen
  6790.      SCREEN 1          ;make the visible screen active
  6791.      SCREEN TEAR       ;use effect to move Screen 2 to 1 -- in SR-Info,
  6792.                        ;  or VP-Info with NOEFFECTS, same as SCREEN 2,1
  6793.  
  6794.  
  6795.  
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.  
  6803.  
  6804.  
  6805.  
  6806.  
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840.      SCREEN                      SRI  VPI  VPIN                      SCREEN
  6841.  
  6842.      SR-Info/VP-Info Reference Manual           Page 336          SECTION 4
  6843.  
  6844.  
  6845.  
  6846.                                      SCROLL
  6847.  
  6848.      Scroll a part of the screen.
  6849.  
  6850.      ╔════════════════════════════════════════════════════════════════════╗
  6851.      ║ SCROLL <line1>,<line2>                                             ║
  6852.      ║                                                                    ║
  6853.      ║ <line1>      from this line number                                 ║
  6854.      ║ <line2>      to this line number                                   ║
  6855.      ╚════════════════════════════════════════════════════════════════════╝
  6856.  
  6857.           Scroll the screen up one line from line number line1 to line
  6858.      number line2; line1 and line2 are numeric expressions. If line1 is
  6859.      less than line2, the scrolling is reversed.  line1 cannot equal line2.
  6860.  
  6861.           This command is used to scroll text on the screen.
  6862.  
  6863.           Examples:
  6864.  
  6865.           1.
  6866.  
  6867.      1>SCROLL 2,5
  6868.      1>SCROLL 5,2
  6869.  
  6870.           2. Scrolling demo.  Needs two data files: CUST, with fields CUSTN
  6871.      (customer number), NAME (customer name), ADD:1 (address); INVEN with
  6872.      fields: STYLE, COLOR, DESCRIPT, QUANT, COST.
  6873.  
  6874.      USE cust
  6875.      USE#2 inven
  6876.      @ 2,0 SAY CEN('SR-Info can scroll windows',80)
  6877.      @ 5,0 SAY CEN('windows can scroll up !',80)
  6878.      DELAY .5
  6879.      @ 7,0 SAY 'CUSTN  NAME                           ADDRESS'
  6880.      REPEAT 5 TIMES VARYING i
  6881.         ? custn,name,add:1,i
  6882.         SKIP
  6883.         DELAY .5
  6884.      ENDREPEAT
  6885.      REPEAT 5 TIMES
  6886.         SCROLL 8 12
  6887.         @ 12,0
  6888.         ?? custn,name,add:1
  6889.         DELAY .5
  6890.         SKIP
  6891.      ENDREPEAT
  6892.      @ 14,0 SAY CEN('and windows can scroll down',80)
  6893.      DELAY .5
  6894.      @ 16,0 SAY 'STYLE  COL DESCRIPTION          QUANT    COST'
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.      SCROLL                      SRI  VPI  VPIN                      SCROLL
  6901.  
  6902.      SR-Info/VP-Info Reference Manual           Page 337          SECTION 4
  6903.  
  6904.  
  6905.      DELAY .5
  6906.      SELECT 2
  6907.      REPEAT 5 TIMES VARYING i
  6908.         ? style,color,descript,quant,cost,i
  6909.         SKIP
  6910.         DELAY .5
  6911.      ENDREPEAT
  6912.      REPEAT 5 TIMES
  6913.         SCROLL 21 17
  6914.         @ 17,0
  6915.         ?? style,color,descript,quant,cost
  6916.         DELAY .5
  6917.         SKIP
  6918.      ENDREPEAT
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.      SCROLL                      SRI  VPI  VPIN                      SCROLL
  6961.  
  6962.      SR-Info/VP-Info Reference Manual           Page 338          SECTION 4
  6963.  
  6964.  
  6965.  
  6966.                                       SEEK
  6967.  
  6968.      Find the last record matching a given FIND string by its index in the
  6969.      selected data file.
  6970.  
  6971.      ╔════════════════════════════════════════════════════════════════════╗
  6972.      ║ SEEK <char exp>                                                    ║
  6973.      ║                          VP-Info Professional only                 ║
  6974.      ║                                                                    ║
  6975.      ║ <char exp>   expression to be evaluated and found in the current   ║
  6976.      ║                index                                               ║
  6977.      ╚════════════════════════════════════════════════════════════════════╝
  6978.  
  6979.           SEEK is one of a family of commands that finds a record in an
  6980.      indexed data file by matching a given string with key values in the
  6981.      index file:
  6982.  
  6983.           SEEK is identical to FIND, except that it searches for the match
  6984.                to the value of a character expression instead of a string
  6985.                constant (VP-Info Professional only) (no-find positions the
  6986.                file at the top of file)
  6987.           FIND positions the file on the first record in the index matching
  6988.                the LAST string (no-find positions the file at the top of
  6989.                file)
  6990.           LAST positions the file on the last record in the index matching
  6991.                the FIND string (VP-Info Professional only) (no-find
  6992.                positions the file at the top of file)
  6993.           NEAREST positions the file on the first record in the index equal
  6994.                to or greater than the FIND string (VP-Info Professional
  6995.                only)
  6996.  
  6997.           All forms allow a search to be made on a character expression
  6998.      when the expression if preceded by the macro symbol "&".  When the
  6999.      variable var='TAYLOR', all of the following command lines are
  7000.      equivalent:
  7001.  
  7002.      SEEK var
  7003.      FIND &var
  7004.      SEEK &var
  7005.  
  7006.           If SET DELETE ON, deleted records will not be found.  (See the
  7007.      command SET.)
  7008.  
  7009.           Numbers must always be treated as strings, even if the key
  7010.      expression is a numeric field.  If NUM is a numeric field of width 2,
  7011.      FIND 1 will not find 1, but SEEK STR(1,2) or SEEK ' 1' will be
  7012.      successful.
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.  
  7019.  
  7020.      SEEK                           VPI  VPIN                          SEEK
  7021.  
  7022.      SR-Info/VP-Info Reference Manual           Page 339          SECTION 4
  7023.  
  7024.  
  7025.           When SEEK is successful, the value of the current record pointer
  7026.      (as shown by the # and RECNO( functions) is set to the current record
  7027.      number, and the system variable :NEAR is set to the same number.
  7028.  
  7029.           If the record is not found, the current record pointer will be
  7030.      set to 0 and the value of :NEAR will be set to the number of the first
  7031.      record in the index with an index key greater than the FIND string; if
  7032.      the index contains no key greater than the FIND string, :NEAR is set
  7033.      to the bottom of the file and EOF( is set to T (true).
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.  
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.  
  7077.  
  7078.  
  7079.  
  7080.      SEEK                           VPI  VPIN                          SEEK
  7081.  
  7082.      SR-Info/VP-Info Reference Manual           Page 340          SECTION 4
  7083.  
  7084.  
  7085.  
  7086.                                      SELECT
  7087.  
  7088.      Select the file number to work with.
  7089.  
  7090.      ╔════════════════════════════════════════════════════════════════════╗
  7091.      ║ SELECT <num const>/PRIMARY/SECONDARY                               ║
  7092.      ║                                                                    ║
  7093.      ║ <num const>    a file number between 1 and 6 SR-Info or between    ║
  7094.      ║                     1 and 10 VP-Info                               ║
  7095.      ║ PRIMARY          same as 1                                         ║
  7096.      ║ SECONDARY        same as 2                                         ║
  7097.      ╚════════════════════════════════════════════════════════════════════╝
  7098.  
  7099.           This command selects a file number, <num const>.  Once this
  7100.      number has been selected, the data files opened with the USE command
  7101.      will be referred to as file <num const>.
  7102.  
  7103.           (For compatibility with older VP-Info programs, file 1 is also
  7104.      called the PRIMARY file and File 2 is also called the SECONDARY file.)
  7105.  
  7106.           In SR-Info and VP-Info, there can be six or ten data files open
  7107.      at the same time; each must have a different file number.
  7108.  
  7109.           SELECT 1, SELECT 2, and so on are regarded as command verbs; no
  7110.      part of the command can be in a macro.
  7111.  
  7112.           Examples:
  7113.  
  7114.      1>SELECT 4
  7115.      4>SELECT SECONDARY
  7116.  
  7117.           You can temporarily change the selected file by putting the file
  7118.      number after the command keyword.
  7119.  
  7120.           Example:
  7121.  
  7122.      1>SELECT 1
  7123.      1>USE invoice
  7124.      1>USE#2 customer
  7125.      1>LIST
  7126.  
  7127.           The LIST command will list from the invoice file and the customer
  7128.      file will be opened as file 2.
  7129.  
  7130.           Note to dBASE programmers:  No version of dBASE uses file numbers
  7131.      the way SR-Info/VP-Info does, but both have a method of field
  7132.      redirection that must be adjusted when porting dBASE applications to
  7133.      SR-Info/VP-Info.  dBASE II named fields in a different work area by
  7134.      preceding the name with P. or S. to indicate Primary or Secondary work
  7135.  
  7136.  
  7137.  
  7138.  
  7139.  
  7140.      SELECT                      SRI  VPI  VPIN                      SELECT
  7141.  
  7142.      SR-Info/VP-Info Reference Manual           Page 341          SECTION 4
  7143.  
  7144.  
  7145.      area. dBASE III and later versions use aliases, established when the
  7146.      file is opened with USE, that are linked to a field name with an arrow
  7147.      (example: cust->name).  Your first step in program conversion is
  7148.      replacing these constructs with SR-Info/VP-Info file-numbering scheme
  7149.      (example: cust#2).
  7150.  
  7151.  
  7152.  
  7153.  
  7154.  
  7155.  
  7156.  
  7157.  
  7158.  
  7159.  
  7160.  
  7161.  
  7162.  
  7163.  
  7164.  
  7165.  
  7166.  
  7167.  
  7168.  
  7169.  
  7170.  
  7171.  
  7172.  
  7173.  
  7174.  
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.  
  7198.  
  7199.  
  7200.      SELECT                      SRI  VPI  VPIN                      SELECT
  7201.  
  7202.      SR-Info/VP-Info Reference Manual           Page 342          SECTION 4
  7203.  
  7204.  
  7205.  
  7206.                                       SET
  7207.  
  7208.      Set up environmental controls.
  7209.  
  7210.      ╔════════════════════════════════════════════════════════════════════╗
  7211.      ║ SET <param> ON/OFF                                                 ║
  7212.      ║                                                                    ║
  7213.      ║ <param>   is chosen from the list:                                 ║
  7214.      ║               ADD, ALTERNATE, ANSI, BELL, CARRY, CONFIRM,          ║
  7215.      ║               CONSOLE, DEBUG, DELETED, DELIMITER, DISPLAY,         ║
  7216.      ║               DIVZERO, DO, ECHO, EJECT, END, ERROR, ESCAPE,        ║
  7217.      ║               EXACT, EXECUTION, FUNCTION, GET, HEADING,            ║
  7218.      ║               INTENSITY, KEEP, LINE, LOCK, MENU, MONO, NETWORK,    ║
  7219.      ║               PRINT, PROMPT, RAW, SAVE, SCREEN, SNOW,              ║
  7220.      ║               STEP, TALK, TEXT, TRIM, UPPER, ZERO                  ║
  7221.      ╟────────────────────────────────────────────────────────────────────╢
  7222.      ║ Switch:                                                            ║
  7223.      ║                                                                    ║
  7224.      ║ ON or OFF                                                          ║
  7225.      ╚════════════════════════════════════════════════════════════════════╝
  7226.  
  7227.           These parameters enable and disable certain features of
  7228.      SR-Info/VP-Info.  The features are explained below.
  7229.  
  7230.           SR-Info/VP-Info comes with some of these features on, and some
  7231.      off; an asterisk marks the default.
  7232.  
  7233.      Parameter   Switch  Explanation:
  7234.  
  7235.      ADD         ON      When doing a POST, and the find is unsuccessful, a
  7236.                             record will be appended to the Master File, the
  7237.                             non-numeric fields of the Master File record
  7238.                             will be replaced by the matching fields in the
  7239.                             Transaction File record, and, the posting is
  7240.                             done to the new record.
  7241.                 *OFF     When doing a POST, and the find is unsuccessful,
  7242.                             an error message is sent.
  7243.  
  7244.      ALTERNATE   ON      An alternative to SET PRINT ON and SET FORMAT TO
  7245.                             PRINT commands: output that would be sent to
  7246.                             the printer is sent to a disk text file
  7247.                             instead.  The name of the disk file is
  7248.                             specified in the SET ALTERNATE TO <file>
  7249.                             command (see also SET ALTERNATE TO.  SET PRINT
  7250.                             ON is ignored when SET ALTERNATE ON.
  7251.                 *OFF     Stop sending output to the disk file. (NOTE: SET
  7252.                             PRINT OFF also sets ALTERNATE OFF if ALTERNATE
  7253.                             ON. Do not mix SET PRINT and SET ALTERNATE
  7254.                             commands, however; only use these commands in
  7255.                             ON/OFF pairs.)
  7256.  
  7257.  
  7258.  
  7259.  
  7260.      SET                         SRI  VPI  VPIN                         SET
  7261.  
  7262.      SR-Info/VP-Info Reference Manual           Page 343          SECTION 4
  7263.  
  7264.  
  7265.  
  7266.      ANSI        ON      ANSI.SYS is no longer supported for terminal
  7267.                             emulations by SR-Info/VP-Info, but the SET ANSI
  7268.                             command is allowed for compatibility with
  7269.                             programs written for earlier versions. It has
  7270.                             no effect.
  7271.                 *OFF     SET ANSI has no effect in SR-Info/VP-Info.
  7272.  
  7273.      BELL       *ON      The computer rings the bell whenever illegal data
  7274.                             is entered or when data input goes from an
  7275.                             editing field to the next editing field.
  7276.                  OFF     Bell is turned off.
  7277.  
  7278.      CARRY       ON      When in APPEND or the append mode of EDIT, make
  7279.                             the appended record identical to the current
  7280.                             record.
  7281.                 *OFF     Appended records are blank.
  7282.  
  7283.      CONFIRM     ON      In full-screen editing, data entry into an editing
  7284.                             field must be terminated by pressing <ENTER>.
  7285.                             (When filling a numeric field, this condition
  7286.                             will drop the last numeric character, the one
  7287.                             under the cursor.  The remedy is to make the
  7288.                             input picture one character wider.)
  7289.                 *OFF     Once an editing field is filled, data entry
  7290.                             proceeds to the next editing field.
  7291.  
  7292.      CONSOLE    *ON      The output directed to the screen goes to the
  7293.                             screen.  This flag is always set when <Esc> is
  7294.                             pressed or SR-Info/VP-Info stops execution on
  7295.                             an error.
  7296.                  OFF     All output directed to the screen is suppressed.
  7297.                             (Note, however, that scrolling is not
  7298.                             suppressed by this command, so existing
  7299.                             material on the screen can be scrolled off the
  7300.                             top of the screen.  Consider directing screen
  7301.                             output to a background screen instead of SET
  7302.                             CONSOLE OFF.)
  7303.  
  7304.      DEBUG       ON      Activate all the DEBUG print commands.
  7305.                 *OFF     Ignore all the DEBUG print commands.
  7306.  
  7307.      DELETED     ON      All records with the DELETED flag are ignored by
  7308.                             all the commands except the GOTO command.
  7309.                 *OFF     Records with the DELETED flag are listed, found
  7310.                             with FIND, etc., but marked as DELETED
  7311.                             (however, these records are never appended,
  7312.                             averaged, copied, counted, summed, totalled, or
  7313.                             reported).
  7314.  
  7315.  
  7316.  
  7317.  
  7318.  
  7319.  
  7320.      SET                         SRI  VPI  VPIN                         SET
  7321.  
  7322.      SR-Info/VP-Info Reference Manual           Page 344          SECTION 4
  7323.  
  7324.  
  7325.  
  7326.      DELIMITER   ON      The editing fields in the @ GET, EDIT, BROWSE,
  7327.                             TEXT (@ and % macros) commands are bounded by
  7328.                             colons.
  7329.                 *OFF     These editing fields are not bounded by colons.
  7330.  
  7331.      DISPLAY    *ON      Displayed macros are immediately updated in a TEXT
  7332.                             during READ when their values are changed in an
  7333.                             ON FIELD structure.
  7334.                  OFF     Displayed TEXT macros are not updated during READ.
  7335.  
  7336.      DIVZERO      ON      Division by zero is permitted and does not cause
  7337.                             execution of a program to cease with an error
  7338.                             message; the result of division by zero is
  7339.                             arbitrarily set at zero.
  7340.                 *OFF     Division by zero is not permitted and causes
  7341.                             program execution to abort with an error
  7342.                             message.
  7343.  
  7344.      DO         *ON      Subroutines are compiled as overlays to the
  7345.                             calling program (see DO command).
  7346.                  OFF     Subroutines are not compiled in the calling
  7347.                             program. Instead, the compile produces files
  7348.                             containing the compiled environment for the
  7349.                             subroutines (with the extension ENV).  May be
  7350.                             useful in developing and debugging very complex
  7351.                             applications.
  7352.  
  7353.      ECHO        ON      When compiling a SR-Info/VP-Info program
  7354.                             (including the compiling done on-the-fly before
  7355.                             running an uncompiled program), the program
  7356.                             lines are shown on the screen as they are
  7357.                             compiled; it has no effect while programs are
  7358.                             actually being executed.
  7359.                 *OFF     Program lines are not shown.
  7360.  
  7361.      EJECT      *ON      In a report form file, the EJECT line will send a
  7362.                             form feed character after each subtotal.
  7363.                  OFF     In a report form file, the EJECT line will send
  7364.                             enough carriage returns to move the paper in
  7365.                             the printer to the form depth set by the SET
  7366.                             LENGTH TO command (default is 66).
  7367.  
  7368.  
  7369.  
  7370.  
  7371.  
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.      SET                         SRI  VPI  VPIN                         SET
  7381.  
  7382.      SR-Info/VP-Info Reference Manual           Page 345          SECTION 4
  7383.  
  7384.  
  7385.  
  7386.      END        *ON      During READ while SET FUNCTION OFF, pressing any
  7387.                             function key has the same effect as pressing
  7388.                             <End>; READ is exited and the function key
  7389.                             number is stored into :KEY.
  7390.                  OFF     If SET FUNCTION OFF, then all function keys give a
  7391.                             carriage return and line feed combination
  7392.                             (leave input field) and the function key number
  7393.                             is stored in :KEY.  READ is not exited, but
  7394.                             action can be controlled in an ON FIELD
  7395.                             structure.
  7396.  
  7397.      ERROR      *ON      If an ON ERROR structure is in effect, it is
  7398.                             executed in event of an error.
  7399.                  OFF     An active ON ERROR structure is ignored and
  7400.                             SR-Info/VP-Info reacts as though the structure
  7401.                             did not exist.
  7402.  
  7403.      ESCAPE     *ON      Hitting <Esc> aborts program execution, or if an
  7404.                             ON ESCAPE structure is in effect, program
  7405.                             execution jumps to the start of the structure.
  7406.                  OFF     <Esc> is ignored.
  7407.  
  7408.      EXACT       ON      Whenever strings are compared for equality (in
  7409.                             conditions, or when invoking FIND), all
  7410.                             characters in both strings, including trailing
  7411.                             blanks, are compared, and only perfect matches
  7412.                             are true.  Thus 'ABCD'='ABC' is false, and FIND
  7413.                             ABC will not find 'ABCD'.
  7414.                 *OFF     Whenever strings are compared for equality,
  7415.                             trailing blanks are ignored, and only the
  7416.                             number of characters to the right of the = sign
  7417.                             are compared.  Thus 'ABCD'='ABC' is true, and
  7418.                             FIND ABC will find 'ABCD' (if 'ABCD' is the
  7419.                             first record key starting with 'ABC').
  7420.  
  7421.      EXECUTION   ON      All FIELD modules in an ON FIELD structure are
  7422.                             executed before exiting READ (or the current
  7423.                             record in BROWSE OFF and EDIT OFF), as well as
  7424.                             when leaving their respective input fields.
  7425.                 *OFF     FIELD modules are executed only when leaving their
  7426.                             respective input fields.
  7427.  
  7428.      FUNCTION   *ON      Function keys display values stored in them when
  7429.                             pressed.
  7430.                 *OFF     Disable the usual functions of the function keys
  7431.                             <F1> to <F10>.  Pressing a function key will
  7432.                             produce a Ctrl-W (or a carriage return/line
  7433.                             feed if SET END OFF); the number of the
  7434.                             function key pressed is available to the
  7435.                             programmer in the :KEY system variable.
  7436.  
  7437.  
  7438.  
  7439.  
  7440.      SET                         SRI  VPI  VPIN                         SET
  7441.  
  7442.      SR-Info/VP-Info Reference Manual           Page 346          SECTION 4
  7443.  
  7444.  
  7445.  
  7446.      GET         ON      A Get Table is maintained when calling a sub-
  7447.                             program; it is, therefore, still in effect upon
  7448.                             return from the sub-program, provided it is not
  7449.                             cleared in the sub-program.  (A Get Table is
  7450.                             cleared either with the CLEAR GETS command, or
  7451.                             by creating a get with TEXT or an @ GET command
  7452.                             after a READ command.)
  7453.                 *OFF     A Get Table is cleared whenever program execution
  7454.                             leaves a sub-program.
  7455.  
  7456.      HEADING     ON      Field names are displayed over each column during
  7457.                             LIST and DISPLAY command execution.  If fields
  7458.                             names are longer than column width, the name is
  7459.                             truncated as in BROWSE.  Headings are not
  7460.                             displayed if an expression list is given on the
  7461.                             LIST or DISPLAY command line.
  7462.                 *OFF     Field names are not displayed with LIST and
  7463.                             DISPLAY.
  7464.  
  7465.      INTENSITY  *ON      The editing fields in full-screen editing are
  7466.                             shown in reverse video.
  7467.                  OFF     Editing fields are shown in normal video.
  7468.  
  7469.      KEEP        ON      When a TEXT file is read from the disk, it is
  7470.                             stored in memory so that subsequent calls for
  7471.                             the same TEXT will use the version in memory
  7472.                             instead of reading it in from the disk again.
  7473.                 *OFF     The disk is accessed every time the TEXT file is
  7474.                             called.  Note: If the TEXT filename is a macro
  7475.                             or variable name, SR-Info/VP-Info always goes
  7476.                             to the disk for the text whether SET KEEP is ON
  7477.                             or OFF.
  7478.  
  7479.      LINE       *ON      Place line numbers in compiled program to be used
  7480.                             with error messages.
  7481.                  OFF     No line numbers in compiled program.
  7482.  
  7483.      LOCK        ON      VP-Info Professional Network Edition only.  All
  7484.                             data file records are automatically locked
  7485.                             whenever the user is positioned on them.
  7486.                 *OFF     Records are not automatically locked.
  7487.  
  7488.      MENU        ON      Display the meaning of the editing keys for EDIT
  7489.                             and BROWSE.
  7490.                 *OFF     No editing keys displayed.
  7491.  
  7492.      MONO        ON      A monochrome monitor is used. (Has no default.
  7493.                             Not required unless both monochrome and color
  7494.                             adapters are present in your computer; put the
  7495.                             appropriate command in your CNF file.)
  7496.                  OFF     A color monitor is used.
  7497.  
  7498.  
  7499.  
  7500.      SET                         SRI  VPI  VPIN                         SET
  7501.  
  7502.      SR-Info/VP-Info Reference Manual           Page 347          SECTION 4
  7503.  
  7504.  
  7505.  
  7506.      NETWORK     ON      Turn network facilities on (VP-Info Professional
  7507.                             Network Edition only; enables the user to LOCK
  7508.                             and UNLOCK records on any network or multi-user
  7509.                             system adhering to the standard conventions of
  7510.                             Microsoft DOS 3.1 and above.  See SET NETWORK
  7511.                             TO command).
  7512.                 *OFF     Network facilities are not turned on (VP-Info
  7513.                             Professional Network Edition only).
  7514.  
  7515.      PRINT       ON      Output produced such by relative display commands
  7516.                             as LIST, DISPLAY, ?, and ?? is sent to a
  7517.                             printer (or to a text file if SPOOL is in
  7518.                             effect).  In the interactive mode, the effect
  7519.                             of SET PRINT ON is turned off when the prompt
  7520.                             appears, so that the commands will not be
  7521.                             printed.  SR-Info/VP-Info will continue
  7522.                             printing the results of the commands.
  7523.                 *OFF     The output is sent to the screen.  This flag is
  7524.                             always set OFF when <Esc> is pressed or an
  7525.                             error is encountered while running a program.
  7526.  
  7527.      PROMPT      ON      A dot prompt, as in dBASE.
  7528.                 *OFF     The n> prompt, where n is the file number.
  7529.  
  7530.      RAW         ON      No blanks separate the expressions when the
  7531.                             DISPLAY or LIST command is used with an
  7532.                             expression list (see ?, ??, DISPLAY, and LIST).
  7533.                 *OFF     Blanks are placed between expressions.
  7534.  
  7535.      SAVE       *ON      Changes are saved to disk when the user leaves a
  7536.                             changed record or closes the data file.
  7537.                  OFF     Changes are not written to disk.
  7538.  
  7539.      SCREEN     *ON      SCREEN command works as described under SCREEN
  7540.                             command.
  7541.                  OFF     When screens are switched with SCREEN command,
  7542.                             cursor position and color attributes are not
  7543.                             saved or restored.  (Provided only to allow
  7544.                             user to force compatibility with early versions
  7545.                             of VP-Info.
  7546.  
  7547.      SNOW       *ON      When using a CGA color monitor and some other
  7548.                             monitor types, SR-Info/VP-Info may cause screen
  7549.                             flicker called "snow."
  7550.                  OFF     Snow is suppressed, at a cost of slowing screen
  7551.                             displays.
  7552.  
  7553.  
  7554.  
  7555.  
  7556.  
  7557.  
  7558.  
  7559.  
  7560.      SET                         SRI  VPI  VPIN                         SET
  7561.  
  7562.      SR-Info/VP-Info Reference Manual           Page 348          SECTION 4
  7563.  
  7564.  
  7565.  
  7566.      STEP        ON      Execute a SR-Info/VP-Info program a line at a time
  7567.                             (with SET LINE ON, the line numbers will be
  7568.                             displayed on the top line of the screen
  7569.                             display).
  7570.                 *OFF     Execute SR-Info/VP-Info programs continuously.
  7571.  
  7572.      TALK       *ON      SR-Info/VP-Info messages from commands are
  7573.                             displayed.  This flag is always set when <Esc>
  7574.                             is pressed and when the conversational mode is
  7575.                             entered.
  7576.                  OFF     Messages are not displayed.
  7577.  
  7578.      TEXT       *ON      The TEXT display macros created with & and # are
  7579.                             put into the Get Table; usually required for
  7580.                             input screens created with TEXT.
  7581.                  OFF     Display macros are not put into the Get Table;
  7582.                             usually required when using TEXT for printer
  7583.                             output, as in mail-merge programs.
  7584.  
  7585.      TRIM       *ON      The & macro in TEXT trims string variables.
  7586.                  OFF     The trimming is turned off.
  7587.  
  7588.      UPPER       ON      All keyboard-input characters from "a" to "z" are
  7589.                             forced to upper case "A" to "Z"; a software
  7590.                             "Caps Lock".
  7591.                 *OFF     Lower-case keyboard entry is not altered.
  7592.  
  7593.      ZERO       *ON      Display zeros whenever the numeric value zero must
  7594.                             be displayed.
  7595.                  OFF     If the value zero has to be displayed, display
  7596.                             blanks instead.
  7597.  
  7598.  
  7599.  
  7600.  
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.  
  7611.  
  7612.  
  7613.  
  7614.  
  7615.  
  7616.  
  7617.  
  7618.  
  7619.  
  7620.      SET                         SRI  VPI  VPIN                         SET
  7621.  
  7622.      SR-Info/VP-Info Reference Manual           Page 349          SECTION 4
  7623.  
  7624.  
  7625.  
  7626.                                  SET ALTERNATE
  7627.  
  7628.      Specify text file for output.
  7629.  
  7630.      ╔════════════════════════════════════════════════════════════════════╗
  7631.      ║ SET ALTERNATE TO <file>                                            ║
  7632.      ║                                                                    ║
  7633.      ║ <file>          text file name                                     ║
  7634.      ╚════════════════════════════════════════════════════════════════════╝
  7635.  
  7636.           The command SET ALTERNATE specifies the text file to be used when
  7637.      the SET ALTERNATE ON command is given.  The default extension of the
  7638.      file is TXT.  If the file already exists, the new data is appended at
  7639.      the end.  (See SET ALTERNATE ON under the SET command.)
  7640.  
  7641.           All data that would normally go to the printer is sent to this
  7642.      file.
  7643.  
  7644.           Example:
  7645.  
  7646.      SET ALTERNATE TO record
  7647.      SET ALTERNATE ON
  7648.      @ 10,0 SAY 'This goes to RECORD.TXT'
  7649.      SET ALTERNATE OFF
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.  
  7666.  
  7667.  
  7668.  
  7669.  
  7670.  
  7671.  
  7672.  
  7673.  
  7674.  
  7675.  
  7676.  
  7677.  
  7678.  
  7679.  
  7680.      SET ALTERNATE                SRI  VPI  VPIN              SET ALTERNATE
  7681.  
  7682.      SR-Info/VP-Info Reference Manual           Page 350          SECTION 4
  7683.  
  7684.  
  7685.  
  7686.                                    SET COLOR
  7687.  
  7688.      Set the attribute byte of the characters to be displayed.
  7689.  
  7690.      ╔════════════════════════════════════════════════════════════════════╗
  7691.      ║ SET COLOR TO <attrib>                                              ║
  7692.      ║                                                                    ║
  7693.      ║ <attrib>   numeric expression, the attribute byte: 0 to 255        ║
  7694.      ╚════════════════════════════════════════════════════════════════════╝
  7695.  
  7696.           This command sets the attribute byte of all characters to be
  7697.      displayed on the screen, and updates the system variable :COLOR with
  7698.      <attrib>.  SET COLOR TO 0 returns to the normal mode.  An alternative
  7699.      way of getting the same result is:
  7700.  
  7701.      :COLOR=<attrib>
  7702.  
  7703.           These commands work with standard IBM monochrome and color
  7704.      monitors.
  7705.  
  7706.           Every character displayed on the screen has an attribute byte
  7707.      that determines how the character is displayed.
  7708.  
  7709.           For monochrome monitors: the character may be bold, underlined,
  7710.      reverse, and blink, or any combination of them.  The important numbers
  7711.      are:
  7712.  
  7713.           standard characters       7
  7714.           underline                 1
  7715.           reverse video           112
  7716.  
  7717.           to get bold:        add   8
  7718.           to make it blink:   add 128
  7719.  
  7720.           For color monitors, both the background and the character has
  7721.      color.  Compute ATTRIB by adding up (up to) four numbers:
  7722.      background+foreground+blink+brightness from the following tables:
  7723.  
  7724.           background         0  - black
  7725.                             16  - blue
  7726.                             32  - green
  7727.                             48  - cyan
  7728.                             64  - red
  7729.                             80  - magenta
  7730.                             96  - brown
  7731.                            112  - white
  7732.  
  7733.           foreground         0  - black
  7734.                              1  - blue
  7735.  
  7736.  
  7737.  
  7738.  
  7739.  
  7740.      SET COLOR                   SRI  VPI  VPIN                   SET COLOR
  7741.  
  7742.      SR-Info/VP-Info Reference Manual           Page 351          SECTION 4
  7743.  
  7744.  
  7745.                              2  - green
  7746.                              3  - cyan
  7747.                              4  - red
  7748.                              5  - magenta
  7749.                              6  - brown
  7750.                              7  - white
  7751.  
  7752.           blink              0  - no blink
  7753.                            128  - blink
  7754.  
  7755.           brightness         0  - normal
  7756.                              8  - intense
  7757.  
  7758.           See also the COLOR command for setting the attribute bytes for a
  7759.      rectangular part of the screen.
  7760.  
  7761.           Examples:
  7762.  
  7763.      1>SET COLOR TO 7         ;white on black, the mono default
  7764.      1>SET COLOR TO 48        ;black on light blue, the color default
  7765.      1>SET COLOR TO 58        ;bright green on light blue (48+8+2)
  7766.      1>SET COLOR TO 96        ;black on gold
  7767.      1>SET COLOR TO 112       ;black on white...the mono reverse
  7768.  
  7769.  
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.      SET COLOR                   SRI  VPI  VPIN                   SET COLOR
  7801.  
  7802.      SR-Info/VP-Info Reference Manual           Page 352          SECTION 4
  7803.  
  7804.  
  7805.  
  7806.                                     SET DATE
  7807.  
  7808.      Set the default form for dates.
  7809.  
  7810.      ╔════════════════════════════════════════════════════════════════════╗
  7811.      ║ SET DATE TO <str exp>                                              ║
  7812.      ║                                                                    ║
  7813.      ║ <str exp>     the default date format                              ║
  7814.      ╚════════════════════════════════════════════════════════════════════╝
  7815.  
  7816.           This command, in conjunction with the date function DATE(7,
  7817.      <str exp>), is designed to give control over input of dates.  The
  7818.      order of the day, month, and the year, and the number of digits in
  7819.      year (2 or 4), is controlled as follows:
  7820.  
  7821.  
  7822.           SET DATE TO                 formats '12/31/1991' as follows:
  7823.  
  7824.           'mmddyy'                             123191
  7825.           'ddmmyy'                             312191
  7826.           'yymmdd'                             911231
  7827.           'mmddyyyy'                           12311991
  7828.           'ddmmyyyy'                           31121991
  7829.           'yyyymmdd'                           19911231
  7830.  
  7831.  
  7832.           These are the six available options.
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846.  
  7847.  
  7848.  
  7849.  
  7850.  
  7851.  
  7852.  
  7853.  
  7854.  
  7855.  
  7856.  
  7857.  
  7858.  
  7859.  
  7860.      SET DATE                    SRI  VPI  VPIN                    SET DATE
  7861.  
  7862.      SR-Info/VP-Info Reference Manual           Page 353          SECTION 4
  7863.  
  7864.  
  7865.  
  7866.                                   SET DEFAULT
  7867.  
  7868.      Set the drive letter of the default disk drive for data and index
  7869.      files.
  7870.  
  7871.      ╔════════════════════════════════════════════════════════════════════╗
  7872.      ║ SET DEFAULT TO <drive letter>                                      ║
  7873.      ║                                                                    ║
  7874.      ║ <drive letter>  the drive letter of the default drive              ║
  7875.      ╚════════════════════════════════════════════════════════════════════╝
  7876.  
  7877.           This command sets the drive letter of the default drive for data
  7878.      and index files.  If this drive letter is, say, C, every data and
  7879.      index file will be searched for on drive C, unless the file name
  7880.      contains an explicit drive letter.
  7881.  
  7882.           This command will rarely be used, but is provided for
  7883.      compatibility with older versions of SR-Info/VP-Info.  Most users will
  7884.      prefer the extra flexibility of the FILES command, the FILES ...
  7885.      ENDFILES structure, and the SET DIR command.  The first two allow you
  7886.      to specify exactly where specific files and groups of files are to be
  7887.      found, and the third actually "logs" you onto any disk and/or
  7888.      directory.
  7889.  
  7890.           See the FILES command, the FILES ... ENDFILES structure, and the
  7891.      SET DIR command.
  7892.  
  7893.           Example:
  7894.  
  7895.      1>SET DEFAULT TO C
  7896.      1>USE employee INDEX a:emp2
  7897.  
  7898.           In this example, the data file EMPLOYEE.DBF will be looked up on
  7899.      drive C:; however, the index file EMP2.NDX will be fetched from
  7900.      drive A:.
  7901.  
  7902.  
  7903.  
  7904.  
  7905.  
  7906.  
  7907.  
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.  
  7915.  
  7916.  
  7917.  
  7918.  
  7919.  
  7920.      SET DEFAULT                 SRI  VPI  VPIN                 SET DEFAULT
  7921.  
  7922.      SR-Info/VP-Info Reference Manual           Page 354          SECTION 4
  7923.  
  7924.  
  7925.  
  7926.                                     SET DIR
  7927.  
  7928.      Change drive and/or current directory.
  7929.  
  7930.      ╔════════════════════════════════════════════════════════════════════╗
  7931.      ║ SET DIR TO [<drive>:][<directory>]                                 ║
  7932.      ║                                                                    ║
  7933.      ║ <drive>         the drive letter of the new default drive          ║
  7934.      ║ <directory>     the directory name (according to DOS rules)        ║
  7935.      ╚════════════════════════════════════════════════════════════════════╝
  7936.  
  7937.           This command changes the current drive and/or the current
  7938.      directory; equivalent to combining the DOS commands change drive and
  7939.      CHDIR (CD)..
  7940.  
  7941.           Contrast this with the FILES and SET DEFAULT TO commands, which
  7942.      only tell SR-Info/VP-Info where to look for certain categories of
  7943.      files without changing the user's current position on the disk.  Exit
  7944.      from SR-Info/VP-Info after SET DIR is in the new directory on the new
  7945.      drive.
  7946.  
  7947.           If <drive> is not specified, the new directory is on the same
  7948.      drive.  If directory is not specified, the new directory will be the
  7949.      last directory DOS changed to on the target drive or, if no directory
  7950.      has been changed to, the root of that drive.
  7951.  
  7952.           If <directory> begins with a backslash (example \DATA), the
  7953.      directory will be off the root; if not, the directory will be off the
  7954.      directory onto which the user is currently logged.
  7955.  
  7956.           If the <drive> is invalid, no message will be given, but the
  7957.      change will not take place. If no <drive> is given and the <directory>
  7958.      is invalid, again no change will occur.  However, if <drive> is valid
  7959.      and <directory> is invalid, the drive will change and the user will be
  7960.      logged into the current directory on that drive.
  7961.  
  7962.           The current drive and directory can be checked with the :DIR
  7963.      system variable, which always contains the current drive and directory
  7964.      (example C:\INFO).
  7965.           `
  7966.                Caution: If you change directories within SR-Info/VP-Info,
  7967.           you may lose track of where some of your files are.  This is
  7968.           particularly likely if you have a FILES structure in use without
  7969.           full path names giving both drive letter and leading backslash on
  7970.           the directory.
  7971.  
  7972.           Example:
  7973.  
  7974.      1>SET DIR TO D:\UTIL
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.      SET DIR                     SRI  VPI  VPIN                     SET DIR
  7981.  
  7982.      SR-Info/VP-Info Reference Manual           Page 355          SECTION 4
  7983.  
  7984.  
  7985.      1>? :DIR
  7986.      D:\UTIL
  7987.  
  7988.  
  7989.  
  7990.  
  7991.  
  7992.  
  7993.  
  7994.  
  7995.  
  7996.  
  7997.  
  7998.  
  7999.  
  8000.  
  8001.  
  8002.  
  8003.  
  8004.  
  8005.  
  8006.  
  8007.  
  8008.  
  8009.  
  8010.  
  8011.  
  8012.  
  8013.  
  8014.  
  8015.  
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023.  
  8024.  
  8025.  
  8026.  
  8027.  
  8028.  
  8029.  
  8030.  
  8031.  
  8032.  
  8033.  
  8034.  
  8035.  
  8036.  
  8037.  
  8038.  
  8039.  
  8040.      SET DIR                     SRI  VPI  VPIN                     SET DIR
  8041.  
  8042.      SR-Info/VP-Info Reference Manual           Page 356          SECTION 4
  8043.  
  8044.  
  8045.  
  8046.                                    SET FIELDS
  8047.  
  8048.      An obsolete command retained in the language for compatibility with
  8049.      earlier versions of VP-Info.
  8050.  
  8051.      ╔════════════════════════════════════════════════════════════════════╗
  8052.      ║ SET FIELDS TO <num const>                                          ║
  8053.      ║                                                                    ║
  8054.      ║ <num const>   the number of fields                                 ║
  8055.      ╚════════════════════════════════════════════════════════════════════╝
  8056.  
  8057.           This command is ignored in SR-Info/VP-Info. In VP-Info
  8058.      Professional, its role is taken by the FILES= command in the VPI.SET
  8059.      file.
  8060.  
  8061.  
  8062.  
  8063.  
  8064.  
  8065.  
  8066.  
  8067.  
  8068.  
  8069.  
  8070.  
  8071.  
  8072.  
  8073.  
  8074.  
  8075.  
  8076.  
  8077.  
  8078.  
  8079.  
  8080.  
  8081.  
  8082.  
  8083.  
  8084.  
  8085.  
  8086.  
  8087.  
  8088.  
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.      SET FIELDS                  SRI  VPI  VPIN                  SET FIELDS
  8101.  
  8102.      SR-Info/VP-Info Reference Manual           Page 357          SECTION 4
  8103.  
  8104.  
  8105.  
  8106.                                    SET FILTER
  8107.  
  8108.      Set a condition which applies to all subsequent data-file commands.
  8109.  
  8110.      ╔════════════════════════════════════════════════════════════════════╗
  8111.      ║ SET FILTER TO [<cond>]                                             ║
  8112.      ║                                                                    ║
  8113.      ╟────────────────────────────────────────────────────────────────────╢
  8114.      ║ Option:                                                            ║
  8115.      ║                                                                    ║
  8116.      ║ <cond>    the condition applied to all subsequent data-file        ║
  8117.      ║             commands                                               ║
  8118.      ╚════════════════════════════════════════════════════════════════════╝
  8119.  
  8120.           Most command that use data files (LIST, REPLACE, REPORT, etc.)
  8121.      allow a selection condition to be specified with a FOR clause.
  8122.  
  8123.           SR-Info/VP-Info also allows a global condition to be attached to
  8124.      all data-file commands, including many that do not allow a FOR clause,
  8125.      including SORT, EDIT, and BROWSE.
  8126.  
  8127.           The filter is turned off with  FILTER TO without a condition.
  8128.  
  8129.           While a filter is in effect, a FOR clause can be used with
  8130.      commands to limit further the records subject to the command.
  8131.  
  8132.  
  8133.           Examples:
  8134.  
  8135.           1.   Browse a filtered data file:
  8136.  
  8137.      1>SET FILTER TO amt:due>0
  8138.      1>BROWSE
  8139.  
  8140.           2.   Produce a listing of payables due to vendors in California,
  8141.      only if there is actually an amount due.
  8142.  
  8143.      1>SET FILTER TO amt:due>0
  8144.      1>REPORT owing FOR state='CA'
  8145.  
  8146.  
  8147.  
  8148.  
  8149.  
  8150.  
  8151.  
  8152.  
  8153.  
  8154.  
  8155.  
  8156.  
  8157.  
  8158.  
  8159.  
  8160.      SET FILTER                  SRI  VPI  VPIN                  SET FILTER
  8161.  
  8162.      SR-Info/VP-Info Reference Manual           Page 358          SECTION 4
  8163.  
  8164.  
  8165.  
  8166.                                    SET FORMAT
  8167.  
  8168.      Directs the @ SAY commands to screen or printer.
  8169.  
  8170.      ╔════════════════════════════════════════════════════════════════════╗
  8171.      ║ SET FORMAT TO SCREEN/PRINT                                         ║
  8172.      ╟────────────────────────────────────────────────────────────────────╢
  8173.      ║ Switch:                                                            ║
  8174.      ║                                                                    ║
  8175.      ║ SCREEN     send output to screen; the default                      ║
  8176.      ║ PRINT      send output to printer                                  ║
  8177.      ╚════════════════════════════════════════════════════════════════════╝
  8178.  
  8179.           SET FORMAT TO SCREEN or PRINT is used to send data formatted with
  8180.      the @ SAY command to the screen or the printer (but not to both).  The
  8181.      default is SCREEN.  (See the command @.)  The default is always set
  8182.      when <Esc> is pressed.
  8183.  
  8184.           IF SPOOL or SET ALTERNATE TO has redirected print output to a
  8185.      disk file, SET FORMAT TO PRINT will cause output to go into the disk
  8186.      file.
  8187.  
  8188.  
  8189.  
  8190.  
  8191.  
  8192.  
  8193.  
  8194.  
  8195.  
  8196.  
  8197.  
  8198.  
  8199.  
  8200.  
  8201.  
  8202.  
  8203.  
  8204.  
  8205.  
  8206.  
  8207.  
  8208.  
  8209.  
  8210.  
  8211.  
  8212.  
  8213.  
  8214.  
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.      SET FORMAT                  SRI  VPI  VPIN                  SET FORMAT
  8221.  
  8222.      SR-Info/VP-Info Reference Manual           Page 359          SECTION 4
  8223.  
  8224.  
  8225.  
  8226.                                    SET INDEX
  8227.  
  8228.      Specify index files.
  8229.  
  8230.      ╔════════════════════════════════════════════════════════════════════╗
  8231.      ║ SET INDEX TO                                                       ║
  8232.      ║ SET INDEX TO <file>                                                ║
  8233.      ║ SET INDEX TO <file list>                                           ║
  8234.      ║ SET INDEX TO <num const>                                           ║
  8235.      ║                                                                    ║
  8236.      ║ <file>        the name of the index file                           ║
  8237.      ║ <file list>   a list of up to 7 index files                        ║
  8238.      ║ <num const>   a number between 1 and 7                             ║
  8239.      ╚════════════════════════════════════════════════════════════════════╝
  8240.  
  8241.           The command SET INDEX TO specifies the index file(s) to be used
  8242.      with the selected data file.  If more than one index file is given,
  8243.      the first index file will be used as the Master Index.  The Master
  8244.      Index is used by the FIND command, and all the display type commands
  8245.      (BROWSE, LIST).  However, all the index files specified in the list
  8246.      are maintained by the commands that add or edit records (APPEND, EDIT,
  8247.      @ GET, and so on).
  8248.  
  8249.           The Master Index can be changed with the SET INDEX TO <num const>
  8250.      command.  The index files are assigned numbers when they are activated
  8251.      in a file list.  Say, SET INDEX TO 3, makes the third on the list the
  8252.      Master Index.  This involves no disk action; no file is opened or
  8253.      closed.
  8254.  
  8255.           Index files can also be opened with the USE command (see USE).
  8256.  
  8257.           SET INDEX TO with no file name, closes all the index files for
  8258.      the selected data file, but the data file is not closed.  Index files
  8259.      are also closed when the data file is closed. (See the commands CLOSE
  8260.      and USE.)
  8261.  
  8262.           Examples:
  8263.  
  8264.      1>USE employee
  8265.      1>SET INDEX TO employee,empl2,empl3
  8266.      1>LIST
  8267.      1>SET INDEX TO 3        ; makes empl3 the Master Index
  8268.      1>SET INDEX TO          ; closes all index files for the selected file
  8269.  
  8270.  
  8271.  
  8272.  
  8273.  
  8274.  
  8275.  
  8276.  
  8277.  
  8278.  
  8279.  
  8280.      SET INDEX                   SRI  VPI  VPIN                   SET INDEX
  8281.  
  8282.      SR-Info/VP-Info Reference Manual           Page 360          SECTION 4
  8283.  
  8284.  
  8285.  
  8286.                                    SET LENGTH
  8287.  
  8288.      Set page depth for the printer when the printer does not support a
  8289.      standard formfeed control character.
  8290.  
  8291.      ╔════════════════════════════════════════════════════════════════════╗
  8292.      ║ SET LENGTH TO <num exp>                                            ║
  8293.      ║                                                                    ║
  8294.      ║ <num exp>   the page depth                                         ║
  8295.      ╚════════════════════════════════════════════════════════════════════╝
  8296.  
  8297.           The page depth is the number of lines from the top of the page to
  8298.      the very bottom of the page.  If the SET LENGTH command is not used,
  8299.      page depth is assumed to be 66.
  8300.  
  8301.           Warning: SET LENGTH does not set how many lines will be printed
  8302.      on a page but the physical size of the page.  This command is used if
  8303.      the page depth is unusual (e.g., filling in a preprinted form), or if
  8304.      the usual 6 line per inch printing is changed, say, to 8 lines per
  8305.      inch.
  8306.  
  8307.           Example:
  8308.  
  8309.      1>SET LENGTH TO 40
  8310.  
  8311.  
  8312.  
  8313.  
  8314.  
  8315.  
  8316.  
  8317.  
  8318.  
  8319.  
  8320.  
  8321.  
  8322.  
  8323.  
  8324.  
  8325.  
  8326.  
  8327.  
  8328.  
  8329.  
  8330.  
  8331.  
  8332.  
  8333.  
  8334.  
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.      SET LENGTH                  SRI  VPI  VPIN                  SET LENGTH
  8341.  
  8342.      SR-Info/VP-Info Reference Manual           Page 361          SECTION 4
  8343.  
  8344.  
  8345.  
  8346.                                   SET LIBRARY
  8347.  
  8348.      Set the drive letter of the default disk drive for data and index
  8349.      files.
  8350.  
  8351.      ╔════════════════════════════════════════════════════════════════════╗
  8352.      ║ SET LIBRARY TO <library>                                           ║
  8353.      ║                                                                    ║
  8354.      ║ <library>     a library file, default extension LIB                ║
  8355.      ╚════════════════════════════════════════════════════════════════════╝
  8356.  
  8357.           This opens a special form of file called a library, which
  8358.      contains up to 65,000 library entries each of 256 bytes.  Library
  8359.      entries are automatically combined into volumes of up to about 20,000
  8360.      characters by creation of an internal linked list, analogous to the
  8361.      way DOS links disk clusters together to make large disk files.
  8362.  
  8363.           If the <library> does not exist, it will be created.  The default
  8364.      extension for library files is LIB.
  8365.  
  8366.           Library volumes can be created only with the WRITE command, and
  8367.      output only with the TEXT command (although a programmer can also
  8368.      access the data through use of the sequential file functions SEEK(,
  8369.      GET(, and PUT( if sufficiently skilled).
  8370.  
  8371.           Both WRITE and TEXT distinguish between standard disk files and
  8372.      volume numbers in their command lines by preceding volume numbers with
  8373.      a period.  Do not mistake this usage for a decimal number.
  8374.  
  8375.           Technical information for experienced programmers: the structure
  8376.      of a library file is as follows:
  8377.  
  8378.           Header:
  8379.  
  8380.             Bits 0 and 1           next volume to be added, an unsigned
  8381.                                      integer
  8382.             Bits 2 and 3           next available volume, an unsigned
  8383.                                      integer; may be less than next to be
  8384.                                      added because existing volumes may
  8385.                                      have been released with REMLIB(
  8386.                                      function or shortened with WRITE
  8387.             Bits 4 through 15      unused
  8388.  
  8389.           Each volume:
  8390.  
  8391.             Bits 0 through 253     the text contents of the volume; end of
  8392.                                      file indicated by 1A hex
  8393.             Bits 254 and 255       a pointer to the next part of the
  8394.                                      volume, an unsigned integer; if no
  8395.                                      next part, pointer is null
  8396.  
  8397.  
  8398.  
  8399.  
  8400.      SET LIBRARY                 SRI  VPI  VPIN                 SET LIBRARY
  8401.  
  8402.      SR-Info/VP-Info Reference Manual           Page 362          SECTION 4
  8403.  
  8404.  
  8405.  
  8406.           Example:
  8407.  
  8408.      1>SET LIBRARY TO screens
  8409.      1>? :avail                  ;get number of next available volume
  8410.           65.00
  8411.      1>WRITE .:avail             ;use WRITE to enter a file in volume 65
  8412.  
  8413.  
  8414.  
  8415.  
  8416.  
  8417.  
  8418.  
  8419.  
  8420.  
  8421.  
  8422.  
  8423.  
  8424.  
  8425.  
  8426.  
  8427.  
  8428.  
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.  
  8435.  
  8436.  
  8437.  
  8438.  
  8439.  
  8440.  
  8441.  
  8442.  
  8443.  
  8444.  
  8445.  
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451.  
  8452.  
  8453.  
  8454.  
  8455.  
  8456.  
  8457.  
  8458.  
  8459.  
  8460.      SET LIBRARY                 SRI  VPI  VPIN                 SET LIBRARY
  8461.  
  8462.      SR-Info/VP-Info Reference Manual           Page 363          SECTION 4
  8463.  
  8464.  
  8465.  
  8466.                                     SET LINK
  8467.  
  8468.      Set up a physical link between two data files.
  8469.  
  8470.      ╔════════════════════════════════════════════════════════════════════╗
  8471.      ║ SET LINK TO <num const>                                            ║
  8472.      ║ SET LINK OFF                                                       ║
  8473.      ║                                                                    ║
  8474.      ║ <num const>  the selected file is linked to the file with          ║
  8475.      ║                   this file number                                 ║
  8476.      ╚════════════════════════════════════════════════════════════════════╝
  8477.  
  8478.           The command SET LINK TO sets up a link between two files by
  8479.      record number.  After the link is set up between the selected file and
  8480.      another file, as the record pointer is moved in the selected file (for
  8481.      instance, with GO, FIND, or LIST), the record pointer in the other
  8482.      file is similarly moved.  If the selected file has more records, once
  8483.      the record number is too large for the other file, its current record
  8484.      number pointer will stay on the last record.
  8485.  
  8486.           SET LINK OFF turns off the linkage (if any) from the selected
  8487.      file.
  8488.  
  8489.           The command SET LINK TO temporarily "creates" data files with
  8490.      more than 32 fields from data files with such limits.  Data files
  8491.      which permanently have more than 32 fields can be created with the
  8492.      CREATE command.
  8493.  
  8494.           SET LINK TO can "chain" many files together.
  8495.  
  8496.      1>SET LINK TO 2
  8497.      1>SET#2 LINK TO 4
  8498.      1>SET#4 LINK TO 6
  8499.  
  8500.      links together the files 1, 2, 4, and 6.
  8501.  
  8502.           There can be only one SET LINK TO command from any one file.
  8503.  
  8504.      2>SET LINK TO 3
  8505.      2>SET LINK TO 4
  8506.  
  8507.      The second command overrules the first.
  8508.  
  8509.  
  8510.  
  8511.  
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.  
  8519.  
  8520.      SET LINK                    SRI  VPI  VPIN                    SET LINK
  8521.  
  8522.      SR-Info/VP-Info Reference Manual           Page 364          SECTION 4
  8523.  
  8524.  
  8525.           It is the user's responsibility to make sure that there are no
  8526.      "loops" such as in:
  8527.  
  8528.      1>SET LINK TO 2
  8529.      1>SELECT 2
  8530.      2>SET LINK TO 1
  8531.  
  8532.           If SET LINK is used, SET RELATION should be avoided.
  8533.  
  8534.  
  8535.  
  8536.  
  8537.  
  8538.  
  8539.  
  8540.  
  8541.  
  8542.  
  8543.  
  8544.  
  8545.  
  8546.  
  8547.  
  8548.  
  8549.  
  8550.  
  8551.  
  8552.  
  8553.  
  8554.  
  8555.  
  8556.  
  8557.  
  8558.  
  8559.  
  8560.  
  8561.  
  8562.  
  8563.  
  8564.  
  8565.  
  8566.  
  8567.  
  8568.  
  8569.  
  8570.  
  8571.  
  8572.  
  8573.  
  8574.  
  8575.  
  8576.  
  8577.  
  8578.  
  8579.  
  8580.      SET LINK                    SRI  VPI  VPIN                    SET LINK
  8581.  
  8582.      SR-Info/VP-Info Reference Manual           Page 365          SECTION 4
  8583.  
  8584.  
  8585.  
  8586.                                    SET MARGIN
  8587.  
  8588.      Specify text margin for printer.
  8589.  
  8590.      ╔════════════════════════════════════════════════════════════════════╗
  8591.      ║ SET MARGIN TO <num exp>                                            ║
  8592.      ║                                                                    ║
  8593.      ║ <num exp>   the margin                                             ║
  8594.      ╚════════════════════════════════════════════════════════════════════╝
  8595.  
  8596.           The command SET MARGIN sets the left margin for the printer.
  8597.      This command can be used in conjunction with any command that sends
  8598.      output to the printer.  See the commands SET PRINT ON, SET FORMAT TO
  8599.      PRINT, SET WIDTH, and TEXT.
  8600.  
  8601.           Example:
  8602.  
  8603.      SET PRINT ON
  8604.      SET MARGIN TO 5
  8605.      ? 'This is indented'
  8606.  
  8607.      Prints:
  8608.  
  8609.           This is indented.
  8610.  
  8611.  
  8612.  
  8613.  
  8614.  
  8615.  
  8616.  
  8617.  
  8618.  
  8619.  
  8620.  
  8621.  
  8622.  
  8623.  
  8624.  
  8625.  
  8626.  
  8627.  
  8628.  
  8629.  
  8630.  
  8631.  
  8632.  
  8633.  
  8634.  
  8635.  
  8636.  
  8637.  
  8638.  
  8639.  
  8640.      SET MARGIN                  SRI  VPI  VPIN                  SET MARGIN
  8641.  
  8642.      SR-Info/VP-Info Reference Manual           Page 366          SECTION 4
  8643.  
  8644.  
  8645.  
  8646.                                    SET MEMORY
  8647.  
  8648.      An obsolete command retained in the language for compatibility with
  8649.      earlier versions of VP-Info.
  8650.  
  8651.      ╔════════════════════════════════════════════════════════════════════╗
  8652.      ║ SET MEMORY TO <num const>                                          ║
  8653.      ║                                                                    ║
  8654.      ║ <num const>   the amount of memory reserved for high memory        ║
  8655.      ╚════════════════════════════════════════════════════════════════════╝
  8656.  
  8657.           This command is ignored in SR-Info/VP-Info. In VP-Info
  8658.      Professional, its role is taken by the MEMORY= command in the VPI.SET
  8659.      file.
  8660.  
  8661.  
  8662.  
  8663.  
  8664.  
  8665.  
  8666.  
  8667.  
  8668.  
  8669.  
  8670.  
  8671.  
  8672.  
  8673.  
  8674.  
  8675.  
  8676.  
  8677.  
  8678.  
  8679.  
  8680.  
  8681.  
  8682.  
  8683.  
  8684.  
  8685.  
  8686.  
  8687.  
  8688.  
  8689.  
  8690.  
  8691.  
  8692.  
  8693.  
  8694.  
  8695.  
  8696.  
  8697.  
  8698.  
  8699.  
  8700.      SET MEMORY                  SRI  VPI  VPIN                  SET MEMORY
  8701.  
  8702.      SR-Info/VP-Info Reference Manual           Page 367          SECTION 4
  8703.  
  8704.  
  8705.  
  8706.                                   SET NETWORK
  8707.  
  8708.      Specify the network.
  8709.  
  8710.      ╔════════════════════════════════════════════════════════════════════╗
  8711.      ║ SET NETWORK TO <num exp>                                           ║
  8712.      ║ SET NETWORK  ON/OFF                                                ║
  8713.      ║                                                                    ║
  8714.      ║ <num exp>   the network number                                     ║
  8715.      ╚════════════════════════════════════════════════════════════════════╝
  8716.  
  8717.           This command enables the user to LOCK and UNLOCK records on any
  8718.      network or multi-user system adhering to the standard conventions of
  8719.      Microsoft DOS 3.1 and above.
  8720.  
  8721.           The network calls are turned on with SET NETWORK TO 1 or SET
  8722.      NETWORK ON.
  8723.  
  8724.           The network calls are turned off with SET NETWORK TO 0 or SET
  8725.      NETWORK OFF.
  8726.  
  8727.           Caution:  Do not SET NETWORK ON when the SHARE command or your
  8728.      network's equivalent is in effect, or run with SET NETWORK OFF while
  8729.      SHARE is in effect.  If you want to run VP-Info Professional Network
  8730.      Edition in both modes, start from different directories depending on
  8731.      whether the network is loaded.  Put SET NETWORK ON in the VPIN.CNF
  8732.      file in one directory, and SET NETWORK OFF in the other.
  8733.  
  8734.           Examples:
  8735.  
  8736.      1>SET NETWORK TO 1
  8737.      1>SET NETWORK TO 0
  8738.      1>SET NETWORK ON
  8739.  
  8740.  
  8741.  
  8742.  
  8743.  
  8744.  
  8745.  
  8746.  
  8747.  
  8748.  
  8749.  
  8750.  
  8751.  
  8752.  
  8753.  
  8754.  
  8755.  
  8756.  
  8757.  
  8758.  
  8759.  
  8760.      SET                         SRI  VPI  VPIN                        SET
  8761.  
  8762.      SR-Info/VP-Info Reference Manual           Page 368          SECTION 4
  8763.  
  8764.  
  8765.  
  8766.                                   SET RELATION
  8767.  
  8768.      Set up a relation between the selected file and another indexed data
  8769.      file.
  8770.  
  8771.      ╔════════════════════════════════════════════════════════════════════╗
  8772.      ║ SET RELATION ON <str exp> TO <num const>                           ║
  8773.      ║ SET RELATION OFF                                                   ║
  8774.      ║                                                                    ║
  8775.      ║ <str exp>      the key of the relation                             ║
  8776.      ║ <num const>    the relation is set between the selected file       ║
  8777.      ║                     and file <num const>                           ║
  8778.      ╚════════════════════════════════════════════════════════════════════╝
  8779.  
  8780.           <str exp> is an expression made up of fields (of character type)
  8781.      of the selected file, string constants, and string variables.
  8782.  
  8783.           Any time the current record pointer is changed for the selected
  8784.      file, <str exp> is evaluated, and a FIND is made with the result in
  8785.      the file <num const>.
  8786.  
  8787.           A file can be related to a number of other files: 1 is related to
  8788.      2, 1 is related to 3, 1 is related to 4 (file 1 has 3 fields on which
  8789.      additional information is available in files 2, 3, and 4); 1 is
  8790.      related to 2, 1 is related to 3, and 3 is related to 4 (the
  8791.      information linking 1 and 3 has additional data on file 4).
  8792.  
  8793.           Relations can also be chained: 1 is related to 2, 2 is related to
  8794.      3, and 3 is related to 4.
  8795.  
  8796.           However, only one file can SET RELATION TO a given file: you
  8797.      cannot have both 1 related to 6 and 2 related to 6.
  8798.  
  8799.           It is the user's responsibility to make sure that there is no
  8800.      loop, such as 1 related to 2, 2 related to 3, and 3 related to 1.
  8801.  
  8802.           To disable a relation, SET RELATION OFF, close either the
  8803.      selected file or the target file, of close the indexes on the target
  8804.      file.
  8805.  
  8806.           Examples:
  8807.  
  8808.      1>USE order
  8809.      1>USE#3 customer
  8810.      1>INDEX#3 ON cust:no TO customer
  8811.            3 RECORDS IN TOTAL INDEXED
  8812.      1>SET RELATION ON cust:no TO 3
  8813.      1>LIST order:no,fname#3,name#3
  8814.            1  10001  Robert          Steen
  8815.  
  8816.  
  8817.  
  8818.  
  8819.  
  8820.      SET RELATION                SRI  VPI  VPIN                SET RELATION
  8821.  
  8822.      SR-Info/VP-Info Reference Manual           Page 369          SECTION 4
  8823.  
  8824.  
  8825.      NO FIND
  8826.            2  10002
  8827.            3  10003  Joe             Smiths
  8828.      NO FIND
  8829.            4  10004
  8830.            5  10005  Robert          Steen
  8831.      1>SET RELATION OFF
  8832.  
  8833.           Note: the first order has CUST:NO 0050; this was found in the
  8834.      customer file, and the customer name was listed.  The second order has
  8835.      CUST:NO 105; there is no such customer in the customer file, so a NO
  8836.      FIND message is sent (this can be turned off in programs only with SET
  8837.      TALK OFF), and only the ORDER:NO was listed.
  8838.  
  8839.  
  8840.  
  8841.  
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.  
  8848.  
  8849.  
  8850.  
  8851.  
  8852.  
  8853.  
  8854.  
  8855.  
  8856.  
  8857.  
  8858.  
  8859.  
  8860.  
  8861.  
  8862.  
  8863.  
  8864.  
  8865.  
  8866.  
  8867.  
  8868.  
  8869.  
  8870.  
  8871.  
  8872.  
  8873.  
  8874.  
  8875.  
  8876.  
  8877.  
  8878.  
  8879.  
  8880.      SET RELATION                SRI  VPI  VPIN                SET RELATION
  8881.  
  8882.      SR-Info/VP-Info Reference Manual           Page 370          SECTION 4
  8883.  
  8884.  
  8885.  
  8886.                                    SET WIDTH
  8887.  
  8888.      Specify text width for printer.
  8889.  
  8890.      ╔════════════════════════════════════════════════════════════════════╗
  8891.      ║ SET WIDTH TO <num exp>                                             ║
  8892.      ║                                                                    ║
  8893.      ║ <num exp>     page width                                           ║
  8894.      ╚════════════════════════════════════════════════════════════════════╝
  8895.  
  8896.           The command SET WIDTH sets the page width (number of characters
  8897.      per line) for the TEXT and REPORT commands.  The WIDTH is the width of
  8898.      the text from the left margin; the default is 80.  So if the commands:
  8899.  
  8900.      SET MARGIN TO 10
  8901.      SET WIDTH TO 50
  8902.  
  8903.      are given, TEXT will wrap the words at character position 60.
  8904.  
  8905.           When a matrix variable is displayed, it is wrapped by the value
  8906.      set by SET WIDTH.
  8907.  
  8908.           The only aspect of a report that is affected by SET WIDTH TO is
  8909.      the number of characters over which its heading is positioned. It has
  8910.      no effect on the report columns themselves.
  8911.  
  8912.           See the commands SET MARGIN, SET PRINT ON, SET FORMAT TO PRINT,
  8913.      and TEXT.
  8914.  
  8915.           Examples:
  8916.  
  8917.           1. Program segment:
  8918.  
  8919.      SET WIDTH TO 40
  8920.      TEXT
  8921.      This is a nice long sentence to illustrate SET WIDTH.
  8922.      ENDTEXT
  8923.  
  8924.           Prints:
  8925.  
  8926.      This is a nice long sentence to
  8927.      illustrate SET WIDTH.
  8928.  
  8929.           2. Program segment:
  8930.  
  8931.      SET WIDTH TO 80
  8932.      TEXT
  8933.      This is a nice long sentence to illustrate SET WIDTH.
  8934.      ENDTEXT
  8935.  
  8936.  
  8937.  
  8938.  
  8939.  
  8940.      SET WIDTH                   SRI  VPI  VPIN                   SET WIDTH
  8941.  
  8942.      SR-Info/VP-Info Reference Manual           Page 371          SECTION 4
  8943.  
  8944.  
  8945.  
  8946.           Prints:
  8947.  
  8948.      This is a nice long sentence to illustrate SET WIDTH.
  8949.  
  8950.           3. Matrix variables:
  8951.  
  8952. 1>DIM NUM num[20]
  8953. 1>? num
  8954.       0.00       0.00       0.00       0.00       0.00       0.00       0.00
  8955.       0.00       0.00       0.00       0.00       0.00       0.00       0.00
  8956.       0.00       0.00       0.00       0.00       0.00       0.00
  8957. 1>SET WIDTH TO 30
  8958. 1>? num
  8959.       0.00       0.00       0.00
  8960.       0.00       0.00       0.00
  8961.       0.00       0.00       0.00
  8962.       0.00       0.00       0.00
  8963.       0.00       0.00       0.00
  8964.       0.00       0.00       0.00
  8965.       0.00       0.00
  8966.  
  8967.  
  8968.  
  8969.  
  8970.  
  8971.  
  8972.  
  8973.  
  8974.  
  8975.  
  8976.  
  8977.  
  8978.  
  8979.  
  8980.  
  8981.  
  8982.  
  8983.  
  8984.  
  8985.  
  8986.  
  8987.  
  8988.  
  8989.  
  8990.  
  8991.  
  8992.  
  8993.  
  8994.  
  8995.  
  8996.  
  8997.  
  8998.  
  8999.  
  9000.      SET WIDTH                   SRI  VPI  VPIN                   SET WIDTH
  9001.  
  9002.      SR-Info/VP-Info Reference Manual           Page 372          SECTION 4
  9003.  
  9004.  
  9005.  
  9006.                                       SKIP
  9007.  
  9008.      Move ahead or back in data file.
  9009.  
  9010.      ╔════════════════════════════════════════════════════════════════════╗
  9011.      ║ SKIP [<num exp>]                                                   ║
  9012.      ╟────────────────────────────────────────────────────────────────────╢
  9013.      ║ Option:                                                            ║
  9014.      ║                                                                    ║
  9015.      ║ <num exp>   by this many records; may be positive (forward) or     ║
  9016.      ║               negative (backward); default 1 record forward        ║
  9017.      ╚════════════════════════════════════════════════════════════════════╝
  9018.  
  9019.           The command SKIP moves the current record pointer ahead or back
  9020.      in the selected data file.
  9021.  
  9022.           SKIP by itself advances the record pointer to the next record.
  9023.  
  9024.           If you SKIP ahead more records than there are records left in the
  9025.      data file, then the current record becomes the last record.  Skipping
  9026.      past the last record sets the function EOF true.
  9027.  
  9028.           If you SKIP too many records back, the current record pointer
  9029.      will be set to 0.
  9030.  
  9031.           If there is an index file, ahead and back is understood in the
  9032.      indexed order.
  9033.  
  9034.           Examples:
  9035.  
  9036.      1>USE employee
  9037.      1>? #
  9038.           1.00
  9039.      1>SKIP
  9040.      1>? #,EOF
  9041.           2.00 F
  9042.      1>SKIP 5
  9043.      1>? #,EOF
  9044.           6.00 T
  9045.      1>SKIP -2
  9046.      1>? #,EOF
  9047.           4.00 F
  9048.      1>SKIP -10,EOF
  9049.      1>? #
  9050.           0.00 F
  9051.  
  9052.  
  9053.  
  9054.  
  9055.  
  9056.  
  9057.  
  9058.  
  9059.  
  9060.      SKIP                        SRI  VPI  VPIN                        SKIP
  9061.  
  9062.      SR-Info/VP-Info Reference Manual           Page 373          SECTION 4
  9063.  
  9064.  
  9065.  
  9066.                                       SORT
  9067.  
  9068.      Sort the selected data file into another data file.
  9069.  
  9070.      ╔════════════════════════════════════════════════════════════════════╗
  9071.      ║ SORT ON <str exp> TO <file>                                        ║
  9072.      ║                                                                    ║
  9073.      ║ <str exp>     the key of the sort                                  ║
  9074.      ║ <file>        the data file to contain the result of the sort      ║
  9075.      ╚════════════════════════════════════════════════════════════════════╝
  9076.  
  9077.           This command sorts the selected data file to the data file
  9078.      specified.  The sort is done by evaluating the <str exp>, creating a
  9079.      temporary index, and copying the file to <file>.
  9080.  
  9081.           Example:
  9082.  
  9083.      1>USE employee
  9084.      1>SORT ON name+fname TO empl2
  9085.  
  9086.           This is equivalent to the following:
  9087.  
  9088.      1>USE employee
  9089.      1>INDEX ON name+fname TO temp
  9090.      1>COPY TO empl2
  9091.  
  9092.           However, the second version has the advantage of allowing a field
  9093.      list and FOR clause, and output as an SDF file, none of which is
  9094.      available in SORT.
  9095.  
  9096.           For example, suppose the intention is to create a small, sorted
  9097.      data file with only name and address information on single employees
  9098.      for use by the company social club for a mailing about an upcoming
  9099.      event.
  9100.  
  9101.           The correct way to accomplish this is:
  9102.  
  9103.      1>USE employee
  9104.      1>INDEX ON name+fname TO temp FOR .NOT. married
  9105.      1>COPY TO empl2 FIELDS fname,name,addr,city,state,zip,tel_no
  9106.  
  9107.           See COPY and INDEX.
  9108.  
  9109.  
  9110.  
  9111.  
  9112.  
  9113.  
  9114.  
  9115.  
  9116.  
  9117.  
  9118.  
  9119.  
  9120.      SORT                        SRI  VPI  VPIN                        SORT
  9121.  
  9122.      SR-Info/VP-Info Reference Manual           Page 374          SECTION 4
  9123.  
  9124.  
  9125.  
  9126.                                      SOUND
  9127.  
  9128.      Use the computer speaker to generate a sound effect.
  9129.  
  9130.      ╔════════════════════════════════════════════════════════════════════╗
  9131.      ║ SOUND <numeric exp>                                                ║
  9132.      ║                                 VP-Info Professional only          ║
  9133.      ║                                                                    ║
  9134.      ║ <numeric exp>  the number of the sound required                    ║
  9135.      ╚════════════════════════════════════════════════════════════════════╝
  9136.  
  9137.           When effects are enabled (i.e., the NOEFFECTS keyword is not in
  9138.      the VPI.SET file), SOUND activates the computer speaker with one of a
  9139.      library of sounds effects.
  9140.  
  9141.           At publication time, there are 13 preprogrammed sound effects,
  9142.      numbered 1 through 13.  SOUND 0 terminates any sound. Values outside
  9143.      the range 0 through 13 are ignored.
  9144.  
  9145.           As naming the effects is not meaningful, VP-Info Professional
  9146.      users are urged to run the program example below and try all of them.
  9147.  
  9148.           Note that effect 2 continues until another sound is activated or
  9149.      SOUND 0 is executed; all other effects have defined duration.
  9150.  
  9151.           The command RING actually executes SOUND 7.
  9152.  
  9153.           Examples:
  9154.  
  9155.      1>SOUND 3
  9156.  
  9157.           A program to demonstrate all 13 effects:
  9158.  
  9159.      CLS
  9160.      REPEAT 13 TIMES VARYING effect
  9161.         @ 10,35 SAY 'Effect'+STR(effect,3)
  9162.         SOUND effect
  9163.         DELAY 1               ;timed pause
  9164.         SOUND 0               ;terminate sound if not self-terminating
  9165.      ENDREPEAT
  9166.  
  9167.  
  9168.  
  9169.  
  9170.  
  9171.  
  9172.  
  9173.  
  9174.  
  9175.  
  9176.  
  9177.  
  9178.  
  9179.  
  9180.      SOUND                          VPI  VPIN                         SOUND
  9181.  
  9182.      SR-Info/VP-Info Reference Manual           Page 375          SECTION 4
  9183.  
  9184.  
  9185.  
  9186.                                      SPOOL
  9187.  
  9188.      Redirect printer output to disk file, or send disk file to printer.
  9189.  
  9190.      ╔════════════════════════════════════════════════════════════════════╗
  9191.      ║ Four forms:                                                        ║
  9192.      ║ 1.  SPOOL <filename>                                               ║
  9193.      ║ 2.  SPOOL                                                          ║
  9194.      ║ 3.  SPOOL <filename> TO <device> [PAGE <num exp>]                  ║
  9195.      ║ 4.  SPOOL/T                                                        ║
  9196.      ║                                                                    ║
  9197.      ╟────────────────────────────────────────────────────────────────────╢
  9198.      ║ Options:                                                           ║
  9199.      ║                                                                    ║
  9200.      ║ Form 1:      Create file <filename> and direct print output to     ║
  9201.      ║                that file; default extension TXT                    ║
  9202.      ║ Form 2:      Close any open spool file and stop redirection        ║
  9203.      ║ Form 3:      Do background printing of <filename> on <device>,     ║
  9204.      ║                usually PRN but can be any DOS device               ║
  9205.      ║     PAGE <num exp>  start printing on page <num exp>               ║
  9206.      ║ Form 4:      Stop background printint started with Firm 3          ║
  9207.      ╚════════════════════════════════════════════════════════════════════╝
  9208.  
  9209.           This command allows printer output to be captured into a disk
  9210.      file, and optionally spooled out to disk while other processing
  9211.      continues.  This command has four forms as follows:
  9212.  
  9213.                1.   Used with a filename, it creates a new spool file with
  9214.                     the name of filename (default extension TXT).
  9215.  
  9216.                2.   Used without a filename, SPOOL closes any open spool
  9217.                     file and restores printer as standard print device..
  9218.  
  9219.                3.   Used with both filename and device name, <filename> is
  9220.                     spooled to the specified DOS device, such as PRN, LPT1,
  9221.                     etc.  If PAGE option is used with a page number (can be
  9222.                     an expression) prinnting starts with the top of that
  9223.                     page number.
  9224.  
  9225.                4.   Used with a slash-T (/T), spooling is terminated. This
  9226.                     is same symbol as used with the DOS PRINT command for
  9227.                     the same purpose.
  9228.  
  9229.           If SPOOL is used to create a file, and a file already exists with
  9230.      that name, the user in Conversational SR-Info/VP-Info is required to
  9231.      confirm that the file should be overwritten; in programs, the existing
  9232.      file is overwritten without prompting.
  9233.  
  9234.           Examples:
  9235.  
  9236.  
  9237.  
  9238.  
  9239.  
  9240.      SPOOL                       SRI  VPI  VPIN                       SPOOL
  9241.  
  9242.      SR-Info/VP-Info Reference Manual           Page 376          SECTION 4
  9243.  
  9244.  
  9245.  
  9246.      1>SPOOL reports
  9247.      1>REPORT custlist
  9248.      1>SPOOL
  9249.      1>SPOOL reports TO prn
  9250.  
  9251.  
  9252.  
  9253.  
  9254.  
  9255.  
  9256.  
  9257.  
  9258.  
  9259.  
  9260.  
  9261.  
  9262.  
  9263.  
  9264.  
  9265.  
  9266.  
  9267.  
  9268.  
  9269.  
  9270.  
  9271.  
  9272.  
  9273.  
  9274.  
  9275.  
  9276.  
  9277.  
  9278.  
  9279.  
  9280.  
  9281.  
  9282.  
  9283.  
  9284.  
  9285.  
  9286.  
  9287.  
  9288.  
  9289.  
  9290.  
  9291.  
  9292.  
  9293.  
  9294.  
  9295.  
  9296.  
  9297.  
  9298.  
  9299.  
  9300.      SPOOL                       SRI  VPI  VPIN                       SPOOL
  9301.  
  9302.      SR-Info/VP-Info Reference Manual           Page 377          SECTION 4
  9303.  
  9304.  
  9305.  
  9306.                                      STATUS
  9307.  
  9308.      Display status information.
  9309.  
  9310.      ╔════════════════════════════════════════════════════════════════════╗
  9311.      ║ STATUS                                                             ║
  9312.      ╚════════════════════════════════════════════════════════════════════╝
  9313.  
  9314.           If used in the interactive mode, this command displays two
  9315.      screens of information on the status of SR-Info/VP-Info.
  9316.  
  9317.           The first page lists the data files in use, the current record
  9318.      numbers, which file number is selected (marked by an asterisk), the
  9319.      expressions on which the index files had been indexed (the index file
  9320.      names are not shown).  In the example below, the lines:
  9321.  
  9322.      Rec #               File name       Indexed by
  9323.      0000008 *File 1 ... SALES.DBF       SALESMAN+PART , PART , DATE
  9324.  
  9325.      tell you that SALES.DBF is file 1; the asterisk shows that file 1 is
  9326.      selected; the current record number is 8; there are three index files,
  9327.      indexed by the expressions: SALESMAN+PART, PART, DATE.
  9328.  
  9329.           Next, you find the setting of all the flags; ON is show as Y, OFF
  9330.      as N.
  9331.  
  9332.           The "Total space left" message gives the number of bytes left in
  9333.      the 64K data space (see Appendix A).
  9334.  
  9335.           SR-Info can use 20 files altogether, of which only 16 are
  9336.      actually available to the user.  VP-Info users with DOS 3.3 and above
  9337.      can have up to 50 files open at one time, provided FILES= commands are
  9338.      in both the CNF file and the CONFIG.SYS file in the root directory of
  9339.      the boot drive, and both call for at least that number of files.
  9340.      "Files in use" shows how many are being used; you can infer how many
  9341.      are still available (16-4=12 in the standard setting, 46-4=42 if
  9342.      FILES=50).
  9343.  
  9344.           "High memory remaining" is the number of bytes available for use
  9345.      by matrix variables and background-screen storage.
  9346.  
  9347.           "Width" and "Left margin" show the most recent setting by SET
  9348.      WIDTH and SET MARGIN, respectively, or the default.
  9349.  
  9350.           In the example shown below, the top line shows NETWORK ON; when
  9351.      not on, or when not using VP-Info Professional Network Edition, this
  9352.      message is omitted.  When SET NETWORK ON and data files are opened
  9353.      with file modes (READ, WRITE, LOCK, or SHARE), the first letter of the
  9354.      mode is shown immediately before the index expressions.
  9355.  
  9356.  
  9357.  
  9358.  
  9359.  
  9360.      STATUS                      SRI  VPI  VPIN                      STATUS
  9361.  
  9362.      SR-Info/VP-Info Reference Manual           Page 378          SECTION 4
  9363.  
  9364.  
  9365.  
  9366.           The second page of the STATUS display is the same as the listing
  9367.      produced by the command LIST MEMORY.
  9368.  
  9369.           If STATUS is a command in a program, the execution of the program
  9370.      stops, the user can view the two screens, and then program execution
  9371.      resumes.  In this use of STATUS, the first page also shows the name of
  9372.      the current program.
  9373.  
  9374.           Example:
  9375.  
  9376.           Give the commands:
  9377.  
  9378.  
  9379.      1>number=21
  9380.      1>name='David'
  9381.      1>USE sales INDEX sales,part,date
  9382.      1>STATUS
  9383.  
  9384.           The display:
  9385.  
  9386. ──────────────────────────────────────────────────────────────────────────────
  9387. Thursday, March 22, 1990            VP-Info STATUS                 NETWORK ON
  9388.  
  9389. Rec #               File name       Indexed by
  9390. 0000001 *File 1 ... SALES.DBF       W SALENUM , PARTNUM , DATE
  9391. 0000000  File 2 ...
  9392. 0000000  File 3 ...
  9393. 0000000  File 4 ...
  9394. 0000000  File 5 ...
  9395. 0000000  File 6 ...
  9396. 0000000  File 7 ...
  9397. 0000000  File 8 ...
  9398. 0000000  File 9 ...
  9399. 0000000  File 10 ...
  9400. ┌────────────┬────────────┬────────────┬────────────┬────────────┬────────────┐
  9401. │ Add...... N│ Delete... N│ End...... Y│ Heading.. N│ Print.... N│ Step..... N│
  9402. │ Alternate N│ Delim.... N│ Error.... Y│ Intensity Y│ Prompt... N│ Talk..... Y│
  9403. │ Bell..... N│ Display.. Y│ Escape... Y│ Keep..... Y│ Raw...... N│ Text..... N│
  9404. │ Carry.... N│ Divzero.. Y│ Exact.... N│ Line..... Y│ Save..... Y│ Trim..... Y│
  9405. │ Confirm.. N│ Do....... Y│ Execute.. Y│ Lock..... N│ Screen... Y│ Upper.... N│
  9406. │ Console.. Y│ Echo..... N│ Function. Y│ Menu..... Y│ Snow..... Y│ Zero..... Y│
  9407. │ Debug.... N│ Eject.... Y│ Get...... N│ Mono..... Y│            │            │
  9408. └────────────┴────────────┴────────────┴────────────┴────────────┴────────────┘
  9409. Program .............. GENERAL.PRG      Files in use ......... 1
  9410. Memory remaining ..... 23490            High memory remaining. 39744
  9411. Width................. 80               Left margin .......... 0
  9412. ──────────────────────────────────────────────────────────────────────────────
  9413.  
  9414.  
  9415.  
  9416.  
  9417.  
  9418.  
  9419.  
  9420.      STATUS                      SRI  VPI  VPIN                      STATUS
  9421.  
  9422.      SR-Info/VP-Info Reference Manual           Page 379          SECTION 4
  9423.  
  9424.  
  9425.  
  9426.                                      STORE
  9427.  
  9428.      Assign value to a memory variable.
  9429.  
  9430.      ╔════════════════════════════════════════════════════════════════════╗
  9431.      ║ STORE <exp> TO <memvar>                                            ║
  9432.      ║                                                                    ║
  9433.      ║ <exp>      the value assigned                                      ║
  9434.      ║ <memvar>   name of memory variable                                 ║
  9435.      ╚════════════════════════════════════════════════════════════════════╝
  9436.  
  9437.           This command assigns a value to a memory variable; if the
  9438.      variable does not exist, it will be created.  An equivalent way of
  9439.      assigning value is with the = command.
  9440.  
  9441.           See the command =.
  9442.  
  9443.           Examples:
  9444.  
  9445.      1>STORE 3 TO b
  9446.      1>STORE 5*b TO c
  9447.      1>? c
  9448.          15.00
  9449.  
  9450.  
  9451.  
  9452.  
  9453.  
  9454.  
  9455.  
  9456.  
  9457.  
  9458.  
  9459.  
  9460.  
  9461.  
  9462.  
  9463.  
  9464.  
  9465.  
  9466.  
  9467.  
  9468.  
  9469.  
  9470.  
  9471.  
  9472.  
  9473.  
  9474.  
  9475.  
  9476.  
  9477.  
  9478.  
  9479.  
  9480.      STORE                       SRI  VPI  VPIN                       STORE
  9481.  
  9482.      SR-Info/VP-Info Reference Manual           Page 380          SECTION 4
  9483.  
  9484.  
  9485.  
  9486.                                       SUM
  9487.  
  9488.      Sum numeric expressions for selected records.
  9489.  
  9490.      ╔════════════════════════════════════════════════════════════════════╗
  9491.      ║ SUM [<scope>] <num exp list> [TO <memvar list>] [FOR <cond>]       ║
  9492.      ║                                                                    ║
  9493.      ║ <num exp list>    the numeric expressions to sum                   ║
  9494.      ╟────────────────────────────────────────────────────────────────────╢
  9495.      ║ Options:                                                           ║
  9496.      ║                                                                    ║
  9497.      ║ <scope>           select by scope (default scope: ALL)             ║
  9498.      ║ <memvar list>     store the results in these memory variables      ║
  9499.      ║ FOR <cond>        select by condition                              ║
  9500.      ╚════════════════════════════════════════════════════════════════════╝
  9501.  
  9502.           The command SUM adds up numeric expressions for selected records
  9503.      of the selected data file.  Up to 10 expressions can be summed with
  9504.      one command.  Optionally, the results can be stored in numeric memory
  9505.      variables; the expression list and the numeric memory variable list
  9506.      must have the same number of entries.  <memvar list> cannot contain
  9507.      numeric matrix variables.
  9508.  
  9509.           Records flagged as DELETED are not summed.  See also AVERAGE,
  9510.      COUNT, MIN, and MAX.
  9511.  
  9512.           Example:
  9513.  
  9514.           The total payroll of the company presently, and after a 5% raise:
  9515.  
  9516.      1>USE employee
  9517.      1>SUM salary, salary*1.05
  9518.            6 SUM(S)
  9519.      191980 201579
  9520.      1>SET TALK OFF
  9521.      1>SUM salary,salary*0.05 TO sal,salincr
  9522.      1>? sal,salincr
  9523.      191980 201579
  9524.  
  9525.  
  9526.  
  9527.  
  9528.  
  9529.  
  9530.  
  9531.  
  9532.  
  9533.  
  9534.  
  9535.  
  9536.  
  9537.  
  9538.  
  9539.  
  9540.      SUM                         SRI  VPI  VPIN                         SUM
  9541.  
  9542.