home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / rbnotes2.zip / EDTORIAL.15 < prev   
Text File  |  1986-09-09  |  81KB  |  2,345 lines

  1.  
  2.  
  3.  
  4.  
  5. MICRORIM TECHNICAL NOTE
  6. ________________________________________________________
  7.  
  8. SEARCHING FOR EMBEDDED BLANKS IN TEXT STRINGS
  9.  
  10. DATE      :  07/86                   NUMBER       :  EX-7-1
  11. PRODUCTS  :  R:BASE 5000             VERSIONS     :  1.01
  12.           :  R:BASE SYSTEM V                      :  1.0
  13. CATEGORY  :  INQUIRY                 SUBCATEGORY  :  BLANKS/WILDCARDS
  14.  
  15. ________________________________________________________
  16.  
  17. DESCRIPTION:   How can I use wildcards to search for an embedded
  18. blank, other character, or a specific format of characters stored in a
  19. TEXT or NOTE data type column?
  20.  
  21.  
  22.  
  23.  
  24. EXPLANATION:   You can use asterisk and question mark wildcards in any
  25. WHERE clause in both R:BASE System V and R:BASE 5000.  The asterisk
  26. will replace one or more characters and the question mark will replace
  27. one character.
  28.  
  29. In R:BASE System V, you can also use wildcards in rules.  For example,
  30. you can use rules to ensure that a number with a specific format is
  31. entered correctly.  The rule:
  32.  
  33. "Wrong format, try again" CUSTNUM EQ "??-????"
  34.  
  35. will ensure that:
  36.  
  37.   ■  CUSTNUM column must always have an entry
  38.   ■  Entry into the CUSTNUM column must always be exactly seven
  39.   characters long
  40.   ■  There must be a dash in position three
  41.  
  42. If, using the above example, you wanted the system to insert the dash
  43. automatically, you could do it easily with an R:BASE System V form.
  44. First, set up two fields (V1 and V2) on the form with a dash between
  45. them like this:
  46.  
  47. Enter the customer number:   SE-S  E
  48.  
  49. The first SE combination is the location of the TEXT variable V1 and
  50. the second SE is the location of the TEXT variable V2.  Now, during
  51. data entry, the operator's cursor will jump over the dash while
  52. entering the customer number.
  53. Finally, set up the following expression to concatenate the two
  54. variables, insert the dash, and store the result in the TEXT column
  55. CUSTNUM:
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. CUSTNUM = ((CTXT(.V1))+"-"+(CTXT(.V2)))
  69.  
  70.  
  71.  
  72.  
  73. SOLUTION:   Put the embedded blanks between two asterisks and enclose
  74. the whole thing in quotation marks in the appropriate WHERE clause.
  75. The asterisks serve as wildcards and the quotes tell R:BASE to
  76. consider whatever is found between the quotes to be one value.  For
  77. example, to search for one embedded blank in a customer name stored in
  78. a column named CUSTOMER, put one space between the asterisks in the
  79. following SELECT command line:
  80.  
  81. SELECT ALL FROM COMPANY WHERE CUSTOMER = "* *"
  82.  
  83. To search for two blanks, put two spaces between the asterisks:
  84.  
  85. SELECT ALL FROM COMPANY WHERE CUSTOMER = "*  *"
  86.  
  87. This tip works equally well on columns defined as NOTE data types in
  88. R:BASE System V.
  89.  
  90. If you wanted to search for a blank (or any other character) in a
  91. specific position of a text string, you would use the question mark.
  92. For example,
  93.  
  94. SELECT ALL FROM COMPANY WHERE CODENUM = "?? *"
  95.  
  96. will look for a blank in the third position of the CODENUM column.
  97. Checking specific positions in the line can be helpful in:
  98.  
  99.   ■  Verifying that the data has been entered correctly
  100.   ■  Counting the occurrences of certain values in certain positions
  101.   in the string
  102.   ■  Working with codes where every position in the code has a
  103.   specific meaning
  104.  
  105. In R:BASE System V, on TEXT (but not NOTE) data type columns, you can
  106. use the SLOC function to locate the exact position of a character.
  107. If, however, you are looking for a blank, set a variable to a blank
  108. first, and then use the variable in the function.  This is necessary
  109. because the SLOC function does not recognize a blank between two
  110. quotes.  For example, the following will locate the position of the
  111. first blank in the NAME column and then change the value of the
  112. 1STBLANK column to that position number:
  113.  
  114. SET VAR VBLANK TO " "
  115. CHANGE 1STBLANK TO (SLOC('NAME',.VBLANK)) IN tblname WHERE NAME EXISTS
  116.  
  117.  
  118.  
  119.  
  120. MICRORIM TECHNICAL NOTE
  121. ________________________________________________________
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134. CUSTOM PAGE NUMBERING
  135.  
  136. DATE      :  07/86                   NUMBER       :  EX-7-2
  137. PRODUCT   :  R:BASE SYSTEM V         VERSION      :  1.0
  138. CATEGORY  :  REPORTS                 SUBCATEGORY  :  CUSTOM PAGE
  139. NUMBERS
  140.  
  141. ________________________________________________________
  142.  
  143. DESCRIPTION:   I need to do custom page numbering on my report.
  144. Specifically, sometimes I need to start numbering the pages of my
  145. report at a number other than one.  For example, I might be printing a
  146. whole series of reports in a WHILE loop and I want the final output to
  147. look like one long report.
  148.  
  149. At other times, I need to reset the page numbering within a long
  150. report so that I can break the report apart and give a separate report
  151. to each customer or department.  This is necessary when I am printing,
  152. for example, multiple page bills for customers or doing departmental
  153. reports.  I want to number the pages starting with one for each new
  154. customer or new department.
  155.  
  156.  
  157.  
  158.  
  159. EXPLANATION:   By using the #PAGE system variable in R:BASE 5000 and
  160. R:BASE System V, each report printed will always begin with page
  161. number one and sequentially number each subsequent page.  However,
  162. because R:BASE System V uses global variables and has logical
  163. functions, you can modify your R:BASE System V report to begin page
  164. numbering at any number you choose.
  165.  
  166. Also, using R:BASE System V, you can apply this same method to
  167. resetting page numbers when a break occurs.
  168.  
  169.  
  170.  
  171.  
  172. SOLUTION:  Using this four-step solution you can create custom page
  173. numbers that will begin with any number you choose or will begin
  174. renumbering each time your break column changes.
  175.  
  176. STEP ONE
  177.  
  178. In this method, a global variable VPAGE is used to number the pages
  179. rather than the #PAGE system variable.
  180.  
  181. Define the following two variables in the expression mode of reports
  182. by choosing Expression from the Reports Definition Menu:
  183.  
  184. |------------------------Reports Definition Menu------------------------------|
  185. |  Edit  Expression  Configure  Draw                                          |
  186. |-----------------------------------------------------------------------------|
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199. and then choosing Define from the Expression Menu:
  200.  
  201. |----------------------------Expression Menu----------------------------------|
  202. |  Define  Delete  Retype  Reorder                                            |
  203. |-----------------------------------------------------------------------------|
  204.  
  205.  
  206. Enter the following two expressions by first entering the variable
  207. name and type at the Enter expression: prompt and then entering the
  208. actual expression at the next Enter expression prompt:
  209.  
  210.   1: INTEGER :  VP1      =  (.VP1 + 1)
  211.   2: INTEGER :  VPAGE    =  (IFEQ(.VP1,1,(.VPAGE + 1),.VPAGE))
  212.  
  213. The second expression is telling R:BASE to increment the VPAGE
  214. variable by one if this is a new page.  VP1 will only be equal to one
  215. if there has just been a page break.
  216.  
  217. STEP TWO
  218.  
  219. Escape back to the Reports Definition Menu and choose the Configure
  220. option.  You will get the configuration menu like that shown below.
  221. Toggle the YES in the Page row and Variable Reset column so that the
  222. menu looks like the following:
  223.  
  224.     Lines Per Page .................:   60
  225.     Remove Initial Carriage Return..:   [NO ]
  226.     Manual Break Reset .............:   [NO ]
  227.     Page Footer Line Number.........:     0
  228.  
  229.                  BREAKPOINTS                FORM FEEDS
  230.               Break    Variable       Header         Footer
  231.               Column   Reset       Before After   Before After
  232.               -------- ------      ------ ------  ------ ------
  233.      Report                        [NO ]  [NO ]   [NO ]  [NO ]
  234.      Page              [YES]
  235.      Break1   [None]   [NO ]       [NO ]
  236.      Break2   [None]   [NO ]       [NO ]
  237.      Break3   [None]   [NO ]       [NO ]
  238.      Break4   [None]   [NO ]       [NO ]
  239.      Break5   [None]   [NO ]       [NO ]
  240.      Break6   [None]   [NO ]       [NO ]
  241.      Break7   [None]   [NO ]       [NO ]
  242.      Break8   [None]   [NO ]       [NO ]
  243.      Break9   [None]   [NO ]       [NO ]
  244.      Break10  [None]   [NO ]       [NO ]
  245.  
  246. Now you will be presented with the list of variable choices to add to
  247. the reset list, pick VP1 to cause the VP1 variable to be reset to zero
  248. every time there is a page break.
  249.  
  250. Now, at the top of every page, VP1 will be reset to zero and it will
  251. immediately be changed to one (1) when the first expression is
  252. executed.  The second expression will cause VPAGE to be incremented by
  253. one (1) only if VP1 is equal to one (1), meaning that there has just
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265. been a page break.
  266.  
  267. STEP THREE
  268.  
  269. Escape back to the Reports Definition Menu and choose the Edit option.
  270. Using the [F6] key, locate the VPAGE variable on your report wherever
  271. you want the page number to print.
  272.  
  273. STEP FOUR
  274.  
  275. Now you can start your page numbering at any number you want by
  276. setting the variable VPAGE to that number at the R> prompt before you
  277. begin printing the report.  Unless VPAGE is cleared with the CLEAR
  278. command, VPAGE will continue to increment each time the report is
  279. printed in a WHILE loop.  Take care, however, that you do reset any
  280. variables being used in the report to total.
  281.  
  282. ALTERNATE METHOD
  283.  
  284. If you want to break on the customer identification number and begin
  285. to number each page for a particular customer, go through the same
  286. four step process but modify the second step to add the break column
  287. (CUSTID, DEPTNUM, or whatever).  Add the VP1 variable to the reset
  288. list for that break, and indicate that you do want a page break before
  289. each break heading.
  290.  
  291.  
  292.     Lines Per Page .................:   60
  293.     Remove Initial Carriage Return..:   [NO ]
  294.     Manual Break Reset .............:   [NO ]
  295.     Page Footer Line Number.........:     0
  296.  
  297.                  BREAKPOINTS                FORM FEEDS
  298.               Break    Variable       Header         Footer
  299.               Column   Reset       Before After   Before After
  300.               -------- ------      ------ ------  ------ ------
  301.      Report                        [NO ]  [NO ]   [NO ]  [NO ]
  302.      Page              [YES]
  303.      Break1   [CUSTID] [YES]       [YES]
  304.      Break2   [None]   [NO ]       [NO ]
  305.      Break3   [None]   [NO ]       [NO ]
  306.      Break4   [None]   [NO ]       [NO ]
  307.      Break5   [None]   [NO ]       [NO ]
  308.      Break6   [None]   [NO ]       [NO ]
  309.      Break7   [None]   [NO ]       [NO ]
  310.      Break8   [None]   [NO ]       [NO ]
  311.      Break9   [None]   [NO ]       [NO ]
  312.      Break10  [None]   [NO ]       [NO ]
  313.  
  314.  
  315.  
  316. MICRORIM TECHNICAL NOTE
  317. ________________________________________________________
  318.  
  319. MAKING A REPORT WITH REPORTS EXPRESS
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332. DATE      :  07/86                   NUMBER       :  EX-7-3
  333. PRODUCT   :  R:BASE System V         VERSIONS     :  1.0
  334. CATEGORY  :  REPORTS                 SUBCATEGORY  :  HOW TO DEVELOP
  335.  
  336. ________________________________________________________
  337.  
  338. DESCRIPTION:   What is the procedure to follow when creating a report
  339. with R:BASE System V Reports EXPRESS?
  340.  
  341.  
  342.  
  343.  
  344. EXPLANATION:   Making a report with R:BASE System V Reports EXPRESS is
  345. basically a six-step process as outlined in the solution below.
  346.  
  347. Some of the steps are optional.  For example, if your report does not
  348. have breakpoints, skip step two.
  349.  
  350. It is not required that you follow the steps outlined below.  Other
  351. ways may work as well as the one we present here.
  352.  
  353.  
  354.  
  355.  
  356. SOLUTION:   Here is the six step report development method:
  357.  
  358. STEP ONE:  DECISIONS
  359.  
  360.   ■  Make a rough sketch of the way you want the report to look.
  361.  
  362.   ■  Where will you get the information for the report?  List the
  363.   columns and their associated tables in their places on your report
  364.   sketch.  List the variables you will need and any expressions.
  365.   Choose the table or view that will be the base table.  If your
  366.   report will be using more than one table or view, make sure that the
  367.   base table or view is on the many side of a one-to-many
  368.   relationship.
  369.  
  370.   ■  All the other tables in your list, other than the base table,
  371.   will be lookup tables for this report.  Lookup tables contain
  372.   information that you want to look up and must be on the one side of
  373.   a one-to-many relationship.  For example, you might want to look up
  374.   a name and address for a particular customer number, or you might
  375.   want to look up a part description based on a part number.
  376.  
  377.   ■  Are any of the lookup tables "many" tables?  In other words will
  378.   you want to look up more than one row?  A yes answer here means that
  379.   you will need to create a VIEW and use the VIEW as the base table
  380.   for the report.
  381.  
  382.   ■  Decide how you will get the values for your report.  Will the
  383.   values come from the columns in the tables?  Which columns?  Will
  384.   you need to calculate or concatenate by using expressions?  What
  385.   expressions are needed?
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.   ■  Are you going to do subtotals?  Do you need subheadings or
  399.   subfootings?  Do you want to group information based on a column
  400.   value?  If the answer to any of these questions is yes, then you
  401.   will need to set up breakpoints.  Breakpoints allow you, for
  402.   example, to print all the information grouped or totalled by
  403.   customer, by department, or by account number.  If you will be using
  404.   breakpoints, list the break columns.
  405.  
  406.   ■  Enter Reports EXPRESS, choose the database, choose the base
  407.   table, and then you will be presented with the Reports Definition
  408.   Menu:
  409.  
  410. |------------------------Reports Definition Menu------------------------------|
  411. |  Edit  Expression  Configure  Draw                                          |
  412. |-----------------------------------------------------------------------------|
  413.  
  414. STEP TWO:  SET UP BREAK COLUMNS
  415.  
  416. If you have no breakpoints in your report, skip this step.  If you
  417. have subtotals or groupings that require subheadings or subfootings,
  418. enter the break columns in this step.
  419.  
  420. Choose Configure and you will be presented with the following
  421. configuration table:
  422.  
  423.     Lines Per Page .................:   60
  424.     Remove Initial Carriage Return..:   [NO ]
  425.     Manual Break Reset .............:   [NO ]
  426.     Page Footer Line Number.........:     0
  427.  
  428.                  BREAKPOINTS                FORM FEEDS
  429.               Break    Variable       Header         Footer
  430.               Column   Reset       Before After   Before After
  431.               -------- ------      ------ ------  ------ ------
  432.      Report                        [NO ]  [NO ]   [NO ]  [NO ]
  433.      Page              [NO ]
  434.      Break1   [None]   [NO ]       [NO ]
  435.      Break2   [None]   [NO ]       [NO ]
  436.      Break3   [None]   [NO ]       [NO ]
  437.      Break4   [None]   [NO ]       [NO ]
  438.      Break5   [None]   [NO ]       [NO ]
  439.      Break6   [None]   [NO ]       [NO ]
  440.      Break7   [None]   [NO ]       [NO ]
  441.      Break8   [None]   [NO ]       [NO ]
  442.      Break9   [None]   [NO ]       [NO ]
  443.      Break10  [None]   [NO ]       [NO ]
  444.  
  445. Enter the break columns in the Break Column area under the BREAKPOINTS
  446. heading.  Leave the Variable Resets at NO for now.  When you are
  447. finished, press the [ESC] key to get back to the Reports Definition
  448. Menu.
  449.  
  450. STEP THREE:  DEFINE VARIABLES, EXPRESSIONS, AND LOOKUPS
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463. You will need to set up expressions to:
  464.  
  465.   ■  Look up information in other tables
  466.   ■  Make totals, subtotals, or grandtotals
  467.   ■  Use expressions or functions in your report
  468.   ■  Use global variables
  469.  
  470. Choose Expression from the Reports Definition Menu.  You will be
  471. prompted to enter the expression.  See chapter six of the User's
  472. Manual for instructions on setting up lookups, variables, and other
  473. expressions.  Remember that all item names appearing to the left of
  474. the equal sign in the expression list are actually global variables.
  475. When defining them for the first time, you can assign a data type to
  476. them by entering the following prior to entering the actual
  477. expression:
  478.  
  479. varname datatype
  480.  
  481. For example, to pretype a variable VTOT to CURRENCY data type, you
  482. would enter the following:
  483.  
  484. VTOT CURRENCY
  485.  
  486. Now you can enter the actual expression for VTOT.  After entering all
  487. the expressions for the report, you are ready to actually key in the
  488. report, locate all the columns and variables, and create the report
  489. sections.  Press [ESC] to get back to the Reports Definition Menu.
  490.  
  491. STEP FOUR:  ENTER TEXT, CREATE SECTIONS, & LOCATE VARIABLES/COLUMNS
  492.  
  493. Choose Edit from the Reports Definition Menu.  You will be presented
  494. with a blank screen with RH highlighted near the upper left corner and
  495. the word EXPAND on the bottom line.  Now you can set up the report
  496. sections, enter the actual text information, and locate all the
  497. variables and columns.
  498.  
  499. The word EXPAND at the bottom of the screen means EXPAND mode is on.
  500. You can set up your sections with EXPAND mode on and then toggle it
  501. off, by pressing the [F9] key, when you want to enter text or locate a
  502. column/variable.
  503.  
  504. At this point, decide on the sections you will have in your report.
  505. There are seven different section types to choose from:  report header
  506. (RH); page header (PH); break header (H1...H0); detail (D); break
  507. footer (F1...F0); page footer (PF); report footer (RF).  If you had
  508. ten breaks defined, it would be possible to have as many as 25 secions
  509. in one report.  You do not have to have all sections in your report.
  510. In fact, a one section report will print if that one section is a
  511. detail, break header, or break footer section.  Note that in order for
  512. a report to print, it must have a detail, break header, or break
  513. footer section.
  514.  
  515. You can move from section to section with expand mode on by pressing
  516. the [F8] key to go forward and the [F7] key to move back.  If, for
  517. example, you do not want a report header, press the [F8] key as your
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529. first action in this step, and you will see the RH change to a PH.
  530. Now if you do not want a page header, press the [F8] key again to get
  531. to the next section and so on.
  532.  
  533. When you are in the right section, press the [ENTER] key to mark as
  534. many lines of that section type as you want.  When you have marked
  535. enough lines, press [F9] to turn expand off.  Now, enter the text you
  536. want to print in that section and locate columns and variables by
  537. pressing the [F6] key.  After pressing the [F6] key, you will be
  538. presented with the following prompt:
  539.  
  540. Column or variable name:
  541.  
  542. You can type in the name or pick it from a list.  If you want to pick
  543. the column or variable from a list, press the [ENTER] key when
  544. prompted and you will see the following menu:
  545.  
  546.  
  547. |------------------------------Locate Menu------------------------------------|
  548. |  Variables  Columns                                                         |
  549. |-----------------------------------------------------------------------------|
  550.  
  551. Now you can choose Variables to get a pick list of all the defined
  552. variables, or you can press Columns to get a pick list of all the
  553. defined columns.   The pick list that comes up is only one line long
  554. but you can get to another line of variables or columns with the down
  555. arrow key or by tabbing over to the last entry in the line with the
  556. [TAB] key.  This makes locating easy.
  557.  
  558. After entering all the text and locating all the variables and columns
  559. for that section, press the [F9] key to toggle EXPAND back on.  Press
  560. [F8] to go to the next section.  Continue the process until you have
  561. set up all your sections.
  562.  
  563. When you finish, press [ESC] to return to the Reports Definition Menu.
  564.  
  565. STEP FIVE:  CONFIGURE RESET VARIABLES AND LINES PER PAGE
  566.  
  567. Complete this step if you want to change the default number of lines
  568. per page from 60 or if you need to have any variables reset during
  569. report processing.
  570.  
  571. If you are doing subtotaling you will definitely need to reset your
  572. subtotaling variables for each new customer, department, or whatever
  573. your grouping is.  To add variables to the reset lists, choose the
  574. Configure option and you will get the configure chart.  Go to the
  575. appropriate position under the Variable Reset column on the chart.
  576. Press [Y] to add to the list.  You will be able to pick the variables
  577. to add to the list.
  578.  
  579. STEP SIX:  TEST, FIX, AND TEST AGAIN
  580.  
  581. Print the report and make sure you are getting what you want.  Few
  582. people have everything exactly right the first time.  You will want to
  583. see how the report looks and then go back into Reports EXPRESS to make
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595. any modifications that you find necessary.
  596.  
  597. For example, you might want to change the section markings on your
  598. report.  To do this:
  599.  
  600.   ■  Move the cursor next to the start of the section you want to
  601.   change.
  602.   ■  Toggle EXPAND on by pressing the [F9] key.
  603.   ■  Select the section you want by pressing the [F8] key to go to
  604.   forward through the possibilities or by pressing [F7] key to go
  605.   backwards.
  606.   ■  Once you have the section you want, you will need to get inside
  607.   the highlighted marking bar on the left of the screen to mark the
  608.   entire section. Do this by pressing the [SHIFT][TAB] key
  609.   combination.
  610.   ■  Once inside, use the down arrow key to remark the complete
  611.   section.  When you are finished, press [ESC] to escape from the
  612.   highlighted marking bar.
  613.  
  614. This has been a quick overview of the procedure to follow in
  615. developing an R:BASE System V report.  For additional information,
  616. work through the two tutorials in the Learning Guide and study chapter
  617. six in the User's Manual.
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625. MICRORIM TECHNICAL NOTE
  626. ________________________________________________________
  627.  
  628. DIFFERENCES BETWEEN R:BASE 5000 AND R:BASE SYSTEM V
  629.  
  630. DATE      :  08/86                   NUMBER       :  EX-8-1
  631. PRODUCT   :  R:BASE SYSTEM V         VERSIONS     :  1.0
  632.              R:BASE 5000                             1.01
  633. CATEGORY  :  FEATURES                SUBCATEGORY  :  SYSTEM V VS. 5000
  634.  
  635. ________________________________________________________
  636.  
  637. DESCRIPTION:   What are all the differences between R:BASE 5000 and
  638. R:BASE System V?
  639.  
  640.  
  641.  
  642.  
  643. EXPLANATION:   The differences between R:BASE 5000 and R:BASE System V
  644. are extensive.  This technical note summarizes many of the major
  645. differences between the two products and provides some basic tips on
  646. making use of the additional power in R:BASE System V.
  647.  
  648. This is not a complete list of everything that R:BASE System V can do.
  649. Only major differences are listed.  R:BASE 5000 is also a powerful
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661. product and has been ranked as the number one database management
  662. product by Datapro Research Corporation in September 1985 and February
  663. 1986.  To get a complete picture of what you can do with R:BASE System
  664. V, add the following to all the powerful features already found in
  665. R:BASE 5000.
  666.  
  667.  
  668.  
  669.  
  670. SOLUTION:
  671.  
  672. Definition EXPRESS And Database Structure
  673. _________________________________________
  674.  
  675. R:BASE 5000 gives you Application EXPRESS.  R:BASE System V gives you
  676. Definition EXPRESS, Application EXPRESS, Forms EXPRESS, and Reports
  677. EXPRESS.
  678.  
  679. R:BASE System V databases have an expanded structure and a new easier
  680. way to define databases using EXPRESS technology.  R:BASE System V
  681. offers the following new types of columns, tables, definition methods,
  682. and ways to modify database structure:
  683.  
  684. NOTE DATA TYPE
  685.  
  686. NOTE is a new data type that can contain up to 4092 characters of text
  687. (including spaces).  A NOTE is a variable length column; only the
  688. actual number of characters entered are stored.  If you enter 1200
  689. characters in a NOTE column in one row and another row in the table
  690. has 50 characters in the same NOTE column, then the two rows together
  691. will only use up 1250 bytes for that particular column.  The maximum
  692. number of characters (4092) can be visualized as a very full, single
  693. spaced, typed page.  For example, an entire page of information with
  694. 60 lines of 68 characters each, would fit into a single NOTE column.
  695.  
  696. You can still search for a particular character, word, or phrase in
  697. the NOTE column by using the CONTAINS operator in the WHERE clause.
  698. You can store long pieces of textual information, display that
  699. information in scrolling windows, review or change the information, or
  700. search for key words or phrases.
  701.  
  702. DOUBLE DATA TYPE
  703.  
  704. The new DOUBLE data type gives you double precision real numbers with
  705. up to 15 digits of accuracy instead of the six digits that you get
  706. with the REAL data type in R:BASE 5000.
  707.  
  708. CURRENCY DATA TYPE
  709.  
  710. The new CURRENCY data type replaces the DOLLAR data type in R:BASE
  711. 5000.  In R:BASE System V you can specify the currency format to print
  712. in U.S. Dollar format, British Pound Sterling format, etc.  Now you
  713. can internationalize your applications.
  714.  
  715. COMPUTED COLUMN
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728. R:BASE System V allows computed columns.  Each computed column has an
  729. expression associated with it showing how it is calculated.  Each
  730. computed column can be any of the data types except for NOTE.
  731. Computed columns are calculated based on values stored in other
  732. columns in the same table.  If a value changes in one of the columns
  733. contained in the computed column's expression, the value of the
  734. computed column is automatically updated.
  735.  
  736. You can use constants, other columns, system variables (such as #DATE
  737. and #TIME), and even SuperMath functions, directly in the definition
  738. of the computed column.  For example, a computed column can
  739. automatically calculate the extended price of an order, or the future
  740. value of an investment.  By using date math (for example, subtracting
  741. the system date from a future date stored in the data) you could
  742. automatically calculate items that decrease or increase in value as
  743. time goes on.
  744.  
  745. A computed column can also automatically concatenate text columns
  746. together to make a composite identifier (also known as a composite key
  747. or a composite ID column).  For example, a computed column COMPID can
  748. be the automatic concatenation of two other columns such as SUBKEY1
  749. and SUBKEY2.  If either SUBKEY1 or SUBKEY2 is changed, COMPID will
  750. automatically reflect the change.  You can set up a rule to ensure
  751. uniqueness of the composite key.
  752.  
  753. VIEWS
  754.  
  755. A view is a dynamic ad hoc combination of related tables.  Only the
  756. definition of the view is stored on disk.  The data brought up in a
  757. view is not stored on disk; it is created and used on an as needed
  758. basis.  Views can, for example, be used by reports, the CROSSTAB
  759. command, the SELECT command, and other commands.  A view can contain a
  760. selected group of columns from one table, or it can hold a combination
  761. of columns from up to five different tables.  Each of the tables used
  762. in a view needs to have at least one column in common with the others.
  763. Views containing only one table may be used with the EDIT and the
  764. BROWSE commands.
  765.  
  766. Views are very useful in creating multi-table reports.  Views are
  767. dynamic; the data for the view is found and put together (based on the
  768. stored definition) every time it is referenced.  If you are currently
  769. using any of the relational commands before printing a report, you may
  770. want to switch to using a view in order to avoid having to use up disk
  771. space for the resulting table.
  772.  
  773. Views can be easily defined using Definition EXPRESS or Prompt-By-
  774. Example (PBE).
  775.  
  776. EFFICIENT USE OF SPACE
  777.  
  778. If you remove the last table created and you have not edited NOTE type
  779. columns, R:BASE System V will automatically retrieve the extra space
  780. that was being used by that table.  In other words, file two of the
  781. database will automatically shrink in size.
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794. For example, create a temporary table by combining two permanent
  795. tables using the INTERSECT command.  Next, browse through the
  796. resulting temporary table with the BROWSE command and then delete the
  797. temporary table using the REMOVE command.
  798.  
  799. The space used by the last table in the database is automatically
  800. recovered.  To find out which table is last, issue the following
  801. command and look at the last name in the list:
  802.  
  803. LIST TABLES
  804.  
  805. RULES
  806.  
  807. Rules can be easily defined and modified using Definition EXPRESS
  808. without having to program.  Also, by combining rules with computed
  809. columns, you can set up more powerful rules without having to write a
  810. program.  For example, you could have a rule check for a unique
  811. combination of first and last name.  To accomplish this, set up a
  812. computed column that automatically concatenates first and last name
  813. and then set up the rule on that computed column.
  814.  
  815. PASSWORDS
  816.  
  817. Passwords for databases, tables, and views can be easily defined using
  818. Definition EXPRESS.
  819.  
  820. STRUCTURAL MODIFICATION
  821.  
  822. Using Definition EXPRESS, you can modify the database structure even
  823. if data has already been loaded into the table.  Or, if you prefer,
  824. use the new REDEFINE command which replaces the R:BASE 5000 CHANGE
  825. COLUMN command.
  826.  
  827.  
  828.  
  829. Application EXPRESS
  830. ___________________
  831.  
  832. Application EXPRESS has the following additional capabilities in
  833. R:BASE System V.
  834.  
  835. TEMPLATES
  836.  
  837. Using Application EXPRESS, you can now integrate custom templates into
  838. your application.  Templates are ASCII files with R:BASE commands and
  839. operator prompts in them.  They are similar to customs and macros in
  840. Application EXPRESS.  With templates you can prompt the user for the
  841. parts of a command line that will be different each time the
  842. application is run.  Templates use the system parameter variables %1
  843. through %9 to pass user input directly into the command lines included
  844. in the template.  Templates are best suited to situations where a
  845. table or column name will be different each time the application is
  846. run.
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859. PATHS
  860.  
  861. Application EXPRESS now supports paths.  Your Application EXPRESS
  862. files do not need to reside on the same directory as your database.
  863.  
  864. SORTING
  865.  
  866. The sorting capability in Application EXPRESS now supports up to 10
  867. sort levels.
  868.  
  869. SET APPLICATION ENVIRONMENT
  870.  
  871. Now you can set the color, bell, and error messages for an application
  872. created from Application EXPRESS.
  873.  
  874.  
  875.  
  876. New Commands And Features
  877. _______________________________
  878.  
  879. 70 FUNCTIONS
  880.  
  881. The 70 SuperMath functions work throughout the product.  They are
  882. specialized functions that work on literal values, variable values,
  883. and column values, and include:
  884.  
  885.   ■  Mathematical functions such as log, mod, absolute value, square
  886.   root, minimum, maximum, average, etc.
  887.   ■  Trigonometric functions
  888.   ■  Hyperbolic functions
  889.   ■  String manipulation functions such as determining the length of a
  890.   string, getting a piece of a string, putting one string into
  891.   another, locating a string in another string, changing a string to
  892.   all caps, changing a string to all lower case, changing a string to
  893.   all lower case with the first letter of the first word capitalized,
  894.   changing a string to all lower case with with the first letter of
  895.   all words capitalized, left justifying, right justifying, centering,
  896.   etc.  A string used in a string manipulation function can be a
  897.   literal (actual string of characters), a value in a variable, or a
  898.   value in a TEXT column.  The following command, for example, will,
  899.   for every row in the table, determine how long the person's name is
  900.   and store the number in the LENGTH column.  NAME is a TEXT column
  901.   and LENGTH is an INTEGER column.
  902.  
  903. CHANGE LENGTH TO (SLEN('NAME')) IN +
  904. tblname WHERE NAME EXISTS
  905.  
  906.   ■  Date and Time Functions pull out the integer month, day, year,
  907.   hour, minute, second, or day of week; or pull out the text month or
  908.   text day of week; or change a calendar date to a Julian date.
  909.   Finally, you can switch from integer hour, minutes, and seconds to a
  910.   time hh:mm:ss value and from integer month, day, and year to a date
  911.   mm/dd/yy.
  912.   ■  Financial functions such as future value, present value, and many
  913.   others.
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.   ■  Logical functions (IFEQ, IFLT, and IFGT) compare one item to
  926.   another and based on the result, assign different values to the
  927.   function.  Logical functions allow simple conditional processing in
  928.   forms and reports as well as in command files and macros.
  929.  
  930. ZIP
  931.  
  932. Run other .EXE and .COM programs without leaving R:BASE System V.  You
  933. can, for example, be in R:BASE and ZIP out to write a letter with your
  934. word processor and, when you quit, be automatically back in R:BASE.
  935.  
  936. BROWSE
  937.  
  938. The new BROWSE command makes it possible to browse forward and back
  939. through the rows in your table without making any changes to the data.
  940. If you wish to make changes, use the EDIT command.
  941.  
  942. IMPROVED ...WHERE COUNT...
  943.  
  944. R:BASE 5000 has a WHERE COUNT EQ clause.  R:BASE System V adds to this
  945. feature.  Now you can use any of the following WHERE clauses (n is a
  946. number representing the position of the row in the table):
  947.  
  948.   ■  WHERE COUNT EQ n
  949.   ■  WHERE COUNT NE n
  950.   ■  WHERE COUNT LT n
  951.   ■  WHERE COUNT LE n
  952.   ■  WHERE COUNT GE n
  953.   ■  WHERE COUNT GT n
  954.  
  955. SECRET PASSWORD ENTRY
  956.  
  957. The USER command now automatically prompts the operator to enter his
  958. or her password.  The password is NOT displayed on the screen as it is
  959. being entered.
  960.  
  961. AMPERSAND VARIABLES
  962.  
  963. Ampersand variables (&varname) are similar to dotted variables
  964. (.varname) in that they tell R:BASE System V to get the value of the
  965. variable and put the value into the command where the &varname is
  966. located.  However dotted variables are used in WHERE clauses to
  967. replace values.  Ampersand variables can replace anything in the
  968. command line.  An ampersand variable can hold several words, a part of
  969. a command, or even an entire command.
  970.  
  971. For example, it is often handy to have a quick way to qualify all rows
  972. in a WHERE clause for a CHANGE command or to delete all the rows in a
  973. table.  In R:BASE System V, you can assign a global WHERE clause to an
  974. ampersand variable in your RBASE.DAT initial startup file and then use
  975. it throughout your application.  First, put the following command into
  976. your RBASE.DAT file (#1 is interpreted by R:BASE as the first column
  977. in the table):
  978.  
  979. SET VAR VALL TO "WHERE #1 EXISTS OR #1 FAILS"
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992. Now you can use the variable VALL to provide a global WHERE clause by
  993. including it in the command with an ampersand in front of it.  For
  994. example, to delete all the rows in a table named ANALYZE you would use
  995. the following command:
  996.  
  997. DELETE ROWS FROM ANALYZE &VALL
  998.  
  999. CLS COMMAND
  1000.  
  1001. The new CLS (clear screen) command allows you to clear the entire
  1002. screen or to select only certain rows of the screen to clear.
  1003.  
  1004. CLEAR COMMAND ENHANCED
  1005.  
  1006. R:BASE System V allows you to specify a list of variables with a
  1007. single CLEAR command.
  1008.  
  1009. RBEDIT ENHANCED
  1010.  
  1011. RBEDIT, the editor that we provide as a stand-alone module outside of
  1012. R:BASE System V and as an internal command inside R:BASE, has been
  1013. enhanced.  Now you can mark blocks, copy blocks, and delete blocks.
  1014. In addition, you can use RBEDIT to edit exec type files (created with
  1015. the RECORD command).  Using RBEDIT in this way you can edit and change
  1016. the actual keys that you want executed in a particular exec.  For
  1017. example, if you want the [ESC] key to be pressed three times in
  1018. succession in a particular exec file, edit the exec file with RBEDIT
  1019. and actually type in the characters:
  1020.  
  1021. [ESC][ESC][ESC]
  1022.  
  1023. in the appropriate spot.
  1024.  
  1025. PROMPT-BY-EXAMPLE (PBE)
  1026.  
  1027. Use EXPRESS-like menus to guide you through the command-generation
  1028. process.  PBE supports almost all the R:BASE System V commands.  PBE
  1029. is an excellent way to make learning R:BASE System V easier.  You can
  1030. also define your own prompts to be used with the PBE code.  One
  1031. customer was able to replace 100 lines of code with one customized PBE
  1032. prompt.
  1033.  
  1034. RECORD/PLAYBACK MACROS
  1035.  
  1036. By pressing [F7] you can start an automatic recorder, record your
  1037. keystrokes, then store them to a file (called an exec file) or assign
  1038. them to a function key.  Use the R:BASE System V RECORD/PLAYBACK
  1039. feature anywhere in R:BASE System V.  The file you create can be
  1040. edited using RBEDIT to further customize the macros you create.
  1041.  
  1042. You can use an exec file as an automatic startup file in Application
  1043. EXPRESS, Forms EXPRESS, Reports EXPRESS, Definition EXPRESS, or
  1044. FileGateway.  Include the name of the exec file on the appropriate
  1045. line in the RBSYSTEM.ASC file.
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058. KEY MAP MACROS
  1059.  
  1060. You can assign R:BASE System V commands to a key map.  This means that
  1061. if you have assigned a command or set of commands to, for example, the
  1062. [ALT][F10] key combination, when you hold down the [ALT] key and press
  1063. the [F10] key, the commands stored in the key map will be executed.
  1064.  
  1065. This is useful when you want the operator to be able to "push a
  1066. button" to begin program execution.  You might assign several
  1067. different RUN commands to different keys and then the operator will
  1068. not have to remember the name of the command file.
  1069.  
  1070. Key maps are not automatically saved so if you want to save and reuse
  1071. your key maps during other R:BASE sessions, turn RECORD on (to create
  1072. an exec file) while defining the key maps for the first time.  When
  1073. you have defined all the key maps, use the [F7] key to turn RECORD
  1074. off.  Now you can playback the exec file, using the PLAYBACK command,
  1075. to automatically define your function keys.  If you put the PLAYBACK
  1076. command into your RBASE.DAT initial command file, your key maps will
  1077. be automatically assigned each time you load R:BASE System V.
  1078.  
  1079. You can assign up to 40 key maps with a total of 512 characters stored
  1080. in all of them.  You can assign the function keys themselves, the
  1081. function keys in combination with the shift key, the function keys in
  1082. combination with the control key, and the function keys in combination
  1083. with the alt key.  We recommend, however, that you use just the [ALT]
  1084. and [CTRL] key combinations in order to avoid overwriting the function
  1085. keys that R:BASE System V uses.
  1086.  
  1087. CROSSTAB
  1088.  
  1089. You can analyze inter-column relationships with the new CROSSTAB
  1090. command.  CROSSTAB allows you to crosstabulate the number of
  1091. occurrences (count), averages for numeric data types, sums, minimums,
  1092. and maximums.
  1093.  
  1094. NEW COMPUTATIONAL CAPABILITIES
  1095.  
  1096. New features in the COMPUTE command allow you to compute the standard
  1097. deviation and the variance as well as being able to use expressions
  1098. including the 70 SuperMath functions.
  1099.  
  1100. MULTI-USER OR SINGLE USER
  1101.  
  1102. R:BASE System V is switchable between single and multi-user.
  1103.  
  1104. NEW SET PARAMETERS
  1105.  
  1106. R:BASE System V has several new SET parameters:
  1107.  
  1108.   ■  TOLERANCE:  The SET TOLERANCE command allows you to set a range
  1109.   for numbers of the REAL and DOUBLE data type.  For example, by
  1110.   setting the tolerance to .5, you would bring up all the rows where
  1111.   TOTAL was between 9.5 and 10.5 in the following command:
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124. SET TOLERANCE .5
  1125. EDIT ALL FROM tblname WHERE total = 10.0
  1126.  
  1127.   ■  ZERO:  SET ZERO ON means that all null values will be treated as
  1128.   if they were zero in mathematical calculations.
  1129.   ■  TIME FORMAT, TIME SEQUENCE, DATE FORMAT, DATE SEQUENCE:  With
  1130.   TIME and DATE you can now set the format in which the TIME or DATE
  1131.   column will be printed as well as the sequence in which they will be
  1132.   entered.  The format and sequence need not be the same.  You can,
  1133.   print literals in the DATE format and can use a new WWW format to
  1134.   print the day of the week.  For example, the following command:
  1135.  
  1136. SET DATE FORMAT "WWW+  MMM+ DD, YYYY"
  1137.  
  1138.   would produce the following output format for a date of 10/12/86:
  1139.  
  1140.   Friday  October 12, 1986
  1141.  
  1142.   See your manual for a complete description of all the formats at
  1143.   your disposal.
  1144.  
  1145.   ■  CURRENCY:  The CURRENCY option allows you to specify the currency
  1146.   symbol and to specify whether it precedes or follows the number.
  1147.   ■  MULTI:  The MULTI switch turns multi-user on and off.
  1148.   ■  WAIT, VERIFY, and LOCK:  These are associated with the multi-user
  1149.   option.
  1150.  
  1151. SETS SAVED WITH DATABASE
  1152.  
  1153. Several of the SET parameters are now saved with the database.
  1154. Whenever you open a database these saved parameters will be reset to
  1155. what they were when that database was last closed.  The SET PARAMETERS
  1156. that are saved with the database are:
  1157.  
  1158.   ■  AUTOSKIP
  1159.   ■  BELL
  1160.   ■  CASE
  1161.   ■  CURRENCY
  1162.   ■  DATE FORMAT
  1163.   ■  DATE SEQUENCE
  1164.   ■  TIME FORMAT
  1165.   ■  TIME SEQUENCE
  1166.   ■  NULL
  1167.   ■  REVERSE
  1168.   ■  TOLERANCE
  1169.   ■  ZERO
  1170.  
  1171.  
  1172. All parameters are reset to the defaults each time R:BASE is loaded,
  1173. but the parameters listed above are automatically changed to those
  1174. stored for the database when the database is opened.  This means that
  1175. if you want to set specific parameters for a command procedure, you
  1176. should first open the database and then issue the series of SET
  1177. commands.
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190. BACK UP TO FLOPPIES
  1191.  
  1192. Back up and restore large databases to multiple floppy disks using
  1193. R:BASE commands.
  1194.  
  1195. EXPRESSIONS
  1196.  
  1197. With R:BASE System V fully supports a large variety of complex
  1198. expressions and parentheses are fully supported.
  1199.  
  1200. SELECT ANALYSIS
  1201.  
  1202. With R:BASE System V you can do quicky "what if" analyses without
  1203. actually changing the data stored in your database and without having
  1204. to create a report.  Do it by using expressions in a SELECT command.
  1205. For example, you could see what it would cost you to give everybody a
  1206. 10 percent raise in pay by comparing the bottom line totals from the
  1207. following two SELECT commands:
  1208.  
  1209. SELECT SALARY=S FROM PEOPLE
  1210. SELECT (SALARY*1.10)=S FROM PEOPLE
  1211.  
  1212. STAR MULTIPLY
  1213.  
  1214. The symbol for multiplication in R:BASE System V is the asterisk.
  1215. R:BASE System V will still attempt to correctly interpret the X as a
  1216. multiplication symbol if there are spaces on either side of it, but in
  1217. general you should use the asterisk.
  1218.  
  1219. SPACES NOT REQUIRED
  1220.  
  1221. R:BASE System V does not require spaces around operators in
  1222. expressions.   For example, (A*B) meaning "A times B" is perfectly
  1223. legal in R:BASE System V.
  1224.  
  1225. SMOOTH SCROLL
  1226.  
  1227. When using the EDIT command, the display screen will now smoothly
  1228. scroll up and down.
  1229.  
  1230. LONG COMMAND LINES
  1231.  
  1232. With R:BASE 5000, command lines can be up to 1600 characters long, but
  1233. each line of the command must be 79 characters or less with a plus
  1234. symbol (+) to continue to the next line.
  1235.  
  1236. With R:BASE System V, you can still continue the lines if you like but
  1237. there are four additional features.
  1238.  
  1239. First, with R:BASE System V, your total command line can be up to 5000
  1240. characters long.
  1241.  
  1242. Second, if you are using RBEDIT to write a command file, you are still
  1243. limited to a max of 79 characters per line.  If, however, you use
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255. another editor or a word processor (under nondocument or nonformat
  1256. mode), to write your command files and macros, a single line may be
  1257. longer than 79 characters.  In fact, it may be as long as 1000
  1258. characters without having to continue it onto the next line.
  1259.  
  1260. Third, if you are entering the command at the R> prompt, you do not
  1261. have to enter the plus sign.  R:BASE System V will automatically
  1262. insert the plus symbol and continue on the next line.  You can key in
  1263. your command without stopping.
  1264.  
  1265. Fourth, as long as you do not hit the enter key until the end of the
  1266. entire
  1267. command line, you can bring back an entire multiple line command by
  1268. using the [CTRL][right arrow] keys or the [END] key.  This is very
  1269. handy if you make a mistake in a long command line.  Also, the [HOME]
  1270. key will move you to the front of a command line without zapping the
  1271. command line.  If you want to zap the command line, that is easily
  1272. accomplished with the [CTRL][left arrow] keys.
  1273.  
  1274. BEEP
  1275.  
  1276. The new BEEP command will cause your computer to beep.
  1277.  
  1278.  
  1279. Forms EXPRESS
  1280. _____________
  1281.  
  1282. R:BASE System V has a powerful new Forms module.  By Using R:BASE
  1283. System V Forms EXPRESS you can, without having to write a program, set
  1284. up forms that can do all of the following :
  1285.  
  1286. MULTIPLE TABLES
  1287.  
  1288. A form can give you access to up to five different tables.  When using
  1289. the form, the operator can move easily from one table area to the next
  1290. by using the [F9] key.
  1291.  
  1292. CUSTOM COLORS
  1293.  
  1294. Assign different colors to different columns, variables, and regions
  1295. located in the form.
  1296.  
  1297. DRAW BOXES
  1298.  
  1299. Draw single-line or double-line boxes around data entry regions or
  1300. anywhere else on the form.  Use the arrow keys to draw in all
  1301. directions and use the [F4] key to "put the pen down" and "pick the
  1302. pen up" from the screen.  You are actually drawing on the screen and
  1303. do not have to remember ASCII codes.  Even corners are done
  1304. automatically.
  1305.  
  1306. MULTIPLE ROW REGIONS
  1307.  
  1308. Define a special region on the form where multiple rows will be
  1309. displayed or entered.  For example, display one row of customer
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321. information from the CUST table at the top of the form and display
  1322. five invoice rows from the INVOICE table for that customer.  If the
  1323. customer has more than five invoices, the operator can scroll through
  1324. the rows in the region by using the [F8] key to go forward and the
  1325. [F7] key to go backward.
  1326.  
  1327. MULTIPLE PAGES
  1328.  
  1329. A form can have up to five pages.  When creating the form, press the
  1330. [PGDN] key to begin creating a new page.  Later, the operator can move
  1331. from page to page in the form by using the [PGUP] and [PGDN] keys.
  1332.  
  1333. VARIABLES IN THE FORM
  1334.  
  1335. Global variables can be used directly in the form.  R:BASE System V
  1336. forms may make R:BASE 5000 variable forms less necessary.   You can
  1337. use your R:BASE System V form to update global variables for use
  1338. throughout R:BASE.  You can control whether or not the operator will
  1339. be able to change the value, what color it will be, and define a
  1340. default value for it directly in the form.  You can also use variables
  1341. for display purposes only.  For example, you can display the current
  1342. date by using the system variable #DATE.
  1343.  
  1344. FUNCTIONS AND EXPRESSIONS
  1345.  
  1346. Expressions can be used directly in the form to automatically
  1347. calculate fields based on the value of other fields.  Using this
  1348. feature you can:
  1349.  
  1350.   ■  Automatically assign unique numbers by concatenating the julian
  1351.   date, hours, minutes, and seconds from the system date and time.
  1352.   ■  Use conditional functions to automatically display the absolute
  1353.   value of a negative (or credit) balance column in a red field and
  1354.   display a positive (or debit) balance in a blue field.
  1355.   ■  Do on screen calculations.
  1356.  
  1357. CUSTOMIZE MENUS
  1358.  
  1359. When using a form, R:BASE System V automatically displays a menu at
  1360. the top of the screen.   There is one menu for data entry and another
  1361. for editing.  You can modify these menus.  The title can be changed
  1362. and you can reorder or delete the choices presented in the menus.  In
  1363. this way, your application can control the operator's choices.
  1364.  
  1365. PROTECTION
  1366.  
  1367. In addition to revising the menus you have many other ways to protect
  1368. data and control how the form is used.  You can add these protections
  1369. directly in Forms EXPRESS without having to program them.
  1370.  
  1371.   ■  You can protect specific fields in the form, not allowing the
  1372.   operator to edit some fields while allowing edits to other fields.
  1373.   This is done by assigning field characteristics to each field
  1374.   (variables and columns) located in the form.  To assign field
  1375.   characteristics, answer the questions that Forms EXPRESS asks.
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.   ■  You can have one form for data entry and another for editing by
  1388.   copying the data entry form to a new name and then changing the
  1389.   characteristics on the new form to make it an edit only form.
  1390.   ■  Protect your tables by customizing table characteristics.  Allow
  1391.   (or prevent) adding new rows.  Allow (or prevent) replacing existing
  1392.   rows.  Allow (or prevent) deleting rows.
  1393.   ■  Assign read-only and/or modify passwords to the form that will
  1394.   override the table passwords.
  1395.  
  1396. LOOKUPS
  1397.  
  1398. Look up values already in a table and display them on the screen
  1399. during data entry.  One master lookup expression will make all the
  1400. columns in the looked up row available for locating on the form.  In
  1401. other words, it is not necessary to have an expression for each column
  1402. in the row.
  1403.  
  1404. SELECTIVELY REUSE FIELDS
  1405.  
  1406. In addition to having default values, you can selectively repeat
  1407. fields from the previous record.  In R:BASE 5000 you must reuse the
  1408. entire previous record.  In R:BASE System V you can select which
  1409. fields to reuse.
  1410.  
  1411. EASY FORM MANAGEMENT
  1412.  
  1413. By picking from Forms EXPRESS menus you can easily:
  1414.  
  1415.   ■  List, remove, create, change, or copy a form.
  1416.   ■  Rename or delete a table associated with a form.  This will not
  1417.   rename or delete the actual table but will change the table
  1418.   information in the form.
  1419.   ■  Reorder the tables used in a form.  For example, change the first
  1420.   table, in a three table form, to the last table.
  1421.   ■  Define, delete, retype, or reorder the expressions associated
  1422.   with each table used in a form.
  1423.   ■  Customize lookups.
  1424.   ■  Change the prompting order of the fields.
  1425.  
  1426. In addition there is a new command:
  1427.  
  1428. REMOVE FORM formname
  1429.  
  1430.  
  1431. Reports EXPRESS
  1432. _______________
  1433.  
  1434. Reports EXPRESS works in a manner similar to forms.  You will use many
  1435. of the same function keys to perform similar functions.  For example,
  1436. in both Forms EXPRESS and Reports EXPRESS, use the [F6] key to locate
  1437. a field (column or variable).
  1438.  
  1439. DRAW BOXES
  1440.  
  1441. Draw boxes and borders for your report.  Use the arrow keys to draw in
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453. all directions and use the [F4] key to "put the pen down" and "pick
  1454. the pen up" from the screen.  You are actually drawing on the screen
  1455. and do not have to remember ASCII codes.  Even corners are done
  1456. automatically as you change directions.  Keep in mind, however, that
  1457. the borders may not print on the printer the way they look on the
  1458. screen.  For the borders to print on your printer you will need a
  1459. graphics printer that supports ASCII codes greater than 127.
  1460.  
  1461. WIDER REPORTS
  1462.  
  1463. Reports in R:BASE 5000 can be up to 131 characters wide.  Reports in
  1464. R:BASE System V can be up to 255 characters wide.
  1465.  
  1466. EASY FIXED FOOTER
  1467.  
  1468. In R:BASE System V, it is easy to make a page footer print on a
  1469. specific line of your report.  In R:BASE 5000, it is necessary to set
  1470. up vertical tabs and send specialized printer control codes to your
  1471. printer.
  1472.  
  1473. REPORTS MAINTENANCE
  1474.  
  1475. Use the main Reports EXPRESS Report Options Menu to list reports,
  1476. create a report, change a report, copy a report with a new name, or
  1477. remove a report.
  1478.  
  1479. In addition, R:BASE System V has a new command:
  1480.  
  1481. REMOVE REPORT rptname
  1482.  
  1483.  
  1484. VARIABLES IN REPORTS
  1485.  
  1486. Global variables are used exclusively in R:BASE System V reports.
  1487. There are no specialized report variables that are not global
  1488. variables, as there are in R:BASE 5000.  All variables used in R:BASE
  1489. System V reports are global variables.
  1490.  
  1491. EXPRESSIONS AND FUNCTIONS
  1492.  
  1493. Expressions and functions can be used directly in the report.  This
  1494. includes the 70 SuperMath functions.  You can put more than one
  1495. operator on a line and use parentheses in your expressions so you may
  1496. be able to reduce the number of variables necessary in your report.
  1497.  
  1498. By using the logical functions IFEQ, IFLT, and IFGT, you can do some
  1499. conditional processing in R:BASE System V reports.  For example, if a
  1500. result was negative, you could print the absolute value in a credit
  1501. column.  If the result turns out to be positive, you could print it in
  1502. a debit column.  You would do this by locating two fields VTOTCR and
  1503. VTOTDR and loading the actual result into the appropriate variable
  1504. while setting the other to zero.  If the actual result was in a VACT
  1505. variable, the following two expressions would accomplish this:
  1506.  
  1507. VTOTCR = (IFLT(.VACT,0,(ABS(.VACT)),0))
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519. VTOTDR = (IFLT(.VACT,0,0,.VACT))
  1520.  
  1521.  
  1522.  
  1523. FileGateway
  1524. ___________
  1525.  
  1526. FileGateway is the recommended method in R:BASE System V for importing
  1527. and exporting files.
  1528.  
  1529. IMPORT AND EXPORT
  1530.  
  1531. In addition to the importing capability of R:BASE 5000 FileGateway,
  1532. R:BASE System V FileGateway makes it possible to export Lotus 1-2-3
  1533. worksheets, Symphony worksheets, VisiCalc worksheets, fixed format
  1534. ASCII files, and delimited ASCII files.  The export facility, like the
  1535. import facility, is menu driven and easy to use.
  1536.  
  1537. The AS ASCII option on the UNLOAD command is no longer available in
  1538. R:BASE System V.  Therefore, to unload data in one continuous line for
  1539. each row in the table, you will need to use R:BASE System V
  1540. FileGateway rather than the UNLOAD command.
  1541.  
  1542. SAVING CONVERSION PARAMETERS
  1543.  
  1544. Use the RECORD and PLAYBACK features in R:BASE System V to save your
  1545. FileGateway parameters and automate the file conversion process for
  1546. both importing and exporting files to your R:BASE System V database.
  1547. RECORD is toggled on and off with the [F7] key.  Playback is initiated
  1548. with the [F8] key.
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555. Compatibility With Our Other Products
  1556. _____________________________________
  1557.  
  1558. We will be making the Extended Report Writer (XRW), the Program
  1559. Interface (PI), and CLOUT (our natural language interface option)
  1560. compatible with R:BASE System V databases in the near future.  There
  1561. will also be a Runtime version of R:BASE System V available soon.
  1562.  
  1563. R:BASE 5000 databases currently work with XRW, the PI, CLOUT, and
  1564. there is a Runtime version of R:BASE 5000.
  1565.  
  1566.  
  1567.  
  1568. Environment
  1569. ___________
  1570.  
  1571. R:BASE System V requires more memory and a hard disk.  R:BASE 5000
  1572. will run on a dual floppy machine.
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585. R:BASE System V program files are larger than R:BASE 5000 program
  1586. files.  R:BASE 5000 comes complete on six (6) disks.  R:BASE System V
  1587. is a complete system of programs and is shipped with a total of eleven
  1588. (11) disks.  R:BASE System V uses up more of the available space on
  1589. the hard disk for the program files.  R:BASE 5000 will leave more room
  1590. for larger databases.  This is an important consideration for those
  1591. who have small hard disks.  R:BASE 5000 is a powerful product, and if
  1592. you have a small system, you may find that you do not need the extra
  1593. power available in R:BASE System V.  We will continue to sell and
  1594. support R:BASE 5000 so that you can choose the product that suits your
  1595. needs.
  1596.  
  1597. R:BASE System V requires 512K bytes of memory in single user mode and
  1598. 640K in multi-user mode.  R:BASE 5000 will run with as little as 256K
  1599. bytes of memory (on an IBM-PC with no hard disk and no memory resident
  1600. programs).  R:BASE 5000 Multi-user requires 640K on file server and
  1601. 512K on each of the nodes.
  1602.  
  1603. If you are using Multi-user, the hard disk requirement of R:BASE
  1604. System V may be significant.  In both R:BASE System V and R:BASE 5000
  1605. Multi-user your application will run faster if you install the R:BASE
  1606. program files on each and every node in the network.  If you have
  1607. R:BASE System V and want to install it on all the nodes, each node
  1608. must have a hard disk and 640K of memory.  R:BASE 5000 Multi-user can
  1609. be installed on dual floppy nodes containing only 512K of memory.  It
  1610. is NOT required, with either product, that you install R:BASE on all
  1611. nodes.  However, on most networks, if you do install the R:BASE
  1612. program files on all of the nodes, your applications may run faster.
  1613.  
  1614.  
  1615.  
  1616.  
  1617. MICRORIM TECHNICAL NOTE
  1618. ________________________________________________________
  1619.  
  1620. TIPS ON CONVERTING FROM R:BASE 5000 TO R:BASE SYSTEM V
  1621.  
  1622. DATE      :  08/86                   NUMBER       :  EX-8-2
  1623. PRODUCT   :  R:BASE SYSTEM V         VERSIONS     :  1.0
  1624. CATEGORY  :  CONVERTING              SUBCATEGORY  :  FROM R:BASE 5000
  1625.  
  1626. ________________________________________________________
  1627.  
  1628. DESCRIPTION:   How do I convert from R:BASE 5000 to R:BASE System V?
  1629.  
  1630.  
  1631.  
  1632.  
  1633. EXPLANATION:   Converting your R:BASE 5000 application to an R:BASE
  1634. System V application involves two procedures:  database conversion and
  1635. application/R:BASE code conversion.
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651. SOLUTION:   As a first step in converting to R:BASE System V from
  1652. R:BASE 5000, back up your database and then follow the instructions in
  1653. the white Conversion Guide booklet to convert your database structure
  1654. and begin to make alterations to your R:BASE applications.
  1655.  
  1656. After you follow the instructions in the Conversion Guide, converting
  1657. your programs from R:BASE 5000 to R:BASE System V will be mostly a
  1658. matter of revising your application to take advantage of the new power
  1659. features in System V and adjusting your programs to follow new syntax
  1660. rules.
  1661.  
  1662. If you are using variable forms you may want to replace them with
  1663. R:BASE System V forms.  Variable forms, developed in R:BASE 5000, will
  1664. work in R:BASE System V, but you will find that R:BASE System V forms
  1665. make your application run faster.  Create your new forms using Forms
  1666. EXPRESS.  This step alone has been reported to make some applications
  1667. run two to four times faster.
  1668.  
  1669. There are also some differences between the two products that you will
  1670. want to allow for.  R:BASE System V functions and complex expressions
  1671. require new strict syntax rules.  You may need to make some revisions
  1672. to your R:BASE 5000 code to comply with these new syntax rules.
  1673.  
  1674. Here are some tips to help you convert from R:BASE 5000 to R:BASE
  1675. System V.  Keep in mind that when we use the word parse or any
  1676. variation of the word parse, we mean the way R:BASE reads, evaluates,
  1677. and interprets commands and expressions.
  1678.  
  1679.   ■  All variables in R:BASE System V are global variables.  If you
  1680.   have report variables with the same name as global variables, rename
  1681.   one or both of them.  If you print the same report more than once in
  1682.   the same session, you will need to clear your variables or set them
  1683.   to zero.  R:BASE 5000 has report variables that are unique for that
  1684.   report.  R:BASE System V does not have separate report variables.
  1685.   For example, if your report has six variable expressions in it,
  1686.   using the variables: VCOUNT  VTOT1  VTOT2  VTOT3  VNAME  and
  1687.   VCITYSTZ, you might want to use the following commands to print the
  1688.   report:
  1689.  
  1690. SET ZERO ON
  1691. SET NULL " "
  1692. CLEAR VCOUNT VTOT1 VTOT2 VTOT3 VNAME VCITYSTZ
  1693. OUTPUT PRINTER
  1694. PRINT yourrept
  1695. OUTPUT SCREEN
  1696. SET NULL -0-
  1697. CLEAR VCOUNT VTOT1 VTOT2 VTOT3 VNAME VCITYSTZ
  1698.  
  1699.   This code will do a number of things for you.  First, zero is set
  1700.   on, which means that in any math involving null values, the nulls
  1701.   will be treated as if they are equal to zero.  Setting null to a
  1702.   blank in the second command line, will cause all nulls to be printed
  1703.   as blanks.  The CLEAR command allows you to specify a list in R:BASE
  1704.   System V; you no longer have to enter a CLEAR for each of the
  1705.   variables.  The last commands set null back to -0- and clear the
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.   variables again.
  1718.  
  1719.   ■  R:BASE System V needs to be explicitly told what is an
  1720.   expression, what is a variable, what is a value, and what is a
  1721.   column name.  If you have an expression, let the expression parser
  1722.   know it by surrounding the entire expression with parentheses.  For
  1723.   example,
  1724.  
  1725. SET VAR vcommis TO 100
  1726. SET VAR vnum TO (15 % .vcommis + $25.00)
  1727. SET VAR v3 TO (.v1 + .v2)
  1728.  
  1729.   Lookups are the exception to the rule.  Do NOT use parentheses in
  1730.   lookups in reports or forms, and do NOT include mathematical
  1731.   functions and expressions in lookups.
  1732.  
  1733.   ■  Enclose all literal date entries in quotes.  If the quotes aren't
  1734.   included, the expression parser in R:BASE System V will perform two
  1735.   division operations.  For example, the date 10/10/86 will not be
  1736.   understood as a date unless it is enclosed in quotes.  Instead it
  1737.   will be parsed as 10 divided by 10 divided by 86.
  1738.  
  1739.   ■  Although R:BASE 5000 required spaces around all operators in an
  1740.   expression, R:BASE System V does not.  The following is a command
  1741.   that will work correctly in R:BASE System V.
  1742.  
  1743. SET VAR vdate TO ("10/10/86"+90)
  1744.  
  1745.   If your R:BASE 5000 expressions have spaces in them, there is no
  1746.   need to remove the spaces.  R:BASE System V disregards spaces.
  1747.  
  1748.   ■  Pretype any value being that might be misconstrued as something
  1749.   other than a single item.  For example, a part number such as 510-12
  1750.   or 1005-A, might be interpreted as two items with a minus sign
  1751.   between them.  To tell R:BASE that this is a single item and not an
  1752.   expression, you must enclose the value in quotes or pretype it as
  1753.   text.  Otherwise, the expression parser will attempt to subtract the
  1754.   portion of the item that follows the dash (-) from the part that
  1755.   precedes the dash.  The following will work correctly:
  1756.  
  1757. SET VAR vpartno TEXT
  1758. SET VAR vpartno TO 1005-A
  1759.  
  1760.   ■  To tell the parser that a name you are using in an expression is
  1761.   a column name, enclose the name in single quotes.  For example:
  1762.   'CUSTID'.  Be careful to use only the right leaning single quote as
  1763.   both the open single quote and the close single quote.  Make sure
  1764.   that none of your column or variable names contain a special
  1765.   character.  Do not use math operators in variable names or column
  1766.   names.  Also, names should not be made up entirely of numeric
  1767.   characters.  If a column or variable name is a number, it may be
  1768.   mistaken for a number rather than a column or variable name.  These
  1769.   are examples of variable and column names that should NOT be used:
  1770.  
  1771. AA%BB     01     XYZ-1     12345     TOT/AMT
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.   ■  In most cases, you should set the data type of a variable before
  1785.   using it in an expression.  The following example illustrates an
  1786.   operation that is acceptable in R:BASE 5000 but is not valid in
  1787.   R:BASE System V when the variable is not pre-typed.  The desired
  1788.   result is abc1.
  1789.  
  1790. SET VAR vprodid TO abc + 1
  1791.  
  1792.   To get the above SET VAR command to function in R:BASE System V, you
  1793.   can do either of the following:
  1794.  
  1795.    ■  Establish the data type of the variable prodid as TEXT prior to
  1796.      using it in the expression.  This can be done with the SET VAR
  1797.      vprodid TEXT command.
  1798.    ■  Use an appropriate function in the expression to make the
  1799.      expression valid.  For example, if you want to concatenate, you
  1800.      will need to tell the expression parser that the number one (1)
  1801.      should be used as a TEXT one rather than a numeric one (1).  To
  1802.      do this you would need to use the CTXT function.  Without the
  1803.      CTXT function, the parser would think you were trying to add text
  1804.      to a number and would give you an error message.  For example,
  1805.      the following would be the way to do the above SET VAR command in
  1806.      R:BASE System V:
  1807.  
  1808.    SET VAR vprodid TO (abc + ctxt(1))
  1809.  
  1810.       Simply enclosing the number in quotes is not sufficient.  It is
  1811.       necessary to actually use the CTXT function on the number to
  1812.       literally tell the expression parser to treat the one as a TEXT
  1813.       element.
  1814.  
  1815.   ■  To use a comma in a concatenation operation, a variable must
  1816.   sometimes be defined equal to the value ",".  An example is shown
  1817.   here:
  1818.  
  1819. SET VAR vcomma TEXT; SET VAR vcomma TO ","
  1820. SET VAR vcsz TO (.vcity+.vcomma&.vstate&.vzip)
  1821.  
  1822.   It may not always be necessary to set a variable to the comma first,
  1823.   but rather than attempt to remember when you have to and when you
  1824.   don't, it will be easier to always use a VCOMMA variable.
  1825.  
  1826.   ■  Try to adhere closely to the convention of beginning all variable
  1827.   names with a V.  You will need the convention in R:BASE System V to
  1828.   be able to quickly determine if you have a variable or a column
  1829.   name.
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835. MICRORIM TECHNICAL NOTE
  1836. ________________________________________________________
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849. TIPS AND AXIOMS FOR USING R:BASE SYSTEM V EXPRESSIONS
  1850.  
  1851. DATE      :  08/86                   NUMBER       :  EX-8-3
  1852. PRODUCT   :  R:BASE SYSTEM V         VERSIONS     :  1.0
  1853. CATEGORY  :  EXPRESSIONS             SUBCATEGORY  :  TIPS AND AXIOMS
  1854.  
  1855. ________________________________________________________
  1856.  
  1857. DESCRIPTION:   What general tips should I keep in mind in using the
  1858. new expressions and functions in R:BASE System V?
  1859.  
  1860.  
  1861.  
  1862.  
  1863. EXPLANATION:   R:BASE System V allows complex expressions including 70
  1864. SuperMath functions.  To assist you in becoming more familiar with the
  1865. R:BASE System V expressions, we have compiled this list of tips and
  1866. fundamentals relating to expressions.
  1867.  
  1868. What Is An Expression?
  1869.  
  1870. An expression is a mathematical operation involving two or more
  1871. operands (also known as arguments) and any of the valid math
  1872. operators.  An expression can also be a string operation such as
  1873. concatenation.
  1874.  
  1875. Expressions can be used in a myriad of places throughout R:BASE System
  1876. V.  For example, expressions are valid in:
  1877.  
  1878.   ■  Up to ten computed columns per table
  1879.   ■  Reports
  1880.   ■  Forms
  1881.   ■  WHERE clauses (as long as the WHERE clause is not on a lookup)
  1882.   ■  The CHANGE, SET VARIABLE, COMPUTE, IF, WHILE, and SELECT commands
  1883.  
  1884. Expressions can be as long as 160 characters and can be nested up to
  1885. 75 parentheses deep.  Functions are acceptable operands within an
  1886. expression and functions can be nested inside other functions.
  1887. Expressions can have up to 25 columns and variables in them and up to
  1888. 50 total items.  Creative use of nesting and functions can produce
  1889. very powerful results.
  1890.  
  1891. For example, if you had a discount structure that was based on
  1892. quantity ordered, you could set up a computed column that will
  1893. automatically compute the discount for you.  In this example, if a
  1894. customer buys five or less gadgets then there is no discount.  If she
  1895. buys six to 100, she will get a 10% discount.  If she buys over 100,
  1896. she will get a 25% discount.   There are three applicable columns:
  1897.  
  1898. QTY      INTEGER    *(giving the quantity ordered)
  1899. PRICE    CURRENCY   *(the unit price of the item)
  1900. EXTENDED CURRENCY   *(the computed column that determines the discount
  1901. to
  1902.                       apply and calculates the extended price minus
  1903. the
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.                       applicable discount)
  1916.  
  1917. The discount percentage is the result of the following nested
  1918. function:
  1919.  
  1920. (IFLT(QTY,6,0,(IFLT(QTY,101,10,25))))
  1921.  
  1922. The above function expression reads as follows:  If the quantity is
  1923. less than six make the discount zero.  If the quantity is not less
  1924. than zero and is less than 101, make the discount ten.  Otherwise,
  1925. make the discount 25 because that means that quantity is 101 or
  1926. greater.
  1927.  
  1928. Now, by taking the above nested function and nesting it into the
  1929. EXTENDED column (defined as a computed column with a CURRENCY data
  1930. type), the complete expression for the EXTENDED column is as follows:
  1931.  
  1932. ((QTY*PRICE)-((IFLT(QTY,6,0,(IFLT(QTY,101,10,25))))%(QTY*PRICE)))
  1933.  
  1934. You now have a computed column that is calculated based on the values
  1935. in other columns and based on a specific conditional grouping.
  1936.  
  1937. Commands That Use Expressions
  1938.  
  1939. CHANGE colname TO (expression) IN...
  1940.   CHANGE commis TO (15%'saleprce') IN #2
  1941.  
  1942. COLUMNS - entered in conjunction with a
  1943.   column definition
  1944.   totprce (115%('qty'*'cost')) CURRENCY
  1945.  
  1946. COMPUTE operation (expression) FROM..
  1947. COMPUTE ALL (expression) FROM...
  1948.   COMPUTE commis AS SUM (2.5%'invtotal')...
  1949.  
  1950. EXPAND tblname WITH colname =(expression) +
  1951.   datatype length
  1952.   EXPAND custlist WITH +
  1953.   wholenm=('firstnm'&'lastnm') TEXT 25
  1954.  
  1955. IF condlist THEN
  1956.   an expression can be a condition
  1957.   IF totwt EQ (1.286*'gross') THEN
  1958.   IF ('onhand'*'cost') GT (.95*'budget') THEN
  1959.  
  1960. REDEFINE colname1 TO (expression)...IN...
  1961.   REDEFINE col3 TO ('col1'*'col2') IN tab1
  1962.  
  1963. SELECT collist (expression) FROM...
  1964.   SELECT #2 #3 #7 ('qty'*'cost')=S FROM tab1
  1965.  
  1966. SET VARIABLE varname1 TO (expression)
  1967.   SET VAR area TO (.#PI*r**2)
  1968.   SET VAR wholenm TO (.fn & .ln)
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981. WHERE condlist...
  1982.   an expression can be a condition
  1983.   WHERE netval GT ('rating'*'avesal')
  1984.  
  1985. WHILE condlist THEN
  1986.   an expression can be a condition
  1987.   WHILE duedt LE (.#DATE + 30) THEN
  1988.   WHILE (.v1**2) NE (105%.totrow) THEN
  1989.  
  1990. Expression Limits
  1991.  
  1992. 160 Total number of characters per expression
  1993. 10  Computed columns (which are, in effect, expressions) per table
  1994. 25  Columns and/or variables per expression
  1995. 75  Nesting levels (except for text expressions where nesting is not
  1996. allowed.
  1997. 50  "Items" per expression  For example: ((a + b) - (c + sqrt(d)))
  1998.                                            - - -  -  - -   -  -
  1999.     has a total of eight items including:  a + b  -  c + sqrt d.
  2000.  
  2001. Expression Axioms
  2002.  
  2003.   ■  COMPUTE cannot use TEXT expressions
  2004.   ■  TEXT expressions will not support nesting
  2005.   ■  TEXT expressions must be enclosed in parentheses when used as a
  2006.   "value".  For example, ...WHERE csz EQA (cty&st&zip)
  2007.   ■  Arguments used with TEXT functions must be constants, columns, or
  2008.   variables
  2009.   ■  REDEFINE cannot be used on a column that is used in a computed
  2010.   column definition.  For example, if COL3 is defined as (COL1 *
  2011.   COL2), neither COL1 or COL2 can be REDEFINED
  2012.   ■  NOTE columns cannot be used in expressions nor can NOTE columns
  2013.   be the result of an expression
  2014.   ■  NOTE columns cannot be computed columns
  2015.  
  2016. New Math Operators
  2017.  
  2018.   ■  Unary plus (+)
  2019.   ■  Unary minus (-) which is the same as multiplying by -1
  2020.   ■  Multiplication (* replaces the X symbol, however R:BASE 5000
  2021.   commands using the X operator with spaces before and after, will
  2022.   function correctly in System V)
  2023.   ■  **  Exponentiation
  2024.  
  2025. Some Parsing Information
  2026.  
  2027. First, the expression parser determines if the item is a variable,
  2028. column, or a value.  The following takes priority with the parser:
  2029.  
  2030.   ■  .varnm - the dot (.) tells the expression parser that the item is
  2031.   a variable
  2032.   ■  'aaaaa' - the single quotes indicate that this is a column name.
  2033.   Use only the "right leaning" single quote located on the quotations
  2034.   key on your keyboard.  The left leaning single quote will not work.
  2035.   ■  "aa bb" - the double quotes means treat this as one item.  In
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.   R:BASE System V both numeric items and text items may be enclosed in
  2048.   quotes.
  2049.  
  2050. Second, the expression parser checks whether the item is a valid
  2051. INTEGER, DOUBLE, CURRENCY, DATE, or TIME.  This is the exact order
  2052. that the parser uses in determining the type.  Notice that REAL is not
  2053. in the list.  If an item has not been pretyped but is a valid REAL, it
  2054. will automatically be given a data type of DOUBLE.  The only way to
  2055. assign a REAL data type is to pretype the item.
  2056.  
  2057. Third, the expression parser checks whether an item is a function,
  2058. column name, or variable.
  2059.  
  2060. Fourth, if the item meets none of the above tests, the parser treats
  2061. the item as a literal text string.
  2062.  
  2063. Evaluation Order For Expressions
  2064.  
  2065. Complex expressions are evaluated using the following order:
  2066.  
  2067.   ■  Expressions inside internal parentheses are resolved first
  2068.   ■  Functions are evaluated second
  2069.   ■  Unary + or - situations are resolved next
  2070.   ■  Exponentiation operations are then performed
  2071.   ■  Multiplication or division operations are resolved in a left to
  2072.   right order next
  2073.   ■  Percent operations are done as the next to last step
  2074.   ■  Addition or subtraction operations are done last
  2075.  
  2076. Expression Evaluation Examples
  2077.  
  2078. ((2*6)/(2**2+4))
  2079.  
  2080.     Internal parentheses: 12/(2**2+4)
  2081.     Within the second set of parentheses:
  2082.          Exponentiation: 12/(4+4)
  2083.          Addition: 12/8
  2084.     Division: 1.5 (Answer)
  2085.  
  2086. (-.num*(2+2)**3) assuming num=3
  2087.     Internal parentheses: -.num*4**3
  2088.     Unary -: -3*4**3
  2089.     Exponentiation: -3*64
  2090.     Multiplication: -192 (Answer)
  2091.  
  2092. ((12-SQRT(16)/2)%20)
  2093.     Internal parentheses
  2094.          Functions: (12-4/2)%20
  2095.          Division: (12-2)%20
  2096.          Subtraction: 10%20
  2097.     Percent: 2 (Answer)
  2098.  
  2099. NULL Values In Expressions
  2100.  
  2101. NULL values may be handled in one of two ways.  They can either be
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113. treated as 0 or as a "black hole."  The SET ZERO ON/OFF command
  2114. controls this situation. If ZERO is set off (and off is the default
  2115. setting), numeric expressions containing NULL values will always have
  2116. NULL as an answer.  With ZERO set on, NULL values are treated as if
  2117. they are equal to zero in numeric operations.
  2118.  
  2119. Also, be aware that numeric variables that have NULL values when added
  2120. together will cause a zero result, if ZERO has been set on with the
  2121. SET ZERO ON command.  For example, if variable V1 is NULL and varible
  2122. V2 is NULL, the following code will make variable V3 equal to zero:
  2123.  
  2124. SET ZERO ON
  2125. SET VAR V3 = (.V1 + .V2)
  2126.  
  2127. If ZERO is set off, then V3 in the above example would be NULL.
  2128.  
  2129.  
  2130.  
  2131.  
  2132. MICRORIM TECHNICAL NOTE
  2133. ________________________________________________________
  2134.  
  2135. MODIFYING THE RBSYSTEM MAIN MENU IN R:BASE SYSTEM V
  2136.  
  2137. DATE      :  08/86                   NUMBER       :  EX-8-4
  2138. PRODUCT   :  R:BASE SYSTEM V         VERSIONS     :  1.0
  2139. CATEGORY  :  PROGRAM                 SUBCATEGORY  :  RBSYSTEM MENU
  2140.  
  2141. ________________________________________________________
  2142.  
  2143. DESCRIPTION:   I want to customize the main menu that comes up when
  2144. the operator enters RBSYSTEM to add a DOS batch file.
  2145.  
  2146.  
  2147.  
  2148. EXPLANATION:   The main RBSYSTEM menu can be customized by modifying
  2149. the RBSYSTEM.ASC file.  When R:BASE System V was shipped to you the
  2150. main menu looked like this:
  2151.  
  2152. |------------------------------------------------------------------------------|
  2153. |                                                                              |
  2154. |                   ***************           |-----------------------------|  |
  2155. |                *********************        |   R:BASE System V           |  |
  2156. |             ***************************     |-----------------------------|  |
  2157. |           ******************************    |   Definition EXPRESS        |  |
  2158. |         ****************    ************    |   Application EXPRESS       |  |
  2159. |       ***************       *************   |   Forms EXPRESS             |  |
  2160. |      ***************       **************   |   Reports EXPRESS           |  |
  2161. |     ***************      ***************    |   R:BASE                    |  |
  2162. |    ****************   *****************     |   RBEDIT                    |  |
  2163. |   *****************   *************         |   FileGateway               |  |
  2164. |   *****************   **************        |   CodeLock                  |  |
  2165. |  ******************   ***************       |   Return to DOS             |  |
  2166. |  ******************   ****************      |                             |  |
  2167. |  ******************   *****************     |                             |  |
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179. |  ******************   ******************    |                             |  |
  2180. |  ******************   *******************   |-----------------------------|  |
  2181. |                                                                              |
  2182. |                                                                              |
  2183. |                   Copyright (c) by Microrim, Inc., 1986                      |
  2184. |------------------------------------------------------------------------------|
  2185.  
  2186. And the RBSYSTEM.ASC file looked like this:
  2187.  
  2188. SET COLOR FORE 7
  2189. SET COLOR BACK 0
  2190. 1 "Definition EXPRESS"  "RBDEFINE -R -F7 -B0"
  2191. 2 "Application EXPRESS" "EXPRESS  -R -F7 -B0"
  2192. 3 "Forms EXPRESS"       "FORMS    -R -F7 -B0"
  2193. 4 "Reports EXPRESS"     "REPORTS  -R -F7 -B0"
  2194. 5 R:BASE                "RBASE    -R -F7 -B0 -P"
  2195. 6 RBEDIT                "RBEDIT   -R -F7 -B0"
  2196. 7 FileGateway           "GATEWAY  -R -F7 -B0"
  2197. 8 CodeLock              "CODELOCK -R -F7 -B0"
  2198. 0 "Return to DOS"
  2199.  
  2200. Notice that when the product is shipped there are nine choices listed
  2201. in the RBSYSTEM.ASC file.  If you wish to modify the current choices
  2202. in the menu, read the instructions beginning on page 10-10 of the
  2203. R:BASE System V User's Manual.
  2204.  
  2205. The main reasons for modifying the main menu are:
  2206.  
  2207.   ■  To change the order of the choices listed in the menu.
  2208.   ■  To remove choices from the list
  2209.   ■  To add an .EXE or .COM executable file to the menu
  2210.   ■  To change the options (-P, -M1, etc.) on one or more of the
  2211.   choices
  2212.   ■  To change the colors for a particular module
  2213.   ■  To add a DOS batch file to the choices.
  2214.   ■  To add an auto execute file to an R:BASE module, or have several
  2215.   R:BASE modules with each one automatically executing a different
  2216.   R:BASE application.
  2217.  
  2218. The manual covers how to do all of these modifications except for the
  2219. last two.  This technical note will address how to add a DOS batch
  2220. file to the menu choices and how to have several R:BASE applications
  2221. in your menu.
  2222.  
  2223.  
  2224.  
  2225. SOLUTION:   To add a DOS batch file to the RBSYSTEM menu, first, write
  2226. the batch file that you want to use.  For example, a batch file that
  2227. did a directory, paused, and then returned to the RBSYSTEM main menu
  2228. would look like this:
  2229.  
  2230. ECHO OFF
  2231. DIR
  2232. PAUSE
  2233. EXIT
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246. The PAUSE command in DOS stops execution of the batch file and
  2247. displays the message:
  2248.  
  2249. Press any key to continue
  2250.  
  2251. The EXIT command gets you back to the RBSYSTEM main menu.  It is not
  2252. required, but it is fine to have it in the file if you want it.
  2253.  
  2254. Second, add the batch file line to the RBSYSTEM.ASC file.  It does not
  2255. have to go at the bottom of the file.  Put the line in the position
  2256. you want it to display in the menu and assign a number larger than 99
  2257. and a choice name to it.  For example, if you have a batch file that
  2258. does some disk management functions and the file is named MANAGE.BAT,
  2259. your entry in the RBSYSTEM.ASC file should be similar to the
  2260. following:
  2261.  
  2262. 100 "Disk Management" "COMMAND /C MANAGE.BAT"
  2263.  
  2264. Your RBSYSTEM.ASC may look like this after adding the MANAGE.BAT batch
  2265. file, removing the EXPRESS options, and changing the order on the
  2266. RBEDIT and FileGateway options:
  2267.  
  2268. SET COLOR FORE 7
  2269. SET COLOR BACK 0
  2270. 5 R:BASE                "RBASE    -R -F7 -B0 -P"
  2271. 7 FileGateway           "GATEWAY  -R -F7 -B0"
  2272. 100 "Disk Management"   "COMMAND /C MANAGE"
  2273. 6 RBEDIT                "RBEDIT   -R -F7 -B0"
  2274. 8 CodeLock              "CODELOCK -R -F7 -B0"
  2275. 0 "Return to DOS"
  2276.  
  2277. The COMMAND /C portion of the line is required.  It invokes
  2278. COMMAND.COM (the file that comes with DOS) and then calls the batch
  2279. file MANAGE.BAT.  You need to have your COMMAND.COM file in the root
  2280. directory of your hard disk.  Make sure that the root directory is
  2281. included in your DOS path command.
  2282.  
  2283. Notice that even though the R:BASE System V modules have been
  2284. rearranged, the numbers associated with each module have not been
  2285. changed.  No matter where you locate the R:BASE line, it always keeps
  2286. it's number 5, FileGateway keeps 7, RBEDIT keeps 6, etc.
  2287.  
  2288. It is also possible to repeat the R:BASE number 5 line as many times
  2289. as you like with different parameters, choice name, and auto execute
  2290. files associated with it.  This is great for choosing applications
  2291. from the the RBSYSTEM menu.  For example, the RBSYSTEM.ASC file listed
  2292. below would give the operator the option of choosing the following
  2293. three ways of running R:BASE:
  2294.  
  2295.   ■  R:BASE with prompts
  2296.   ■  R:BASE without prompts
  2297.   ■  Orders Application
  2298.  
  2299. SET COLOR FORE 7
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311. SET COLOR BACK 0
  2312. 5 "R:BASE with prompts" "RBASE    -R -F7 -B0 -P"
  2313. 5 "R:BASE (no prompts)" "RBASE    -R -F7 -B0"
  2314. 5 "Orders Application"  "RBASE    -R -F7 -B0 ORDERS.CMD"
  2315. 7 FileGateway           "GATEWAY  -R -F7 -B0"
  2316. 6 RBEDIT                "RBEDIT   -R -F7 -B0"
  2317. 0 "Return to DOS"
  2318.  
  2319. The operator would now get the following RBSYSTEM menu:
  2320.  
  2321. |------------------------------------------------------------------------------|
  2322. |                                                                              |
  2323. |                   ***************           |-----------------------------|  |
  2324. |                *********************        |   R:BASE System V           |  |
  2325. |             ***************************     |-----------------------------|  |
  2326. |           ******************************    |   R:BASE with prompts       |  |
  2327. |         ****************    ************    |   R:BASE (no prompts)       |  |
  2328. |       ***************       *************   |   Orders Application        |  |
  2329. |      ***************       **************   |   FileGateway               |  |
  2330. |     ***************      ***************    |   RBEDIT                    |  |
  2331. |    ****************   *****************     |   Return to DOS             |  |
  2332. |   *****************   *************         |                             |  |
  2333. |   *****************   **************        |                             |  |
  2334. |  ******************   ***************       |                             |  |
  2335. |  ******************   ****************      |                             |  |
  2336. |  ******************   *****************     |                             |  |
  2337. |  ******************   ******************    |                             |  |
  2338. |  ******************   *******************   |-----------------------------|  |
  2339. |                                                                              |
  2340. |                                                                              |
  2341. |                                                                              |
  2342. |                   Copyright (c) by Microrim, Inc., 1986                      |
  2343. |------------------------------------------------------------------------------|
  2344.  
  2345.