This section takes a procedural step-by-step look at how DataFlex's FILEDEF
utility
can be used to create and maintain the datafiles
of an application.To execute the program type "FILEDEF" at the operating system "A>" prompt or select
it
from the CONFIGURATION NENU. The program willsign on and present a serles of prompts in order to obtain the data needed to define the data
file,
Each of the prompts from FILEDEF ispresented here with the how to's on their use and their relationship
to the rest of the DataFlex system. IF YOU MAKE AN INCORRECT ENTRY:
Some FILEDEF menu choices proceed through a series of prompts, which must be answered in order to continue.
If
at any pofntp you are notsure of the answer9 or you key a wrong response9
it
isstill
necessaryto answer all of the questions, at 1east'w1th something that satisfies
the program, in order to proceed and get back to the FILEDEF
operations menu. Once all the questions have been answerech however,
the menu (see below) gives you the opportunity to modify your earlier answers or to abandon them altogether (choice 10)» and leave your
original
file (if
any) unchanged.—
="=~=__"=="=="""—
———~———DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-57 =
ENTER FILE NUMBER:
When run, the FILEDEF Program prompts the configurator with a
list
of currently definedfiles.
You may modify one of theseg enter an unusedfile
number to start a newfile
or reactivate one not currently on the1 ist.
As a shortcutg you may enter FILEDEF <FILENUMBER> at the operating system command level to pass a
file
number directly to the programwithout going through the
files
menu. NEW FILE (YIN)If
you have selected afile
number that does not appear in thefile
list
then you musttell
FILEDEFif
this is a newfile
or an inactiveone .
If
you are creating thisfile
for thefirst
time answer the questionwith a "Y".
If
afile
definition for this fi1e already exists, answer the question with the "N" response (you can just press enter to default to the "N"responseL which will give you the chance to reactivate the
file.
The system will then ask for the ROOT name, USER DISPLAY nameg and Data-Flex filename of the
file.
DataFlex appl ication configurations purchased separately which
are installed on an existing DataFlex system must have their
file
numbersre-activated as described above.
If
you are modifying or re-activating an existingfile
definitiong theFILEDEF menu will be displayed. Otherwise, for a new
file,
somepreliminary information will be required: ROOTNAME
The ROOTNAME refers to the base name of any DataFlex data or config- uration
file
created by FILEDEF. The ROOTNAME must conform tooperating system filename conventions of up to eight letters and numbers. DataFlex will append the appropriate extension based on the use of a particular physical
file
(see the appendix). Make up an 8character or smaller rootname for your
file
WITHOUT AN EXTENSION!If
you wish to specify the drive on which DataFlex is to place the data filem prefix thefile
name with the drive specification in thestandard format: drive letter (A..P) followed by ":
"
followed byfilename.
EXAMPLE ROOTNAME W/DRIVE SPEC.: B: MYFILE
This would be a
file
called "MYFILE" located on disk drive "B".C-58 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual ——— USER DISPLAY Nm:
The User display name is the one which will be displayed in the FILE SELECTION menus by DataF1ex programs. Enter the name you would like to see displayed to the operator for this
file.
If
thefile
name is preceded with a "@"it
will not display on the runtimefile
displaymenus. The maximum length of the user display name is 30 characters.
DataFlex FILENAME
The DataF1ex filename can be up to ten characters long and must start
with a letter. The DataFlex filename is used to reference a data
file
from configurations. In thatit
does not contain drive specificationsit
is a "soft" reference to afile
that makes an application indepen-dent of a particular hardware configuration.
It
is also usedg alongwith a field's Tagname, to define DATA BASE ELEMENT names within a
file.
RECORD LENGTH
This is the physical size (in bytes) of the record you
will
becreating. DataFlex will automatically block sma?1 records into 512
byte blocks. Larger records can be any multiple of 128 bytes. You can assign the record length by selecting option 4 from the FILEDEF
operations menu.
If
there is a conflict between what you assign asthe record length and what the syst«n needs to correctly block the recorcb the necessary record length will be blocked autwat1ca11y by FILEDEF when you enter the record length.
If
you know the record length at this point, you may enterit.
If
you are creating a definition from an IMAGE and don't know the recordsize, you may
initialize
it
to zero. The READ SCREEN optionwill
thenset the record length for you. DataF1ex will block records in all
sizes from
l
to 26 bytes, 28 bytes, 3Ó9 32p 35» 39, 42p 46p 5L 5& 649 73,t 85» l029 128, l7Ch 256, and upward in multiples of 128 bytes,to a maximum to 4 kilobytes.
MAX # OF RECORDS
The value entered here is the maximum number of records to be stored
in the database for this
file.
The figure entered here is non-critical
unless you elected the system option (see InstallingDataFlex) which provides for pre-a11ocation of disk space for the
maxium possible size of your database. Otherwisep you may feel free
to make some growing room available for the number of records in a
particular
file.
The absolute maximum number of records in a DataFlex
file
is 64AOO. NOTE:If
the need arises to expand the maximum number of records after afile
contains datag re-enter FILEDEF and enter a larger value for thisfield.
Then, run the REINDEXutility
to rebuild the index(s) under the new parameter.DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-59 ——————
———————— -—————- REUSE DELETED SPACE (YIN)
For most applications you
will
want DataFlex to reassign the disk space released when a record is deleted from afile,
howevem inapplications where you want to use the record number as an audit
trail
or as a transaction number, this would not be desirable. To allow there-use of deleted spacep enter <Y>es; otherwiseg enter <N>o. mLTI-UsER RE-READ (YIN):
If
you are running on a multi-user systan (and you have a multi-user version of DataFlex) and you wish for thisfile
toutilize
the featureof allowing multiple users to write to the same record at the same
time then enter a 'Y', otherwise, enter 'N'. NOTE: MULTIUSER option
of SETSCREEN must be set to (Y) to
utilize
RE-READ. THE FILE DEFINITION MENUAfter completing the entries just covered about R00TNAMEp etc., the FILEDEF operations menu
will
be displayed.It
looks like this:l:
CREATE/EDIT FIELD SPECIFICATIONS 2: CREATE/EDIT INDEXES3: DISPLAY/PRINT FILE DEFINITION 4: SET FILE PARAMETERS AND NAMES 5: ERASE DATA FILE
6: SET FILE INACTIVE
7: CREATE FILE DEFINITION FROM SCREEN IMAGE 8: CREATE FILE DEFINITION FROM .DEF IMAGE 9: SAVE DEFINITION AND EXIT FILEDEF
IQ: ABORT FILEDEF, DO NOT UPDATE DEFINITION FILE You may enter one of the option numbers
(l
- 10) to select your next action. For new
files
you MUST either execute Optionsl
and 2, or Option 7. The results of using Option I or Option 7 are the same:creation of a DataFlex
file
definition. The methods used to reachthat end are different: option one takes you field by field through
the record definition where you make the specification entries
manually. Option 7 functions just like the DataFlex AUTODEF
Utility
and determines the record structure autanatical1y from the screen image.C-60 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual OPTION I