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

  1. APPLICATIONS MAKER - HELP FOR FILE ITEMS
  2.  
  3. The  FILE  ITEMS execute operations relevant to the  manipulation  of
  4. datafiles.  They are of seven types:  GET RECORD, WRITE RECORD,  NEW,
  5. RELATIONAL WRITE, LOAD MARKER and SHOW.
  6.  
  7. GET RECORD ITEMS:  With the GET RECORDs the next available record  in
  8. the  targeted file will be read into the file's buffer.  The data  it
  9. contains  will  then  be available for use.  If you  have  loaded  no
  10. MARKER  FILE these items will read all the records in the  file.   If
  11. you have used the LOAD MARKER ITEM (below) these items will read  the
  12. records in the MARKER FILE, in whatever order they're in.
  13.  
  14. The  GET  RECORD  ITEMS take a label as an argument.   When  all  the
  15. records  have been processed (end of file or marker) the  GET  RECORD
  16. ITEM will do a forward goto, branching to that label.
  17.  
  18. WRITE RECORD ITEMS:  With the WRITE RECORDs the data in the buffer of
  19. the targeted file will be written to disk into the record from  which
  20. it  came.
  21.  
  22. These  items  differ  from the RELATIONAL WRITES in  that  the  write
  23. happens  whenever  the item is encountered and an  entire  record  is
  24. written  instead of a single field.
  25.  
  26. The  use  of  the  WRITE  RECORD items  can  cause  trouble  if  your
  27. application  terminates prematurely due to an error.  Your  file  has
  28. been  updated  and  the rest of your  application,  after  the  error
  29. occurred,  did not happen.  So, place WRITE RECORD items as  near  as
  30. possible  to  the end of your application, after any  possibility  of
  31. aborting the application.
  32.  
  33. NEW  ITEMS:  With the NEW items a new record in the targeted file  is
  34. created.   Your  user will need to select, or allow  the  program  to
  35. select, a record number for the new record.
  36.  
  37. The NEW item MUST be used in applications that write new records into
  38. datafiles.   Failure to do so will cause the first or current  record
  39. in the file to be over-written when the write is executed.
  40.  
  41. When  NEW  is used the first available hole in the  file  (caused  by
  42. record  deletion) or new disk space for the record is read  into  the
  43. file's  buffer and any data it may contain is replaced by  spaces  or
  44. zero.  Thusly, a NEW RECORD is created.
  45.  
  46. So,  use  NEW items at the top of your screen, or at the top  of  the
  47. segment  of your "program" that creates a new record.  The  NEW  item
  48. must  be  executed  before any of the fields in the  new  record  are
  49. filled.  Using NEW after some of the fields are filled will WIPE THEM
  50. OUT.  Use a WRITE RECORD item when you have placed the necessary data
  51. into the record, to record it to disk.
  52.  
  53. RELATIONAL  WRITE ITEMS:  With the RELATIONAL WRITEs  the  relational
  54. writes  stored in memory for the targeted file are written  to  disk.
  55.  
  56. These  relational  writes  are  created when  the  WRITE  TO  ANOTHER
  57. DATAFILE  option within data items is used.  Unlike the WRITE  RECORD
  58. item, these items will not be executed until the RELATIONAL WRITE  is
  59. encountered, presumably as the last step in your process, and only  a
  60. single field is written as opposed to an entire record.  So, if  your
  61. application ends with an error, nothing is changed.
  62.  
  63. If you update file five, field seven, then use that file/field  again
  64. before you execute the RELATIONAL WRITE the new value will be used as
  65. the list of relational writes is searched as data is read from disk.
  66.  
  67. Like  the  DO items the RELATIONAL WRITEs use memory to  store  their
  68. file,  field,  new  value and update mode.  And  they  could  exhaust
  69. available memory if not properly managed.  So, if your application is
  70. cyclic  and  updates  files  via  these  items  you  should  place  a
  71. RELATIONAL WRITE item for each file updated near the end of the cycle
  72. to  conserve memory.  If the application bombs these writes will  not
  73. be executed, and you're in trouble again.
  74.  
  75. RESET FILE ITEMS:  With the RESET FILEs the target file will be reset
  76. to  the first record.  If you have used the LOAD MARKER FILE item  to
  77. load  a marker for the file the marker file will be closed,  and  you
  78. will  be able to load another marker or process all records.   It  is
  79. not necessary to use this item just to close a marker.
  80.  
  81. LOAD  MARKER ITEMS:  With the LOAD MARKERs a MARKER FILE  written  by
  82. the BASE program in the targeted file is loaded.  These MARKER  FILES
  83. give  you the ability to process a pre-defined group of records in  a
  84. pre-defined  order.   After executing a LOAD MARKER  the  GET  RECORD
  85. items will fetch the next record from the marker instead of the file.
  86.  
  87. When  initializing  a LOAD MARKER item you may select a  MARKER  FILE
  88. from  the menu of the markers present.  You may also press escape  to
  89. bypass  file selection.  You will then have the option to  allow  the
  90. user of your application to select the a marker from that same  menu.
  91. This  is  handy  to do a report or operation on a  group  of  records
  92. selected at runtime.
  93.  
  94. SHOW  ITEMS:  With the SHOW items the currently loaded record in  the
  95. targeted file is displayed.  You select the file from the files menu,
  96. and  you  have the option to allow your user to edit the  record  and
  97. write it back to disk, or to display it read-only.