home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a114 / 1.img / UTIL / UTIL.ZIP / FLIMPORT.DOC next >
Encoding:
Text File  |  1990-08-25  |  9.4 KB  |  243 lines

  1. FLIMPORT
  2.  
  3. FLIMPORT creates a Paradox table from fixed-length ASCII format records.
  4.  
  5. ASCII tables can have either comma-delimited, variable-length fields or
  6. fixed-length fields and records. With fixed-length records, there usually
  7. is no marker to indicate the start of each field; you need to know the
  8. starting point and length of each field to interpret the data in these
  9. records.
  10.  
  11. FLIMPORT lets you define a specification file that contains this
  12. information. It then uses this specification file to either create a new
  13. table or append records to an existing table.
  14.  
  15. To start FLIMPORT, at the DOS prompt enter the command
  16.  
  17.    flimport
  18.  
  19. A Paradox-like menu appears with the options Create, Modify, Print, Import,
  20. Length, and Exit. Press the F1 function key for help anywhere in the
  21. program.
  22.  
  23. Create lets you build a new import specification from scratch. At the Spec
  24. File Name prompt, enter the name of the specification file you want to
  25. create, including drive and path. Enter import specifications as described
  26. below.
  27.  
  28. Modify lets you change any import specifications you have previously
  29. created. When prompted, enter the path and file name of the specification
  30. file to change. Change the import specifications as described below.
  31.  
  32. Print prints a formatted list of import specifications from a file. Before
  33. choosing this option, be sure your printer is on and ready.
  34.  
  35. Import is what actually imports data into a Paradox table. At the Spec File
  36. Name prompt, enter the name of the specification file to use. Import loads
  37. this file into memory and uses it to import data into the table.
  38.  
  39. Length displays the length of your fixed-length records. If you have
  40. trouble importing records, use this option to compare the actual record
  41. length with the length you entered into the specification file.
  42.  
  43.  
  44. Entering import specifications
  45.  
  46. After you choose Create or Modify and enter a file name, two forms appear
  47. onscreen. In the Table/Source Specs form, enter information about the table
  48. and file to be imported (the source file). In the Field Spec form, enter
  49. information about Paradox fields and the origin of the data used to
  50. populate them. Enter data as you do in Paradox. The up and down arrow keys
  51. move you between fields; the F3 and F4 function keys (Up Image and Down
  52. Image) move you between the two forms.
  53.  
  54.  
  55. Table and source specifications
  56.  
  57. The "Table/Source Spec" form has four fields to describe the Paradox table
  58. and the file to be imported into it.
  59.  
  60. In the Table Name field, enter the name of the Paradox table you're
  61. importing the records into. Don't type the .DB suffix; this is assumed by
  62. FLIMPORT.
  63.  
  64. In the Action field, type the word Create or Append or Overwrite.
  65.  
  66.      Create builds a new table from scratch, as long as no table with that
  67.      name already exists.
  68.  
  69.      Append adds new records to an existing table. CAUTION: Do not append
  70.      new records to an indexed table, as FLIMPORT treats all tables as
  71.      unindexed; it adds records to the end of the table, not in key
  72.      sequence.
  73.  
  74.      Overwrite builds a new table; if a table with that name already
  75.      exists, it is overwritten.
  76.  
  77. In the Source field, enter the name of the file containing records to
  78. import. Include drive and path, if necessary.
  79.  
  80. In the Record Length field, enter the length of all records in the source
  81. file.
  82.  
  83. FLIMPORT reads ASCII text from the source file until it encounters a
  84. carriage return/linefeed, which marks the end of the record. FLIMPORT
  85. expects all records to be the same length; the fields are fixed-length, and
  86. every record usually has the same number of fields. However, FLIMPORT can
  87. handle one special case: Characters or fields that aren't of interest can
  88. be truncated from the end of a record; if there are fewer characters in the
  89. record than specified, FLIMPORT pads the rest of the record with blanks. If
  90. there are more characters in the record than specified, they are ignored.
  91.  
  92.  
  93. Field specifications
  94.  
  95. The Field Spec form lets you describe fields in the Paradox table and
  96. source records. Here you enter the Paradox field names and types, along
  97. with information about where to find the source data to populate them.
  98.  
  99. On the Field Name line, enter the name of the Paradox field to contain the
  100. imported data.
  101.  
  102. On the Field Type line, enter a valid Paradox field type:
  103.  
  104.           N = numeric format
  105.           $ = dollar format
  106.           S = integer format
  107.           D = date format
  108.           Annn = character format of size nnn
  109.  
  110. On the Starting Position line, enter the starting position in the source
  111. file's records where the field begins.
  112.  
  113. On the Field Length line, enter the length of the source field.
  114.  
  115. After you have described the first field, press PgDn to get a fresh form
  116. for the next field. The following keys move you through the stack of Field
  117. Spec forms:
  118.  
  119.      PgDn displays the next field spec. If you are in the last field spec,
  120.      it displays a new blank form.
  121.  
  122.      PgUp displays the previous field spec. If you are in the first field
  123.      spec, it displays the last field spec.
  124.  
  125.      Home moves to the first field spec; End moves to the last.
  126.  
  127.      Del deletes the current field spec.
  128.  
  129.      Ins inserts a blank field spec form in the middle of the stack.
  130.  
  131. To leave Create or Modify, press the F10 function key to see the
  132. Specification Menu. The options are Save, Cancel, Print, Import, and
  133. Resume.
  134.  
  135. Save (or the F2 function key) writes the current specifications to the disk
  136. file you specified after choosing Create or Modify. If an incorrect value
  137. exists in any field, the save is canceled and the cursor positioned in the
  138. incorrect field. This prevents saving any invalid specification.
  139.  
  140. Cancel lets you leave Create or Modify without saving and return to the
  141. main menu.
  142.  
  143. Print sends the current specification to the printer.
  144.  
  145. Import lets you import a file according to the current specifications. As
  146. with Save, you are prompted to correct any invalid specifications before
  147. importing.
  148.  
  149. Resume lets you go back to editing your import specifications. Esc does the
  150. same thing.
  151.  
  152.  
  153. Importing records
  154.  
  155. Choose Import from the main menu and enter the name of the specification
  156. file. FLIMPORT first loads and verifies this file, then imports the records
  157. from the source file to the Paradox table. It validates source fields
  158. against the corresponding Paradox field types. If discrepancies occur,
  159. FLIMPORT either prints or displays all invalid fields. Invalid source
  160. fields are imported as empty (null) fields.
  161.  
  162. To avoid import problems, use the following table as a guide. It describes
  163. which ASCII formats can be successfully imported into each Paradox field
  164. type. As a general rule, both leading and trailing blanks are ignored. A
  165. source field that contains all blanks is imported into Paradox as an empty
  166. (null) field.
  167.  
  168. Field Type          Acceptable Values
  169. -------------------------------------------------------
  170.  
  171. N (numeric)    All numbers, including those containing
  172.                a decimal point; leading blank spaces,
  173.                dollar signs, and commas are ignored;
  174.                a minus sign can indicate a negative value.
  175.  
  176. $ (dollar)     Same as N (numeric)
  177.  
  178. S (integer)    Same as N (numeric), but any numbers
  179.                to the right of the decimal point
  180.                are ignored; maximum value is +32767
  181.                and minimum value is -32767.
  182.  
  183. D (date)       The following formats are valid:
  184.  
  185.                m/dd/yy       mm/dd/yy
  186.                m/dd/yyyy     mm/dd/yyyy
  187.                yy/mm/dd      yyyy/mm/dd
  188.  
  189.                You can also use a dash instead
  190.                of the slash to separate parts of
  191.                a date.
  192.  
  193. A (character)  Any valid ASCII character can be
  194.                imported; after removing trailing blanks,
  195.                the remaining value cannot be longer than
  196.                the Paradox field.
  197.  
  198.  
  199. Cancelling the Import
  200.  
  201. To cancel an import in progress, press [Ctrl][Break]. FLIMPORT returns you
  202. to where you began the import. The table contains all the records imported
  203. before you cancelled the operation.
  204.  
  205.  
  206. Batch Mode
  207.  
  208. If you have an existing specification file you use periodically to import
  209. data into Paradox, use FLIMPORT in batch mode. You do not have to respond
  210. to any prompts and can specify the device to which you want source data
  211. errors directed. To invoke FLIMPORT in batch mode, enter this command at a
  212. DOS prompt:
  213.  
  214.      flimport <spec filename> -print
  215.  
  216. where <spec filename> is the name of the specification file. The -print
  217. parameter is optional. For example,
  218.  
  219.      flimport receipts.spc -print
  220.  
  221. imports to a Paradox table according to specifications in RECEIPTS.SPC and
  222. sends any source file errors to the printer. If you want to send errors to
  223. the screen, simply leave out the -print option.
  224.  
  225.  
  226. Control Key Summary
  227.  
  228. F1                  display help screen
  229. F2                  save the current specification
  230. F3                  move cursor to the Table/Source Spec screen
  231. F4                  move cursor to the Field Spec screen
  232. F10                 display the current menu
  233. UpArrow             move to previous field
  234. DownArrow           move to next field
  235. Home                move to first field spec
  236. End                 move to last field spec
  237. PgUp                move to previous field spec
  238. PgDn                move to next field spec
  239. Del                 delete current field spec
  240. Ins                 insert a new field spec
  241. BackSpace           erase previous character
  242. [Ctrl][BackSpace]   erase entire field
  243.