home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / datamage.zip / HELPFILS.ZIP / MACROERR.HLP < prev    next >
Text File  |  1991-09-25  |  5KB  |  93 lines

  1. "MACRO ERROR OPTIONS HELP"
  2.  
  3. "Somewhere between 1958 and 1960  somebody  wrote  the  first  computer"
  4. "program.  Endless quibbling can be done on what constitutes a program,"
  5. "so the poor guy still, as far as I know, hasn't gotten credit for it."
  6.  
  7. "Soon after the first program was written,  or perhaps during it's cre-"
  8. "ation, somebody thought:  WHAT IF  something goes wrong right here...."
  9.  
  10. "The concept of PROGRAMMING and ERROR TRAPPING are of approximately the"
  11. "same age, and are siamese twins.  Each  time a new  program is created"
  12. "one of the things the PROGRAMMER must do is to separate them, and make"
  13. "them both behave."
  14.  
  15. "When you write a MACRO you (yep, YOU) are the programmer. The fact you"
  16. "are programming a program instead of the computer is of little conceq-"
  17. "uence when you realize the RESULTS are the same."
  18.  
  19. "YES YOU CAN program.  If you have used  DATAMAGE  to select a group of"
  20. "records and print them you ALREADY HAVE! You have issued a first-class"
  21. "programming command:  IF (parameters  you  selected to form the group)"
  22. "THEN PRINT THE RECORDS.  And you have, no doubt, met with  success in"
  23. "doing so.  So, the hard part is behind you."
  24.  
  25. "DATAMAGE, like the programming language of your choice,  consists of a"
  26. "limited number of functions.  Many of the functions will do different,"
  27. "though similar, operations when various parameters are specified."
  28.  
  29. "Like a programmer, the user selects these functions and specifies par-"
  30. "ameters to them.   The functions are building blocks,  of which a very"
  31. "great number of possible process can be constructed."
  32.  
  33. "Most ways to program group your  function  selections  into a program."
  34. "DATAMAGE allows you the option of making a program:  The MACRO."
  35.  
  36. "There's DANGER in MACROland. A poorly designed MACRO can work well for"
  37. "six months or six years, then blow up in your face.   Leaving you with"
  38. "some of your records having been processed,  some not,  and no  way to"
  39. "determine which is whom."
  40.  
  41. "Let's say we have a customer file with records from all states.  Every"
  42. "so often we need to print our receivables by state in order on amount."
  43. "While we're at it, we'll post interest on the balance to the record."
  44.  
  45. "A MACRO is written that selects records in the  target state,  selects"
  46. "records in the survivors having a balance of > 0,  sorts  on  balance,"
  47. "prints a report, computes/adds interest, etc.  Then re-loads the file,"
  48. "and does it again until all fifty states have been processed."
  49.  
  50. "The macro is carefully verified, implemented,  and runs fine for three"
  51. "months.  The forth month all our customers in Montana are paid up. The"
  52. "MACRO expects to find Montana records to process but has found none."
  53.  
  54. "If this had happened during manual  program operation  DATAMAGE  would"
  55. "have provided the appropriate error message, and how to proceed  would"
  56. "then be left up to the user.  In a MACRO that's not good enough."
  57.  
  58. "If the MACRO aborts we are left in the sad situation  described above."
  59. "The operator (whenever the MACRO is run) CAN NOT be counted upon to be"
  60. "able to recover from an error of this type.  So the MACRO must recover"
  61. "the error and continue processing the remainder of the states."
  62.  
  63. "In order for the MACRO to recover it must  JUMP OVER  the instructions"
  64. "that compute the Montana records, and resume processing with the first"
  65. "instruction that processes the records for the next state."
  66.  
  67. "After the processing of each states' records the  entire  file was re-"
  68. "loaded using the F11 function, then the F7 function was used to select"
  69. "the records in the next state to be processed.  If the MACRO jumped to"
  70. "the next F11 the recovery would be successful."
  71.  
  72. "The above situation is often  duplicated,  but a marker file is loaded"
  73. "between the processes. For that reason you may also select resume next"
  74. "load marker as an error option."
  75.  
  76. "In some cases you would want a MACRO to end early if no survivors were"
  77. "found during a record-select operation. The ABORT error option will do"
  78. "that, and the message FATAL ERROR IN MACRO will be displayed."
  79.  
  80. "Depending on the complexity of the task a  MACRO  may or may not be an"
  81. "acceptable way of doing it.  If you need  the  kind of  error trapping"
  82. "that allows you to re-direct the control to any label you have defined"
  83. "inside your program then get QUICK BASIC and write your own program."
  84.  
  85. "If DATAMAGE  allowed that kind of  processing it would,  of necessity,"
  86. "exclude many  users incapable of programming at that level.   In other"
  87. "words you would have to be a programmer to be able to use the program."
  88. "And that's NOT what we're doing, here."
  89.  
  90. "Before embarking upon any serious  MACRO recording you should read the"
  91. "instruction file MACRO.DOC that came with your  DATAMAGE.   These help"
  92. "screens are supposed to be brief, and this one already isn't."
  93.