home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / dbfill-b.zip / db-fill.doc < prev   
Text File  |  1996-03-24  |  14KB  |  379 lines

  1. DB-FILL 1.0 for OS/2 (open beta)
  2.  
  3. DB-FILL is copyrighted by, and can be obtained from:
  4.  
  5. Byte Of Software Systems
  6. #75 - 20465 Douglas Crescent
  7. Langley, British Columbia
  8. V3A 4B6
  9.  
  10. boss@mindlink.bc.ca
  11.  
  12.  
  13. Terms of Use
  14. ~~~~~~~~~~~~
  15. This software is presented as-is. Byte Of Software Systems will not be 
  16. liable for any damages arising from the use of DB-FILL. This is a beta 
  17. version of DB-FILL. As such it is assumed to have software anomalies.
  18.  
  19. While Byte Of Software Systems is interested in bug and usage reports, it 
  20. is under no obligaton to use the reports, nor pay for the reports.
  21.  
  22. Introduction
  23. ~~~~~~~~~~~~
  24. DB-FILL is a program designed for data base system developers. DB-FILL 
  25. creates randomly generated data for filling data bases. This allows the 
  26. data base system to be tested under load.
  27.  
  28. Usually data base developers input a few records to test their reports and 
  29. look-up functions. Then, when the system is delivered to the customer, 
  30. problems surface when the record count reaches into the thousands.
  31.  
  32. This beta version of DB-FILL is limited to 10 records per data file. The 
  33. production version will created unlimited numbers of records, based on disk
  34. space.
  35.  
  36. DB-FILL can create data for relational data base systems. Simply link the 
  37. data base files using primary and secondary field definitions. DB-FILL will
  38. correctly relate records using the key fields. Records (and fields) can be 
  39. conditionally created.
  40.  
  41. This document is a condensed version of the printed manual. It does not 
  42. contain the example descriptions, and only has brief descriptions of the
  43. command set.
  44.  
  45. Requirements
  46. ~~~~~~~~~~~~
  47. DB-FILL will run on OS/2 2.x and greater. You will also require a data 
  48. base program that is capable of importing ASCII data in either FIXED LENGTH
  49. format, or COMMA DELIMITED format.
  50.  
  51. Installation
  52. ~~~~~~~~~~~~
  53. Create a directory for DB-FILL and unzip DB-FILL_.ZIP using a directory
  54. expansion option (-d).
  55.  
  56. Running DB-FILL
  57. ~~~~~~~~~~~~~~~
  58. DB-FILL requires a single command line parameter, the name of a script 
  59. file. For the contents of the script file see below.
  60.  
  61. Conventions
  62. ~~~~~~~~~~~
  63. Any text within square brackets is optional []. Capitalized text is 
  64. MANDATORY. Text with a vertical bar '|' between options means select from 
  65. the choices.
  66.  
  67. File Commands
  68. ~~~~~~~~~~~~~
  69. Every file command starts with the ampersand '@' character. Commands can be
  70. continued on successive lines. White space (spaces, tabs) are ignored, 
  71. except within double quotes ". To actually insert a double quote, use \". 
  72. Text case is ignored except within double quotes.
  73.  
  74. Names must start with a letter and can contain numbers and underscores '_'.
  75.  
  76. All files must have the following line as the first non-blank line:
  77.       DB-FILL VERSION 1
  78.  
  79.  
  80. @CHOICE, name, value; value [;value]
  81.    Builds a choice list. The name of the list is used within @FIELD
  82.    definitions. Up to 100 choice values can be defined. For greater lists 
  83.    use @TABLE.
  84.  
  85. @*
  86.    Single line comment. Can be placed after a valid command on the same 
  87.    line.
  88.  
  89. @COMMENT
  90.    Starts a comment block. Comment blocks are ended with the @ENDCOMMENT
  91.    command.
  92.  
  93. @COUNT, name, NUMBER, initial, minimum, maximum
  94.    Defines a counter. The name of the counter is used within @FIELD 
  95.    definitions.
  96.  
  97. @COUNT, name, LIST, initial
  98.    Defines a counter which uses a list. The name of the counter is used 
  99.    within @FIELD definitions.
  100.  
  101. @COUNT SET, name, text | count;param [& text | count;param]
  102.    Defines a count set. Count sets are evaluated right to left, but 
  103.    inserted left to right. You can string several counters and literal text
  104.    together. The right most counter is incremented first. If it reaches its
  105.    maximum value, it is set to its minimum, and the next right counter is
  106.    incremented.
  107.  
  108. @DATA BASE, name, file name, COMMA | FIXED LENGTH, REPLACE | QUIT
  109.    Starts the definition of a data base. Output methods are comma delimited
  110.    or fixed length. If a file with the same name is found, REPLACE will 
  111.    over write it, while QUIT will end DB-FILL. A data base definition is 
  112.    followed by its @FIELD definitions.
  113.  
  114. @DATA PATH, ADD | INSERT | REPLACE, path [;path]
  115.    Defines the data path that DB-FILL will search to locate input files.
  116.  
  117. @DATE, format codes
  118.    Changes the default date format. See DATETIME in FIELD TYPES for valid
  119.    codes.
  120.  
  121. @DRIVE FREE, drive, mega bytes
  122.    Sets the minimum amount of free space in mega bytes on the indicated drive
  123.    before DB-FILL quits. The default is 2 Mbytes.
  124.  
  125. @ECHO, text
  126.    Echos the text to the screen. Used for input file indicators.
  127.  
  128. @ECHO PROCESS, HIDE | SHOW
  129.    Turns on or off @ECHO display.
  130.  
  131. @ENDCOMMENT
  132.    Ends a comment block started with the @COMMENT command.
  133.  
  134. @ERROR FILE, file name
  135.    Uses an error file rather than the screen
  136.  
  137. @FIELD KEY, name, size, type; parms [+type;parms][+"text"]
  138.    A KEY field definition. Every data base must have a key field. Size is
  139.    in characters. For types and their parameters see FIELD TYPES.
  140.  
  141. @FIELD PF-KEY, name, db; field, min. max, % | field; condition
  142.    A primary foreign field. DB; FIELD is the foreign field name in the data
  143.    base. Somewhere between min and max records will be created. The min and 
  144.    max are limited to 10 records in this beta version. Normally DB-FILL can
  145.    create thousands of related records. Percent is the probability that a
  146.    record will be created, or if the field in DB matches the condition, 
  147.    the record is created. See CONDITIONS below.
  148.  
  149. @FIELD SF-KEY, name, db;field
  150.    A secondary key field. The value will be randomly chosen from the DB 
  151.    field.
  152.  
  153. @FIELD DATA, name, %,size, type;parm [+type;parm][,SKIP|DO;fname;condition]
  154.    A data field. Percent is the probability that the field will hold data. 
  155.    Size is in characters. For types and their parameters see FIELD TYPES. 
  156.    If SKIP or DO and a condition is used, then the percent value is
  157.    ignored. The field will be used (or not) dependant on the conditions in 
  158.    the field 'fname'.
  159.  
  160. @GENERATE, db; records
  161.    Tells DB-FILL how many records to create for the data base. This is 
  162.    limited to 10 records in this beta version. Normally DB-FILL can create 
  163.    thousands of records.
  164.  
  165. @INCLUDE FILE, file name
  166.    Inserts the file name. You can have files with stock definitions and 
  167.    re-use them.
  168.  
  169. @MACRO, name, text
  170.    Defines a macro. The macro text will replace the macro name wherever it 
  171.    is found. Macro names are placed within angle brackets <>. Built in 
  172.    macros are: <file name> the current file being loaded, <line number> the
  173.    current line number of the file being read, <program name> usually 
  174.    DB-FILL, <program path> the path where DB-FILL.EXE is, <BASE PATH> the 
  175.    path where you started DB-FILL from, and <VERSION> the current DB-FILL 
  176.    version.
  177.  
  178. @MACRO OUT, name
  179.    Removes the macro from use.
  180.  
  181. @ORDER, db name, field [;field]
  182.    Defines the field output order for the data base. Normally DB-FILL 
  183.    writes the fields in the order in which they were defined. You can 
  184.    over ride this by using @ORDER. If you use @ORDER, then ALL the fields
  185.    that you want output must be listed.
  186.  
  187. @PROCESS, RUN | SYNTAX | TEST
  188.    RUN is the default. SYNTAX reads the definition files but does not 
  189.    create records. TEST reads the definition files, then allows testing of 
  190.    FIELD TYPES.
  191.  
  192. @PROJECT, text
  193.    Sets up project text. This can be used within @FIELD definitions.
  194.  
  195. @RANDOM SEED, number
  196.    Seeds the random number generator. This allows for repeatable random 
  197.    values. Default is the current date/time.
  198.  
  199. @STATUS FILE, file name
  200.    Uses a status file rather than the screen for runtime messages.
  201.  
  202. @STATUS MESSAGE, VALUE LIST | LOAD DATA BASE | FILE NAME | SHOW ALL | SHOW
  203.  SETTING, level [+level]
  204.    Sets run time status message reporting.
  205.      VALUE LIST
  206.         ALL, NONE, TABLE NAME, TABLE VALUE, TABLE LIST, TABLE MEMORY, 
  207.         CHOICE NAME, CHOICE VALUE, CHOICE MEMORY, COUNT NAME, COUNT MEMORY
  208.      LOAD DATA BASE
  209.         ALL, NONE, DATA BASE NAME, DATA BASE LOAD, DATA BASE LAYOUT, FIELD 
  210.         NAME, FIELD DEFINITION
  211.      FILE NAME
  212.         ALL, NONE, FILE FIND, INCLUDE OPEN, INCLUDE CLOSE, TABLE OPEN, 
  213.         TABLE CLOSE, OUTPUT OPEN, FILE LINE, COMMAND LINE, RESULT LINE
  214.      SHOW ALL
  215.         ALL, NONE
  216.      SHOW SETTING
  217.         ALL, NONE, DATA PATH, DATE TIME
  218.  
  219. @TABLE FILE, file name [, table name]
  220.    Uses a table file for lists. File syntax follows general DB-FILL file 
  221.    syntax. If you use a table name, it will over-ride the tabe name in the 
  222.    table file. Valid table file commands are:
  223.  
  224.    @*
  225.    @COMMENT
  226.    @END COMMENT
  227.    
  228.    @TABLE NAME, name
  229.       This is the name of the table. It can be over-ridden by using a table
  230.       name in the @TABLE command.
  231.  
  232.    @VALUE, START
  233.       ALL lines after this command will be used as table values. Only the 
  234.       single line comment '@*' is not a vlaue.
  235.  
  236. @TIME
  237.    Changes the default time format. See DATETIME in FIELD TYPES for valid
  238.    codes.
  239.  
  240.  
  241. Conditions
  242. ~~~~~~~~~~
  243. DB-FILL can conditionally fill data fields, or conditionally create related
  244. records. There are four condition types: CHOICE, DATA, NO DATA, and VALUE. 
  245. For data fields, if the condition is true, you can DO or SKIP filling the 
  246. field.
  247.  
  248. CHOICE; name
  249.    Use a CHOICE list. If any of the values in the choice list match the
  250.    value in the condition field, then the condition is true.
  251.  
  252. DATA
  253.    If the condition field holds a value, then the condition is true.
  254.  
  255. NO DATA
  256.    If the condition field does not hold a value, then the condition is 
  257.    true.
  258.  
  259. VALUE; data [;data]
  260.    A list of values. For numeric data, you can specify a range by using the
  261.    ampersand (ie: 5&20).
  262.  
  263.  
  264. Field Types
  265. ~~~~~~~~~~~
  266. This section outlines the various field types that are used to create data.
  267. You can string the field types together by using the '+' sign. In this way 
  268. you can tailor the data and create an unlimited number of data types.
  269.  
  270. Most of the field types have an optional size parameter. If more than one 
  271. field type is used, then the size parameter is mandatory. If only one field
  272. type is used, then the size is taken from the field definition size.
  273.  
  274. "Text  "
  275.    Text can be used simply by placing it within double quotes. Spaces and 
  276.    letter case will be left as is.
  277.  
  278. CHOICE;[size];name
  279. CHOICE;[size];name;C
  280. CHOICE;[size];name;S[;#]
  281. CHOICE;[size];name;R[;#]
  282.    Use a choice list. If no usage parameter is used, the R is used. Using C
  283.    will place the current value into the field. Using S will sequemtially 
  284.    use that choice values. If the optional number is given, then each value
  285.    will be used NUMBER times before the next value is used. If R is used,
  286.    then the values are randomly chosen. If the optional number is given, 
  287.    then each value will be used up to NUMBER times. After each value is 
  288.    used NUMBER times, the list will be re-used.
  289.  
  290. COUNT;[size];name;type [;[ S | Z ] [;increment amount] ]
  291.    Use a counter. Type refers to numeric types. See below for a list. If 
  292.    the letter S is used, then the value is padded on the left with spaces. 
  293.    The letter Z will pad with the zero value for the type. If an increment is
  294.    used, then the counter will be incremented by that amount. Negative
  295.    values will decrement the counter.
  296.  
  297. COUNT SET;[size];name[;I]
  298.    Use the count set. If I is used, then the counters will be incremented.
  299.  
  300. DATETIME; format [;action]
  301.    Insert a date and/or time, optionally adjusting it. Date and time format
  302.    codes are presented below.
  303.  
  304.  
  305.    Format Codes
  306.       " "         literal text
  307.       AM          AM or PM
  308.       D           day number
  309.       D0          day number with leading zero
  310.       DATE        default date format (see @DATE)
  311.       DMY         date in day.month.year format
  312.       H12         hour in 12 hour format
  313.       H24         hour in 24 hour format
  314.       HMS12       time in 12 hour format with AM/PM
  315.       HMS24       time in 24 hour format
  316.       J           julian day
  317.       MIN         minute
  318.       M           month number
  319.       M0          month number with leading zero
  320.       MDY         date in month.day.year format
  321.       ML          long month name
  322.       MS          three letter month name
  323.       PM          AM or PM
  324.       S           seconds
  325.       TIME        default time format (see @TIME)
  326.       W           numeric week day (0 = Sunday)
  327.       WL          long weekday name
  328.       WS          three letter weekday name
  329.       Y2          two digit year
  330.       Y4          four digit year
  331.       YMD         date in year.month.day format
  332.    
  333.    Action Codes
  334.       Y [-] #     add/subtract from the year
  335.       M [-] #     add/subtract from the month
  336.       D [-] #     add/subtract from the day
  337.       W [-] #     add/subtract number of weeks
  338.       H [-] #     add/subtract from the hour
  339.       N [-] #     add/subtract from the minute
  340.       S [-] #     add/subtract from the second
  341.  
  342. INTEGER;[size];start;end;type[; S | Z ]
  343.    Insert an integer into the field. The value will be random between start
  344.    and end. Type refers to numeric types. See below for a list. The letter S 
  345.    will pad on the left with spaces.  The Z will zero fill the number.
  346.  
  347. PROJECT [;size]
  348.    Insert the project text. See @PROJECT.
  349.  
  350. TABLE;[size];name[;#]
  351.    Insert a value from a table. If # is used, then each value will be used 
  352.    number times before the next value is used.
  353.  
  354. TEXT;[size];type;U|L|M[;"Pad Text"]
  355.    Inserts randomly generate text. The number of characters inserted is 
  356.    random between 25% and 100% of size. U, L, or M, will change the case to
  357.    Upper, Lower, or leave it Mixed. If Pad is given, then the text will be
  358.    padded to size. Text types are below.
  359.  
  360.    FREE         free text. No restraints on content
  361.    NAME         names. Starts with a consonent. Vowels or consonents do not
  362.                 appear more than twice in a row
  363.    ALPHA        only letters
  364.    ALPHANUM     mixture of numbers and letters
  365.    " Text "     literal text
  366.  
  367.  
  368. Number Types
  369. ~~~~~~~~~~~~
  370. DB-FILL can output numeric data in several different types. Use the first 
  371. letter of the type.
  372.  
  373. B - BINARY          0 - 1
  374. H - HEXADECIMAL     0 - F
  375. N - NUMBER          0 - 9
  376. O - OCTAL           0 - 7
  377. T - TEXT            A - Z
  378.  
  379.