home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / rbnotes2.zip / EDTORIAL.11 < prev    next >
Text File  |  1986-02-21  |  13KB  |  369 lines

  1. DEFINED LENGTH VS. LOCATED LENGTH IN VARIABLE FORMS
  2.  
  3. DATE      :  02/05/86                NUMBER       :  EX-2-4
  4. PRODUCT   :  R5K                     VERSIONS     :  1.01
  5. CATEGORY  :  Varforms                SUBCATEGORY  :  Locations of Text Cols
  6.  
  7. ******************************************************************************
  8.  
  9. DESCRIPTION:  I located a variable that I defined as TEXT 4 on my
  10. variable form.  I only need one character as input so I located the E
  11. on top of the S in locate mode.  I have other text immediately
  12. following the location.  When I enter or edit that variable the text
  13. that is just to the right of the location is "grabbed" by the
  14. variable.
  15.  
  16.  
  17.  
  18.  
  19. EXPLANATION:   There are two types of lengths for TEXT type variables
  20. in variable forms, the defined length and the located length.  The
  21. located length is the determined by counting the S, the E, and all the
  22. spaces between the S and E.  The defined length is the actual length
  23. that you gave the TEXT variable when you defined it.
  24.  
  25. The located length can be shorter than the defined length or it can be
  26. the same size.  If the located length is shorter, R:base "pulls" the
  27. difference from whatever happens to be on the form immediately
  28. following the E of the location.
  29.  
  30. This can be useful when you want to concatenate a default value onto
  31. the end of whatever the operator enters.  For example, you could
  32. automatically concatenate a state abreviation to the end of each city
  33. entered by the operator.  If the you knew the state would always be MI
  34. for Michigan, you could avoid having the operator enter it each time
  35. by locating the CITY variable in 4 less positions than its definition
  36. would warrant.
  37.  
  38. To make this work, define CITY with a length of 20 and locate it in 16
  39. positions.  Then in the Edit mode of the FORMS command, enter the
  40. space, comma, and MI immediately following the E of the CITY location.
  41. The result will be similar to the following:
  42.  
  43. S              E ,MI
  44.  
  45. Now everything the operator enters into CITY will have the ,MI
  46. automatically concatenated onto the end of it.
  47.  
  48.  
  49.  
  50.  
  51. SOLUTION:   If you do not want R:base to grab text, make sure that the
  52. defined length of TEXT columns and the located length are the same or
  53. that only spaces follow the location.
  54.  
  55. To correct your current variable form, use the R:base FORMS command.
  56. When prompted for the name of the form, enter the variable form name.
  57. Choose the locate option and name your variable.  Change the defined
  58. length of the variable to exactly match the located length that you
  59. want.  Finally, locate your Ss and Es to match the definition.
  60. ******************************************************************************
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. HOW TO PRINT A PAGE FOOTER AT THE BOTTOM OF A PAGE
  68.  
  69. DATE      :  02/05/86                NUMBER       :  EX-2-5
  70. PRODUCT   :  R5K                     VERSIONS     :  1.01
  71. CATEGORY  :  Reports                 SUBCATEGORY  :  Placement of
  72. footer
  73.  
  74. ************************************************************************************
  75.  
  76. DESCRIPTION:   If there are less than thirty lines of detail printed
  77. on a page, the page footer prints under the detail and not on the
  78. bottom of the page.  How can I put the page footer at the foot of the
  79. page?
  80.  
  81.  
  82.  
  83.  
  84. EXPLANATION:   This is the way the report writer normally prints page
  85. footers.  However, there are several ways to work around this and
  86. actually print the page footer at the the bottom of the page.  The
  87. solution presented here is one way.
  88.  
  89.  
  90.  
  91.  
  92. SOLUTION:   See the article in the R:base EXCHANGE November 1985
  93. "Printing on Preprinted Forms" for a detailed explanation of this
  94. solution.  This solution is outlined below:
  95.  
  96. 1) First determine how many lines you would normally print on the page
  97. before the footer
  98.  
  99.      To do this, calculate the total number of lines on the page:   66
  100.                          Minus footer lines (10 in this example):   10
  101.                                                                     --
  102.           Leaving the number of lines to print before the footer:   56
  103.  
  104. 2) Set lines (on reports main menu) to the answer from step 1 (56 in
  105. this example)
  106.  
  107. 3) Define three report variables using the define mode of the REPORTS
  108. command.
  109.  
  110.     One for the printer control code for page size 56.
  111.     One for the printer control code for eject.
  112.     One for printer control code for page size 10.
  113.  
  114. You will need to refer to your printer manual to locate the decimal
  115. codes you will need for this third step.
  116.  
  117. 4) Locate the three report variables using the locate mode of the
  118. REPORTS command.
  119.  
  120.     Locate the variable for page size 56 at top of page header.
  121.     Locate the variable for eject as 1st var in page footer.
  122.     Locate the variable for page size 10 immediately following the
  123.     eject variable in the footer.
  124.  
  125. The footer will now be printed at the bottom of the page, and #page
  126. will count page numbers correctly.
  127. ************************************************************************************
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. AUTOEXEC.BAT AND DATE AND TIME
  136.  
  137. DATE      :  02/05/86                NUMBER       :  EX-2-6
  138. PRODUCT   :  R5K                     VERSIONS     :  1.01
  139. CATEGORY  :  DOS                     SUBCATEGORY  :  AUTOEXEC.BAT
  140.  
  141. ************************************************************************************
  142.  
  143. DESCRIPTION:   I put my CD and PATH commands in an AUTOEXEC.BAT file
  144. as I was told to do in the first chapter of the manual, and now my
  145. machine doesn't prompt me for the correct date and time.  How can I
  146. get it to prompt me again?
  147.  
  148.  
  149.  
  150.  
  151. EXPLANATION:   Some computer systems that automatically prompt for
  152. date & time when booted, stop prompting when there is an AUTOEXEC.BAT
  153. file.  DOS assumes that If you want to be prompted for DATE and TIME,
  154. you will put the appropriate commands in the AUTOEXEC.BAT file.
  155.  
  156.  
  157.  
  158.  
  159. SOLUTION:   Modify your AUTOEXEC.BAT file to include the DATE and TIME
  160. commands.  Then every time you boot your system you will be prompted
  161. to enter DATE and TIME.
  162.  
  163. For example, your AUTOEXEC.BAT file might contain the following lines:
  164.  
  165. PATH C:\DBDIR;C:\SYSTEM
  166. CD C:\DBDIR\DATA
  167. DATE
  168. TIME
  169. ************************************************************************************
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178. SUPPRESSING ERROR MESSAGES WHEN DELETING A FILE
  179.  
  180. DATE      :  02/05/86                NUMBER       :  EX-2-8
  181. PRODUCT   :  R5K                     VERSIONS     :  1.01
  182. CATEGORY  :  MESSAGES                SUBCATEGORY  :  SUPPRESSION
  183.  
  184. ************************************************************************************
  185.  
  186. DESCRIPTION:   When I set messages and error messages off, then
  187. delete a file, I still get the message that the file is being deleted.
  188.  
  189.  
  190.  
  191.  
  192. EXPLANATION:   Some commands print messages on the screen even though
  193. ERROR MESSAGES and MESSAGES have been set off.  The commands that
  194. currently do this include DELETE, COPY, RENAME, CHANGE COLUMN, and
  195. EXPAND.
  196.  
  197.  
  198.  
  199.  
  200. SOLUTION:   In your command file, you can work around this problem by
  201. sending the message into a file.  This way the user will never see the
  202. message.  For example, you could delete a file by using the following
  203. set of three commands before deleting the file:
  204.  
  205. OUTPUT TRASHCAN
  206. DELETE filename
  207. OUTPUT SCREEN
  208.  
  209. This will delete the file, but send the message to an output file
  210. named TRASHCAN rather than to the screen.
  211. ************************************************************************************
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219. WHEN DOLLAR SIGN IS SET TO BLANK, DOLLAR MATH IS INCORRECT
  220.  
  221. DATE      :  02/05/86                NUMBER       :  EX-2-9
  222. PRODUCT   :  R5K                     VERSIONS     :  1.01
  223. CATEGORY  :  MATH                    SUBCATEGORY  :  DOLLAR
  224.  
  225. ******************************************************************************
  226.  
  227. DESCRIPTION:   When doing dollar arithmetic, I get unexpected results
  228. or I get the following error message :
  229.  
  230. -ERROR- Expression cannot be evaluated
  231.  
  232. This only occurs when doing dollar arithmetic using global variables.
  233.  
  234.  
  235.  
  236.  
  237. EXPLANATION:   R:base does not handle dollar arithmetic correctly when
  238. the dollar sign is set to a blank.  R:base does not look at the data
  239. type, it looks only at the value.  Because there is no dollar sign on
  240. the number, dollar math is no longer possible.  R:base gets confused
  241. because both the BLANK and DOLLAR are set to a blank.  If you set
  242. DOLLAR to something that nothing else is set to (such as the pound
  243. sign #), then dollar math will work correctly.
  244.  
  245. Any dollar value that contains a comma will not work at all.  In
  246. addition, the following three examples also demonstrate what is
  247. happening:
  248.  
  249.  
  250. EXAMPLE ONE:
  251. This example shows normal dollar arithmetic.  Here everything comes
  252. out the way you would expect because DOLLAR is set to the dollar sign:
  253.  
  254.  
  255. SET DOLLAR=$
  256. SHOW VARIABLE
  257. Variable = Value                              Type
  258. --------   ------------------------------     ----
  259. #DATE    = 01/30/86                           DATE
  260. #TIME    =  8:43:21                           TIME
  261. V1       =                   $100.00          DOLLAR
  262. V2       =                    $25.00          DOLLAR
  263.  
  264.  
  265.  
  266. SET VARIABLE V3 TO .V1 + .V2
  267. SHOW VARIABLE
  268. Variable = Value                              Type
  269. --------   ------------------------------     ----
  270. #DATE    = 01/30/86                           DATE
  271. #TIME    =  8:44:20                           TIME
  272. V1       =                   $100.00          DOLLAR
  273. V2       =                    $25.00          DOLLAR
  274. V3       =                   $125.00          DOLLAR
  275.  
  276.  
  277. EXAMPLE TWO:
  278. This example shows the same calculation as example one but here DOLLAR
  279. is first set to a blank.  Here the variable V3 is computed without an
  280. error message but it is given a REAL data type instead of DOLLAR.
  281.  
  282. CLEAR V3
  283. SET DOLLAR=
  284. SET VARIABLE V3 = .V1 + .V2
  285. SHOW VARIABLE
  286. Variable = Value                              Type
  287. --------   ------------------------------     ----
  288. #DATE    = 01/30/86                           DATE
  289. #TIME    =  8:45:31                           TIME
  290. V1       =                   100.00           DOLLAR
  291. V2       =                    25.00           DOLLAR
  292. V3       =           125.00                   REAL
  293.  
  294.  
  295. EXAMPLE THREE:
  296. This example demonstrates that if you first set DOLLAR to a blank and
  297. you preassign a DOLLAR data type to the V3 variable, then you get the
  298. error message and R:base will not perform the calculation.
  299.  
  300. CLEAR V3
  301. SET DOLLAR=
  302. SET VARIABLE V3 DOLLAR
  303. SET VARIABLE V3 TO .V1 + .V2
  304. -ERROR- Expression cannot be evaluated
  305. SHOW VARIABLE
  306. Variable = Value                              Type
  307. --------   -----------------------------      -----
  308. #DATE    = 01/30/86                           DATE
  309. #TIME    = 11:37:19                           TIME
  310. V1       =                    100.00          DOLLAR
  311. V2       =                     25.00          DOLLAR
  312. V3       = -0-                                DOLLAR
  313.  
  314.  
  315. If you set DOLLAR back to the dollar sign, then the problems
  316. demonstrated by the second and third examples do not occur.  Instead,
  317. you get accurate results like that in the first example.
  318.  
  319.  
  320.  
  321.  
  322. SOLUTION:   Set the dollar sign back to $ with the command:
  323.  
  324. SET DOLLAR=$
  325.  
  326. before doing calculations, and set it to blank afterwards if
  327. necessary.
  328. ************************************************************************************
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. MODIFYING LABELS.MAC
  339.  
  340. DATE      :  02/05/86                NUMBER       :  EX-2-10
  341. PRODUCT   :  R5K                     VERSIONS     :  1.01
  342. CATEGORY  :  LABELS                  SUBCATEGORY  :  LABELS.MAC
  343.  
  344. ************************************************************************************
  345.  
  346. DESCRIPTION:   I modified LABELS.MAC to include my column names, and I
  347. am running it from within my own command file as a macro (with a RUN
  348. LABELS.MAC command line), but it keeps dumping me to the R> when it is
  349. finished processing.  It should be returning to the next line in my
  350. calling command file.
  351.  
  352.  
  353.  
  354.  
  355. EXPLANATION:   LABELS.MAC has the following command as the final
  356. command line in the file:
  357.  
  358. INPUT TERMINAL
  359.  
  360. This terminates processing.  The QUIT command and the INPUT SCREEN
  361. commands will also terminate the processing of the calling command
  362. file.
  363.  
  364.  
  365.  
  366.  
  367. SOLUTION:   Change the last line of LABELS.MAC to say RETURN.  Control
  368. will then return to your command file instead of the R> prompt.
  369.