• No results found

USE FILEDEF TO PUT IT ALL TOGETHER

In document DataFlex V2 Jul1984 pdf (Page 168-172)

This section takes a procedural step-by-step look at how DataFlex's FILEDEF

utility

can be used to create and maintain the data

files

of an application.

To execute the program type "FILEDEF" at the operating system "A>" prompt or select

it

from the CONFIGURATION NENU. The program will

sign 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 is

presented 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 not

sure of the answer9 or you key a wrong response9

it

is

still

necessary

to 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 defined

files.

You may modify one of theseg enter an unused

file

number to start a new

file

or reactivate one not currently on the

1 ist.

As a shortcutg you may enter FILEDEF <FILENUMBER> at the operating system command level to pass a

file

number directly to the program

without going through the

files

menu. NEW FILE (YIN)

If

you have selected a

file

number that does not appear in the

file

list

then you must

tell

FILEDEF

if

this is a new

file

or an inactive

one .

If

you are creating this

file

for the

first

time answer the question

with a "Y".

If

a

file

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

numbers

re-activated as described above.

If

you are modifying or re-activating an existing

file

definitiong the

FILEDEF menu will be displayed. Otherwise, for a new

file,

some

preliminary 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 to

operating 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 8

character 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 the

file

name with the drive specification in the

standard format: drive letter (A..P) followed by ":

"

followed by

filename.

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

the

file

name is preceded with a "@"

it

will not display on the runtime

file

display

menus. 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 that

it

does not contain drive specifications

it

is a "soft" reference to a

file

that makes an application indepen-

dent of a particular hardware configuration.

It

is also usedg along

with 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

be

creating. 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 as

the 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 enter

it.

If

you are creating a definition from an IMAGE and don't know the record

size, you may

initialize

it

to zero. The READ SCREEN option

will

then

set 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 Installing

DataFlex) 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 a

file

contains datag re-enter FILEDEF and enter a larger value for this

field.

Then, run the REINDEX

utility

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 a

file,

howevem in

applications where you want to use the record number as an audit

trail

or as a transaction number, this would not be desirable. To allow the

re-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 this

file

to

utilize

the feature

of 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 MENU

After 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 INDEXES

3: 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 Options

l

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 reach

that 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

In document DataFlex V2 Jul1984 pdf (Page 168-172)