Data Flex_V2_Jul1984 Flex V2 Jul1984

DataFlex_V2_Jul1984 DataFlex_V2_Jul1984

User Manual: DataFlex_V2_Jul1984

Open the PDF directly: View PDF PDF.
Page Count: 366

DownloadData Flex_V2_Jul1984 Flex V2 Jul1984
Open PDF In BrowserView PDF
D a

a F I

t

Version

1983.

Copyright ,c)

2.0

Software

Development

Appllcatfon

DATA
8525
Miamb

1984
ACCESS

e X

Data

Access

System

Corporation

CORPORATION

SW 129

1"ermce
33156

Florida
USA

Manual

Revision

Date;

07/18/84

COPYRIGHT

NOTICE

is copyrighted (C) 1981. l982p and 1983 by Data Access
worldwide.
Corporation.
All rights under this copyright are reserved
which
DataF1ex,
is an integral part of
including this manuañ
DataFlex, may not be reproduced,
transmjttedg stored in any manner in
form
in any
system
a retrieval
or through any means, e1ectrica17
mechanica'L
written
opticab manual or otherwise without the express
MiamL
FL
permission of Data Access Corporatiom 8525 SW 129 Terraceg
DataF1ex

33156,

USA.

DISCLAIMER

Corporation makes no representations or warrantiesn
or any Data
or implied, With respect to DataFlex, this manuab
including but not limited to warranties of
Corporation productg
purpose.
merchantability or fitness for a particular
Data

Access

express
Access

Access
Corporation reserves unto itself the right to make
enhancements,
revisions and alteration of any kind
periodic changes,
and/or its manual without obligation to notify any person,
to DataFlex
enhancements,
revisions
or organization
institution
of such changes,
and alterations
to the product.
Data

TRADEMARKS
DataFlex

and

Flex-keys

are

trademarks

of

Data

Access

Corporation.

trademarks
and registered
trademarks
are
of other companies
annotated
referred to at various points throughout this manual,
The owners
an asterfsk
(*).
of the trademarks are listed below:

The

MBASIC
CBASIC
CP/M
MP/M
WordStar
MailMerge
Pasca1/MT+
dBASE
PC-DOS
IBM
MS-DOS

II

Microsoft
Digital Research
Digital Research
Digital Research
MicroPro International
MicroPro International
Digital Research
Ashton-Tate, Inc.
Business
International
Business
International
Microsoft

Machines
Machines

with

A COMPLETE,

If

to

we use
us.

a

correction

UPDATED

or

WILL

MANUAL

Improvement

BE YOURS

to this

manual

.

.

which

.
you

submit

continually improving our manual to make the power of DataF1ex
is the chief source
easier to get to for the new user. User feedback
The Disclaimer on the
to the manual.
of corrections and improvements
preceding page says that we aren't obligated to provide you with
but
updates
to DataF1ex
or its manual.
if we use a correction or
send
improvement
you
us,
we'll send you a copy of the edition of the
(a)
which
manual
contains your update(sL subject to the following:
only the first
If we receive the same suggestion from several sources.
and
person
submitting the correction/improvement gets a new manual;
(b) If we use two or more of your suggestions in one new edition of
manual,
you still
(multiple suggestions still
our
only get one manual
of being first on at least one of the suggesincrease your chances
Access
Data
Corporation's decision in these matters is final.
tions).
does
A new manual
not include a new binder (the old one is re-usable).
We're

Herds

How:

out the form on the opposite side of this page indicating
have
multiple suggestions. please
suggestion is.
If you make
and phone
Please
make copies of the form.
your namep address,
Send
you win
a new manuaK
clear so that we can get back to you
the suggestion(s) to:
Just
what

fill

your

if

DOCUMENTATION
Data
Access
8525

Corporation
Terrace
Florida 33156

SW 129

Miami,

...and we'll
for helping

yours
is a winner!
get back to you
help others to get more of the power

us

if

Either wayy thanks
of DataFlex.

SUGGESTION
For

Improvement

of

the

Dataf1ex

2.0

Version

User's

Manual

From:

Submitted:

Name

Date

(A/C)

Phone

Address

Address

Zip

State/Prov.

City
Page

Country

Revision

Date

of

Height:
Page

Manual:

TYPE

OF SUGGESTION:

_

Correction of wrong information
Addition of missing information
C1aFification/Improvement of existing
Addition of new example

in.

x

Width:

inches

Number(s):

example

DETAILS:

the above suggestion to Data Access Corporation with full
I submit
tO9 wIth the
may wish
understanding
permission to make any use of
that compensation
to me for ito if any9 will be completely at the
I assume no liability for its
discretion of Data Acce9s Corporation.
completeness
or accuracy.

it

Signature

DataF1ex

Serial

Number

—
——

"=""""""'""""

—————
TABLE

====

~ ...
=,..'===

OF CONTENTS

———-— —

======———"="="—="====="""""""""""

'u'"
ORGANIZATION
Sequence

SECTION

ORIENTATION

Installation.

. . . .
System.
. . .
Development
Application

Runtime
System

Diagram.

Facilities
OPERATOR'S

. . .
DataFlex

of

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

. . .
Diagram.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

GUIDE.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.
.
.

.

.

.
.

.
.
.

.

.
.

.
.

.

.
.

.
.
.

.

.
.

.
.

.
.

.
.

.
.
.
.

m'*

.
.

of Presentation.
Notational Conventions.

OPERATIONAL

AND ORIENTATION

OPERATION

A:

MANUAL

OF THIS

.

.

.

.

Definition of Terms - Operator.
How to Begin.
, . . . . . . . .
Flex-key Summary.
. . . . . . .
Command Explanations
Keyboard
.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. .
. .
. . . . . .
. . . . . .
Sequence
Choosing
an Output
. .
QUERY to Generate
Using
a Report

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.
.

.

.
.

.
.
.

.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

INSTALLING
OPERATING
QUERYING

DATAFLEX
TUTORIAL.
THE

DATABASE

Start-ljp.
Operation
Selections

Program
Program
Making

***

.
.
.

.

.
.

SECTION

B:

II

Creation

and

Maintenance

.

Configuration.

STARTING

PROGRAMMING TUTORÍAL.
. . . . . .
WITH IMAGES.
FORMATTING
. . . . .
"Pages"
Image
. . , . . . . . .
Images
Configuration
in DataFlex
DATABASES
DESIGNING
. . . . . . .
Organization of Data.
. . . . .
Data
Types.
. . . . . . . . . .
Indexing in Applications.
. . .
AUTODEF Program
. . . . . . . .
HOW TO WRITE A CONFIGURATION.
. .
Creating the Source File. . . .
How to Compile
a Configuration.
How to Run a Configuration.
. .
DATAFLEX
UTILITIES.
. . . . . . .
Editor. . . . . . . . . . . . .
Reindex
. . . . . . . . . . . .
Free
List (FREL).
. . . . . . .
Read.
. . . . . . . . . . . . .
dBASE
How to Convert
Files to
1.6X to 2.0
Conversion
DataFlex
Menu

.

—

~ ~

.
.
.

.
.
.

WITH

.
.
.

DATAFLEX

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.

.
.

.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.

.
.

.
.

.
.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.

.

.

.

.

.
.
.
.

.
.
.
.
.
.
.
.
.

.

.

.

.
.

.
.

.
.

.

.
.
.

.
.
.

.
.
.

.
.
.

.
.

.
.

.
.

. . .
DataFlex

. . . .
(MENUDEF)

.
.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

,

.

.
.
.

.
.

.

.

.

.
.
.

.
.

.

.
.

.
.

.
.

.
.

.

.

.

.

.

.
.

A-2
A-5
A-5
A-6
A-7
A-lO
A-13
A-15
A-16
A-17
A-18
A-19
A-25
A-33
A-41
A-41
A-43
A-44
A-44
A-45

'h'*

.
.
.

Files.

A-l
A-l

.

.
.
.

.
.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.
.

.

B-l
B-15
B-15
B-19
B-21
B-21
B-22
B-23
B-25
B-29
B-29
B-31
B-33
B-35
B-35
B-39
B-43
B-44
B-44
B-51
B-53

—

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

SECTION

*H

Indicators.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

. .
Q .
. .

.
.
.

. .
e .
. .

.
.
.

. .
« .
. .

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.

.
.
.

.
.

.

.
.
.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

e .
. .

.
.

.
.

.
.

. O .
Q . .

Q e .
. . .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
,

.

.

.
.
.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.
.

.
.
.

.
.
.

.
.
.

q . .
. P .
. O .

.
.

.
.

.
.

.
.

0 . 0 .
ELEMENTS

,

*

Command

.
.
.
.

.
.

.
.

O .
. .

. $ 0 .
. . . .
e ¢ O .

.

.

. O . O O Q .
P . Q . . . .
O O . O 0 . .
. . . . . . .

.
.

.
.

.
.

.
.

.
.

0
.

.
.

.
.

,
.

,
.

O .
. .

.

.

Structure of an
Images
in ENTER

. . . .
ELEMENTS.

.

J
.

.
.

.

.
.

.

Q .
. .

.
.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

O g .
. . .

.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.
.

. 0 .
a . .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

O . . .
e , , U .
P . H . .

.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.

.
.

.
.

.

.

.

.
.

.
.

,
,

O .
. .

.
.
ENTER

.
.

.
.

Configuration

.
.

.
.

.
.

. .
Q .

.

.
.

. . . . ,, . .
P 9 e . g U .
of ENTER. . .

.
.

Procedures

Command.

.
.

.

. . .
3 D .

.

O .
. .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

0
.

.

.

.

.

.
.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

0 . .
O O .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.
. .
0 e 3 . . . .
, , O O @ . .
REPORT Macro

.

.

.

.

.

.

.

.

.
.

O .
. .

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

U .
. .

.
.

Q .
. .

.

.

REPORTING
AND OUTPUT.
. .
The REPORT Command Macro.

.

.

.
.

Sections of REPORT. . . . 0
Subtota11ing and Tota11ing.
Selective Reporting . . . O
Page Control.
. , . . . . Q
Things
to Remember About the

1984

Data

,~

Access

.

.

.

.

.
.

.

.

.

.
.
.

of Operation
Indicator.
.

.

.
.

.
.
.

.
.

. .
3 .

.

.
Format
Options.
and AUTOPAGE.

Copyright (c)

.
.

. .
Q .

DATA ENTRY.
. . . . .
ENTER Command Macro

ENTER Sequence
ENT$PERMISSIVE

.
.

.
.

Command

ENTDISPLAY

.
.

.
.

Command

User-Oefined

.

.
.

MANIPULATING
DATA
MOVE Command.
. .
INCREMENT
Comnand

ENTRY

.

.

.
.

DATE Command,
.
INTEGER
Command

CALCULATE

.

.

.
.

Command.
STRING
NUMBER Command.

INDICATOR

.
.

.

.

DATA

DECLARING

.
.

.

Variables
Expressions . . .
Date
Variables. .
Date
Constants. .
.

.
.

.

.

.

Numeric

Filenames

.

.

.

Constants

Numeric

.

.
.
.

.

.

O .

. .
Q O .

Corporation

.

Manual

***

.

.

.

String Constants.
String Variables.

User's

2.0

FACILITIES

PRE-PROGRAMMED

C:

OF CONFIGURATIONS.

ELEMENTS

ENTRY
ENTRY

DataF1ex

OF CONTENTS

TABLE

ii

C-l
C-2
C-2
C"3
C-3
C~4
C~5
C-6
C~6
C—7
C-9
C-9
C-lO
C-lO

C-ll
C-12
C-13
C-13
C-14
C-14
C-15
C-15
C-17
C-18
C-19
C-19
C-21
C-24
C-26
C-27
C-28
C-31
C-31
C-31
C-34
C"38
C"41
C-45

05/16/84

2.0

DataF1ex

———

SECTION

-

Create
Related Fields.
Two
List the Fields.

to

.

.

.

.

.

.

.

.

.

the Files
.

.

.

.

. . . . . . . . . .
Overlapping Fields. . . . . . . . . . . . . . .
Step
Three
Determine
the Key Fields . . . . .
Step
Four
Use FILEDEF
to Put It Ali Together.
Creating/Edlting
Fields . . . . . . . . . . . .
Indexes. . . . . . . . . . . .
Creating/Edlting
Print File Definition
. . . . . . . . . . . . .
Set
Fi7e Parameters/Names
. . . . . . . . . . .
Data
Erase
File . . . . . . . . . . . . . . . .
Set
File Inactive . . . . . . . . . . . . . . .
Image.
Create
File Definition from Screen
. . .
Create
File Definition from .DEF File . . . . .
FILEDEF.
Save Definition/Exit
. . . . . . . . .
Abort FILEDEF . . . . . . . . . . . . . . . . .

SAMPLE

APPLICATIONS

.

.

.

.

.

.

.

iii

(continued)

C

(FILEDEF)
DEFINITION
FILE
. . . . . . . .
Plan
Step
One
the Relationships Among
How
Step

OF CONTENTS

TABLE

Manual

User's

————————————————————

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.
.

.

.

.
.

.
.

.
.
.

.
.
.

.
.

.
.

.
.

.
:

.
.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

C-47
C-48
C-50
C-53
C-54
C-55
C-56
C-60
C-63
C-65
C-66
C-66
C-66
C-66
C-67
C-67
C-67
C-69

P
SECTION

***
DIRECT
PAGE

CONTROL
Command.

OF DATA
.

.

.
.

ACCEPT Command.
.
DISPLAY
Command
.
AUTOPAGE Command.

ENTRY.
.

.

.

.

.
.

.

.

.

.

.

OUTCLOSE Command.
OUTPUT Command.
NAME Command.
.
FORMAT Command.
PRINT

.

.

.

.
.

.
.

.
.

Command
. . .
ENTERGROUP.
. . . .
MANIPULATING
STRINGS.
LEFT Command.
RIGHT Command

.
.

.
.
.

.
.
.

.
.

.

.

. . . . .
. . . . .
Commands.

.
.
.

.
.

.
.

.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.
.

.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.

.
.

.

.

.
.

.

.

.
.

.

.

.
.

.

.

.
.

.

.

.

.

.

.

.

.

. .
. .
Command

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.
.

.
.

.
.

.

.

.

.

.

.

.

.
.
.

.

.

.

.

.

.

.

.
.

.

.
.

.

.
.

CHARACTER
POS Command

. .
Command.

PAD Command

. .
TRIM Comnand.
.
APPEND Command.
UPPERCASE Command
CMDLINE
Command

.'.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

String Operations
CONDITIONAL

.
.

'H'*

.

MID Command
.
ASCII
Command

LENGTH

.
.
.

DATAFLEX

.
.
.

. . .
. . .
BLANKFORM

CLEARFORM and
OUTFILE
Command

PROGRAMMING

D:

EXEQ/TION

Setting Indicator Status.
Predefined Indicators . .
IF Test
. . . . . . . . .

.

D-l
D-l
D-l
D-2
D-3
D-3
D-4
D-4
D-5
D-5
D-6
D-7
D-8

D-ll
D-ll
D-12
D-13
D-13
D-14
D-14
D-15
D-15
D-16
D-16
D-17
D-17
D-18
D-19
D-20
D-24
D-24

—-————-————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

TABLE

iv

DataFlex

OF CONTENTS

SECTION
CONTROLLING

.

.

.
.

.
.

.
e

.
.
.

.
.
.

.
.
.

.
.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

. . .
S. D .

. .
O .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

O Q e .
9 . . . .

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

Q P . .
. . D .

.
.

.
.

.
.

.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.

. .
P .

.
.

.

Q .

. . .
g . .
. Q .

.
.

.

.
.
.

.

0 .
. .
. .

.

.

.

.

.
.

.
.

.
.

.
.
.

.

.
.

.
.

.
.

. .
. .
0 .

.
.

.
.

.
.

.
.

.
.

.
.

. . .
Q Q .

.
.

.
.

. .
P .

.

.

.
.

.
.

.
.

.
.

. .
D .

.
.

.

.
.

.
.

.
.

.
.

O O .
. . .

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

U .
. .
. .

.
.

.
.

.
.

.
.

.
.

.

.

G .

.

.

. . . .
. . . .
END Command
. .
UNTIL
Command.

.
.

.
.
.

.

ABORT Command
.
BLOCKS AND LOOPS.

-

.

.

.

.

.

.
ON GOSUB Command.
.
RETURN Command.
. .
CHAIN Command
. . .
CMDLIME
Command
. .
DEBUG Command
. . .
ERROR Command
. . .
Command.
CLEARWARNING

-

.

.

0 .

.

ON GOTO Comand
GOSUB Command

BEGIN
REPEAT

.
.

.
.

.

.

.
.

LOOP Command
REPEAT
. . Q .
WHILE ~ END Command
0 . . V P
FOR
FROM
TO
LOOP Command.
- CONTROL- OF THE
CONSOLE
DIRECT
.
SHOW Command.
. . . . . . . .
SHOWLN Command.
. . . . . . .
INPUT
Command
. . . . . . . .
GOTOXY Command.
. . . . . . .
CLEARXY Command
. . . . . . .
CLEARSCREEN
CQmmand
. . U . 0
KEYCHECK Cownand.
. . . . . .
INKEY
Command
. . . . . Q . .
SCREENMODE Conmand.
. . . . 3
MANIPULATING
RECORDS.
. . . . .
and FILEDEF
Database
Commands

Buffers.
File Definition
Record

.

.
.
.

.
.

.

.

.

.
.

. .
D .

.
.

.
0

.
.

. . .
e & .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

. .
O .

.
.

.
.

.
.

.
.

.
.

.
.

0 . .
D 8 0

.
.

. .
G .

.
e

. .
U .

.
.

.
.

.
.

.
.

D .
. .

.
.

. . .
e P ,

. . .
0 3 .

.
.

.
.

.
.

.
.

.
,

.
.

.
.

,
.

.
q

.
.

.
.

. .
0 .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

*

.

.
.

.
.

.
.

.
.

.
.

. .
O .

. .
. .
SAVERECORD Comand.
CLEAR Command
. .
DELETE Comiand.
.
RELATE Command.
.
Command.
ATTAM
.
ZEROFILE
Command.
System
Files. . .
MANIPULATING
FILES.

.
.

.

,

.

0 .

.

.

.

.

0

.

.

.

.

.

.

.

.

.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

e
.

. . .
P 0 .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.
.

.

.

.

.
U .

.

.

.

.

.

.

.

.

.

.

.

Y .

.
.

.

.

.
.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

. .
0 .
. .

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.
.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.
.

.
.

.
.

.

.

.

.
.
.

.

.

.

.

.

.

.

.

.

.

.

.

OPEN Command.
FIND

Command.

SAVE

Corrmand.

.

ERASEFILE
Command
RENAME Command.
COPYFILE

Cormand.

DIRECTORY
FILELIST
SYSTEM

.

.
.
.

Command

.

Cormand.
Command.

.
.

.
.
.
.

.
.
RUNPROGRAM Command.
.
REGISTRATION
Command.
SYSDATE

Command

.

.

——————-—————————-—
Copyright (c) 1984 Data

.

.

.
a Q .
Q O .
.
.

.
.

.

.

. .
. .
O .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.

.
0

e .

.

.

.

.

.

.

.
.

.
.

.

G D .

.
.

.

.

.
.

.

. .
D .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Access

Manual

(continued)

D

SEQUENCE.

EXECUTION

GOTO Command.

User's

2.0

Corporation

D-29
D-29
D-30
D-30
D-31
D-31
D-32
D-32
D-33
D-33
D-34
D-34
D-35
D-35
D-35
D-36
D-37
D-37
D-39
D-39
D-40
D-40
D-41
D-41
0~42
D-42
D-43
D-43
D-45
D-45
D-45
D-46
D-47
D-48
D-51
D-51
D-52
D-52
D-52
D-53
D-54
0~54
D-55
D-55
D-55
D-56
D-56
D-56
0~57
D-58
D-58
D-58

05/16/84

Manual

2.0 User's

DataFlex

OF CONTENTS

TABLE

—————————————————————————————————————

SECTION
DIRECT
INPUT
DIRECT_INPUT

AND OUTPUT
Command.

DIRECT_0UTPUT
CL0SE_INPUT
READ

.
.

.
.
and SEQEOL
WRITE Command
. .
WRITELN
Command
.
Command.

.

.
.

.
.

.
.

.

.
.

Key
ENTAGAIN
ENTERMODE

.
.

.
.

.
.

.
.

.
.

.
.

.
.

. . . .
Commands

.
.

.
.

.
.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.
.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

ADVANCED

E:

.

.

Indicators

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.
. . .
Under

.
.

.
.

.
.
.

. . . . . .
. . . . . .
. . . . . .
ENTER Macro.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

,
.

.
.

,
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. . . . . . . .
AND WINDOWINDEX.
. . .
AND EXTENDING
DATAFLEX.

.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.

.
.

.
.

.
.
.

.
.
.
.
.

.
.
.

.
.
.

.
.
.

Cand.
Command

.
.

Operation
.
.

Command
Command

.

.

.

,

.

.

CHECK Macro
Symbol-Checking

Internal

Cmmand

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.
.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Characters.
of Symbols.

Typing

***

.

the

SECTION

RESERVED WORDS OF DATAFLEX.
.
FILES,
ARGUMENTS AND COMMANDS

APPENDIX

F:

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

Arguments.
. . . .
Format
and Entry Options

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.

.

.

.

.

.

.

.

.

.

List

Command
Syntax
SPECIFICATIONS.

.
.

.
.

.
.

. . .
COMPILER
ERROR NESSAGES
. .
RUNTIME
ERRORS AND DIAGNOSIS.
GLOSSARY.

. .
OF ASCII

.

.

.

.

.

. . .
CODES.
.

.

.

D-62
D-62
D-62
D-64
D-65
D-66
D-67
D-67

E-l
E-2
E-2
E-4
E-4
E-4
E-5
E-7
E-8
E-9
E-9
E-9
E-9
E-lO
E-lO

E-ll
E-13
E-14
E-14
E-16
E-16
E~l7
E-18
E-19
E-20

***

.
.

Predefined

D-61
D-61

*'H'

.

Definition.
. .
Include Files . . . . .
Compile
Time
Variables.
Conditionals.
. . . . .

.

CONFIGURATION

.

Command

'-lfjEX

.
.

.

Replacement

TP'3LE

.
.

.

,

REREAD Command.
.
IFMANGE
Command.

Window

.
.

.

SECTION

LOCK Command.
.
UNLOCK Command.

DESPOOL

.
.

.

Procedures.

Multi-User

FIELDINDEX
MODIFYING

.
.

.
.

.
.

BACKFIELD
Command
.
HELP Command.
. . .
MULTI-USER
FUNCTIONS.

SETOANGE

.
.

.
.

Predefined Indicators

USING FUNCTION
KEYS
.
Using
the Flex-key
Using

.
.

.
.

.
.

Reporting Without Report.
***

.
.

.
.

Command
. .
& CL0SE_OUTPUT

Command.

READLN
SEQEOF

.
.

(continued)

U

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.
.

.
.

.
.

.

.
.

.
.

.

.

.
.

.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.

.
.

.

.

.
.

.

.

.
.

.

.

.

.

.

F-l
F-3
F-4
F-5
F-6
F-9
F-13
F-19
F-35
F-41
F-43

==========""

Copyright (c)

1984

Data

Access

Corporation

06/08/84

v

vi

TABLE

DataF1ex

OF CONTENTS

Menu.

Master

Screen
Screen
Screen

A-l A-2
A-3
A-4
A-5
B-6

Sample

Screen

B-7

Configuration
Configuration.

Sample

Screen

B-8

"PERSON'4

Sample
Sample

Screen
Screen

B-9

Menu
Menu

Sample
Sample
Sample

Screen
Screen
Screen

Sample
Sample
Sample

Sample

Screen

Sample
Sample

Screen
Screen

Sample

Screen

Sample

Screen

Sample
Sample

Screen
Screen

Vendor
Demo

Master

List-Demo
Record,
Personnel

File

-

B-lO B-ll C-12
C-13
C-14
C-15
C-16
D-17
-

Configuration
Configuration
Conflguration

Sample

Configuration

C-13

-

Sample

C-14
C-15

Sample

Configuration
Configuration
Configuration
Configuration
Configuration
Configuration
Configuration

-

Sample

Configuration

E-21

C-8

C-16
C-17
D-18
D-19
E-20

.

.

1984

Data

B-5

in
Select to Run

. . .
Sample
.
.

.
.

. . .
Data.
.
.

.
.

.
,

.
.

.
.

B-9
B-17

.
.

B-53
B-54

. . . . .
. . . . .
and Editing

.

.

.

.

.

.

.

O e

C-59
C-60
C-70
C-81
C-86

0

Initial Entry . .
File, After AUTODEF . . .
Personnel
File, After Customization
"PERSON"
Entry Screen
. . . . , , .
"PERSON"
Plus "JOB" . . . O . . . .
Date
Systtm
Dfsp1ay/Entry O . Q . .
Simple
ENTER Configuration.
. . O .
Using
ENTER Configuration
Procedures
User-Oefined
. . . 0 . .
Using
ENTER Configuration
entdisplay.
. . . . . . . . . . Q .
Simple
Report Using REPORT Macro .
Record,

Personnel

-

-

-

Complex

Report

Access

Using

REPORT

Macro.

REPORT With
Operator Selections
and Page Control
. . . . . . . .
Image
Screen
for FILEDEF to
Work

From.

Inventory
Inventory
Inventory
Inventory

.

.

.

.
.
.

Customer

Report. . .
Master
File . .
File Data Entry

File

File, Using ENTERGROUP
Illustration
of FIND Command . .
Update
Routine in Multi-User
Environment. . . . . . . . . . .
Use of WINDOWINDEX
Predefined
Variable . . . . . . . . . . . .

Corporation

.

.
.

.

Vendor
Master

. . .
Master

.

. . .
Customer

Personnel

__—"—

Copyright (c)

A-42
A-42

. . .
. . .
AUTODEF
.

configurations

Personnel

Sample

C-7

C .

.

sample

of

C-id
C-ll -C-12
-

Sample
Sample

A-34
A-35
A-36

.
.
.

0"68

0

C-9

Sample
Samp7e

.

.
.
.

Macro

Configuration

Sample

.

.
.
.

B-56

Sample
Sample
Sample

Showing

.
.
.

Question
System
Entry
File Definition Menu. . . . . . . . .
File Definition Field Edit Option Menu
Master
File. . . .
Inventory Customer
File. . . . . .
Inventory Item Master
Inventory Invoice Entry . . . . . . .
Report
Configuration Not Using REPORT

Sample

Sample
Sample
Sample

Prompting

Mentn

Menu

B-l B-2
B-3
B-4
B-5
B-6

Sample
Sample

. . . .
. . . .
. . . .
System
Menu
. .
Inventory System.
.
.
.

Edit Selection.
Configuration.

Configuration
Configuration
Configuration
Configuration
Configuration
Configuration
Configuration
Configuration

Sample

. . .
menu
.
Record

Inventory

list
Sample

.

Configuration

Manual

screens

sample

of

list

User's

2.0

.
.
.
.
.
.

B-2
B-7
B-13
B-15
B-17
B-30
C-23
C-25
c-26
C-33
C-37
C-42
C-53
C-74
C-77
C-80
C-84
D-9
D-50
E-IX)
E-12

——

05/16/84

_——
__"

————

—"~——"

=:

:::::

ORGANIZATION

OF THIS

MANUAL

—————=====

_

SEQUENCE

===""=="""

====
==========

"",

OF PRESENTATION

is the
material is presented in this manual
for the undertaking of tasks in learning DataFlex
and in using
Your
learning experience with DataFlex will rapidly
become
you
a productive experiencep
in that within a couple of hours,
will be able to create database
structures and control them with
configurations.
Configurations is the word used in this manual for a
data
processing procedure, or program written in DataFlex. Your
straightforward applications which
early exercises will yield simp1eg
will have more than enough power to
despite their simplicity
perform
any number
efficiently
of cormon data processing tasks, such
as mailing
lists.
in

The

sequence
recommended

which

sequence

it.

very likely acquired DataFlex because
its Aspower and
management.
mere
you continue
go far beyond
list
reading this manuá1» and testing the facilities described in each
section, possibi7ities
for greater scope and sophistication will
multiply rapidly until you reach the point at which you have the means
The simpler
needs.
of satisfying all of your data management
fac1l1ties of DataF1ex
are so powerful that you may reach this point
features of Datañex
well" before you explore the more advanced
described in later sections.
If this happens, there is no need to
study
further except to generally acquaint yourself with the
capabilities
features.
of the more advanced
But

you

flexibility

————————
Copyright

(C)

1984

Data

Access

Corporation

05/16/84

r

A-2

ORGANIZATION

NOTATIONAL

OF THIS

CONVENTIONS

IN

DataF7ex

MANUAL

THIS

2.0

User's

Manual

MANUAL

with
the formats
made up of screen
and
are
(always
images
lines, the two
at the beginning) and then comand
by the distinctive
combination
character
sections being separated
"l*"
made up
DataF1ex
commands
by
are
like sentences
line.
itself on onecormand)
and
(usually) one or more objects (referred to
of a verb (the
as argumentsL sometimes
followed by one or more options, and
by
Commands
sometimes
may be preceded
further followed by a comment.
Lastly. some command lines begin
conditional terms called indicators.
with "labels". distinguished by a terminating colon (LABEL: L, whose
purpose
a spot in a configuration
of
for purposes
is to "mark"
Here
is the
future references (such as a RETURN or GOTO connand).
typical format
of a command line:
Certain notational

which

conventions

are

throughout this
to understand

used

manual

become
you should
acquainted in order
examples
shown.
DataFlex configurations

it

[indicator]

command

{options}

argument

//comment

brackets [] surrounding the indicator are required to identify
The braces
{} surrounding the options are not to be typed
indicators.
except
fbr format options for the ENTRY and FORMAT
in most commands,
The braces
used
commands,
where
are
in format
they are required.
howeverj
i11ustrationm
to signify an optional command element.
Again.
except
in the cases
they are not to be typeci in the comand
the comment are, like
noted. The "//" twin diagonals which precede
and
the indicator bracketsp
part of DataFlexG syntax,p
tell DataFlex
the
material following the dlagonalm which leaves them
not to compile
free for any materia] you may wish to include in the source version of
(as
distinguished from the
your configuration for reading by persons
computer). Twin diagonals at the beginning of a line will cause the
Here
entire line to be a comment.
is a typical command line:
The

[FOUNDI

ENTRY

mai1.name

{CAPSLOCÍO

// first

try

This line starts with a (DataF1ex-supp1ied) indicator» FOUND, which is
enclosed
in the required brackets, followed by the comand, ENTRY.
then
the
which
image
window
named
argument,
(in the
is a screen
ccmfiguration) MAIL.NAME,
followed by a formatting option (this one
does
require the braces). CAPSLOCK.
It meansp "If the desired record
is successfully FOUND in the databaseg
put the cursor into the next
window
and accept
element
image
screen
for ENTRY into the database
MAIL.NAME
the characters keyed into the windoWg but as though
the
CAPSLOCK key were
on (lower case
characters converted to uppercase)."
The coment
(first try) is not interpreted by DataFlex and hence has
would
have
meaning
no meaning
only for a person
for execution;
reading the configuration.

it

The

example

above

Copyright (c)

1984

illustrates

Data

Access

the

use

of

upper

Corporation

and

lower

case

in

05/16/84

DataFlex

2.0

User's

Manual

ORGANIZATION

OF THIS

MANUAL

A-3

——

—

ENTRY,
and CAPSLOCK are
FOUND,
all
throughout this manual.
This is
in capital 1etters9 while mail.name
is in lower case.
intended to signify that FOUND, ENTRY, and CAPSLOCK are iñteral
strings which match» respectíve1y9 an indicator. a command and an
option which are inherently part of DataFlex. In any configuration
have
which
e1«nents,
you would
you wrote using these
to 1itera11y use
these
strings then. also. Mail.name, on the other hand. is peculiar
and would
to the example or configuration which is being discus5edp
be some other string
typically
in any configuration written by you
You
you chose
to).
(although you could use
will find this use
in this
of upper and lower case throughout the formats and examples
manuab
except
for the full sample configuratioñs» which follow the
normal
configuration convention of being written in solid capital
and messages
prompts
letters except
for textual material in screen
which
need
and lower
upper
case.
examples

it if

Throughout
enclosed

material
or outPutg

in the systw as well as in this
(") quotation
single (') or double
which
passes
through configurations as such
rather than executed.
DataF1ex,

in either

material
is literal
is displayed

manual,
marks
and

itself has manywhichsyntactical conventions in addition to the
are
peculiar to presentations in this
described above,
DataFlex's own syntactical conventions are described
separately at the appropriate places in this manual.

DataFlex
ones
manual.

Copyright (c)

1984

Data

Access

Corporation

05/16/84

A-4

ORGANIZATION

OF THIS

THIS

Copyright

(C)

1984

Data

PAGE

Access

MANUAL

INTENTIONALLY

Corporation

DataFlex

LEFT

2.0

User's

Manual

BLANK

05/16/84

___ ______

——————
"""===""""

A—5
————————————————————————__=========
~~~
OPERATIONAL

————"

ORIENTATION

"""""

—————
This section describes the steps involved in developing
that come
in DataFlex and the various files and programs
both
in creating and in running it.

application
into play

an

range
of facilities for applications
of this, there is frequently more than one way
to achieve a particular goal. Since one or another of the alternative
methods
is normally preferable under certain circumstancem care
should
be taken
to avoid thinking that the first way conceived
or
Any method
implemented
for doing a task is the only, or bésto way.
be reviewed
developed
against the possibility
for doing a task should
approach
might be easier or more efficient.
that an alternative
DataFlex

offers

development.

a wide
Because

Systm and ApplicaRuntime
Thjs section is divided into two parts:
The runtime system
required
is the part of DataF1ex
tion Development.
The person(s) who run the applica(run) the application.
to execute
tion is(are) referred to as the "operator" (as distinguished from the
The
the application).
configuratom who is the person who develops
which
DataF1ex
development
the
of
section
describes
parts
application
Although
the configurator and
of applications.
support development
the
the
activities
operator may in some instances be the same persom
of configuring on the one hand and operating on the other are differis useful to distinguish between these functions.
ent, so that

it

INSTALLATION

the necessary
installation
consists mainly of copying
of DataFlex
master
disks or hard
disks onto your working
files from your DataFlex
SETSCREEn
program
to initialize
disk drive and then using the DataFlex
the system for your serial number and terminal type. The SETSCREEn
and writes the terminal
reads
the
informaprogram
file TERMLIST.CFG FILELIST.CFG
by
user
to be used by the
the
input
the
to
tion
file
See the
installation
runtime system and the configuration systm.
DataFlex
for more informainstructions and the section on Installing
tion on insta11ation.

The

===ma==: _——————————————~—~~~—————~_~_____"____""_
Access
(C)
1984
Data
Corporation

Copyright

05/16/84

A-6

OPERATIONAL

ORIENTATION

DataFlex

"==========~
RUNTIkE

2.0

User's

Manual

"""""

SYSTEM

is the
runtime system
systems). FLEX.COM and its
are
functional all the time any DataFlex
overlay file "RUN.OVF"
configuration is running. The DataFlex configuration contains the
DataF1ex
do a
intelligence which enables
to make the computer
works
through the BASIC
particular task. just as a BASIC program
(.Fl-X)
configuration
Without a compiled
interpreter.
file, the
runtime system can do nothing.
The

basic operating

nucleus

of the

(FLEX.CMD

"FLEX.COM"

program

on

DataF1ex

CP/M-86

the DataFlex runtime system can
control of a configuratiom
databases9
and manipulate one or more
interact with the
read
and write
standard ASCII files. and
operator, drive the printer,
function found in microcomputer
otherwise activate just about every
These
systems.
activities
are controlled by configurations
(files
by the developer.
with the ".FLX" extension) created and compiled
from
the
When FLEX is run
operating system the name of the
configuration which is to be run must be given with it.
Under

access

initialized,

When

called

files

the

FILELIST.CFG
are

generate
terminal.

available,
control

the

DataFiex runtime system first reads a file
contains information about what database
which
enables
and information
DataFlex to
which
codes
will operate your particular

which

actually refers to
file name appearing in FILELIST.CFG
a cormon
rootof related files on your disk. all having
The data
but
namep
(".DAT" extension)
different extensions.
files
was entered, and the
contain the raw data in the sequence
in which
basic information on the structure of the data file. The key files
(".Kx" extension where x is the number of the index) contain index
which
data
established by the
provides access to the data by indexes
The tag
configurator during the process
of defining the database.
file (".TAG" extension) contains the names of the fields which make up
the database.
Each
a

data

base

"family"

it

consists of:
required to run DataF1ex
at least one .Fl-X (configuration)
and all
database
previously created by the configurator,
files
file
(.DAT)
.TAG)
.Kx and
for any database(s) declared in (used by) the
QUERY
QUERY.COM
and
To
use the
configuration(s).
facility the
QUERY.OVF
program
files must also be present.
Thus

the

minimum

FLEX.COÑL

RUN.OVK

Copyright

(C)

1984

comp1©ent
file
FILELIST.CFG,

Data

Access

Corporation

05/16/84

DataF1ex

User's

2.0

Manual

OPERATIONAL

A-7

ORIENTATION

———————

===""4"""

+ ~
h

Other

Menu

user

when

programs
may be required occasionally
at run time.
and rebuilds
a data
the keys (.Kx files) in case
Reindex
by a power,
medía
damaged
are
failure.
is
or system
and create "ad hoc"
used
indexes. The
to maintain BATCH indexes

supplied

REINDEX

they
also

System

DataFlex

that greets the
is
DataFlex
The name of the menu
initialized
is Itself a DataFlex configuration.
The menu
configuration is MENU.FLX.
facility keeps the menus in a
MENU.DAT
data
base
is MENU.DAT.
is
standard DataF1ex
file whose name databases
in FILELIST.CFG
installed as file 49 in the list of active
Thus
as supplied.
to use the menu facility you must have MENU.FLX and
MENU.DAT
on your system.
The

file

reads

through
reads
a data
((Fre)e (L)iSt) program
file and verifies
rebuilds if necessary)
the list of deleted records in a data
that appear damaged
file, and also deletes or extracts any records
as a consequence
(typically
of a power, media or system failure).
Both
may be kept off-line
until needed.
of these programs
FREÍ(and

APPLICATION

base

DEVELOPMENT

process
involves
of developing specific applications in DataFlex
with the .FLX extension) and database
creating configurations
(files
files to store and manipulate data in the desired fashion. These
with
files are created by use of a group of utility programs supplied
COMPILER
DataFlex. The .Fl-X files are created by running the DataFlex
Source
program
on "source" files.
files can be created by any of
supplied
including the EDITOR.COM program
several different means,
which
is capable
with DataF1ex9
or any text editor or word processor
to producing plain ASCII text files you might happen to favor. The
source
files contain all the various comands in DataFlex which cause
the systw to carry out the desired processes.
The

produce
your first configuration using the AUTODEF
and
for a new databaseg
also creates the definition
for its data. To use it. the first
the data and key files necessary
step is to "draw" an image of the input and query screen that you will
(see
use on your
new database
the section Qñ "Formatting With
EDITOR
Images"). The DataFlex
or your favorite text editor will serve
AUTODEF reads
both
a file
this file and produces
for this purpose.
SOURCE
(.FO)
and
code
a
(with a
configuration
definition
file
file
by
.FRM extension),
ready
to be compiled. The configuration produced
maintenance
AUTODEF can
perform
on the database
file
full file
creates.

will

probably

utility.

AUTODEF

You

it

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

A-8

OPERATIONAL

=""="===~—

DataFlex

ORIENTATION
——

2.0

User's

Manual

""

————+———————————""""

is to create, display and mod'ky
function of the EDITOR program
DataFlex configuration SOURCE and IMAGE files. The source
files can
be created from
scratch with the EDITOR, or can come from one of the
auto-definition
utilities like AUTODEF, QUERY or READ. The source
word
files produced with EDITOR beare standard ASCII files, so mostEDITOR
used
instead of the DataFlex
processors or editors can
if
are
more
you
comfortable with one of them.
The

The

DataFlex

information
QUERY

little

QUERY

provides the user easy access to the
The
any database
existing on the disk drive.
be used
as an ad hoc
report generator that requires
QUERY is entirely
use.
prompt-drivem making
has been
a query
use by operators9 but once

program

stored in

facility

can

it

trafning to
quite practical for
in a
successfully perforTned»
permits storing the query criteria
The source
code
source
for a report configuration.
file can
file as compiled
QLJERY requires all
then
be
of
report.
to become a permanent
the standard
runtime database
files to be present.

it

The

DataFlex READ conffguration generates a
standard ASCII data files. READ is primarily
from
are
converting to DataFlex
other systems.

source

program

intended for

to import
those

who

and CVTRPT programs
read
DataFlex configurations written
DataFlex 2.00
(1.6x) and produce
earlier versions of DataFlex
source
written
in
configurations.
Configurations
Versions l.6x of
DataFjex
are
fully convertible to configurations which run under
Natura11y7
configurations
Version 2.OX by use of these utilities.
produced
in this fashion will not take advantage
of features of
Version 2.Ox which were not present in the version of DataFlex under
which
but
the
original configuration was producecb
the converted
be edited to do so
source
can
desired.
file
if
The

CVTFRM

under

'

B-bit systems--COMP.OVF)
three files to be
requires
files
files
present on the logged-in disk drive in order to do its job: the
(.FO
extension) file for
configuration source
fi1eg a file definition
each
database
and FLEX.CFG
declared by (used in) the configuration,
both
command
The .FO
and FLEX.CFL
must
macro
the DataFlex
file.
files A
reside on the logged-in (defau)t) disk drive.
successful
a runnable DataFlex configuration
compilation will produce
with the
.FLX
as the source
extension and the same rootname
file. As the
compiler runs,
will display on the screen
the original source
commands
together with line numbers assigned
to them by the compiler
and any
which
arise during compi7e
time. This output
error messages
can be directed to any of three devicmm
the consolm the printem or
a printab7e (.PRN)
file.
The

which

compiler
produces

(COMP.COM
.FLX

or

COMP.CMD,
from

and--for

source

it

Copyright (c)

1984

Data

Access

Corporation

05/16/84

DataFlex

2.0 User's

OPERATIONAL

Manual

ORIENTATION

A-9

configuration that does not use any database(s) would not
but the typical Datarequire any .FO files in order to be compl1éd»
The .FO
Flex configuration wIll access one or more databases.
files
used
are
only at compile tim; they are not required at run time. On
the other hand, the other runtime database
files (.DAT, .Kxp .TAG) are
not
required by compile. This difference in file requirements can be
taken
advantage
of when operating within restricted disk space.
A DataFlex

utility,

The

FILEDEF

and

configuration

like

source

AUTODEF,

files.

Is

Multi-file relationships can
requires more extensive knowledge
The FILEDEF
control over the database.
(.DEF)
files
write database
definition
files are useful for reference, database
applications to other environments.
AUTODEF.
FILEDEF

for creating database
files
is more versatile than
FILEDEF.
be created with
of DataFlex, but gives more
program
can
also read and
Definition
in standard ASCII.
and transfer'
documentation
of

used

FILEDEF

is for use by users who want to create their own new
The PACK program
to the DataFlex language.
reads
the file FMAC and creates the file FLEX.CFL which is used by the
added
New command
macros
are
compiler.
to FMAC with a text editor or
by running PACK on the
word
new version
processor and then made usable
(overwriting the old one).
of FMAC, creating a new version of FLEX.CFL
The

PACK

commands

program
and add

them

P

Copyright (c)

1984

Data

Access

Corporation

05/16/84

Y

iÁ

um

¢aMFhgURATjaA/

\

S

runt/he

!
I
J
),

l
query

a

\

)

read

\

t

I

\
editor

[i

I

a

C

b

wage

i

'
FjLEDEF)AU}aDEF
i
'

\

I

t
I
I

l

"FLEX"

runtihe

a

A A
PRINTER'

I

p

\

b
source

""
ccwpiler

-:

'

)

'Ej

I
)

pa0gaaá(

DATAFLEX
systehdiagrah

I

'Li
1//

'tj:
file

q:i'
set

screen

\

Dataflex

2.0

User's

OPERATIONAL

Manual

ORIENTATION

A-ll

————
——————————————————————————————————
.

After running SETSCREEn and "informing" DataFlex of the codes which
operate your terminab there are three basic levels of using DataFlex
proceed
in order for the easiest» most
through which you should
thorough
learning experience. The content of this manual
is itself
They
presented
in the order which will best facilitate this approach.
are
described below:
Your
DataFlex system was supplied with more
with sample datap all on
working configurations complete
diskp
and ready
to run. They are intended as learning aids
You
and are
find most of them
in this manual.
not documented
will
which
from
you may choose
listed in the "DataFlex demo files" submenu,
From this
submenu,
any of the
you may actually
run
the master menu.
by electing
the last
configurations,
and/or query their databases,
You should
free1yg
choice, "QUERY Data Files."
tour these samples
and running reports
to
entering additional test data where you choosep
the screen
and/or your printer from them at will. The Operator's
need
Guide
you will
in
provide all the guidance
in this manual should
Eventua]lyp you may even wish to modify the
this activity.
(Sane
of the
configurations themselves
to make them run differently.
you
configurations may happen to be already very close to something
"code"
(which
could actually use for your own purposes.) The source
is what must be modified and recompiled to change the configuration)
is supplied for every configuration on the C: disk.
QUERYING
than

AND REPORTING

a dozen
compiled

DataFlex
provides
for creating and maintaining databases
creating the configurations you will need for entering data
While
databases.
from
those
and reporting
data
to»
the "shortcut"
methods
and typically
promptecb
more
are
narrowly structured than the
they
"programming"
methods
should
of writing DataFlex configurations,
not be underestimated. In actua1ity7 they are highly flexible and
Roughly
two out of four DataFlex
very powerful in their own right.
have
use any DataFlex
users
no regular occasion
to
facility other
will
MENUDEF (for creating and
than
EDITOR
(for writing configurations),
AUTODEF (for creating
databases
and entry configuraediting menus).
tions) and QUERY (for creating reports and doing interactive
Of the remaining
two
inquiries).
out of four typical DataFlex
users,
be fu1fi17ed by the
only one will have requirements which cannot
aforementioned facilities plus the ENTER macro and the REPORT macro.
The
facilities mentioned above should be explored thoroughly. You
should
proceed
stage
only in the event that you have
on to the next
unusual
requirementm or a driving curiosity as to the virtually
limitless possibí7itíes offered by the most extensiveg flexible
medium
applications development
available 'in today's market.
PROMPTED

DATABASE

numerous
and for

"automated"

CREATION

AND CONFIGURATION

methods

——————

Copyright

————-——
(C)

1984

Data

Access

Corporation

———

————-

05/16/84

A-12

OPERATIONAL

DataFlex

ORIENTATION

==""""==="""=—""""""""""""""""""""""
—===""_".==_""====""""""""""""

"

2.0
=

User's

""""""""""""""""

""""

Manual
"' =====

programming
PROGRANING
AND EXTENSION
OF THE LANGUAGE
In line-by-line
of app1icatiorm DataFlex offers facilities for the creation of
The more
by its creators.
applications not even yet imagined
fundamental
sequential
functions provided in function key commandsg
input/output9 console inputloutput and multi-user functions allow the
which
any processing structure
could be
construction of virtually
whole
configurations can be made up of such
desired. Although
these
commands
commandm
more
are
likely to be used intermingled with
by
pre-programmed
the
structures created
facilities such as the REPORT
and ENTER macros.
While exclusive use of these facilities for writing
way of creating
configurations is likely to be a less efficient
configuratiorm
occasional use of them to alter the way standard
In the Advanced
section
structures function Is very much encouraged.
you will even
find procedures
for modifying DataF7ex
of this manuab
themselves,
commands
as well as procedures
for creating entirely new
commands
for your individual use.

next page offers a graphic depiction of the
sophistlcatíon
to which each of the facilities
The chart should
primarily applies.
not be interpreted
of DataF1ex
Whyg for examp1ep
the
too literally. There is no reason whatsoever
"basic" facility of QUERY should
not be used in an otherwise
"advanced"
application to create one or more reports if QUERY can
function.
satisfy the applicatioMs
requirvments for that particular
Furthem a common way of creating highly complex
applications involves
the use of "basic" or "intermediate" facilities such as QUERY or
AUTODEF to create the "nucleus" of the app1icatiom
and then
subsequent
editing of the nucleus
to incorporate the more "advanced"
features required by the application.
The

schematic

ranges

of

on the
programming

P

——
=""

""
Copyright (c)

. ——,
.,,
1984

Data

Access

.

_

,,,—,

___~___,
Corporation

———————————
_===__~—___~
05/16/84

DataFlex

2.0

OPERATIONAL

Manual

User's

A-13

ORIENTATION

-------------THE

FACILITIES

—------LEVELS

SOPHISTICATION-------

OF CONFIGURATION

ADVANCED

INTERMEDIATE

BASIC

OPERATOR

OF DATAFLEX

llllExISTINGllllll
llCCNFIGURATIONSll

llllll
llllll
llllll
llllll
llllll
lllC0MpILERllll;;l}|lllllll:l:lllllllll:lllllll llllll

ll::lllllllll:|llllllllllllll:llllll;ll
;llllMENUlllll|lllll: lllllllllllllllll|:ll:llllll;lllllllllll:lll:
lll|AUT0DEFllllllll;:
lllll;lll|lll|l:llllllll|llll:lllllllllllllll
llllEDITORlllllllll|: lll:llllll:ll:l:lllll:l::ll
IMAGES|llllllllllllllllllll:
ll|llllll:

llllllWERYlll|lllllllllll:

lllSCREEN
:

llllANUDEFl:
ICONTROL

ll}llll|l::lllllll:llllllllllllllll|lllll
|lllllll:lllllllll}llllllllllllll

C0MMANDSlll:

llllll
ll: lINDICAT0RS:lllllllllll:lll llllll
MACROlllllllllllllll llllll
llllENTER MACR0llllllllllllXl llllll
lmost

comandsllllllllllllllll

lllREPoRT

IENTERGROUP

MACROllllllll:

llllllllll

llll: FILEDEFlllllllllllllllll|l:llll
llKEY

pROCEDURESll

llllFIELDINDExllll
MACRO

Copyright

(C)

1984

Data

Access

Corporation

OPERATIONSI

05/16/84

A-14

OPERATIONAL

ORIENTATION

DataFlex

2.0

User's

Manual

——————
—

THIS

Copyright (c)

1984

Data

PAGE

Access

INTENTIONALLY

Corporation

LEFT

BLANK

05/16/84

===""===————————————~———

"",
ÉÉÉÉFáááEE

--------- ——

—

A-15

~—_""""""

GUIDE

OPERATOR'S

==========

,",

—~~———

—————

objective of this section is to provide a clear, non-technical
The
summary
for data entry.
of use of the system
firstdatapart of the
entry and
for
to use DataF1ex
chapter will define the procedure
Second1y7
maintenance.
the features and facilities that may be
file
used
in any given application will be discussed.

The

to execute
DataFlex uses a set of command keys, called "F1ex-Keys%
of the regularly used functions In an application software
Example
Flex-keys are FINDo used to locate a record in the
SAVEJ used
base;
data
to store a new record in the data basep etc.
is used on such a wide variety of systemsg
DataFlex
Furthem since
by
functions of the program
especially terminals, we will address
of our discussion, rather than by
their Flex-key name in the course
the
particular key on your terminal which has been established, since
the location of that command key may vary from system to system.

many
system.

Flex-key commands
the DataFlex
is used to assign
keyboard.
keys
on
Part of its
to
set of control or function
your
operation is to print a list of the commands and the keys to which
on your terminal.
they are currently assigned
If you do not have a
one
ñOWx and print
for
copy
of that list. go to the SETSCREEn Program
use with this chapter.
The

SETSCREEn

Utility

a

FUNCTIONAL

OVERVIEW

DataFlex application that involves data entry has the capacity to
check
from
data
is the
to make sure that
the keyboard,
and then
on the computer's floppy or
of
data.
store
type
proper
hard
can be made
disk storage device. Once data is stored, DataFlex
to retrieve (FIND) the data and display it on the CRT, and allow the
operator to change or delete it.
A

accept

it

it

All of the capabilities
of DataFlex may or may not be used in every
For
examp1é»
application.
the option exists within a configuration to
lock an operator out of a particular data window on the screen or to
of
automatically make calculations that are routine in the process
Our point is that although all
of
certain data entry situations.
hereg
DataF1ex's
you may not see all of
will be discussed
capabilities
used
them
in every application which you run on your computer.

Copyright (c)

1984

Data

Access

Corporation

05/16/84

A-16

OPERATOR'S

DataF1ex

2.0

User's

Manual

+

?
OF TERMS

DEFINITION

Control

GUIDE

Key:

A key

board
entry that Is made while the "control"
is held down.
Variously represented as "A or
CTRL A to indicate
that the control key is being
held while the "A" is also pressed. Flex-key
functions can be assigned
to control keys with
key

SETSCREEn.
Data

Entry:

The process
of putting new information
computer
through the terminal keyboard.

Ffle

Maintenance:

The
mation

Fill

Character:

into the

examination, changing, or deletion of inforthat is already stored in the computer.

A

below)
(see
character displayed in a "window"
defines the length of the data field which
be entered
can
or displayed at that particular
Genera1]yg
position.
the underline character
(
) is used
for this purpose.
which

Function

Key:

A special key on the terminal
keyboard
that is
outside of the normal typing array.
generates
It
coded
signal that can be "trapped" by DataFlex to
execute
one of the DataFlex Flex-key functions
Terminal
(e.g.. FIND, DELETEg SAVE, etc.).
function keys generate characters that do not
display on the screen.

a

Index:

organized list of keys which is linked to the
records in a file. The index fs maintained in
order automatically by DataFlex so that records can
be accessed
sequentially even though
the data is
entered and stored randomly
in the data base.

Key:

in a record by which the record
E.g.8
or "found" in the data base.
the "ACCOUNT NUMBER" and/or "ACCOUNT NAME" could be
defined as keys for an accounts
receivable record;
the "ITEM ID" and/or "DESCRIPTION"
could be keys
for an inventory record.

An

An

element
be

fie1d(s)

Key

Field:

The

Key

List:

Same

Window:

data

accessed

as

in

a

data

record

which

contains

a

key.

Index.

An

area
of the CRT display defined to accept
or
display data. Windows can be defined to accept
only certain types of data... e.g. numbers only.

————————

——— —

Copyright

of

can

(C)

1984

Data

Access

Corporation

~

05/16/84

DataFlex

2.0

User's

OPERATOR'S

Manual

GUIDE

A-17

—-——————-——————
HOW TO BEGIN
Data
entry and file maintenance
option from the system menu.
number
of the menu item for
to execute.

are begun by selecting the proper
All that you need to do is select the
the
data
entry configuration that you wish

commands
which
you
(or
DataFlex screens
are operated by the Flex-key
The
commands
from
the
keyboard.
are
assigned
issue(s)
the operator)
to certain keys (e.g. TÁÉJ9 LINE FEED, DELETE, RUB-OUT, etc.). function
("Áp
"Bp etc.)
keys
for your
(FL F2, etc.k and/or control sequences
configparticular system.
This assignment
is done with the DataFlex
Once the assignment
of the commands
uration utility called SETSCREE.
is made to the various keys on your terminal, all DataFlex
screens
will operate exactly the same regardless of the fi1e(s) being processed
or the format of the screen.
promotes
the
This feature of DataF7ex
operator efficiency and reduces
opportunity for errors since there is a procedural continuity throughout the systan. The execution of the commands soon becomes second
no
is added to the system,
nature so that when a new or altered module
is required.
additional training or familiarization

displays are "active", which
DataFlex screen
data
or
functions at
entry
file maintenance
command
is issued.

they can execute
time that a Flex-key

means
any

screen
a particular
contains twenty display
of data are to be
but only the first five elements
then
SAVE
command
be issued
can
a
after the
entered initially,
item
unnecessary
is entered. This makes
to
fifth data RETURN
key after
each
of the blank fields just to
strfke the
data
entry effiexit the screen. This feature can improve
reducing the number of keystrokes
ciency by substantially
required.
For

example,

windows,

if

it

Copyright (c)

1984

Data

Access

Corporation

05/16/84

A-18

FLEX-KEY

OPERATOR'S

Manual

User's
—————

DataF1ex

GUIDE

2.0

———
SUMMARY

cnMMANp
ESCAPE

Terminate the

CLEAR

Clear all

RETURN

Terminate entry in the window where the cursor
is currently located and move cursor to the
first position of the next window.

.
BACK

ENTER

Program return to

menu.

windows

screen

the cursor from the current window back
to the previous display window on the screen.

FIELD

Move

FIND

Find
& display the record which
is associated
with the key in the window where the cursor is
currently positioned.
If there is no data in
the WindOWg find and display the record which
is first key in the index for the field associated with the current window.

SUPERFINO

On a screen
display which contains data from
multiple files, this command will find a
record by whichever key window the cursor is
currently positioned in. Them the related
records to the keyed record will be found and
on the CRT.
all data windows
displayed to

SAVE

information to the
Stores the displayed screen
data
base.
the screen contains data from
If
than
more
one fi1ep data
will be written to
whatever
files are part of the configuration.

DELETE

Removes
key

fill

its
found

PREVIOUS

RECORD

the dfsplayed record from the file
from
the key list. A record must
be deleted.
can
before

and
be

it

the record whose key immediately
the key in the window where the
cursor is currently positioned.
Finds

precedes

NEXT

Find
the record whose
the key in the window
currently positioned.

RECORD

key
where

immediately follows
the cursor is

CALCULATE

Performs
the calculation indicated by the
expression entered. Calculations can be per~
formed
as well as on the
in a data window9
prompt
line of the CRT.

HELP

Display

Window

Move

Edit

HELP

screen.

cursor or

change

data

in

an

image

window.

—————————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex

——

————————————
— ——————

—

—

OPERATOR'S

Manual

User's

2.0

KFYF'QFf'P

coMMRNn

fxf'l

GUIDE

————

A-19

— ———

—

ANpTTnN.s

ESCAPE
immediDataFlex
is issued from the keyboard,
All open data
of "shutting down operations".
control is returned to the menu.
It is
files are c1osed7 and the
is madep any data which
important to note that when the ESCAPE connand
is currently displayed is not acted upon in any way unless the program
executes
Specifica11y9 if a new record
a set of commands.
internally
ESCAPE
has been
entered, but not SAVEd to disk(ettek
will not execute
the SAVE command as part of its shut down. This also applies in the
and edited
a record is found
case
of a changed or edited record:
no change
but not re-SAVEd,
will be made in the data base.

the

When

ately

ESCAPE

begins

command

the

process

if

CLEAR

function of the CLEAR command is very simple... to erase any data
the
(only) and place the
character in all
display windows
CLEAR has no effect
window
data
on data
stored in the data
positions.
CLEAR
be used
whatsoever;
base
can
screen
a
operation.
is solely
procedure
called
as a "bailout"
during ed¶ting.
If a record has beenCLEAR
(found), and an edit made that is not correctp
to the screen
will erase the screen and preclude the bad edit from being written to
the data base.
The

fill

from

it

RETURN

The

command
terminates data entry in one display window and
always
This command is almost
the cursor to the next window.
to the RETURN or ENTER key of your terminal.

RETURN

moves
assigned

command
is issued at the end
If you are entering datag and the RETURN
the
displayed information will be
of the last window on the screerg
automatically SAVEd in the data base.
and not enter
a window
prior to entering any
alphanumeric
data
the
field will be given
data. If the window accepts
the value of a string of spaces that is the length of the window.
If
numeric
datá»
the field will be set to zero.
the window accepts

If,

any

during
datag

data

entryg

simply

execute

you wish
to
the
RETURN

skip over
command

"auto-return" at the end of a data
entered data completely fills a windowp
the
will be executed automatically. If "auto-return"
window
the
iS "OÑ"p
to
cursor will jump from the end of the current
the beginning of the next window as soon as the current window is
is up to the user and
filled with data. The use of this feature
SETSCREE
"ON" with the
turned
is
configurator.
Utility program.
It
DataF1ex

can

be

Copyright

(C)

to
that

do an
when

Data

Access

made

This means
field.
RETURN command

1984

Corporation

05/16/84

0PERATOR°S

A-20

GUIDE

'

DataFlex

2.0

User's

Manual

*
°

FIND

where
you can
will display a series of data windows
fnformation or recall existing information for display.
"key
Some of the display windows
are
fields" (as defined above). That
is, they can be used to FIND records in the data base that are assoGenera11y7
ciated with data entered in the windows
of the display.
this is not
the first window in an image is defined as a key, however
always
the case.
image

A screen

enter

new

a particular
record. place the cursor in the window for the
below), enter the "value" of the
field (DESCRIPTION
in the example
key
a FIND command.
for the record you wish to FIND, and execute
DataF1ex
then
you entered in
with
the
value
the
record
will
retrieve
its key field and display it on the screen. If a key with the value
which
not
you entered does
exist, then DataFlex will FIND and display
the first record whose key sequentially follows the position which the
value you entered would occupy
in the Index.

To

FIND

key

illustrate
records in itg

To

key

field),

it

examp1ey

t.he

way

FIND

operates9

suppose

fields,
of
and VENDOR (which
could also be
will not be). This is the data:
which

each

has

DESCRIPTION

VENDOR

ARMATURE

General

DISKETTE

3M

two

ESCALATOR

Electric
Corporation
Otis Elevator

FRISBEE

Wham-O

KEYBOARD

Televideo

with 5
is the
but in this

we had a database
DESCRIPTION
(this
a key

field,

they were entered
is what the following entries would find
command
windowg
and the FIND
executed:
into the DESCRIPTION

if

Here

DataF1ex
YOUR ENTRY

would

FIND

DESCRIPTION

VENDOR

ESCALATOR

Electric
Electric
3M Corporation
3M Corporation
3M Corporation
Otis Elevator

F

FRISBEE

Wham-O

G

KEYBOARD

H

KEYBOARD

J

KEYBOARD

A

ARMATURE

General

ARMATURE

ARMATURE

General

B

DISKETTE

C

DISKEIJE

DISK

DISKEIIE

E

K
L

KEYBOARD

-Error

-

Find

Past

End

Televideo
Televideo
Televideo
Televideo
of File

———-——..,-,———

Copyright (c)

1984

Data

Access

Corporation

05/16/84

DataFlex

User's

2.0

OPERATOR'S

Manual

A-21

GUIDE
———————

SUPERFINO

that displays data from only
identical to the use of the FIND
which
screen
displays data from multiple
ful tool to find and display information

On

a screen

one

base

fi]ep

command.

tionally

files,

from

SUPERFINO
However,

SUPERFINO

multiple,

is funcon

a

is a powerrelated data

files.

action of SUPERFINO is to use DataFlex's data base manager to
place
retrieve all related data on a given screen. To use SUPERFINO,
The
the cursor in the window by which you wish to start the FIND.
be a key
window
must
field.
Enter the key value to find and execute
you want
from
to start viewing the records
the SUPERFINO command.
If
just execute
the beginning of tt!e file in which the cursor is 1ocatech
SUPERFINO
and DataF1ex
related to
will automatically FIND the recordsfound,
all
is
the first key in the key list. Then, when the record
from
other files will also be found and displayed.
related windows
When SUPERFINO
display is filled with data.
is used, the entire screen
The

Once

is complete, you can use the NEXT RECORD
through the related data.
to sequence

screen
display
RECORD commands

the

PREVIOUS

the following example:
an inventory order entry system...

Consider

We have

PARTS

Key

=

BUYERS

Key

= Buyer

TRANSACTIONS

Key

=

Part

the

files

and

are:

#
ID
#

Transaction

to enter all data into the
and.maintained and
through
items
can be ordered
the creation of TRANSACTIONS.
TRANSACTIONs
contain the Buyer ID, the Part #, the quantity of
the PART sold and a total sale amount.
entry configurations

Data

system.

PARTS

and

BUYERS

are

used

can

be

added

the transaction screem
wjndow7
enter a Buyer ID
SUPERFINO,
and press
all fields will be filled. Starting with
the entered Buyerg we can now issue the NEXT RECORD command
and
the
displayed buyer has more transactions, the next
In other
transaction will be found and displayed on the CRT.
words
now FINDing
transactions by Buyer.
we are
The

stage
is set...
place the cursor over

if

we now load
ID
Buyer
the

if

fun
has just
a CLEAR command,
place
begun... If we execute
the cursor in the PART # window and enter a PARTÍ SUPERFINO
NEXT (or
will now ¶ND the PART and its related transactions.
PREVIOUS)
RECORD will
sequence
up and down the transaction
When we
that PART.
hit the end of the transactions
list for requested
PART,
the
next PART in the index will be
for the
displayed with its transactions.
The

""____",
Copyright

(C)

1984

Data

Access

Corporation

05/16/84

OPERATOR'S

A-22

GUIDE

DataF1ex

2.0 User's

Manual

SAVE

data
displayed on the
This
in the data base.
can occur
one or more
associated with the display. SAVE is a simple yet powerful command.
If a configuration datais
changes
to the
not carefully conceived, SAVE can allow unwanted
base
from
from
data
a display containing
several files.

action of

The

and

screen

SAVE

the

save
whether

is to take

command

to the correct
it there
is

data

the

files
files

with
"edit" command in DataFlex. Editing is accomplished
First the record to be edited
of the FIND and SAVE commands.
Then
the necessary
is
to the screen with the FIND command.
When the data
made on the
are
is correctp a
edits or changes
screen.
SAVE command
is executed
to place the altered record back in the data
base.
As mentioned
above,
if the edit is incorrect or needs to be
aborted for any reason.
the CLEAR command will remove the "found"
record from the screen without altering any data.
There
the

is

no

use
brought

DELETE
ProcedUra11yy
the
data
base.
removes
a record from
only operate following the execution of the FIND command
you must
enter the key of the record to be DELETEd, FIND itg
(i.e.,execute
The record
then
the DELETE command).
itself and its key(s)
will be removed from the files.
The

DELETE

DELETE

NEXT

comand

can

RECORD

This command allows you to sequence
through a fi1e9 displaying records
in key order. When the cursor is placed
in a key window2 the NEXT
RECORD command
will FIND the record whose key is next in the fndex for
data
and display
that window's
it. If multiple keykeys are used on the
the
window
be located in any
can
valid
for the
screen,
cursor
operation of the NEXT RECORD command.
PREVIOUS

Same
key

RECORD

as the
precedes

NEXT

RECORD

that of the

command
one

except

currently

FINDs
that
displayed.

it

the record

whose

——————————————

Copyrfght

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex

2.0

OPERATOR'S

Manual

User's

GUIDE

A-23

~

————

CALCULATE

CALCULATE
comnand
allows the operator Interactive access to the
locations
arithmetic capab17íties of DataF1ex.
It can be used in two bottom
on the screen:
or on the command
line at the
of
in a windowp
the CRT. The fomat for the calculation is the same regardless of the
location where
takes place on the screen. Four symbols
are used
for arithmetic operation:
The

it

+

=

-

=

*

=

/

=

The

arithmetic expression
3*50, or 24/6. Parentheses
valid expressions for use
(2+2)*(5/6)

Addition
Subtraction
Multiplication
Division
simply

can
are
by

the

be

supportedg

typed ifb e.g., 2+2, l0-79
so any of the following

CALCULATE

(2*(2*(2*(2))))

are

Command:

100/34+l2*(365/12)

numeric
datap
an
If the cursor is located in a window which contains
When a RETURN command
directly.
arithmetic expression can be entered
is executed,
according to the
the arithmetic will be performed
expression that was entered. No command need be used in this case.
bottom
If the CALCULATE command is issued, the cursor bewill go to the
where
entered. When the
line of the disp1ay9
the expression can
and the arithmetic
execute
a RETURN command
expression is comP]eteg
window
where
be performed
the
the
result
displayed
in
the
with
will
cursor was located when the CALCULATE command was issued. This
the
located in a numeric
applies whether
or
cursor was originally
alphanumeric

window.

HELP

application-dependent "help" screen
to
created as part of an application and
covered
are
in the section of this manual on "Formatting with Images".
Syntax
for using the HELP command within an application to call the
HELP screen
Function Keys".
is described in the section on "Using
The
be

HELP

command

displayed.

will

The

cause

screens

an

are

=========——_—————.,,.-_————.,._—_———.,.,--,,——————_
1984 Data
Access
Corporation

Copyright (c)

Q¿'16/84

OPERATOR'S

A-24

DataFlex 2.0 User's

GUIDE

Manual

—-—-—

USER-DEFINED
some
additional key on your termina] may have been assigned
additional function in your DataFlex app1ication(s).
If so, this was
done
in your particular program and your supervisor or programmer
will tell you which key it is, if any9 and what'it does9 or you will
app1ication(s) you are
find
in the manua7 for the particular
running.
An

it

RIGHT

& LEFT

These

keys

screen

Arrow

Window

Editing

Keys

move the CRT cursor within
hon-destructively
display window during data entry or editing.

BACKSPACE

WIndow

Editing

the cursor one space to the left in
the character under the cursoM as well as
in the window to the right of the cursor.
INSERT

WIndow

Editing

a

screen
any

DELETE

WIndow

Editing

in

a screen

moved

one

1984

Data

Access

deleting
which

may

be

window.
space

to the

Key

Deletes the character under the cursor in a DataFlex
window.
Characters to the right of the cursor will
to the left.

Copyright (c)

window?

characters

Key

Inserts a space at the current cursor position
Characters to the right of the cursor will be
right.
CHARACTER

DataFlex

Key

Moves

CMRACTER

a

Corporation

screen
moved

be

display
one

space

05/16/84

::::Z:Z[TZ

A"25

—————————
—

~~~—~———~~———————————— ——
INSTALLING

=====

DATAFLEX

——

——
""""""""_——""""""""_

~~~~~~~

allows you to configure DataDataFlex SETSCREEn utility program
adapt
certain
Flex to run on your CRT terminaK and to specifically
operations of the software to your specific requirements.
The

we will
use the word
"terminal"
In this chapter of the User's Manual,
and vídeo display of a syst«m
to refer generally to the keyboard
whether
the device is separate from the computer
itself om as in
and video display
Canputer,
cases
the keyboard
like the IBM Personal
and integrated
are
with the computer.
directly connected
be entered directly
from
can
the operating systan
name:
typing the first eight letters of the program

SETSCREEn

level

by

command



A>SETSCREE

entry to SETSCREEn, a list of pre-defined terminal and system
below.
You have
configurations will be displayed as in the example
the option of selecting a predefined terminal which is on the }ist»
adding
the data for a terminal which is not on the list, or editing
the data for a terminal which is already on the list.
Upon

l

SUPERBRAIN

2

ADM 31

3

V.C.

4

TELEVIDEO

5

HAZELTINE

6

ADM 3A

7

TRS-80

8

MICROTERM

9

ADDS

II

IBM

404
(

I5XX
P&T

CP/M

)

VIEWPOINT
PC Wl

PCTERM

13

XEROX

15

NEC A.P.C.

17

HEATH

19

IBM

20

MY TERMINAL

(dos

820
H19/ZENITH

PC Wl

l.l)

Zl9

IS

NOT ON THIS

ACT

5

125

10

HP

12

DEC VT-52

14

ZENITH

16

ANSI

18

T.

ANSI.SYS

(950/925)

lOó
TERMINAL

I.

(DEC)

PEGASUS

LIST

on the list disp7ayedy
simply enter the
your terminal appears
by the name of your
This will select the proper
terminal.
and function
codes
and keys
screen
as preconfigured for your terminal
The predefined Flex-key assignments
keys
will act upon.
that DataFlex
provided for the terminals may be changed
at any time by use of Option
Two in the
function menu shown below.
If you have selected a
displayed terminah the following menu will be displayed:

If

number'

— —————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

A-26

INSTALLING

DATAFLEX

2.0 User's

DataF1ex

Manual

————————

EDIT:

(I)
(2)
(3)

ASSIGN

(4)

DISPLAY

(5)

PRINT

(6)

END

(7)

ABORT

SET

SYSTEM

SET

OPTIONS

FUNCTION

KEYS

CONTROL

TERMINAL

PRESENT

CODES

CONFIGURATION

CONFIGURATION
SAVE

/

CHANGES

SETSCREEN

-

DO NOT WRITE

MANGES

wish
to use Option 4 to display the configuration to check
and/or print the configuration to paper for future off-line
is necessary
for any reason to edit terminal control
reference.
If
these
by use of options
codes
may be done
or function key assignments,
3 and 2 respectively.
Option 6, (END / SAVE (>U\NGES) will write the
configuration to disk for future automatic use by DataFlex.
You

it

may

over

it

There
is a "standard" for terminals that is being used more and
called the ANSI terminal standard. If you cannot
find terminal
may be compatible with the ANSI
information in your manual,
standard. Many of the new "integrated" systws use the ANSI standard.
Systems
known
to use the ANSI standard are: Teievideo 97Cb DEC
Rainbow,
Texas
Instruments Professional, Wang PCg and IBM-PC with DOS
Choice
number
16 above
will provide the ANSI configuration.
2.0.
NOTE:

more,

it

terminal which your terminal emulates) is not
for you to get out your terminal or
manual
system
and manually configure DataFlex using the "MY TERMINAL
LIST"
IS NOT ON THIS
option.
If you need to end SETSCREEn whenat this
and
the menu
point, select any predefined terminal option number,
shown
above
is dfsp1ayed,
enter an option 7 to abort and return to the
operating system.

If

terminal
will

your

it

listecb

"

If

(or

be

a

necessary

IS NOT ON THIS
LIST". and you have
The next prompt
will
is time to proceed.
the
name of your terminal.
This will identffy the entries
make
for future reference from the list of terminals
initially displayed when SETSCREEN is loaded.
you

have

selected

manual

terminal
ask for
that you

ENTER

here,

SETSCREEn

shown

above

PART

ONE:

SYSTEM

a

it

NAME

(UP

TO 20

CARS)

:

will step through the first three options of
with the following series of questions:

From

first

TERMINAL

YOUR TERMINAL

menu

The

"MY

readyg

the

OPTIONS

systw option is:
DO YOU WANT AUTO

This question is
Copyright (c)

answered

RETURN

"Y"

if,

ON FULL

during

FIELD

data

(Y

OR N)

entry.

you

N

want

DataFlex

——————————
———
—————————————————————————————————————————————————
Access
1984 Data
Corporation
05/16/84

DataFlex
~

User's

2.0

INSTALLING

Manual

DATAFLEX

A-27

———————
—

~~

to the next automatically
with data. For examp1m
a window
is formatted for date entries (8 characters including the
in
slashes " / / 'i), and you put in l/1/8Zh the cursor would remain
;
however,
the window until you pressed
if you entered
01/01/83»
the cursor would automatifilling the window comp1ete1yp
image.
in the screen
cally move to the next window
"window"
image
one
move the cursor from
has been
when the window
completely

to

filled

if

___

Answer
window
(and
The

to this question if you want the cursor to
until  is pressedp
at which time DataFlex
only then) move the cursor to the next window.
"N"

THIS

IS

A MULTIUSER

SYSTEM

(Y

OR N)

license is a ntl]t1(lser
your DataFlex
to this question to use your system
respond
with "N".
user systms always

If

"Y"

If

you

in a
then

will

option is:

system

next

remain

N

you

MUST

respond

in multiuser

mode.

On

Yersionp

with
single

option

"Y" to the multiuser question, the next system
question will not display for single-user systems):

responded

is (this

MUST THE

DISK

DATA

(Y

BE PRE-ALLOCATED?

OR N)

answer
this question "Y"es, a file will be created each time
which
(see
is large
Designing Databases)
establish a database
enough
can hold with the
to contain all the data your database
full
which
number
you
will later specify in establishing your
of records
"N"o
be answered
databases.
unless: (I) your
This question should
(some multi-user
systems
do--if yours
requires
operating system
notes
does,
the
for your network);
fact is noted on the installation
or (2) you require for some other reason for the maximum disk space
could
database
occupy
Pre-a11ocation of disk
your
to be pre-reserved.
performance
improve
space
can
with
slightly
in large databases
complex
indexes.
multiple files and numerous

If

you

you

it

When

three questions

these
IS

If

you

have

THIS

DATA

made

a

the questions.

~~~~~~~

Copyright

(C)

If

1984

have

CORRECT

mistake in
the entries

Data

Access

answered,

been
(YIN)

an
are

you

will

be

prompted:

Y

entryy a
correct

Corporation

of

response

Éñtér

"Y"

"N"

to

will

repeat

proceed.

05/

16/84

INSTALLING

A-28

PART

NO:

SET

DataFlex

DATAFLEX

FUNCTION

KEYS

-

2.0

User's

Manual

FLEX-KEYS

be asked
to press certain keys on your keythe Flex-key
throughout DataFlex to execute
DataFlex
will read
etc.).
functions (FIND a record, SAVE a recorch
keyboard
make
them
and retain the
from
as
you
entries
the
your
as the proper response
for the particular
internal codes generated
Flex-key function.

In this

board

section
will

will
used

you
be

which

keys
selected as Flex-keys must not be ones that are used to gendata
1etterm periods,
entry (numbers,
erate characters during normal
You can use taM line feedg
commam
delete, arrows, here-is,
etc.).
by pressing the CONTROL key and a
and any control
character (formed
7etter at the same time), or any "function key" (usually an extra row
keys
keyboard).
on the top row or on the left side of your
of numbered

The

to be used to execute
the
If you have function keys, they do not haveSETSCREEn
will figure out
Flex-key comands; that is your option.
what
kind of function keys your terminal has by asking you to press
The function
keys
you
as Flex-keys must
press
one
(or tWO) of them.
Some terminals
have
"grouped"
all have the same "lead-in" code.
function keys with different lead-in COde5y in which case you can only
You
use one group.
will be prompted:
DOES

If

haveg

you

and

press



After

you

have

keysg

you

wi11

particular

to

want
make

to

KEY

lead off

Copyright

OR N)

a

use7
function keys? answer
default entry of "N".

"Y".

HAVE

established whether
be asked
to press
Flex-key function.

PRESS

...will

(Y

YOUR TERMINAL

(C)

the

1984

CORRESPONDING

following

Data

Access

FUNCTION

a

KEYS?

or not your system
series of keys to

has
assign

N
Otherwise

function
keys
to

a

TO FUNCTION

list:

Corporation

05/16/84

"

DataFlex

RETURN
ESC

User's

2.0

OR ENTER

( EXIT

PREVIOUS

FIELD

WINDOW

FIND

A RECORD

)

(BACK

OR

FIELD)

(E.G.

(13)

ESCAPE

(27)

LINE
)

'L"

RETURN

FEED

"J'

(95)

TAB

(9)

(must

CTRL

F

SAVE

CTRL

S (19)

CTRL

D

CTRL

P

(16)

(SEQUENTIAL)

CTRL

N

(j¿j)

KEY

CTRL

C

(3)

ON SCREEN

CTRL

A

CTRL

Q (17)

(l)

CTRL

U (21)

A RECORD
A RECORD

PREVIOUS
NEXT

RECORD

CALCULATE

FUNCTION

DATA

CLEAR
HELP

(SEQUENTIAL)

RECORD

WINDOWS

KEY

USER

DEFINED

BACK

SPACE(

DESTRUCTIVE

LEFT

ARR0W(

NON DESTRUCTIVE

FUNCTION
)

CTRL

L

(12)

CTRL

K

CTRL

(li)

DOWN ARROW

V (22)

INSERT

CMRACTER

CTRL

Z

(26)

DELETE

mARAcTER

CTRL

X

(24)

THIS

DATA

CORRECT

(YIN)

printable

char.)

(127)

H (8)

CTRL

ARROW

be

(4)

UP ARROW

RIGHT

A-29

(6)

DEL/RUBOUT

)

DATAFLEX

(ID)

SUPERFINO
DELETE

IS

KEY

PROGRAM

DATA

INSTALLING

Manual

Y

of Flex-keys that can be
is the "standard" assignment
on any system
uses
exclusively universal keys for
sInce
each
You may set up the Flex-keys any way you want
on your
function.
Then
system.
all DataFlex programs
running on your system will use
for the meaning
your assignments. Refer to the operator documentation
of each of these Flex-key functions.
This

list

it

implemented

Some
for a Flex-key.
not have duplicate assignments
back
generate the same code from two keysp typically
and back
computer,
case
your
you
may
space
this
is
the
with
arrow. If
NOT use both
The two
forms
provided by
of backspacing
of these keys.
DataFlex are: destructive (deletes data) and non-destructive (moves
They
MUST
the cursor back without deleting data previously entered).
be assigned
internal codes.
to keys that generate different
NOTE:

You

terminals

may

will

Except

for the data window
non-printable characters.
PART

THREE:

SET

SPECIAL

charactem all

SCREEN

of the

above

must

be

ASCII

FUNCTIONS

In this
section you will configure DataFlex
set
to clear the screen,
and other screen
Ail data in this section
highlighting,
attributes.
with spaces separating entries that
will be entered as decimal numbers
require multiple values (e.g. ESC "=" are two values that might be
———————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

A-30

27

entered as
function.
section of

DataF1ex

DATAFLEX

INSTALLING

61).

It will

Up

to four

be

necessary
terminal manual

your

2.0 User's

Manual

values can be entered for each
control
for you to turn to the screen
this part of
in order to complete

(4)

SETSCREEn.

NOTE:

DOES

A FUNCTION

IF

NOT EXIST

ON YOUR TERMINAL,

ENTER

!

a

& EXAMPLE

FUNCTION

EXPLANATION

CLEAR

Enter the code(s) that clears the
than
more
(separated by spaces
number
is to be entered).

SCREEN

if

EXAMPLE:
REQUIRED
CLEAR

27

EXAMPLE:
OPTIONAL
HIGHLIGHTED

27

OPTIONAL

OPTIONAL

27

27

41

8 32

8

FUNCTION

EXAMPLE:

HOW MANY (MARACTERS

WIDE

HOW MANY LINES

LONG

IS

USE 7 OR 8 BIT

ASCII

Data

40

This code is provided to set your terminal
to the proper mode (if required) when
DataFlex
is loaded.

INITIALIZATION

1984

l

This code will move the cursor one space
to the left, replacing the character with

SPACE

REQUIRED

(C)

cursor

FUNCTION

a space.
EXAMPLE:

Copyright

the

FUNCTION

EXAMP,LE:

TERMINAL

from

Enter the code(s) to restore your terminal
mode.
(low intensity)
to the normal

SCREEN

BACK

34

FUNCTION

EXAMPLE:

DESTRUCTIVE

42

If your terminal supports highlighting (or
another display attribute that you prehighferL enter the value that begins
Then
data
in the windows
lighted display.
in high1ighteci mode.
will appear

SCREEN

NON-HIGHLIGHTED

one

FUNCTION

Enter the code that clears
to the end of the screen.

TO END OF SCREEN

screen

IS

27

40

YOUR TERMINAL?

YOUR TERMINAL?

CJIARACTERS?

Access

Corporation

(79
(24
(

7

is standard)
is standard)
is standard)

05/16/84

User's

2.0

DataFlex

INSTALLING

Manual

A-31

DATAFLEX

"—_—_—"""

PART

CURSOR

FOUR:

POSITIONING

CODES

Part Four of SETSCREEn Involves entering the codes that actually
position the cursor on the screen. They are entered in the same way
separated
by spaces.
numbers
as the screen
functions above,, as decimal
The
a
string
value
that will
function
will
generate
positioning
cursor
how
The following
be sent to the terminal.
questions will determine
that string is constructed.
POSITION

LINE

COLUMN

BEFORE

TO PRECEDE

CODES

(Y

OR N)

COORDINATE:

LINE

Y
64

27

the columm
the line co-ordinate to precede
terminal expects
respond
otherwise
with
"N". Next,
question
with
"Y";
the
to
enter the character string (in decimdb separated by spaces)
preceed
the line and column coordinates.
If your terminal does not
require a character string before one of these coordfnatés» just enter

If

your

then

answer

.
POSITION

LINE
CODES

POSITION

CURSOR

POSITIONING

offset
at zero.

codes

COLUMN

(BIAS)

TERMINATION

will

O

is

code

32)

32

(column

O

Is

code

32)

CODE:

to the actual cursor position

ADDED

be

(line

32

COORDINATE:

CODE OFFSET

COLUMN

The

(BIAS)

CODE OFFSET

TO PRECEDE

starting

require the positioning codes as a one byte binary
these, answer the question below with a "B". Some
(mostly ANSI terminals) require the code as an ASCII number.

terminals

Most

For

number.

terminals

SEND CURSOR

POSITIONING

NUMBER OF NULLS

CODES

TO SEND AFTER

IN

BINARY

CLEAR

OR ASCII

SCREEN

(B/A):

B

POSITIONING:

AND CURSOR

O

(mostly older) terminals require a delay after a screen
operaFor
characters that should
these. enter the number of null
tion.
be sent.
Some

fill

IS
your

THIS

DATA

entries

CORRECT

(YIN)

or repeat this

A "N"o

Y

response

section in

case

"""" ""===============Corporation

Copyright

(C)

1984

Data

Access

will allow
of errors.

you

to verify

=====
05/16/84

A-32

INSTALLING

DATAFLEX

DataF1ex

User's

2.0

Manual

————————
THE

SETSCREEN

MENU

codes.
screen
This ends the initial setup of DataF1ex
If you enter an
incorrect code9 or want to change a function key, you may re-select
any of the options from
the menu below.
If you re-enter the SETSCREEn
programg
the initial screen
display will list your manually-defined
you established
'terminal on the pre-defined list under the identifier
for it.
EDIT:

From

(I)

SET

(2)

ASSIGN

(3)
(4)

SET

DISPLAY

(5)

PRINT

(6)

END

(7)

ABORT

this

menu

SYSTEM

OPTIONS

FUNCTION

TERMINAL

KEYS

CCNTROL

PRESENT

CODES

CCNFIGURATION

CONFIGURATION

/

you

SAVE

CMNGES

SETSCREEN

may

-

DO NOT WRITE

select the function

QIANGES

which

you

want

to

change.

B

will generally
the configuration

It

When
changes

be
as

useful to select option (5) to print
a reference for the FLEXKEYs.

your configuration is comp1etey
and return to the DataFlex

use

option

(6)

to

save

a copy

of

your

Menu.

~

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

A—33

_ ""_""
————————
——
==""_"
" " " " " " "" " " " " "" " " " "

________—_—————_——__~~~~~_——==
~
__—————

m

——
: m:z====

OPERATING

TUTORIAL

_———
::::F:E:::
—————————
—

————

———
-— —————
—- ———————————————
———————

you with DataFlex.
This tutorial
is designed
to familiarize
concepts
is
objective
to introduce you to several necessary
tions of the systE%n without going into depth about how the
are
carried out within DataFlex.

Its
and

func-

processes

It is intended that you use this section of the user's manual in a
learning "session". or series of "sessions"» actively exploring DataFlex on your system with the manual as your guide.
The

Programming

you through
DataF1ex

SYSTEM

the

Tutorial in the next section of this
steps
involved in creating your own

will
with

manual
database

guide

álECKOUT.

..
certain prerequisites must first
proceeding with the tutoriab
make
sure
that DataFlex is properly operational on
confirmed to
We dorót want
an improper
to
or incomplete installation
your system.
introduction
to DataFlex.
with
interfere
your
Before
be

have
instructions packaged
followed the installation
First» you should
Master
diskettes for your particular version of the
with your DataFlex
executed
have
the SETSCREEn Program
to conproduct. Next. you should
for your particular system's CRT control codes and
figure DataFlex
have
command
key setup.
printed out a list of your
Also, you should
system's command key set up using option 5 on the SETSCREEn Menu to
give you a guide to follow during the familiarization.
If you have
do
not run SETSCREEm or have not printed your Flex-key configuratiom
those
steps
before proceeding further here.
With

items

these

accomplished,

FOR FLOPPY

DISK

BASED

you

should

COWUTERS,

of the operating system
drive "A: ", and the sample

and

copy

ON HARD DISK

BASED

data

COKPUTERS,

to the drive or work area where
master
diskettes.
the DataFlex

turn

on

your

system

load a diskette containi ng a
the DataFlex programs
into
diskette into drive "B: "; OR

"boot" the systa
DataFlex

has

and

been

(C)

1984

Data

Access

Corporation

"log in"

loaded

be able to determine
should
then
that specific DataFlex
available on your "logged in device" (see glossary) by having
system
display a directory.

You

Copyright

and:

files

from

are

the

05/

16/84

A-34

OPERATING

TUTORIAL

DataFlex 2.0 User's

Manual

that you are logged
in to the "A:
drive (and you may not
should
be able to
on a hard
you
particularly
disk
systemL
then
-enter the DIR command indicated below (shown in boldface) and have a
display containing the listed file names (quite possibly in a different order than displayed here) shown on your CRT screen
along with
the
names
of other ".COM" files that may be on the same diskette or
hard
drive partition
(replace ".COM" with ".CMD" on CP/M-86 systms):

If
be

we

"

assume

A>DIR

*.COM

A: FLEX


.COM

(or

COMP

DIR

.COM

*.CMD

on

QUERY

CP/M-86)

.COM

If

these file names are displayed, then you have the necessary
compoin place to proceed
with this section.
If all of these are not
present in the displayed d1rectoryg try the comnand again. If the
above
flies are still not showñ» refer back to the installation instructions to make sure that they were completed.
nents

O.K., LET'S GET STARTED.
..
We
DataFlex can be run in a completely menu-controlled envirorment.
will use the sample menu that is delivered with DataFlex
as our
guide.
To get to that menu and begin, type the word
FLEX at the command
level
of your operating systan and press .
A>FLEX
In

a

few



seconds,

the

YOUR REGISTERED

DataFlex

Menu

should

display...

NAME

Serial

0" " " " " "
l l

DataFlex Ver. 2.0 -—-MASTER MENU

----

li
n
}

"

l

DataFlex

demo

l
l

2
3

DataFlex
System

Configuration

l

4

Set
Run

}

5
6

DataF1ex
Enter System

l

7

Exit

#

:

ii
li
0
l

files

Utilities
Date

l

Systan

To

l

Configuration
Command

Operation

l

System

l

I
"

i
,
i
l

Please

i



select one of the above o¶¶tions
or
to go back one menu >>>>>>>>>>>>>>>>

l

press

l
—

——————

***

DataFlex

Menu

Systw

—————————

Copyright

(C)

***
————————

1984

Data

Access

Corporation

05/16/84

2.0

DataFlex

User's

Manual

OPERATING

TUTORIAL

A-35

that stores the
configuration (named MENU.FLX)
is a DataF1ex
option "data" in a data base file. You will learn how to modify
later
the existing menus and put your own configurations on the screen
For
on.
now we will use the
standard menu to begin our tour through
DataFlex.
The

Menu

menu

SELECTING
A MENU OPTION...
To select an option from
the meñi-b just
AND .
Let's start by selecting
number

press a
display:

YOUR

(I)

one

on

your

Serial

NAME

REGISTERED

DataFlex

li
li
O
l

keyboard,

press the corresponding number
the DataFlex Demo Menu...
and another menu will

Demo

l
2

Data

l
l

3

l

4

l
l

5
6

Report
Customer
Report
Vendor

l

7

(N-LINE

l
l

8

QUERY

:

li
li

2.00

Files

Enter Vendors
Enter Inventory Items
Enter Customers
Inventory Movement Report

#

e
" l
l
l
l
l
I
l

Invoice
Files

l
'

Data

f

"
Please
select one of the above options or press
 to go back
one menu >>>>>>>>>>>>>>>>

l
l

***

DataFlex

Menu

System

l
l

_

***

displays a list of predefined options that you can use to
Enter a number one (l) to select.
applications work.
option. DataFlex will now load and display
the VENDOR File Maintenance
"image"
used
a screen
for the entry, recall and editing of data in the

This
see

menu

how

sample

DataFlex

VENDOR

Copyright

(C)

data

base

file.

1984

Data

Access

Corporation

05/16/84

OPERATING

A-36

TUTORIAL

DataFlex

2.0

Manual

User's

======——————————————————
—————————————————————
— ———————

DATA

ACCESS

VENDOR

VENDOR

CORPORATION

NUMBER:

<

COMPANY:
ADDRESS:

<

>
ST:

(DAYS):

TERMS

_

()

"

CREDIT
LIMIT:
OUTSTANDING
CREDIT:
REMAINING

TOTAL

WIndows

in

FLEX-KEY

$

PURMASES:

LAST

> can

CREDIT:

ZIP:

$
$
$

._

._
._

._
_/_/_

PURMASE:

<

FILE

>

CITY:
PHONE :

MASTER

be

to

used

FIND

vendors

OPERATION...

uses
"Flex-keys" to accomplish
various actions on a screen
These
are
display.
in lieu of a menu which would list the options
available to a system operator at any given point in an application.
the
The Flex-key concept
works
used
same keys
are
for the
well because
same function throughout all DataFlex
applications on a given system
Foe examp1ep
the
same key
is used on all screens
to FIND a record in
the data basep or to CLEAR displayed infomation from the screen
image.
As noted
above,
Flex-keys are specified in the DataFlex
SETSCREEn
Program.
Specific detailed infomation on the use of the
in the chapter on Operator Procedures.
Flex-keys is in this manual
DataFlex

"FINDING"

A RECORD

IN

THE

DATA

BASE...

NUMBER "window"
on the screen.
Enter a number one (IK and press the FIND Flex-key on your keyboard
The screen
(as
defined in the Flex-key list printed with SETSCREEn).
should
You have just
display information for Data Access Corporation.
executed
your first DataFlex Commandl
Your

cursor will

CLEARING
To

remove
mand Key.
was

INFORMATION

this
The

originally

Copyright

wait in the

(C)

FROM THE

information
displayed

Data

DISPLAY

SCREEN...

the screem press
be restored to the
the menu.

from

should

screen

1984

VENDOR

from

Access

Corporation

the
same

CLEAR

status

ALL
as

Comwhen

it

05/16/84

DataFlex

User's

2.0

A RECORD

"FINDING"

OPERATING

Manual

——

BY AN ALTERNATE

TUTORIAL

A-37

"KEY"

configured to allow VENDORs to be found by either the
you found
a record by VENDOR
or the VENDOR NAME. Above.
NUMBER.
Now,
we can
find the same record by VENDOR NAME. While the
cursor is positioned in the VENDOR NUMBER W1ndOWg press » and
(The
should
move to the VENDOR NAME window.
in
zero which appears
the VENDOR NUMBER wIndow signifies null input, and may be ignored
whenever
appears.) With the cursor in the VENDOR NAME WindOwy type
and press
the FIND Flex-key.
the word "DATA" (in capital letters),
Again, the information for Data Access Corporation should be
displayed.
This

screen
is
VENDOR NUMBER

it

it

MOVING

THE

CURSOR

AROUND THE

SCREEN...

Pressing the  command key will move the cursor sequentially
To move backwards
image.
on
through the entry wIndows of the screen
VENDOR NAME window
example
from
back
screen
(for
to VENDOR
the
the
Each strike
NUMBERL
press
of  or
the BACK WINDOW Flex-key.
One
BACK WINDOW will
one window.
move the cursor forward or backward
from
or a 
a BACK WINDOW from
the
the first window,
caution:
to c1earg and possibly a
last window will cause all the windows
"record" to be saved which you didn't intend to. The safe way to
and to
is to strike the CLEAR ALL F1ex-Key»
clear all the windows
screen
altogether,
is to strike the ESCape Flex-key.
leave the
"SCANNING"

THE

DATA

BASE...

provides a means for you to scan the records in the data base
key
by any pre-deflned
index. You can enter the index at any point
and move
the records
forward or in reverse through
in the data base
(as
above)
and the
image
With
screen
a
described
clear
cursor
file.
NEXT
RECORD
Vendor
VENDOR
NUMBER
window,
press
the
Flex-key.
in the
NEXT RECORD again...
should
NOWg press
number
be displayed.
"l"
be used
be displayed.
number
vendor
can
This same process
"2" should
window
image.
Indexed
on a DataFlex screen
on any
will not
It
data.
function on a window that has un-indexed
DataFlex

information can begin at any place in an index.
with a VENDOR NAME that
to scan all records
started with the letter "G", you would move the cursor to the VENDOR
Then
NAME window
and enter a "G".
press the NEXT RECORD Flex-key and
the first record in the data base which has a VENDOR NAME alphabetlcally following the letter "G" wIll be displayed, possibly "GARNER
To scan
SYSTEMS"
following the
to the record
or "GENERAL ELECTRIC".
To move
in
NEXT RECORD agaim and agaim etc.
press
one disp1ayedD
PREVIOUS
RECORD Flex-key.
the
use
reverse,
A scan
of data
example
For

if

base
you

wanted

==",~==

Copyright (c)

1984

Data

——————
Access

Corporation

05/16/84

OPERATING

A-38

A NEW RECORD

ENTERING

DataF]ex

TUTORIAL

INTO

THE

DATA

User's

2.0

Manual

BASE...

far everything that we have done has used data already stored in
Clear the
the data base.
It's time for some of your own information!
screen
using the CLEAR ALL Flex-key.
Next. press the  Key and
when
be displayed on the screen
temporarily;
a zero (O) will
your new
to your
data is saved a VENDOR NUMBER will automatically be assigned
new entry.
So

The

should
now
MANUFACTURING"

cursor

"MICRO

address, city.
credit limit.

be

in the

and

press

ZIP,

state,

VENDOR

code

area

window.

NAME

Then

.
and

phone

Type

fill

in

number,

the
a

name

fictitious

terms

and

entered, your data for
the credit limit
MICRO MANUFACTURING
will be saved In the data base automatica11y. The
on the screen
contain calculated data that is upremaining windows
be made to
No operator entry can
dated
by other parts of the system.
those windows.
has

When

been

base.
To FIND
new record is now stored in the data
itg place the
type MICRO MANUFACTURING and press
cursor in the VENDOR NAME window,
be displayed
record should
the FIND Flex-key. MICRO MANUFACTURING'S
image,
You can CLEAR the screen
or use NEXT or
on the screen.
PREVIOUS
RECORD Flex-keys to scan
other records in the data base.
The

MANGING

INFORMATION

IN

THE

BASE...

DATA

important functions of any information system
is to
on-going updates
to stored data. This would include
examples
changes
such
as address
in
in a mailing list. price changes
an inventory system,
in
of making these changes
etc. The process
DataFlex
or updatech
is easy... you FIND the record to be changed
imageg
and then
changes
on the displayed screen
enter the necessary
SAVE the record back
Let's try
to the data base.
One

of the
provide for

most

the

it...

Move the
the data base record for MICRO MANUFACTURING.
cursor
and change
the existing data to
to the phone number windows
something
else (e.g. (414)354-6868
to (939)456-9876). Now press the
be stored back
SAVE Flex-key,
and the record will
in the data base
again
FIND MICRO MANUFACTURING
with the changed phone number.
to
verify that your change has been recorded.
FIND

down

can be executed
at any time that a record is disThe displayed information
image.
wIll be SAVEd
the screen
This allows
regardless of the position of the cursor in the image.
you to save
keystrokes by moving the cursor as far Into an image as
necessary
the SAVE without
to change information, and then execute
moving
end
the
the
to
of
screen.
SAVE

The

played

Command

on

HOW TO EXIT
To

leave

THE

any

SCREEN

DataF1ex

& RETURN
screen

TO THE

image

and

MENU...

return control

to the

Menu,,

—————————————————————————————————

Copyright (c)

1984

Data

Access

Corporation

05/16/84

DataFlex 2.0 User's

OPERATING

Manual

TUTORIAL

A-39

___—————_———=———
The screen
image
simply press the ESCAPE Flex-key.
will clear
the DataFlex Menu will re-display ready for another
selection.

and

in

a moment

CHECKPOINT...

SO FAM

have

we

---

explored:
DataFlex

Loading
Making

selection

a

--

Displaying

--

FINDing

--

CLEARing

--

Moving

--

Scanning

--

SAVEing

--

Changing

--

Exiting

a

screen

information
a

the cursor

new

base

a

the DataFlex

Menu

"image"
in the

around

base

data

the

screen

image

information

fnformation

existing
from

from

system

"image"

screen

data

the operating

from

in the

information

display

screen

data

base

in the

data

to the

menu.

base

comfortable with the operation of the system at this point,
Phase
II to build your own sample application file.
there are areas of this section which are unclean or if you just want
more
with the various operations, you can
of a familiarity
to develop
review
you feel comfortable
any of the preceding operations until
enough
to move on to the next phase.

If

you
proceed

are

If

to

====—===—————~—————————~~~—~~———

Copyright

(C)

1984

Data

Access

~~~~+

Corporation

————
05/16/84

A-40

OPERATING

TUTORIAL

Dataf1ex

2.0

================================"===="====_——~~~———~~———

THIS

Copyright

(C)

1984

Data

PAGE

Access

INTENTIONALLY

Corporati

LEFT

on

User's

Manual
—

BLANK

05/]6/84

A~41

——_""""_—"~______"_____—————~——====Z=Z====

=====

==========

EE2á2Es

QUERYING

THE

====
""~"~"""""

DATABASE

="=="=====
—————————————
OVERVIEW

enables
user
any level of system
to quickly
DataFlex QUERY Program
QLJERY can
easily extract information from a DataFlex database.
automatica11y
displays, or
format the file data for reportm screen
disk files. The information can be output by any index, and can be
entered at run time.
selectively extracted according to specifications
and non-technical.
The operation of QUERY is completely interactive
The
and

include optional tota11ing of
Additional features of the QUERY Program
numeric
fieldm and a full range of logical selections (less tham
Up to ten selections
less than or equal tOp etc.) can be used.
per
session are allowed.
meaning
QUERY is device-independent,
from
can be
that
directed to the screen, printer or a disk file. If QUERY'S output is
directed to a disk file,, the data is stored in ASCII format so that
QUERY also offers
read
by other programs.
be edited or
the
can
QUERY has
been
comp1etedp
once
successful
to save
to disk
a
optiom
and run
which
be compiled
as
source
can
as a report configuration
file
QUERY as many times thereafter
as
the
repeating
a DataFlex
program
A1ternat1ve]y, the QUERY-produced
may be desired.
file may be further
modified to become any other kind of report that may be desired.

it

Output

it

it

only one DataF1ex
inquiries can
multifile
configurations by use of the REPORT command
another section of this manual.
Although

QUERY

can

file at a timep
created as DataF1ex
macro.
described in
database

handle
data

prompted

base

be

PROGRAM START-UP

QUERY
menu

is generally
selection or

If the DataFlex
enter the number

Cíu-y"ight

(C)

started from
operating

the

one

of

system

is installed
corresponding to QUERY

MENU system

1984

Data

Access

two

levels of the

command

system:

a

mode.

and
on

Corporation

active on your system
the Data Flex Demo File

05/16/84

-

A-42

THE

QUERYING

Menu
or
examp1e7

which

other menus on
choice number

8

it

in the

may be included
Demo menu below:
Demo

DataFlex

l

2
3
4
5
6

-->

on

User's

2.0

DataFlex

DATABASE

Manual

For

system.

your

Files

Enter Vendors
Enter Inventory Items
Enter Customers
Report
Inventory Movement
Customer
Report
Vendor
Report
ON-LINE
Invoice

7
8 Query

files

data
QUERY

the menu systw is not in USév
operating system by simply typing the

If

may

program

be

invoked

from

the

name:

A>QL)ERY

If

the

file

assigned

number

be

number

given that
step of displaying
skipped. E.g.:

can

A>QUERY

If

no

file

display a
selection.

list

a

to the DataFlex data
on the operating system
of files available for

file

is

command
query

QUERY

knowm

line
will be

and

the

21

accompanies
the entry to QUERY, the program
of files available on the system and prompt
Enter the number of the file to be queried.

will
for

number

list

File

File

Number

Namé

21:

ENTER

a

VENDOR

22:

INVENTORY

25:

CUSTOMER

29:

LINE

FILE

you

NUMBER.

FILE
FILE

ITEMS

OR RETURN

====""=="""""~~"""~""""""""""""""""""""""""""
Copyright (c) 1984 Data Access Corporation

""",————"

FOR MORE FILES:

""

21

"""""""""
"""""" 05/16/84

QUERYING

Manual

DataFlex 2.0 User's

DATABASE

THE

A-43

——————
—————

——————

PROGRAM OPERATION

When

a

file

the fields

has been
selected,
in the selected data

QLJERY

file.

will

display the

names

all

of

example:

For

ADDRESS

O:

RECORD

I:

VENDOR

2:

3:

CITY

4:

STATE

5:

ZIP

6:

PH0NE_AC

7:

PHONE_EX(MG

8:

PHONE_NUMBER

9:

TERMS

10:

CREDIT_LIMIT

PURMASES

13:

LAST_PURQ1ASE

II:

12:

SELECT
DATA

#

ITEMS

THE
FILE

YOU WANT TO BE QUERIED

SELECTIONS

ON TO THE

TO CONTINUE

COLUMNS

CREDIT_USED

FROM

Á'21

WHEN YOUR FIELD

TOTAL

THAT

of

=

10

NEXT

ARE CONF'LETED,
SECTION

FIELD

ENTER

PRESS



OF QUERY.

# TO PRINT:

2

FIELD
# TO PRINT:
with the number of the
is where you respond
field from the displayed list in the order you wish the information to
be:
be displayed
field #, ,
or output. Your entries should
in a report format7
field #, , etc. If you output your query
headers
column
columns
and
in your display or printout will be
the
the
the field names which you select here.
ENTER

ALLOCATED
prompt
the number of horizontal
will accumulate
(characters) used as you select fields for formatted output.
The number
are
calculated by taking the larger of: the
of columns
size of the field you entered from the ]ist» or the size of the data
appeared
on the list plus a space
separator.
field name as

The

COLUMNS

columns

it

many fields
to be included in the QUERY as you want.
the standard video display
the following in mind:
80 columns
(some
and some printers
can only accomnodate
screen
80
COLUMNS
ALLOCATED
exceeds
accomnodate
only 79). If the
actually
which
may make the line of
(or 79), the screen will "wrap around"
unformatted data unreadable.

You

may
However,

enter

as

keep

132 columns
printers will accommodate
of printing at 12 characters per
create up to 255 characters of output per

or

Many

capable

inch

more

or

(e.g. printers
more).

QUERY can

line.

——— ———

Copyright (c)

1984

Data

Access

Corporation

05/16/84

QUERYING

A-44

DataFlex

DATABASE

THE

to the prompt
placing an asterisk
change
you
your mind about a
cancel
the last selection by
As

respond

you

tions

the

desired fields have
the next section.
fields.

all

When
move

by

The

next

ENTER

than
a

if

ITEM

SELECTIONS

MAKING
These

will

prompt

been

chosem

will

QUERY

PRINTED

Manual

if

THE

AT

the  key to
totals are wanted on

press
ask

QUERY?

END OF THE



be:

TO SELECT

IN

User's

line, QUERY will mark your field selecShould
in front of the field tag name.
field that has been selected for outpUt9
key.
using the BACK WINDOW comand

on to
numeric

DO YOU WANT TOTALS

2.0

BY OR PRESS

TO CONTINUE:



QJJERY

the logical operators available in QUERY (less than, less
of data from
or equal to, etc.)c that are used to define a subset
are

file.

the

<:

LESS

>:

GREATER

{:
};

THAN
THAN

selected is

field

numeric

LESS

will

you

THAN

GREATER

OR EQUAL

THAN

TO

OR EQUAL

TO

see:

NUMBER:
EQUAL

=:

if

the

field

TO

X:

selected is alphanumeric

NOT

you

EQUAL

will

TO

see:

STRING:
S:

As

STRING

@: STRING

COMPARE

line
to the prompt
will change by translating your
into the appropriate words. QIJERY will also mark the field
names
list on the upper portion of the screen with the selected
symbol.
If a greater than and a less than are specifiedbe for the same
selected.
fielch a range of records between
the two values will
allowed
The maximum
number
fs 10.
of selection criteria
you

respond

INCLUDES

it

responses

QÍOOSING

AN OUTPUT

SEQJJENCE FOR QJJERY

will display the available indexes
for the file. Select the
or order of the QUERY
index that you want to determine
the sequence

and
do
you
press
the
not enter an index number,
output. If
according to the record number of the data.
output will be ordered
QUERY

—————
———————.,————-————————-—

Cnpyright

(C)

1984

Data

Access

Corporation

05/16/84

QUERYING

Manual

User's

2.0

DataF1ex

THE

DATABASE

A-45

—— —————————
—
*

l

2

--->
--->





OF THIS

OUTPUT

wiR

then

will

QUERY

ask

ENTER

THE

each

of

BE LISTED

SHOULD

TITLE

the

for
top

at the

appear

QUERY

OF THE

page

of

BY:

REPORT.

This information
report format QUERY.

a

HEADER:

REPORT

At this point you
for the output destination.
Next, QUERY wi71 prompt
also have the option of using QUERY to create a configuration file for
The default
is to output a report
a DataFlex report.
for this prompt
formatted query to the screen.
AT THIS
SHOULD

POINT

A REPORT

OUTPUT

YOU MAY SELECT

BE DIRECTED.
IMAGE

QUERY

WHERE THE

YOU MAY ALSO

OUTPUT

SELECT

THE

QUERY

OF THIS
FORMAT

FOR

FILE.

TO:

(F)i1ey (R)eport

(S)creen, (P)rinter,

or (A)bort:

imagep

entry of "S" will cause the output to go to the CRT screen; "P"
send
"F" will direct
to a disk fi7e
the output to the printer;
will
(you
will be prompted
for a ffle name); or "R" will create a "Report
(see
Image"
next paragraph). A , or default, response
will be
Both
the
"S"
executed
were
"F" (file) and "R"
as though
selected.
options will trigger the questions below.
(report configuration)
An

it

USING

By

A REPORT

CONFIGURATION

response
an "R"
to the output option prompt you will
creation of a report configuration file. The next prompt
used
you want
of three formats, Report, Reach or Quoted,
when
report
is
the
output
run:

which

SELECT

THE

1)Report,

OUTPUT
2)Reád»

FORMAT

or

FORMAT:

on

DataFlex

a

data

base

file.

1984

Data

for

ask
the

format:
of

a
under

A sequential ASCII
format consisting of each
separate line terminated with a carriage return.
the format that the DataFlex
utility READ uses to "Read" data
READ

element

will

TO BE USED

3)Quoted

A formatted columnar
report consisting
I) REPORT FORMAT:
elements
arranged
data
in columns
sectiom column headerm
appropriate names, and totals (if selected) at the end.
2)

start

making

the

data

QUERY TO GENERATE

title
their

data
This is
into a

__—————__——______=————

Copyright

(C)

Access

Corporation

05/16/84

QUERYING

A-46

DataF1ex

DATABASE

THE

2.0

User's

Manual

——————————————

===——

ASCII
A sequential
QUOTED FORMAT:
file format compatible with many
versions of BASIC and the "merge"
files created and used by many word
and commas
quotes
("BJ') are used to delimit
processors, in which
Leading
fields and each record is terminated by a carriage return.
QUERY,
from
trimmed
from
and
are
the
fields
of
output
blanks
trailing
(unless you
report configuration
but not from output of the generated
subsequently edit
to do SO).

3)

it

Then

you

be

will

prompted:

THE

ENTER

REPORT

IMAGE

NAME

(8

MARACTERS

MAX)?

up to eight (8) characters
in length that
with the fi7ename
configuration file to be stored under by
the report source
QUERY will
add an extension of .RPT to your
the operating system.
entry resulting in a final name of the file of fi1ename.RPT.
Thereforep
you must
not specify your own extension to the filename.
If you doF QUERY will ignore it.

Respond

wish

you

QUERY
a file already exists with that name (filename.RPT),
will
message
to that effect and ask whether
issue a warning
or not to
in this case is .
overwrite the file. The default response

If

Next

you

will

a message:

see

REPORT
PRESS

IMAGE

CREATED!



TO

CONTINUE......

above.
shown
will then again display the output option prompt
is intended to give you the opportunity to output the actual
(as opposed
data
to the report configuration file which you have just
your
only purpose
for running QUERY at this point was to
created).
If
REPORT
fí1eg choice "A" to abort would be
configuration
create the
your choice.,
QLJERY
which

In
must

order to use
compile

the

it

A>COMP

into

report configuration file created
a .FLX
file with the comnand:

by

QUERY9

you

fl1ename.RPT

filename is the name you gave the file in answer to QUERYG
above.
Prior to compiling itg you may wish to modify it in one
way or anothem
in which case you may do so as you would with any
DataFlex
source
configuration
other
file (see the chapter on How to
configuration
Write a Configuration in this manual). The compiled
be executed
from
would
then
the operating system with the comand:
where

prompt

A>FLEX

filename {output destination}

—————

Copyright (c)

1984

Data

Access

Corporation

05/16/84

B"l

—— ————————-——————
——————————————————
==========
EEEEE=====
PROGRAMMING TUTORIAL

==========

======"===

_______"_"

·
CREATING

A DATAFLEX

APPLICATION

——

zm: zz="=

OF YOUR OWN

you will
is to
experience how easy
section of the tutorial,
having
DataF1ex
ever
without
to "program".
application using
Them
have
once
you
an application
functionfngg you will be introduced
be
by
done
what
can
just
the slightest effort into
putting
to
"customizing" your application requirements.
In

this
create

it

an

in a
to appoint you as manager
achieve this, we have decided
with word prothat has just bought their first microcomputer
cessing and DataFlex. As the member of the group who "took a computer
been
you have
selected to be the one to become
course
in co1lege'%
(and
familiar with the new system and to undertake the development
systems.
management
some
new
information
perfection!)
of

To

company

and thoughtful
gi"wpó
you and your associates recoga creative
The
nize the value of properly planning the information system.
first
a personnel
for the
information system
task defined is to develop

Being

company.

provides several methods to implement
your application
at this point is the
requirements. The easiest and most efficient
of a data base file on your CRT
facility for youwordto create an "image" DataFíex
Editor program.
screen
using a
processor or the

DataFlex

is a format into which data can
in DataFlex termino1ogyg
can be displayed on a CRT screen, or on a
inserted for output.
It
The image
can
include prompting
printed report.
or 1abelling for
where
which
the
is stored in the data base, and "windows"
information
images
a text
with
created
stored data will be output. DataF1ex
are
editor (one is included with DataFlex) or any word processor that can
create and edit a plain ASCII file. Creating an image with your
a visual approach
to designing your
editor allows you to develop
works.
how
looks with how
applications that combines
An
be

"image%

it

it

a utility program
may
an
is
supplied with DataFlex, called AUTODEF, into a data base file
and data
definition
entry screen. AUTODEF reads in the "image"
file,
how you want
asks
things to workg and then
you
some questions about
outputs another file (called a "configuration source" file) onto your
and executed
a
as is, or modified to meet
disk that can be compiled
and
then
compiled. The rest of this
particular set of requirements,
this process. There are othéi"» more flexible ways
section illustrates
FILEDEF)
which
these
accomplishing
functions (such as through
of
are
in this manual.
described elsewhere
When

comp1eté»

"image"

it

be

processed

by

—-——

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

PROGRAMMING

B-2

TUTORIAL

—'—

Manual

2.0 User's

DataF1ex

————

'

Getting Started...

made up an image
procesSg
we have
the familiarization
file
below
with the task defined
to help you get underway
printed
be using
above.
We will
as the
basis of the rest of the tutorial.
You can also use
as is or modify
with your word processor or the
DataFlex
Editor to suit your own tastes for actual use in your own
business.
To

speed

it

and

it

it

Type

in with your

it
it

save

this:

under

the

processor or the DataFlex
with no extension.

word

name

it

PEOPLE,

text editor and
It should look like

/SCREEN
PERSONNEL

,...........,...,.........
EMPLOYEE

LAST

NNE

:

ADDRESSI

:

ADDRESS2
CITY

:

SOC.

#

SEC.

_j'_J_

:

$

PAY

TYPE

:

PEOPLE

:

ZIP

_

:

:

RATE

and

_
ST

PAY

Refer
to the
terminology

MI:

:

:

l*

..............................

FIRST:

-

HIRED

DATE

FILE

._
(H=Hour1y

or

_
"image"

concepts.

file

as

S=Sa1aried)

we

learn

some

basic DataFiex

the first line above is a PAGENAME by which we can
below)
The "windows"
(see
with DataFlex connands,
A
assigned
numbers
sequence.
are
fn a left to right, top to bottom
by the PAGENAME followed by the number
of
given window is addressed
window,
for example
the EMPLOYEE LAST NAME window above is SCREEN.I.
The

"/SCREEN"

address

the

on
image

a

) that you
(and
see above
underline characters (
in the PEOPLE
They
on
your
are
disk)
called
"windows".
data
represent
the area
file
where
The
on a CRT screen
information can be entered or displayed.
number
the length of
of underline characters in a window determines
Ten underlines define a
the data that is valid for entry or display.
window
that will accept
ten characters of data input or display.
The

Copyright (c)

1984

Data

—
Access

————————————————————————————————————————

Corporation

05/16/84

User's

2.0

DataF1ex

PROGRAMMING

Manual

B-3

TUTORIAL

==———————————————————————————————————————

the three types of
illustrates
DataFlex. The three types are called
PEOPLE

data
ASCII»

can be stored by
NUMERIC and DATE.

that

data
is any character or group of characters, that can be typed
the letters A to Z and a to z; numbers 0...9;
the keyboard:
etc.; and space.
punctuation such as comma (9)9 period (.)p colon (:
when you
That's right... a space charactem generated
press the space
keyboarch
bar
as
is just as important to the computer
on the terminal
any other character.
ASCII
from

L

a person's
of ASCII data are: the name of a city (MIAMI),
("N" for new or "U" for
(Mike), or a single character symbol
but they are
used). Numbers can be entered into ASCII windows,
value or charactertreated only as characters and have no numeric
An example
of numbers that could be carried as ASCII data
istics.
number
numbers,
such
would
be identification
on
as the registration
the side of an airplane (N8847J).
Examples
name

ASCII

ters

character
)

(

data
such

Is represented in the image
that following the employee

as

by

underline characin PEOPLE.

name

underline
placing certain other characters among the data "window"
characters, you can specify either of two other types of data for the
By

window.
data
windows
are specified by the inclusion of one decimal
point (.) in place of one of the underline characters for a window.
such
They
as
are appropriate for data which signifies quantities,
volumes
amounts
of moneµ
of fueñ or quantities of parts in
done
on the data.
inventory, particularly
if calculations are to be
windows
NUMERIC
data
the minus sign
will accept
entry only of numbers,
and the decimal
point
(.).
(-),
NUMERIC

data
point is at the rightmost position in a numeric
), the window will accept
entry of whole numbers only
9999
point is placed within the group
but not 9.99 ). If the decimal
)9
window
(
of underline characters that make up a numeric
then
formats
the entered
or displayed data according to the
would
display 12.3
point (the window
position of the decimal
._
as 12.30).

If

the

decimal
(

window

.

._

it

DATE

windows

slashes (l)
the PEOPLE

(

shoyn
are
in the image by underline characters and
The "Date
Hired" in
in the specific format " / _J ",
"image"
of a date _window.
is an example

_

prompting
and any descriptive
placement
of data windowm
or other
information is not of importance
to DataFlex or the AUTODEF Utility.
Only
are
of interest to
the three different types of data windows
Ít¢s
DataFíex. Don't overlook the "/*" at the bottom of the image.
very importantp as you will see.
The

Copyright (c)

1984

Data

Access

Corporation

07/18/84

PROGRAMMING

B-4

DataFlex

TUTORIAL

2.0

User's

Manual

=

______—

processor or the DataFlex Editors you can inspect the
file at addyour leisure... change it9 lengthen one of the
ASCII
windows
some underlinesh
translate the prompting to a
(just
etc. By doing this you can get a feet for how an
foreign language,
"image"
be manipulated to be just
can
the way you want it.

Using

Nord

your

PEOPLE

image

how to do all
about
of this. ietfs get
The
the operating system by typing FLEX.
Configuration option
play. Select the DataFiex
On that menw
select the option for AUTODEF.
from

The

CRT screen

will

ENTER



"ROOT

NAME"

clear

and

Master
from

Menu

the

DataFlex
will dis-

Master

Menu.

prompt:

OR

TO EXIT

OF FILE

Load

done!

it

Enough

TO CREATE:

DEFINITION

to return to the menu, press , otherwise type
AUTODEF know the name of the
you want
to work
file thatPEOPLE
where
working
system
a
you
on
the
is
not
on.
are
file
If
located on the "logged in drive", then you must type the drive desig"B: PEOPLE"
would
be a
nation where the file is stored, for examp1ep
typical entry for a floppy disk based system where the PEOPLE file is
stored on drive El:
you
If
PEOPLE

want

to

let

.

DataFlex
AUTODEF'S

will now display a
processing of the

FILENAME

IMAGE

the

file:

files

d: PEOPLE

CONFIGURATION

FILE

d: PEOPLE.FRM

"d: " in the above list
you may include with

PEOPLE

will

WHAT IS

as

a

result

of

d: PEOPLE
NAME

DataFlex

created

d: PEOPLE

NAME
ROOTNAME
FILE

DATAFLEX

that

of

SUMMARY:

FILE

The

list

PEOPLE

then

THE

the purposes
of
sufficient...
enter

correspond

(e.g.

to any
C: PEOPLE).

drive designation

prompt:

MAXIMUM

For

will

our
a

NUMBER

OF RECORDS

work
here,
value of lOó.

a small

"PEOPLE"

number

COULD

of

HAVE?

records

will

be

AUTODEF will
read
the PEOPLE image file
Without further interaction,
from
for
the disk. When the image has been read, you will be prompted
Any name up to IS characon the image.
the names of the data windows
with a letter and contains no spaces can be used.
ters which begins
but for purposes
of consistency as we go through this exercise, please
enter the following list of window names as they are requested.

Copyright (c)

1984

Data

Access

Corporation

07/18/84

DataFlex
~~

User's

2.0

pR0gRAj¶qINg

Manual

——

===================~~~~—~~~—"
LNAME
FNAME
MI
ADDRI
ADDR2
CITY
ST
ZIP
SSAN
DATE
PAYRATE
PAYTYPE

Code

ZIP

window
will be highlighted
) as
underline character (
example

Account

Social Security
Date
Hired
the Pay Rate
the Pay Type

Each

below

indicates the
prompting for the Last Name:

The

LAST

:
:

CITY

:

SEC.

DATE

FIELD

:

ADDRESSI
ADDRESS2

SOC.

ENTER

NAME

#

HIRED

Number

asterisks ( *****
are
being asked

by

of the

appearance

FILE

***************

$_._

PAY

RATE

:

PAY

TYPE

:

screen

it.
when

FIRST:

it

is

MI:

_

:

_l—j_

in place of the

.............................

ST

:

)

about

you

PERSONNEL

....
EMPLOYEE

"""

Last Name
First Name
Middle Initial
the first line of Address
the second line of Address
City
State

for
for
for
for
for
for
for
for
for
for
for
for

B-5

TUTORIAL

(H=Hour1y

or

_

:

ZIP

_

:

S=Sa1aried)

NAME FOR FIELD_I:

you wish
to back up and rename a windowp the BACK
will move the asterisk "cursor" back to the desired
window.
After all windows have been named, you will have the opportuhave
been
any mfstakes
inadvertently
nity to redo the process
is:
entered. The prompt
As you
proceed,
WINDOW Flex-key

if

if

Press

If
"R"

"C"

to

continUeg

or

the above list has been
to re-enter the window

"R"

to re-do this

properly

entered9

names.

—————
=

Copyright

page:

press

_

"C";

if

not, press

~
(C)

1984

Data

Access

Corporation

05/16/84

PROGRNNING

B-6

of the window
of the fields which

make

to
fn

LNAME

2.

FNAME

5.

ADDR2

6.

CITY

9.

SSAN

LO.

DATE

l.

FIELD

ENTER

NUMBER

3.
7.

II.

TO

2.0 User's

DataF1ex

list

is presse6 a
a selection
the data base.

"C"

When
you
data

TUTORIAL

INDEX

are

MI

4.

ST

8.

PAYRATE

will
to be

names

be

displayed for
to FIND the

used

ADDR1
ZIP

12.

PAYTYPE

OR 

TO END:

_

by Social Security
will want to find personnel
"9" to select that window for indexing.

Since

Manual

Number,

we

enter

it

can
DataFlex can allow for duplicate entries in a data fi1eg or
The choice is up to you.
In tPe case of a name windowp
reject them.
whereas
you would
probably want to allow for duplication,
in the case
a
is unique
for each person)
of a social security number (which
duplicate entry (two identical social security numbers constitute an
erroneous
entry) shou7d be rejected.
The

If

next

prompt

WILL

THE

want

you

duplicate

establishes

DATA

IN

THIS

combining
employees

order

by

BE UNIQUE?

INDEX

is allowed:



_

duplication
entriem press

alíowech

press

"N"9

"Y".

if

you

to reject

want

to create a single index to FIND
three fields containing data on an
example
By
name are
a good
of applying this feature.
index
a single
will put
the LÑ/ÑÉ9 FNAME and MI windowsp
That
in proper alphabetical sequence.
is, they will be in
Last Name, then First Nameg then Middle Initia1.

can be
Multiple data windows
information in the data base.
employee's

or not duplication

whether

used

The

in one index, pÜce the
enter multiple data windows
by spaces.
in a sfngle index entry9 separated
at hand. that entry would be:

To

numbers

of the

windows

For

example

ENTER

FIELD

NUMBER

TO

INDEX

OR 

the above entry to create the
created. Them designate that the
unique
(allow duplicate names).
Make

second
data

TO END:

index

in this

entered
have
the index information for
and create the fndex
the file definition
the operation of the application.

After

you

process

Copyright

(C)

1984

Data

Access

Corporation

the

L 2 3

for the file being
index will NOT be
PEOPLE,
and

data

AUTODEF

files

wIll
for

05/16/84

DataFlex

PROGRNNING

Manual

User's

2.0

B-7

TUTORIAL

—

It is
file was created by AUTODEF called PEOPLE.FRM.
located on the same disk drive where the PEOPLE image file is located.
been
we have
working witM and DataF1ex
It contains themakeimage that
Commands
the image function with the data file that was
that
PEOPLE.FRM
looks like this:
created by AUTODEF.
A command

.
/SCREEN
PERSONNEL

.,..........
EMPLOYEE

NAME

LAST

:
:

CITY

:

SEC.

SOC.
DATE

#

...........................

FIRST

:

ADDRESS1
ADDRESS2

FILE

ST

MI

:

ZIP

:

_

:

_

:

:

HIRED

:

PAY

RATE

:$

PAY

TYPE

:

_/_/—
._
(H=Hour1y

or

_

S=Sa1aried)

l*

OPEN PEOPLE
ENTER PEOPLE
ENTRY PEOF'LE.LNNAE
ENTRY PEOPLE.FNAME
ENTRY

PEOPLE.MI

ENTRY

PEOPL£.ADDR1

ENTRY
ENTRY

PEOPLE.ADDR2

ENTRY
ENTRY

PEOPLE.ST

ENTRY
ENTRY

PEOPLE.SSAN
PEOPLE.DATE
PEOPLE.PAYRATE

ENTRY

PEOPLE.CITY
PEOPLE.ZIP

ENTRY PEOPLE.PAYTYPE
ENTEREND
ABORT

PEOPLE.FRM
cessor

and

Copyright

can

be

loaded

with the

DataFlex

Editor or your

word

pro-

inspected.

(C)

1984

Data

Access

Corporation

05/16/84

PROGRAMMING

B-8

TUTORIAL

DataFlex

===="="=__~——_~__~————~

2.0

User's

Manual

——————————~

"compiled" to be run under DataFlex. The Datain the form that we see 'ft here, and
processes
the internal
into'a highly compressed
file that contains
Should
and instructions
codes
we wish
on which
DataFlex operates.
to
change
application works (and we will),
the way that the personnel
and re-compiled.
PEOPLE.FRM
can be modified with your editor
After
the compiler will output a file called
processing PEOPLE.FRM,
PEOPLE.FRM

must

Flex compiler

now
reads

be

PEOPLE.FRM

it

PEOPLE.FLX.

COMPILING

A DataFlex

CONFIGURATION

FILE

DataF1ex
compile PEOPLE.FRM into an executab7e
program select the
Menu
Configuration option from the Master
screen. On the
a Configuration
Configuration Menu. enter the number for the Compile
When prompted
type
option.
there for the file name to compi1ep
PEOPLE.FRM.
Make sure
to include the .FRM file extension or you will
be instructing
to compile the file PEOPLE, which does not
the program
command
contain the necessary
lines to create an application.
To

DataF1ex

disk drives will now become activep and some recognizable portions of PEOPLE.FRM will be displayed on the CRT screen. Don't be
You may think that what
a1armedl
you see
is some form of "programiS a display of the comand
lines as
mer's revenge". In faCtg
some very useful functions to
DataFiex is compiling them and serves
advanced
DataFlex users.
Your

it

The

has

done
with AUTODEF in the case of this
creation processy
The
creates a support file required for the compiler.
file
name of filename.FD where
"filename" is derived from the name of

file

examp1ep
a

the image
Therefore,
When
Menu.

file processed
a file called

compilation
You

are

by

AUTODEF.

PEOPLE.FD

The

is complete, you will
ready
to test your

now

file

image

exists

now

on

name

was

PEOPLE.

the disk.

returned to the DataFlex
first DataFlex application!
be

From the Configuration
Menu
or Master Mentg select the "Run a DataFlex
Configuration" Option. When the option is selected, you will be
prompted
for the name of the application that you want to run. On a
floppy disk system.
enter the drive letter of the diskette drive on
PEOPLE,
PEOPLE is located followed by the word
which
e.g. B: PEOPLE.
On a hard
dfsk system no drive letter specification
is necessary
unless the PEOPLE file group is located on other than the logged-in
device. See the menu sample on the next page.
It shows the RUN
option selected from the menu, and an entry to RUN the file
B: PE0PLE(.FLX)

Copyright (c)

has

been

made.

1984

Data

Access

~

Corporation

05/16/84

DataFlex

User's

2.0

PROGRARNING

Manual

TUTORIAL

B-9

————

YOUR

REGISTERED

DataFlex
Configuration

0
l

2
3

l
l

4
5
6
7

li
li

2.00

Utilities

0
l
l
l

Menu Definition
System
Editor
AUTODEF (quick

entry screen)
Configuration
DataFlex Configuration
File recovery (fre1)

l

A

Compile
Run a

Re-index
Generate

8
9

l

file

a
ASCII

"

file

l
l
l
l

READ

t

Please
se1eCt
one of the above
options or press
Si
 to go back
one menu >>>>>>>>>>>>>>>>

You have
selected to run a DataFlex configuration
Please
enter the name of the
Menu Systan
***
*** DataFlex

configuration..........

should
screen
look like
is more
with. But now
that is waiting
entry screen
from
data
the data base.

we

a few"seconds?
your
have
been
dealing

is

an

In

active data
and recall

iñtOo

ENTERING

:

File Definition

l

l
I

l
l

#

———————
0

li
li

l

Serial

NAME

0

INFORMATION

it

ON A DataF1ex

SCREEN

l
l

Fi'PfñPlF

image
that
just an image;
for you to enter data

the
than

PEOPLE

it

IMAGE

positioned in the leftmost position of the last
cursor
To enter information
name window.
into the system you simply
Enter a last name, first nameg middle
in the blanks" in the image.
iriitiab addresm etc. until all of the windows contain data. If
there is not any data to be entered into a WñYiOWY press the RETURN
jump
key and the cursor will
to the next window.
should

Your

be

"fill

(Pay
has been entered to the last window
(and
a )
in the case of the PEOPLE screenL the displayed information will
automatically be stored in the data base on the disk. ÍtfS that
two
or three people
in the same fashion...
simple. Now, enter another
stored in the data base as we
will be useful to have a few records

When

data

Type

it

proceed.

Copyright (c)

1984

Data

Access

Corporation

05/16/84

PROGRAMMING

B-lO

DataF1ex

TUTORIAL

2.0

User's

Manual

——
ON A DataFlex SCREEN IMAGE
image
should be
record in the data base, the screen
clear and your cursor should be located in the 7eftmost position in
The personnel
Press
the FINO Ccxnmand Key.
the last name window.
that you just entered on the screen
record for one of the employees
Which
should
one
appear.
is it?? If ail is functioning properly at
be the
one alphabetically
at the
this point, the displayed name should
beginning of those that you entered.
INFORMATION

RECALLING

Having

saved

RECORD Command

NEXT

should
scan

same place in the last
Key.
The record next in

name

This process
until the

can
end

the cursor in the

Leaving

the

a

fill

now
through

the

Now

reached.

the

screen

list

try the

windows.

of all

personne7

RECORD Command

PREVIOUS

windoic,

press

alphabetical

Key.

be

sequence
repeated
to

of the file is
Catching on??

base
any name in the data
just by entering
in
pressing the FIND Command Key just as with the
covered
in PHASE I of the tutorial. To locate
JoneM
George
for him),
that eme had been entered
record (assuming
into the first
type "Jones" into the last name window and "George"
George
Then
press
jones' record
name window.
the FIND Command Key.
instantly.
will be found in the data base and displayed on the screen
You

can

directly

it

FIND

and
name window
VENDOR screen
image

the

named
"Jones" but did not know his
looking for a person
Datacould enter just the last name and press FIND.
find the first Jones in the data base and display his
Flex
there were multiple "joneses" would be
record. The "first jones'%
named Jemes
After
lowest first name.
a person
with the a1phabetica17y
finding the "first Jones", you could use the NEXT RECORD Command to
move
further through the data base to find and display the record for
the Jones that you were seeking.

If you were
name9
first would

you

if

wanted
to display the record for a person and could not rememc1ose7
the exact spelling of his name9 enter something
or the
to display the
if you wanted
first part of the name. For example, 'NCO".
DataF1ex
will then find
you could enter
record for McDougab
the record closest to the data that you have entered and display it.
record is not the person
that you were looking fom
If the displayed
you
(there might be a McOonald
In the data base who would be fOund
entered "MCI)") you can use the NEXT RECORD or PREVIOUS RECORD Command
Keys
to scan up and/or down the data base until the correct personnel
record is found and displayed.

If

you

ber

if

Impressed?

You

should

be.

You've

done

programmer
could have taken an experienced
Good
with conventional software tools.
peek
at the power of DataFlex!

————

what
matter of minutes
at least days to complete
jobll And wefve only begun

in

~=

Copyright

(C)

1984

Data

Access

Corporation

a

———

it
to

~~

05/16/84

Copyright

to
use ber make
the of

(c)
1984

DaÉa

Access

However,
Some knowledge
of inner
order?
out Letts
records?

the

With
OECKPOINT...
FIND
known
by Keyslowest

farp
stored
information
Into
security
you

of
suggestions:
workings.
start
the
data
We
as
you
the
that
shallinformation
this
records
with
entry
have
it spent YOUR
have
Displaying
windows
you
be
number)
a
directly
system
that
The
DataFlex
based
accept appearance
never
message
of
designed
on
improved?
of
How do.
in
the new
it)>
might
the
on the
personnel
easy
about
left
for
What
that
with
person
or the
information
personnel
system explaining
1etG APPLICATION... data
and
personnel
to of
have
the
in
might
a
it
single screen,
the

menu?
questions
computer
operation
...or

Corporation

help

in

to more
information

built

is.

thatinformation
the
message
on how
it7
"frlendly'b
answered
office
the
person
to
and

the
read?
screen

be

exit about
screen

files.

needwill

as

the
and
finding
differentwith
reduce
the

screen

the
people

or

return

the

of
know?
most
its

in

lay-

by data
simply
and
(name
entry

be

the

better?

logical

sequences
recalled
commands.

(given
it

general

DataFlex

could
is

the

doing
to

then

Is

knowledge

base
displayed

different
key-stroke alphabetica11y
picky...
and
information

how

information

not

two

get

itself.
the

want be
have

dataand

num-will

have
who

...is

will a

stored
05/16/84

Where
the dataYouSo
that As QJSTOMIZING
social
good
you've
could

the

time

and

displayed
typing
screen.

wereRemember
BACK
security
name
ity recordg

DataFlex

social
will

number
WINDOW
to
Command
the
fields
number
social
then
be
cursor
number, that
security
now
window.
used
Comnand
and
Keyand
press
cause
security
in
the to
in
AUTODEF
to press
press
RETURN find
the
KeyIf
social
recall
sequence
CLEAR
you
social
number.FIND
to
records
you
to
moveshould
the
security
to
moveALL
were
security
of
display
record
The
the
in
to
move
the
asked
records
the
NEXT
cursor
remove
field.
of
cursor
the number
the
data
which
andthe
to
cursor
the
backwards
record.
To base?
be PREVIOUS
down
individual
window9
of
currently
find
displayed,
the
too to
You
Om
a
the
data
in
RECORD you
farp
record
selected
just
the
with
social
displayed
can
base
press
in
image.
Command
the press
by
orderg
enter
fields
the
secur- social
the
the
a

mumber.
a

2.0
User's

Manual

PROGRAMMING

TUTORIAL

B-ll

B-12

PROGRAMKING

DataFlex 2.0 User's

TUTORIAL

Manual

of this type refer only to the appl'lcatiom not to the strucTherefore.
ture of the information that is stored in the data base.
controls the
we need
the PEOPLE.FRM file since
only to modify
Once
our
modifications are
application.
function of the personnel
be recompiled and the application
PEOPLE.FRM
made,
can
will have new
features as a result of the changes.
Changes

it

To
modifications are made to PEQPLE.FRM with the text editor.
help identify which windows can be used to FIND information in the
place
around
data
base,
some kind of symbol
you can
the name and
Messages
image.
to the
in the screen
social security number windows
typed
image
works
be
about
how
can
the
simply
at the bottcm
operator
of the image change the
of the image for reference. These alterations
LOOKS.
way that the application
The

themmodifications can be made in PEOPLE.FRM to the comands
can have
selves. New commands can be addecb or existing connands
added
operational characteristics
to them to change the way that the
WORKS.
application

Other

proceed
load the PEOPLE.FRM
with these modifications,
your text editor or word processor and make the additions
are shown in boldface in the file on the next page.
To

Copyright

(C)

1984

Data

Access

Corporation

file
to

with
that

ft

05/16/84

pR0gRAmNg

Manual

DataFlex 2.0 User's

B-13

TUTORIAL

/SCREEN
PERSONNEL

,.,,.,.,....................
NAME

ADDRESSI
ADDRESS2

SEC.

DATE

#

HIRED

:

_'
ST

PAY

:

PAY

TYPE

:

>

<

(NO

:

ZIP

_

:

DASHES!)

_j/_J_

:

RATE

MI

<

:
:
:

CITY
SOC.

:

.........................

First

Last
EMPLOYEE

FILE

$

.

._

(H=Hour1y

_

or

# and press
Sec.
a Name or Soc.
 to exit
and return to
OR press

Enter

S=Sa1aried)
FIND to display
record.
DataF1ex
Menu...

the

l*
OPEN

PEOPLE
PEOPLE
ENTRY PEOPLE.LNAME

ENTER

ENTRY
ENTRY

PEOPLE.FNRIE
PEOPLE.MI

ENTRY

PEOPLE.ADDRI

ENTRY
ENTRY

PEOPLE.ADDR2
PEOPLE.CITY

ENTRY

PEOPLE.ST

ENTRY
ENTRY

PEOPLE.ZIP
PEOPLE.SSAN

ENTRY

PEOPLE.DATE

ENTRY
ENTRY

PEOPLE.PAYRATE
PEOPLE.PAYTYPE

//
//
//

{CAPSL0CK.MECK="HS"}//forces

slashes
allow
to put comments
into the corrmand area!

double
you

entry to
//uppercase and accepts
//on1y letter H or S

ENTEREND
ABORT
When

you

edited
see

the

changes
made these
to the PEOPLE.FRM
again
to disk, recompile itp and execute
results of the changes.
have

file

file,

from

save

the

your
menu

to

For
could be included here for PEOPLE.
could be applied to the Pay Rate entry to make
did not exceed a certain value, or State could be set to
sure
that
accept
no
you have
resides
the
only
state in which your business
almost
The possibilities
employees.
are
endless, and
out-of-state
endless
range
that¶s what DataF1ex
is all about--fu1fi11ing the almost
in information
of application requirements that are encountered
processing. Good luck!
Several

other

example,

a

enhancements

range

check

it

——-—————
—————————————————————
(C)
1984 Data
Access
Corporation

Copyright

if

05/16/84

B-14

PROGRNNING

"""" "

TUTORIAL

"

DataFlex

User's

PAGE

INTENTIONALLY

LEFT

BLANK

~~

————
(C)

Manual

———~~~__ .._, ,,_—,___,,. ,.—————.
—... —...—===

THIS

Copyright

2.0

1984

Data

Access

Corporation

~
05/16/84.

——

—————————
————
——————————~~
——

: ;:eaEii22É

formatting

with

——————_—:

::::::::::

images

8"15

ÉI--Z==

OVERVIEW

This
defined with "IMAGES".
record, entry screen
or report
format can look exactly like what you create on the CRT screen with
As straightforward
a concept as
editor.
your word processor or text employ
this is, very few products
it. Dataf1ex can use IMAGE
FORMATTING
create a configuration for
to create a file definition,
data
entry and provide the basic format for reports.
DataFlex. formatting

Throughout

possib1e7

wherever

that

means

can

your

be
data

heading,
look like a form.
format should
It should have a explandata
be enteréd»
procedural
to
material
for
the
descriptive
data
and a place for the
to be entered. The
ations and prompting»
image
is
placing and content of the descriptive part of the screen
should
appear
familiar to the operator, and
up to you.
totally
It
The places where
have
the
flow of the data entry fields.
a logical
data
fields are to be entered into the form image are called DATA
The placement,
WINDOWS.
is very
format and length of the data windows
important to how DATAFLEX interprets the image.
The

image

"PAGES"

IMAGE

A configuration
image
can have
A single screen
is called a "PAGE".
multiple PAGEs, including tiered entry screens, help screens, and any
Each PAGE can be manipulated
other display that may be desired.
PAGEs can be displayed on
Image
individua11y by the configuration.
the screen, used for data entry or output to a device (printerp
The page
by a page
name.
console or file). Each PAGE is identified
name goes
after a "/" in the first space on the first line of the
A
begin
and must
image,
with a letter and may not contain spaces.
configuration which does not begin with a "/" as the first character
in the first space on the first 1irm followed by a pagerwñé»
will be
A PAGE continues in an image
until the
rejected by the compiler.
start of the next PAGE (another "lpagename")
or the end of the image
section (indicated by "l*" at the start of the last image line).
PAGES used
Image
not have more lines
input/output should
for screen
than
the height of your terminal as defined in SETSCREEn (often 24
used
Pages
not have more lines than
for print reports should
lines).
the paper (labels, cards, etc) that the report is printed on.
The

image

"/*"

at

defines the last
bottom). The pagename

below
the

PAGE

is

a configuration
"PERSON"
(note the

of

(note the

first line).

/PERS0N
MY FIRST
NAME:

FIRST
AGE:

l*

_

.

WEIGHT:

._

SCREEN

IMAGE

LAST

NAME:

DATE

OF BIRTH:

====

—————————

Copyright

(C)

1984

_/_/

Data

Access

Corporation

07/10/84

FORMATTING

B-16

WITH

data
three DataFlex
types (ASCII, NUMERIC,
specific format that can be used for IMAGE data

The

Manual

User's

2.0

DataFlex

IMAGES

DATE)
each
windows.

have

a

). The
l. ASCII windows are composed of underline characters (
length of the window (and the data which can be entered there) is
Any printable
character can be
defined by the number of underlines.
one for each
underline in the image.
entered in an ASCII window,
windows
are
point in or at
defined by placing a decimal
(
point is placed
at
the decimal
of a window
or
.). numeric
If
.
end,
digit position for input
that place will count as a
is
to an underline when the screen
(i.e. DataFlex will convert
ready
point will display as a
for input). otherwisep the decimal
NOT
toward
the
marker
on1yy
and
decimal
total length of
position
count
and "-"
be entered into a numeric
Only
numbers,
can
the number.
"."
window.
Entries containing other characters will be rejected.
2.

NUMERIC

the
the

end

__

it

_

_/_/_

DATE windows
are
defined by the format:
be entered in the standard MM/DD/YY
format as
"DATA TYPES",
unless your system was supplied
Internai1y9 dates are stored as 3-byte numbers

3.

.

The

date

must

previously under
in "Euro-date" format.
representing the number
Ip Year
O to the date entered (referred
to as
of days from January
"Julian dates". For applications involving dates outside the range
dates
).
can be formatted using a 4-digit
l90l-l999,
year (
the entire application should
this
format is specifiech however.
If
use this format consistent1y9
since 12/24/44 generates a different
by i2/24/l944.
2-digit year entries (which
value from that generated
being
accept
window
as
the
will
in
the
first century A.D.)
still
should
be trapped in the configuration.
In 4-diglt year modeg
For
DataFlex
will handle dates from L A.D. through the year 2500.
convenience9
the operator may use periods "." or any other punctuatfon
mark
in place of the diagonals "/" in entering dates. Internal
calculations on screen and report displays are not affected by use of
this option.
covered

_/_/

are referenced by number within a PAGE, with the window
sequentially,
left to right, top to bottom. the This
above
In
applies to all image formats: screens, reportsp etc.
PERSON.3,
PERSON.2,
PERSONA
example,
the window names are PERSON.I,
There
and PERSON.5.
is a DataFlex command "NAME" which allows you to
assign other symbolic names to each window.
Data

windows

numbers

assigned

the /PERS0N page above were displayed with the "PAGE" command or
would
look just the way you see
printed with the "OUTPUT" command,
above
except
that the appropriate data would have been MOVED into
the data windows.

If

it

it

DataFlex will
The

windows.

interpret PERSON as a page with 6 lines
type and length of each data window are

PERSON.I
PERSON.2
PERSON.3
PERSON.4
PERSON.5

-

lO-character ASCII
20-character ASCII
3-character integer
4-character number,p
Date

(no

l

decimal)
place after

and
as

5 data

follows:

number

the

decimal

__

Copyright

(C)

1984

Data

Access

Corporation

point

__

07/10/84

DataFlex

User's

2.0

FORMATTING

Manual

WITH

IMAGES

B-17

———————————————————
—————
===—=======~~~~~~——~—~~~—————————————————

When

the

windows

data

filled

are

MY FIRST
FIRST

NAME:

AGE:

25

Note
that
COMMANDS.

the

is

data

SCREEN

John
156.5

WEIGHT:

In,

moved

PERSON

might look like

this:

IMAGE
Doe

LAST

NAME:

DATE

OF BIRTH:

into the

l2/12jl956

windows

data

DataFlex

by

required two pages to accomodate additional
format might look like this:

a configuration
information, the

If

image

/PERS0N
MY FIRST
FIRST

SCREEN
LAST

NAME:
AGE:

_

/JOB

.

WEIGHT:

_

._

IMAGE"
NN4E:

DATE

MY PERSON'S

OF BIRTH:

_l_j

JOB

WORKS FOR:
ADDRESS:
ST:

CITY:
JOB

_

TITLE:

ZIP:

l*
PERSON and JOB.
This image has TWO pages:
separately by name.
pulated and addressed
for the second screen would be jCB.l, JOB.2

—————

Copyright

(C)

1984

Data

Access

Corporation

Each
.The

page

can be maniwindow
names
JOB.6.

default

through

05/16/84

B-18

FORMATTING

WITH

IMAGES

IMAGE pages
in a configuration
to format your input and output.
structures of the configuration.
variable in which data is stored.
window
as well as write to it.
images
are
and MOVE

itself

Manual

are
They
Each
You

to input your
is unnecessary
entry
window
You may use the data
variable.
after you have given the command to accept
user

it

for data
a temporary

used

than
just a convenient way
are actually part of the data
data window can be used as a
read
can
the data out of a data

more

it to
variable

it.

input to
For

the

as

User's

———

The

When
data

2.0

DataFlex

~~~~

example,

if

had

you

previously

could
is acceptable.
(age)

PERSON.3
argument

then

you

use

ACCEPTed
PERSON.3

data
anywhere

into the window
that a numeric

EXAMPLE:
MOVE

(PERSON.3+1)

TO PERSONA

In data
entryp any data that exists in a data window will become the
default value for the record (existing or new) and can be edited or
field edit keys defined In SETSCREEn.
cleared with the DataFlex

WINDOW

FORMATTING

CHNUCTERS

characters that do not affect the
of the window but do affect the
These
formatting characters are
the data in the window.
image.
used
by placing them
directly in the data window
in the screen
examp1e+
For
a "P"
in a window specifies that numbers IAQO and over
These
formatting characters only apply
should have comas
inserted.
comas
(For example,
in numbers
to output using the PRINT command.
The exception to this
are
rule is
not allowed in data entry.)
which
CAPSLOCK,
works
in both data entry and in print.
If placed at
the beginning of a window these characters will not be interpreted;
They
same
they will simply be displayed as though
part of a prompt.
with the exception
is true if they are placed
at the end of a window,
point, which in that position signifies a number with
of the decimal
places. The formatting characters must be mbedded
in
zero decimal
by)
(surrounded
the data window character in order to function
properly.
There
are
TYPE
data
FORMAT of

other
(ASCII,

window
formatting
numeric.
date)

MARACTER

,
C
O
Z
@
$

DESCRIPTION
Embed
Upper

in numbers
only (caps lock)
to left with zero

commas
case

field
Display zero
Trim leading
Floating $ on

Fill

as
&

blank

trailing
left

FORMAT

OUTPUT

EXAMPLE

EXAMPLE

_»

._

abc

.

124
0.00

O
Z_.

_

@_

blanks

$_._

Calculations and string manipulations on data
should be avoidedb
since formatting can change

Copyright

(C)

1984

Data

Access

Corporation

= 23p456.99
= ABC
= 000000124
= (spaces)

23456.99

C_

ENTRYBBBB = ENTRY
567.17
= $567.17

in formatted windows
the apparent "value" of

05/16/84

DataF7ex

User's

2.0

FORMATTING

Manua7

WITH

IMAGES

B-19

Calcuof the ca1culat1on or manipulation.
the contents for purposes
(database
data
be done
on the source
lations and manipulations should
variab1eg
etc.) from which the
element, literal string, in-memory
window
was filled to begin
of the results to
with, with replacement
desired for output purposes.
the window.

if

IMAGES

IN

DATAFLEX

CONFIGURATION

FILES
can contain
filescommands
are

DataFlex
configuration source
The configuration
tion commands.

with the operatorp the IMAGE, and the data
handles
manager
the duties of storing, findingg
stored on the system.

interact
data
data

and configuraVERBS that
The
base
manager.

IMAGEs

action

base

configuration file
the commands section.
DataFlex. The commands
configuration.
The

has
The

two
the IMAGE
parts:
IMAGE section defines

specify

what

action will

and

relating

format section,
the interface to
by the
be taken

and

first part of the configuration file is the IMAGE. The image
section MUST start with a "/" in the first column of the first 1 ine.
If there are no images for the configuration the first line will there
simply be "l*", which signals the end of the image section.
If
PAGES for the
image
are
configuratiom
the name of the first page will
The
end
be on the
first line and ALL of the images follow directly.
of the IMAGE section is indicated by a "l*" on the last line of the
image
section.

The

be placed
name.
can
on the same line as the page
option tells DataFlex to hold that page in memory at all
This improves
throughput
times during execution of the configuration.
speed
when
a page
for output. Since RESIDENT does
is used repetitively
Where
should
be used
use up m«nory
sparingly.
the RESIDENT option
is
is not used the image format will be called off of disk when
needed.
It takes less than a second to read an image from disk.

The

option

The

RESIDENT

"RESIDENT"

it

it

The "HELP"
option can also be included on the page name line, marking
See
the page as a help screen callable by pressing the HELP Flex-key.
Function Keys" for further information on
the section of "Using
providing and accessing HELP screens.

After the "l*", the image section of the configuration ends and the
The cownand
command
section consists of the convnands
section starts.
Commands
and options listed
section of the manua7.
in the comiand
exist for Data Entry, reporting, data base manipulation, PAGE
manipulatiom data movement,
reading and writing sequential filem
any other function you may require.
conditional processing and almost

~

Copyright (c)

———————-————-———————-—
—
Access
1984 Data
Corporation

——————-————

05/16/84

B-20

FORMATTING

WITH

IMAGES

DataF1ex

2.0 User's

Manual

—

Copyright

(C)

1984

THIS

PAGE

Data

Access

INTENTIONALLY

Corporation

LEFT

BLANK

_"

===

05/16/84

8"21

———————————————
—
———————

———————————
————

~

———————

:=:==""

DESIGNING

DATABASES
_ _ _ _ _ _ _ _ __

—

——————————
—————

ORGANIZATION

OF DATA

Informatiom or DATA, can be organized in two ways: structured and
size or length or
unstructured.
Unstructured data has no particular
Examples
books
and the "pile
of
letters,
of this would be:
position.
word
In a computer,
papers" on top of your desk.
processors are
usually used for processing unstructured data. When data is strucby what
they
of data are predefined and identified
turecb groups
Structuring data allows for more consistent and efficient
contain.
storageD
forms, such
retrieval and evaluation of the data. Business
as an mp1oyment
of structured data that you may
form, are an example
Accounting procedures
already use in a manual system.
are a method of
structuring the financial data of a business. DataFlex is a tool for
system.
structuring ANY type of data in a computer
All of the data which makes up a particular
referred to as the "data base".

files

Data

information

of structured

Groups

analogous
to
example:
For

are

business form.
applications could

a
have

like

systan

things

up

Each

to identify

it

DATA

FILES.

particular
file cabinet drawer full of a employee
a file cabinet drawer
of
full
data
applications on a
file of employee
125 data
from

one to
is immediately accessible or
DataFiex
FILE
file is assigned a
uniquely.
can

make

is

a

Each

information.
system.

become

DataF1ex

computer.

about

information

files

of structured

"ON LINE"
to the
NUMBER
NAME and a FILE

Each
individual RECORDS.
record would be
A
application in our example.
file is a
group
of like records. DataFlex can have from one to 64AOO records
assigned
Each
a unique
DataFlex record is automatically
in each file.
RECORD NUMBER when
is created. This number can be utilized as a
number
and is also useful when
system-assigned
account
relating
records from different data files together (as we shall see later).
Data

files

analogous

made up of
are
to ONE employee

it

A field
is one discrete
record is composed
of data "FIELDS".
piece of data that is of a defined type and size which is stored in a
record. There are usually many fields in each record. Each field in
for that record. A records
DataFlex is given a name that is unique
(see
number
in each
preceding paragraph)
is automatically assigned
DataFlex
were
an
record. It can be used and displayed as
number
howevem
change
You cannotp
the record
ordinary numeric
field.
a record number
or assign
yourself.
Each

if it

Data
fields
Examples
of

are
data

fields

Agep Job Sought,
Dateg
in each record. Each
In

records of like kind

Copyright

(C)

1984

FIELDS
make up

is contained in

of

a group

summaryp

referred to as ELENENTS in the record.
in our émployee
record would be:
Last Name*
from
can have
one to 255 fields
etc. DataFlex
by an ELEMENT NAME.
field is identified

sometimes

Data

Access

a

a RECORD

and

multiple

FILE.

Corporation

05/16/84

DESIGNING

B-22

DataFlex

DA7ABASES

2.0

User's

Manual

— —.-————————————
—
_==""===
_

DATA

TYPES

data
In DataFlex, each
as one of three types.
field can be assigned
The basic storage
Each
type uses the computer's storage differently.
how many BYTES
You should
know
is ca71ed a BYTE.
unit of a computer
The three
computer
disk system has available.
of storage

your
types are:

DataFlex

data

that
- This refers to the full set of printable characters
and
numbers
can
generate. It includes all letters,
your computer
Examples
of fields which would be "typed" as
special characters.
ASCII
Each
and notes.
ASCII
data
field
include; namem descriptions,
a maximum
length (number
of characters) that the data in
is assigned
ASCII
Each
character requires ONE byte of
the field can occupy.
storage. Numbers (0...9) entered in fields that are of the ASCII type
properties.
will be treated·on1y as characters without numeric
ASCII

The only characters that can be put into a numeric
field are
numbers
a minus
(0...9),
sign "-"g and the decimal
point
Examples
Numeric
fields are used to store numbers.
are: "prices,
amounts;
Numeric
and quantities.
fields can be used in ca1cuiations.
data
TWO numeric
In DataFlex, each
characters defined in a numeric
NUMERIC

the

-

".".

fields take up half the
require ONE byte of storage9 so numeric
Numeric
a
fields must be assigned
of space as ASCII fields.
number
This storage
point.
of characters before and after the decimal
CANNOT be
split over the decimal point, thus 1.2 and 10.2 and 10.12
would
all require TWO bytes of stcirage.
field

amount

dates
can be represented as ASCII
or NUMERIC fields
In DataF1ex»
convenient to have a special data type for them.
window
be entered in a date screen
a date can
in the following
or using any
punctuation mark as a
formats: MMDDYY, MM/DD/YY,
Once the date data
is entered
delimiter (e.g.g MM.DD.YY or MM,DD,YY).
For
be displayed formatted as MM/DD/YY.
applications involvwill
a four-digit
ing dates outside the range 1901-1999.
year may be speciimage.
in the screen
this
election
is made, the
fied (MM/DD/YYYY)
If
format must be used consistently for dates throughout the app7icatiom
be trapped out in the configuration,
and 2-digit
year entries should
as they generate different
internal values (e.g.9 12/24/44 has a
different
internal value from 12/24/1944).
In 4-digit modeg DataF1ex
The date is
handle
from
the
dates
can
year I A. D. to the year 2500.
as a six-digit number
representing the number of
stored internally
These
days
are
called julian
since day one of year zero (0l/0l/00).
dates. Julian dates can be used in calculations Just like numbers.
Date
Thus
you can add 31 to 12/05/81 and get 01/05/82.
fields always
require three bytes of storage.
DATE

is

-

it

Although

more

it

the correct type and
is important that each data field is assigned
length to hold the largest or longest possible value
is of sufficient
that yoti would want to put into the field. It may be worthwhile to
abbreviate some long values to shorten the field length and take up
less space in your record. The total storage requirement for each
by adding
up the length
record. or the RECORD LENGTFb can be computed
is
in bytes for each field in the data record. Space consumption
determined
by a field's
defined lengtM not the length of data
from
one record to the next.
actually entered into

It

it

Copyright

(C)

-——————
1984 Data
Access

————
——————————————————————

Corporation

05/16/84

DataFlex

2.0

DESIGNING

Manual

User's

DATABASES

B-23

Indexing in Applications
DataF1ex

the capacity to store

has

up

to

64

to
file. Therefore9
it is important
example,
For
interest quickly and easily.
would
employee
you
probably
file folders,
That
by
you
data

filed in order
the file quickly,

his

long

so

way
have

name.

as

you

the

records in each
able to locate records of
of
in a file drawer
thousand

be

have

employee's

each

can
"pull"
name.

the record

file
from

in a file is
in alphabetical sequence
Placing the records themselves
needed.
when
can be found
so that
one way of organizing the data
works
whether
The method
the file is stored in a cabinet or on a
computer
"Finding" something
in an organized scheme is
system's disk.
and efficient.
easy

it

who was
however.
that you wanted to find an employee
when
You know
interviewed a month ago (you know... what's-his-name).
To go directly
he was interviewed,
to his recor"d»
but not his name.
have
you would
to previously have cross-indexed the file by date. Or,
you could search
the whole file until the desired record was found.

Consider

A computer

files.

It

(index) of

exactly the
search

itself.
file
both
indexed

file

the desired
is different
or sequence
Even

though

its
listing

same options to find information
in
themg
or maintain some kind of organized
of each record separate from the data
or more elements
examp1ep
For
applications could be
a
of employment
That
and by DATE RECEIVED.
NAMEs,
by applicants'
way.
element
be searched
even
can
its order
for efficiently

has

can
one

a computer

if

that of the records themselves.

from
can

look through a card f11ep
practical each time that

scan

its

that
you

process
want
to

MUá-l faster than
you could
takes far too long to be
review
or change a record.

files

indexing system
index) of the
geographical area. Listed
The
with the name is a number which can be used to "find" a person.
number
phone
functionally
with the
in the telephone system compares
To find a persom
you "look him up" in
record number on a computer.
by his number.
Then you
"access" the person
the list.
A telephone directory
is a perfect example
The phone
book
works.
is an alphabetical
names
of people with phones in a certain

of

how

listing

an
(an

stores each new record at the end of the data file; figurvirtue of its
ative1yg at the bottom of the existing list.
It ham by second,
third,
relative position in the file, a record number:
first,
To
good!
provide for rapid access to the
etc. But that does you no
records in a file. DATAFLEX keeps "indexes" of data that can be used
to find a particular record. Each index is an organized list made up
from
each
record, and each recordG number.
of like data elements
DATAFLEX

A computer

listing
record
DataF1ex

index

works

of selected data
number
(like the
system

Copyrjght (c)

can

1984

the

the phone book.
It is an organized
record in a file which includes the
number)
of the record. Each record in a
or "found" by up to four different

same as
from
each

phone

be

accessed

Data

Access

Corporation

05/16/84

B-24

DESIGNING

DATABASES

DataF1ex

2.0 User's

Manual

computers
support nine indexes).
fndexes(in B-bit computers--W-bit
can
of each
define which elements
designer of a DataFlex database
find
record are to be used to create the index(es). and thereafter.
the records.

The

stands
ISAM (ISAM
Sequential Access
for Indexed
indexing management
is the best method for computer
available.
DataFlex keeps index data files up to four ways simultaneous1y
on B-bit computers
(nine ways on l6-bit). That means our
by NAME and DATE and two
employee
other things
could be indexed
file
and
(perhaps
all at once.
social security numberL,
job classification
speed,
For
current after each
the DataFlex B+ ISAM keeps all indexes
every
time you enter data
record entry, without a long "SORT" process
(N-LINE
into a file. These features are referred to as MULTI-KEY,

DataFlex
Method).

a B+
uses
B+ ISAM

ISAM.

is
of multiple indexes
creation and automatic on-line maintenance
important feature of DataFlex. This cross-indexing allows superflexible access to any record in your data base in minimum time.
The database
Records
can be
can be located by entire
or partial key.
by any
iñdéxo
randomly
searched
without timeor sequentially,
consuming
procedures.
reorganization or" other clumsy
The
an

records can also be
addition to the KEJL EIELDS discussed above,
RECORD numbers
by their
just as rapid7y as by an index. The
system
the RECORD NUMBER to each record when
automatically assigns
field number
is created. The record number of any record is always
zero in the ffje definition.
In

found

Each
of the indexes
SEGMENTS.
Think
of

for

a

can be
file purchase

made

up

of

as many as
Each
drawer

it

4

is
file VENDOR ID would be
so
the primary indexing
dedicated to one
Within each vendor
(drawerb there would be file folders--one
field.
be arranged
The folders would
for each part supplied by the vendor.
PART NUMBER would
be the secondary
indexing
in order by PART NUMBER.
Within the folder for each part would be the orders for the
field.
which
be
(and
would
final)
the third
partp filed by ORDER NUMBER.
These
successive levels of detail serve to identify
indexing field.
and is an example
each
record (order) ljn¶que1yy
of a three-segment
consuming
¶ndexp
one of the 4 indexes
available for each file in B-bit
only
the orders can be arranged
environments. With the file drawerm
there remain three additional
the one way, but with DataF]exg
An
orderings (indexes) available (eight in 16-bit environments).
say PART
additional index could be another multi-segment indexp
NUMBER/VENDOR
ID/0RDER9
for those situations where you would want
by part number.
And there could be yet
vendors
and orders grouped
further indexes, multi-segment or single.
a
vendor,

of

orders.

will NOT allow two records In the same file to have exactly
can appear
the same key value. Howeverp
to the operator that
duplicate values have been accepted. To allow for duplicate recordsp
is
the record number (designated as field zero in the file definition)
assigned
as the last
in the index. Since record numbers
field segment
be
NEVER
index
are
duplicated
the same, the full
entry can never
(DOE,J/200
differs from DOE.J/75).
DataFlex

it

—

Copyright (c)

1984

Data

Access

—- ————
-, ——————————————.-.,,
—————.,
.,—,. —-. —
05116/84

Corporation

AUTODEF

DESIGNING

Manual

User's

2.0

DataFlex

B-25

DATABASES

PROGRAM

AUTODEF is the easy
an
way to produce
DataFlex utility program
image.
configuration from, and for9 a freshly-drawn entry screen
your
ultimate goal is beyond the
for use even
It is reconnended
after running AUTODEF»
of AUTODEF (in which case,
actual capabilities
you would
edit the resultant configuration source
or
file with EDITOR
def1n1t1on
and also edit the
word
with FILEDEF
file
processor,
your
recommended
for use in multi-entry-screen
necessary). It is also
be appended
which
ENTRY configurations
can
configurations to produce
together lnto'the command section of the eventual ENTRY configuration.
images
together in the same
also appended
with the related screen
order at the beginning of the same file.

The

ENTRY

if

if

job is to read an image file (see Formatting With Images)
have
previously created either with the DataFlex Edjtorg or
which
is capable of producing
with any word processor of your choosing
ASCII
represents the input "form" that
files (most can). The image
you
intend the operator to see when entering to. or searching irg the
With
database.
it. AUTODEF creates the data, index, and definition
files, and the fields with their names and the type of data each field
wIll contain.
AUTODEF's
which
you

rootname.kn

for the
File definition
Ff)e/fie1d names
The data
file
The index f11em n=lndex

rootname.FRM

The

rootname.FD
rootname.TAG
rootname.DAT

To

run

you

Configuration
of the database
"ROOT

NFME"

number

file

source

type AUTODEF at the command level and press the return
select the AUTODEF option from the DataFlex
(rootname
no argument
If AUTODEF is invokedwill with
prompt
you
for a
you wish
to define)
follows:

AUTODEF,
Or,

key.

processor

macro

may
Menu.

it

as

ENTER



TO EXIT

"ROOT

NAME"

FILE

OF

OR

DEFINITION

TO CREATE:

of the file to be
drive specification
as ROOT
the following could be entered
C: CLIENT
B: MYIMAGE
NAMES:
input file resides on the
or, where the
or
You may enter a command
logged
line of: AUTODEF
drivep AN IMAGE.
ROOTNAME at the
operating system leveñ in which case AUTODEF will
skip the prompt for rootname.

The

ROOT NAME is
AUTODEF.

the

input to

For

name and
examp1e9

has
After the rootname
an argument),
will

it

ENTER
You

THE

should

MAXII¶JM
respond

N%ER

AUTODEF
been enterech
(or
ask the following
question:

if

OF RECORDS

with your best

COULD HAVE?

"rootname"

reasonable

with

invoked

was

realizing

estimaté»

two

things:
.
you elect too few recordm
is
a.
back
to FILEDEF and increase the number
databaseñs
capacity (after doing whicM

it

If

always

possible to
in this

of

records

it

will

be

go

necessary

———

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

to

REINDEX

run

on

User's

2.0

DataFlex

DATABASES

DESIGNING

B-26

Manual

the database).

system
option in SETSCREEn was set YES for preAUTODEF
then
of disk space required for databases.
up" all
the files
go to your disk drive and
(indexes. datay and so on)
necessary
for this new database
enough
space
to contain the database
with spaces to pre-empt
when
is entirely full of data. Some multi-user syst«ns
is advisable under other conditionm but
require this, and
should
ensure
free disk space
you
that you have sufficient
to this
available before entering a large number in response
question when the system option is set to YES.

If

b.

your

allocation
will next

"fill

it

it

the Fields

Naming

AUTODEF reads
for each image

image
and prompts
of a name
for the assignment
These
names
are
assigned to identify the
that has been created. When referring to

in

your
window.

in the database
file
fields in configurationsg the correct format to use is
fi1ename.fie1dnameg
where
fieldname is the name you assign in this bÉ
database
file. You will As
process, and filename is the name of the
prompted
right of the image.
for the names from top left to bottom
AUTODEF proceeds
through the fieldm the underscores for the field to
be replaced with asterisks
be named will
in the displayed image to
Type
window
show you which
the
you are
currently being asked to name.
You may
name you wish
to assign to the field in the indicated window.
BACK WINDOW Flex-key to change
a name assignment.
use the

fields
these

named

DataFlex
to identify
names created here
will be used throughout
format estabin the fi1ename.fie1dname
the elements
of the database
and
MUST be consistent,
The use of the element
names
lished above.
conform
to the symbol name conventions established for all DataF1ex
They
must
element
data
start with a 1etterp contain only
references.
15
numbers,
may not be longer than
'L"p or "#". Fieldnames
letters,
characters.
The

NOTE:

Your

screen

Image

must

with the

begin

characters. of which the first must
by a diagonal
punctuation, preceded
will abort, displaying the message
AUTODEF

After

be

page

(up

name

to ten

letter, no spaces or AUTODEF
this Is omitted,
(l).
IfSCREEN
IMAGE MUST BE NAMED.
"ERROR,
a

ABORTING!"

all

the fields

are

named,

to continue or

"R"

At this pointp you may re-do the
with an "R".
errors by responding
continue to the next step.

page

Press

Copyright (c)

"C"

1984

Data

Access

line

bottom

the

prompt

to re-do this

will

page

_

it

find that
0therwise9 answer with

if

you

Corporation

ask:

has any
and
a "C"

07/18/84

DataFlex

User's

2.0

DESIGNING

Manual

B-27

DATABASES

=
..———
————————-—

The

display the field names
will andnow prompt
for which fields

screen

previous step,
indexing.

ENTER

NUPBER

FIELD

TO

INDEX

you
are

have
be

to

OR 

declared in the
used
for

TO END:

enter the number of the fie1d(s) by which you want to FIND
Entering a field number» and then
in the file being created.
pressing  will create an index containing data from the field
number
whose
was entered.
Multiple field numbers can be entered (up
indexes
6 on 16
systemm
8
4
up
on
to
to
bit systems) to create
bit
See the
composed
of multiple data fields.
first part of this chapter
for further information on indexing.
should

You
data

As

will

field numbers
display:
THE

WILL

selected for indexing,

are

DATA

IN

THIS

INDEX

The default
selected
is N, which
combined
with the data in the field
wIll repeat until you
This prompting
4 indexes
systems,
indexes
for
As you
end.

select each

if

BE

the

UNIQUE?

bottom

prompt

line

_

will cause the recordthe number to
index.
to establish
itself
ID
reached
maximum
have

be

of
the
key
or you
for B-bit systems,
field to index, the display will
to
number
and the field
the
name.
change
to include an "*" between
If
you wish
to revise an index after creating ito pressing the BACK
back
can
WINDOW Flex-key will
you
so
one field
move execution
redefine the index. Press  without a field number entry when
index
have
made all
designations you desire.
you

l6-bit

the completion of assigning indexem AUTODEF will create the
AUTODEF will
display
required for the configuration.
and automatically
several systan messages
momentarily on the screen
The configuration
retün to the menu.
file output of AUTODEF is
The rootname.FRM
configuration source
called rootname.FRM.
file may
be modified using the EDITOR
or your own word processor prior to
"as is" when output from AUTODEF.
compilation, or compiled
Upon

files

be compiled
must
an executable DataFlex
to produce
To execute
a compile at the
operating system command leveb
program.
Merm
you are
operating from the DataFlex
type COMP rootname.FRM.
a
select the Configuration Menu and enter the option for "Compile
See the
for more
chapter on the DataFlex Compiler
Configuration".
Rootname.FRM

If

information.

Copyright (c)

1984

Data

Access

Corporation

06/08/84

B-28

DESIGNING

DATABASES

THIS

Copyright (c)

1984

Data

PAGE

Access

DataFlex

INTENTIONALLY

Corporation

LEFT

2.0

User's

Manual

BLANK

05/16/84

B-29
_ _______
========"=

======----------—————————
======="==

"""""""""

HOW TO WRITE

""": ""::":

A CONFIGURATION

—————————

——————————
===========.==============~———~~———~————~~—~~——~~——~—~—

——

~~—————

configurations are semi-compiled. This means that the
"source" file which you create must be translated by a separate step
can
into a form which the computer
execute. Execution of a (semi-)
compiled
configuration then is actually faster than execution of an
uncompl1ed
source
list would be. This section of the user's manual
of creating the application.
refers only to the physical process
Other
parts of the manual will instruct you on what commands and
functions can be used within the configurations.
DataFlex

A

configuration
to be used.
respects:
ready

I. It
2.

fileA

can

is a set of compiled DataFlex commands which
in
configuration is different from a program

only

be

executed

by

the DataFlex runtime

such
Information from other systansp
in the DBMS9 affect the operation of

as
the

are
two

system.

file

definitions
configuration.

the ACTION of your application in
configuration determines
IMAGE definitions.
and forms
relation to the DEFINED file definitions
be used
must
be:
Before
can
a configuration

The

it

form
with the DataFlex
In source
ASCII
other text editor that produces

l.

Created

2.

Compiled

any

from
by

executable
3.

CREATING

the "source" file form into
the DataFlex runtime Systan

EDITOR

files.
a
(a

file
.FLX

utility
that

with the DataFíex
runtime systan
in the presence
the other files required for execution (FILELIST.CFG
appropriate data and key files).
Run

THE

SOURCE

or

is

file).
of
and

FILE:

are
five ways to create the original source
file for a configuration, of which four are "automatic" and the fiftM which is "manualj'
may also be used
for editing configurations created by any of the
First, there are the AUTODEF and FILEDEF utilities with
other means.
image"
and
option to create both the file definition
the "read screen
code
configuration source
for a data entry screen. Second1yp
there is
the QUERY utility to generate a REPORT configuration source code file.
Finally. there is the READ ut1]ity9 which creates configurations to
data
convert ASCII data files to DataFlex
files. Last1yy there is the
EDITOR
DataFlex
or any other text editor which is used to create the
code
have
any source
no éfféctó
file from scratch. Modifications to code
until the modified source
of coursep
file is recompiled.
There

Copyright (c)

————
1984 Data

Access

Corporation

~

05/16/84

B-30

HOW TO WRITE

The
be

configuration source
listed and modified

DataFiex

A CONFIGURATION

by

files
means

are standard
custcmarily

ASCII
employed

User's

2.0

files,
for

so they
such

Manual

can

files.

format of a configuration file is quite sImple: the IMAGE page(s)
each
identified with a slash
is (are) at the top of the configuratiom
in the first column of the first line followed by the name of the
"/"
An
The image
IMAGE page.
format itself starts on the next line.
image
is terminated with the next occurrence of a "/" in the first
marks
"lpagename"
space
the next image pagep or a "l*"
of a line.
The
signals the end of the last image in the configuration.
first a
line of the configuration file must contain either a "lpagename"
or
image
in the file.
"l*", the latter indicating that there is no

The

in the source
the configuration commands start.
be any of the commands
can
listed in the comnand sections of
this manual,
or any commands you may have created with the macro
be in upper
system.
Commands
and filenames can
or lower case-images
between
in screen
the two except
DataFlex does not disti nguish
Command
and
lines can be up to 255
(quote-enclosed) material.
After the
These

file,

"l*"

literal

the end of a line on your
characters long. If a command line reaches
line on the next
terminal's screem you can continue the coímand
terminal line either by typing a semi-colon (;) followed by a carriage
let the line "wrap" on your screen.
returm or merely
The
then

following is a sample of a simple configuration to
the systtim
date:
allow the operator to modify9

disp1ay9

and

/DATEX

TODAY'S

enter today's

Please

DATE
date

IS:
in

_J_l_

MMIDD/YY

format

and

press

RETURN.

/*
OPEN

SYSFILE

DISPLAY
ACCEPT
SAVE

SYSFILE.DATE
TO DATEX.1
TO SYSFILE.DATE
DATEX.I

SYSFILE

ABORT

//
//
//
//
//

Open
Show
Accept
Save
Stop

the system file
the date that 'is set
date
the updated
the systw file
and end configuration

———
——
—————
————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex

2.0

User's

HOW TO WRITE

Manual

A CONFIGURATION

—

HOW TO COMPILE

B-31

—

A CONFIGURATION:

createch there is one more
file has been
A compiled
be used.
can
before
configuration must be created which the DataFjex runtime system can
or
called "COMP.COM" (compi1é)»
execute. This done by a program
COMPile
reads
COM.CMD in CP/M-86
you
the source
versions.
file
a nevg
additional file with the
previously created and produces
The ".Fl-X"
special extension ".Fl-X" after its filename.
file can be
(see
executed
by
the section on
directly
the DataFlex runtime system
"Operational Orientation" for further information).

Once
step

source
a configuration
which
be executed
must

it

process
is started by typing the word
of the source
file to be compiled. A
compiles will be shown on the screen.

This
name

"COMP"

listing

followed
of the

by

the

file

as

full

it

EXAMPL E:
COMP

datex. src

and produce
the
This will read and compile the source
file DATEX.SRC ready
The ".FLX"
e "DATEX.FLX".
is
configuration
to run.
file
The
a configuration
that will run.
This step must be done to produce
".SRC"
name is not required by the
extension on the source
file
compi1erp
by DataFlex. but is recommended
nor
practice where
extensions are not purposely being used for some other end.

fil

of the configuration during compilation you will
a ">" before each
line.
This is the line number
line actually output to the runtime system.
of the
If an
error occurs during runtime this number will be shown with the error
A command
message
line in the source
to help .you find the error.
file
one or several lines in compilatiom
so the line
can generate zet"cb
numbers
by
numbers
some
may
seem
over
line
the compiler
to skip
output
Th is
be expected
as they would
to appear based on the source version.
command
know
how
source
many lines a particular
takes up.
lets you
commands
Most
generate one output i ine.

listing
and

On the screen
note
some numbers
command

"

Following is
options that

a complete
can be used

list

of the compiler (COMP.COM)
individually
or in combination

command
as below:

line

f1INCTPN

Error

E
S

Stop/Pause
on
Do not
delete

F
L

Save
Echo

output
output

Dx

Save

.Fl-X

M#

Expand/contract

temporary
files
listing in file (.PRN)(LST:
on
printer
)
listing
file on Drive x:
expansions
memory

for

macro

Use of this option will
on Error
cause
Option E: Stop/Pause
The
an error
is encountered
compilation to stop
in compilation.
screen
displaying the code which triggered the
display will freeze»
errom and some of the code above it, and the message to press any key
Once
has been
a key
pressed, the option to
to continue compiling.
abort the compñation (Yes or No) is offered.
Ccmpile

if

Copyright

(C)

1984

——————————
Data
Access
Corporation

05/

16/84

A CONFIGURATION

HOW TO WRITE

B-32

DataFlex

2.0 User's

Manual

Do Not
Files Compilation produces
Delete Temporary
is run, which are automatically deleted when
time
compilation finishes or is aborted. One file has the literal name of
used
by the
FORMTAG.TMP,
and contains the names of the windows
and the other has the variable
name of
configuration begin compi1ed*
filename.lC, and contains the Intermediate Code of the configuration
(further explained in the section on "Modifying and Extending
These
DataFlex).
files are not of interest to the general usen but
there is a reason why you wish them not to be deleted, this option
will retain them.
Compile
two

Option

files

S:

it

every

if

Option F: Save Output Listing 'In File The compilation
expansion
invo7ves
into groups
of subprocess
of some comands
commandsg
and generation of line numbers
for each line of this code.
be output to a
The numbered
can
of the
lines with sub-connands
Compile

name

primarily to
their expansions

a

file

This option would be of
the F option.
created custom macros and wishes
to see
in the context of the configuration they work it.
by

filename.PRN

user

use of
who has

use

The output
Option L: Echo Output Listing on Printer
be printed
on the
described above under Option F can alternatively
This Is helpful for locating errors
printer during compilation.
for compiling more
reporting during compi1ation9 and is recommended
complex
configurations,

Compile

Option D: Place .Fl-X File on Drive x: If you wish the
configuration to be saved to a logical drive other than the
on which
the compiler and source code are9 the D Optiort, followed
the letter of the desired drive will cause the file filename.FLX to
written to the specified drive.

Compile
compiled
one
by
be

When
Option
M:
Expand/Contract Memory for Macro Expansions
compilation begins, 4 kilobytes of your computer's memory is allocated
for the compiled
of macro commands into subcomands
for expansion
and the rmainder
is available
configuration (6K on 16-bit systems)»
which
window
names,
include pagenames,
for the storage of symbols,
in-memory
Some configuraelements,
database
variables and labels.
than
is available for them productions need more space for symbols
ing
compilation
the error message OUT OF MEMORY. When this happens.
# represents the number
where
be reattempted with the option ML
can
from
of kilobytes of RAM to be made available for macro expansion
l to
# less than 4 would
be appropriate
for B-bit
9. In such cases,
6 for 16-bit
and less than
systems.
systems,
Conversely. in those
where
expansion
space
macro
cases
is inadequate (compiler error MACRO
EXCEEDED),
BUFFER
SIZE
the M option can be used to expand the
available space as high as 9 kilobytes.
Compile

EXAMPLE:
COMP
Pause

file,

myfi1e.frm ;ESFDB
temporary
on error,
save
fi1es? create
and output MYFILE.FLX
to drive B:

semi-colon is part of the option syntax,
options are used.
The

———

Copyright (c)

and

must

a

.PRN

be

listing

typed

when

————————————————
1984

Data

Access

Corporation

05/16/84

DataFlex

2.0

User's

HOW TO WRITE

Manual

————

A CONFIGURATION

B-33

———————

HOW TO RUN A CX)NFIGURATION:

is ready to
the configuration has been created and compiled
At the operating
runtime system.
with any installed DataF1ex
command
system
level you simply type the word "FLEX" followed by a
and the name of the configuration.
space
If "FLEX" is entered without
a following
configuration file name, the menu system
(if present on
the disk drive) will execute. As sucM "FLEX" is the usual opening
statement operators are taught to enter to initialize the system.

it

Once

execute

EXAMPLE:
FLEX DATEX
Executes
the DATEX

configuration

shown

above.

execution is under control of the DataFlex runtime, you never
since one configuration
to come back to the operating systang
command
RUN another using the (MAIN
to completely automate
your
application as is done in the MENU system.
Once
have

Copyright

(c·)

1984

Data

Access

Corporation

can

05/16/84

B-34

HOW TO WRITE

A CONFIGURATION

THIS

———————
————————
1984

Copyright (c)

Data

PAGE

Access

INTENTIONALLY

Corporation

DataF1ex

LEFT

2.0

User's

Manual

BLANK

05/16/84

"

_""___"_____"""__""_"__"""""""_"""""""":

_

8"35

"""""""

————"— ~~~

"==~"""""",
E: EEEE====

~~

DATAFLEX

=====

UTILITIES

—=__====.=.======,_——~~~~~~_
=================———~~~——————~———————

—————
————

~~——4w——~——

EDITOR

is a stand-alone text editor for the
DataFlex EDITOR program
creation and manipulation of DataFlex configuration files and images.
It is invoked by keying:

The

EDITOR



the operating system where  is the name of the
is desired to edit or create.
If the filename is
omittecb EDITOR will initialize with a default filename of WORK, which
saving to disk or,
may be changed
upon
to re-edit
it is expected
under
may be saved
this name and
the file many times in succession,
(with no filename).
re-edited by default each time EDITOR is invoked
from

file

it

which

it

if

files
of EDITOR is to create the source
While the primary purpose
sequential file maintenance
Datañex,
is also useful for general
word
and limited
processing. EDITOR features full screen
cursor
movementp
scrolling,
vertical and horizontal (up to 158 columns)
There
is also a
insertion and deletion of characters and lines.
ASCII
search
for patterns in text.
text files
feature to search
using EDITOR.
either be created or edited (changed)

for

it

and
can

is taking
the cursor to show where the editing process
cursor's movement
is controlled by the "FLEX-KEYs"
SETSCREEN
Some of the FLEX-KEYs
assigned
program.
in the DataFlex
keys
perform
the same functions in EDITOR as they do in normal
different functions
DataFlex operation, while other FLEX-KEYS perform
from
there are
in DataFlex. This is because
the ones they perform
certain functions in EDITOR which are purely text-editing"functíonsp
Ffna11y9
and which
a number
are
in DataFlex operations.
not supported
of the FLEX-KEYS are not used at all in EDITOR.
EDITOR

place.

uses
The

EDITOR

FUNCTIONS

This section
the FLEX-KEY
RETURN:

ARE EXECUTED

lists

which

(RETURN

the

BY

functions
the

executes

"FLEX-KEYS"

of the
EDITOR

DataFlex

EDITOR

followed

by

command.

KEY)

RETURN key will
the cursor to the
enter text on a line and advance
the cursor is on the last line of the
next line of the display.
If
display, hitting RETURN will cause the displayed text to scroll up one
line.
If the cursor happens to be in column I (one) of the text, then
hitting the RETURN key will cause an insertion of a blank line at the
point where the cursor was.

The

'

Copyright

(C)

1984

Data

Access

Corporation

+

05/16/84

B-36

UTILITIES

DATAFLEX

DataF1ex

2.0

User's

Manual

————
(UP

UP ARROW:

ARROW KEY)

UP ARROW key
will
the cursor is on the
scroll up one line.

The

will

(RIGHT

ARROW:

RIGHT
The

will
scroll

DOWN ARROW key
screen

If

"without erasing

move the cursor
down one line

if

one line
necessary.

down

on

the screen.

ARROW KEY)

ARROW key

RIGHT

Qne line
on the screen.
display then the text will

up

(DOWN ARROW KEY)

DOWN ARROW:
The
The

the cursor
line of the

move

first

will move the cursor
existing characters.

any

one

character to the right

the
the display will
the screen
cursor is at the right boundaryThe of
maximum
length of a text line
scroll horizontally
to the right.
The
is 158 characters.
cursor will not move into unwritten space.

If

LEFT

(LEFT

ARRQÑ:

ARROW KEY)

to

will move the cursor one space to the left without
The
existing characters.
cursor will not move past the
SCROLLED
has HORIZONTAL
unless the screen
of the screen
right by a previous RIGHT ARROW command.

DELETE

END OF LINE:

The

LEFT

erasing

leftthe

The

ARROW key

any
boundary

DESTRUCTIVE

BACKSPACE

all

1eftg deleting
INSERT

QÍARACTER:

BACKSPACE

(DESTRUCTIVE

will

key

the text
(INSERT

from

KEY)

move the cursor
the cursor to the

QU\RACTER

one
end

space
to the
of the line.

KEY)

will move the text line to the right by one
for the insertion of a character at the
the line contains the maximum number of charcursor position.
If
be
The key must
acters (158) then the last character will be lost.
pressed
one time for each
character to be inserted.

The

space

á-lARACTER
INSERT
key
opening
up the text

DELETE
The
and

a1ARAcTER:

DELETE
move

Copyright

(DELETE

MARACTER

KEY)

key
will delete the character under the cursor
text to the right of the cursor one space to the left.

CMRACTER

all

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex

UserIs

2.0

DATAFLEX

Manual

UTILITIES

INSERT

(SAVE

LINE:

RECORD

KEY)

SAVE RECORD key
will insert a line above the line
the screen
After this key is presséd»
cursor appears.
text below the cursor, and leave a blank line to edit.

The

(DELETE

LINE:

DELETE
The

B-37

—————————
——————

— —

RECORD

DELETE

will

which

will

the
scroll all

KEY)

RECORD

key

on

delete the line

on

which

the cursor

appears.

LOAD

(BACK

FILE:

FIELD

KEY)

BACK FIELD
key
will dmr the teU buffer and ask for the filename
of the text file to load. Tf this jcé\/ Y(ijsi pj"essec1 M' Msítakm pj"ess
ESC to abort and return to the text
in the buffer without loading new
text.
The

SAVE

FUNCTION

(USER-DEFINED

FILE:

KEY)

USER-DEFINED
FUNCTION
key will
save
the text file in the buffer to
answer
you change
the disk.
your mind after invoking this cowñáñdo
If
its query by pressing the ESCape key. The prompt will offer the
opportunity to save the file under its original filename (WORK
by merely
EDITOR was invoked
with no filename specification)
pressing
an edit
the RETURN key.
If a different filename is desired after
necessary)
may be
sessiom a new filename (with drive specification
to the prompt.
entered in response

The

if

if

ESCAPE:
The

KEY)

(ESC

ESCape

should

naming

conform

(generally a
the file name
TAB:

(FIND

The FIND
depending

KEY)

key
on

BEGINNING

be

will tab eight spaces to the right
the last direction that the cursor

OF LINE

The CALCULATE
being
edited.

will

will exit the document
editing portion of EDITOR and
of the output file to the disk. The output file
to your standard operating system
file name conventions
two
character drive specificatiom
eight characters for
plus a three character file type extension).

key

allow the

placed

Capyright

or

HOME:

(cALájLATE

or
was

to the
moved.

left

KEY)

will move the cursor to the beginning of the line
the cursor is on the first character then the cursor
at the top of the text.

key

If

—————————
(C)
1984 Data

——————————————————————
Access

Corporation

05/16/84

·

B-38

DATAFLEX

DataF1ex

UTILITIES

2.0

User's

Manual

——————
BACK
The

PAGE:

(PREVIOUS

PREVIOUS

RECORD

The

FIND

NEXT

key

(NEXT

FORWARD PAGE:
RECORD

key

will

RECORD
wi11

(SUPERFINO

TEXT:

KEY)

RECORD

page

the cursor

backward

24

lines.

KEY)

page

the cursor forward

24

lines.

KEY)

SUPERFINO
key
will display the prompt
"Find string:
at the bottom
respond
by keying in the
of the screen, to which the operator should
string which
is desired to find in the file. Once the string has
been
is desired.
found, it may-be editedp deletech or whatever
If the
SUPERFINO
key
again. the prompt will reappear. If the key
is pressed
promptg
pressed
again, in response
the string entered
is
to the
previously will be searched
for again in the fi1e9 and will be
searched
twice, until a
for every time the SUPERFINO key is pressed
different string is entered in response
to the prompt.

"

The

it

topyright

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex

2.0

User's

DATAFLEX

Manual

UTILITIES

B-39

——————

———
REINDEX

UTILITY

The DataFlex index
are maintained dynamically during normal
No reorganization
system
is generally necessary. However.
operation.
made
due to changes
in the
structure after the entry of datm
adding
may be necessary
new Indexes
or system
to rebuild
failure,
The REINDEX
index
new
provides this
create
or
.Kx
independent
Each
index
with a
extensiom
function.
is an
which
where
x is a number
distinguishes the index from other indexes

files

file

it utility

files.

of the

database.
paragraph)
next

(see

REINDEX

file

rebuild all indexes,
particular one.

can

or just

batch

on1yg

indexes

one

TWO types of index
are
files in DataFlex; ON-LINE indexes which
and
maintained dynamically during file creation and maintenance
which
indexes
are
usually used for infrequently-used report
indexes
when a record is
The batch
sequencing.
are NOT updated
created or deleted as the on-line indexes
are.

There

are
BATO

is a 5th index (on 8 bit systans--lOth index on 16 bit systems)
that is reserved for "ad hoc" sorting of existing files. REINDEX can
for this index and create a new index
redefine the specifications
Any other BATOI
index can also be redefined from the
interactively.
command
line.
There

WHEN TO USE REINDEX:

are indications that your index files may be damaged and
2)
I) A DataF1ex
error 2Óp 2L 22 or 26;
"out of order" when an attempt is made to list
them
in order; 3) Trying to FIND one record and getting another; 4)
Records
"missing" out of the data file. For any of these indications
be used
on the suspect
data
is recommended
that the FREL program
REINDEX
data
case
the
is damaged.
before
in
file
itself
file

The

following

you must
Records

REINDEX:
run
seeming
to be

it

USING

REINDEX:

be used
instructions can be given on the
in two ways:
line that calls REINDEX, or its operation can be controlled
interactively.
First we will deal with the interactive mode.

REINDEX

can

command

When REINDEX
is
be greeted with

a

with their

played

REINDEX.
 to

to

hit

ca17ed

If

with

no

menu.
files numbers.
file
have

you
more

more

You
than

should

line.

you

will

files will be disthe file you wish

select
active files you may press
REINDEX
any time within
(Note: the file selection

32
At

get
files listed.
to return to the menu.
is the same as that in QUERY).



process

arguments
on the command
The active DataFlex

you

may

———————————=———
—~~=~~~~~K————————~~~
——

Conyright

(C)

1984

Data

Access

Corporation

05/16/84

DATAFLEX

B-40

DataFlex

UTILITIES

User's

2.0

Manual

—— ———

selected a file, the following menu will
select an operation according to your needs:

Once you
You must

have

be

displayed.

DATAFLEX
REINDEX


ALL

INDEXES

will read the data file selected and rebuild
Re-create all indexes
defined indexes. This fs generally used when a system or power
failure makes the validity of the index file questionable.
Note
program
OPTION

that

if

the validity

should
TWO

-

be

used

RE-CREATE

data

of your
before the

ALL

BAT(M

file

REINDEX

is in questicm

the

all

FREL

program.

INDEXES

Re-create BATCXI indexes
will create all indexes marked as "batch" for
the selected data file. This is generally used before generating
indexes, Le., before end-of-month
reports that require the batch
reporting.
OPTION

THREE

-

RE-CREATE

ONE

INDEX

one at a time.
Re-create one 1ndexD allows you to remake indexesg
program
you made
a new index with the FILEDEF
This may be required
or you had a disk error on an existing Index. Option three will list
indexes
and allow you to select the index you wish
to
the ava11ab1e
re-create.

if

—
Copyright

(C)

=
1984 Data

Access

Corporation

05/16/84

DataF1ex

DATAFLEX

Manual

User's

2.0

FOUR

OPTION

UTILITIES

B-41

——————————

—————
—

-

& CREATE

DEFINE

"AD

HOC"

INDEX

index. This index
Option four allows you to create an "AD HOC" batch
be used
can then
This option will ALWAYS
in any DataF1ex
output.
create index 5 (or index 10 on 16 bit systems). When selected,
You may then select up to four (4)
REINDEX
will display a field list.
(6 on 16
fields to be included in the index
bit systems).
If there
on the screerg you
are
more
fields in the selected file than will

fields or the
may use the  key to get more
key to start
at field one again. Once you have selected the fie7ds to
 and REINDEX
press
will proceed
to
index by field number,
is the same
create the new index. (Note: this field selection process
as that used
in QUERY).

fit

FIVE

OPTION

Delete
from

ad

the
used

space

REINDEX

-

-

DELETE

"AD

disk

irÑej

re-create all
on the RE-INDEX

for (FILE).

indexes

This is equivalent to Option

Menu.

EXAMPLE:
REINDEX

REINDEX

22

-



Will select the
interaction.

file

all

Recreate

MENU
number

and

indexes

file

for

to the

proceed

22.

REINDEX

menu

for

user

EXAMPLE:
REINDEX

REINDEX

Will
Option

22



recreate all
Two on the

MENU

- Select

BATa{
batch
indexes
RE-INDEX
Menu.

file
for

22

and

.

display

REINDEX

This is the

same

menu.

as

EXAMPLE:
REINDEX
Recreate

Copyright

(C)

22

BAT(J1

all

1984

batch

Data

indexes

Access

for

file

Corporation

22

05/16/84

DATAFLEX

B-42

DataFlex

UTILITIES

——————————
====———— ————————————
REINDEX





index for the specified

re-create the specified

Will

Manual

— —————

~

.

User's

2.0

file.

EXAMPLE:
22"1

REINDEX
Recreate

REINDEX

index

one



of

file



22.





... that follow. This
numbers
tQ the field
will redefine 
The index
Four,
but any index can be re-defined.
is like Option
will
be a BATCH type unless
was on-line
before REINDEX was run.

it

EXAMPLE:

REINDEX

REINDEX

22

REINDEX

file

2L index



delete the ad
ad hoc
indexes.

Will
on

5 4 5 O

hoc

REINDEX

QUIET
put at the end

5 by

fields:

DELETE

index .

4,

5

and

This

O.

command

works

only

QUIET

of the command line will cause REINDEX to display
for each record instead of the index data.
only a "*" on the screen
Shortening the display increases throughput speed.

.BAD
REINDEX

Will create a file by the name rootname.BAD
duplicate records found during reindex.

with

a

list

REINDEX
 FLEX 

Will MAIN back to the Flex configuration
This gives you the capability to run
reindex is done.
(like a report) after a reindex operation.

of

a

any

after the
configuration

EXAMPLE:
REINDEX

22

DUPLICATE

BATM

RECORDS

FLEX

IN

MYREPQRT

REINDEX:

records fn any non-ad hoc indem
to maintain the requirement that all
I) NOT
option to:
will be given the
DELETE BAD RECORDS and leave the
in an improper
state;
or 2)
file
The
of bad records
List the bad records to a file or printer.
file
will have the name rootname.BAD

REINDEX
encounters duplicate
must
delete one of the records
index
entries be unique. You

it

If

Copyright

(C)

——-—————
1984 Data
Access

Corporation

05/16/84

DataFlex

User's

2.0

DATAFLEX

Manual

B-43

UTILITIES

~
FREE

LIST

UTILITY

to as
list of available (deleted) records in a file is referred system
the "FREE LIST". It is dynamically maintained during normal
operation (unless "REUSE DELETED SPACE" is set "Y"es in SETSCREEn).
But
due to system
may be
failure (disk errors or power fail)
This is done with the FREÍnecessary
to rebuild the free list.
check
the file for type consistency (bad
utility.and FREL will also
delete any bad records.
data)

The

it

WHEN TO USE

FREÍ-:

Conditions that would Indicate
Power
failure with data files
1..6.
USING

the

for FREL
Disk errors.

need

open.

and

REINDEX
78»

Errors

are:
81
or

FREL:

FORMAT:
FREL

(to display
or

a

FREL»
FREL

(to


FREL on

a

file

whose

files

number

before executing

is already

known.)

EXAMPLE:
FREL
Check

running
If
indexes

lO

file

FREÍ-

for that

FREL

AND BAD

10

for consistency

indicates
file wIth

any bad
REINDEX

and

rebuild

its

records, you should
after running FREL.

free

list

rebuild

the

RECORDS:

encountered
any bad records are
during FREÍ-, the record(s) will be
deleted and the data from them can be sent to a file or to the
".BAD"
is p"ut on the cownand Iirm the bad
pri nter.
If the option
be listed
When the
to the file "rootname.BAD".
records will always
be given the option to:
bad record is encounteredp
you will
l)
first
2)
Not
delete the record and leave the file in an improper
state;
List the bad records to the printer;
or 3) list the bad records to
there are many ways "bad" records can
the .BAD file. NOTE: Although
be created,
a consistent
attribute of bad records is the presence
of
FREL
as "bad"
control (non-ASCII)
characters in data fields.
lists
any
record having such characters in it.

If

——————

Copyright (c)

1984

Data

Access

Corporation

05/16/84

DATAFLEX

B-44

DataFlex

UTILITIES

—————

+

2.0

User's

Manual

~
READ UTILITY

THE

has the function
of automatically writing
DataFlex's READ program
configurations which "read" standard ASCII format data files and
produce
with record numbers and any
DataFlex data fi1em complete
indexes
of the data which might be desired.
It does thisand by querying
certain
of the source
the user as to the characteristics
file,
of the DataFlex file to be created.
desired attributes
(a)
two main
are
uses
configurations:
to
for READ-produced
software environments such as MBASIC*,
"import" data from non-OataFlex
and
SuperCalc*
SDI,
dBASEII*
SDF,,
DIF,
MailMerge*,
the like;
VisiCalc*
database
and
(b) to re-READ ASCII data from a predecessor DataFlex
having more or fewer fields
into a newly-created DataFlex database
than
in their length or data type).
the original (or changes
There

In order to provide a realistic
context for the explanation of READ.
the following instructions cover how to convert a data file from
do not
dBASEII*
purposes
format to DataFlex. If your particular
merely
indicate
skip those sections whose headings
involve dBASEIL
that they pertain to dl3ASE, and substitute the appropriate
environment. The overall process
instructions for your source
involves the use of DataFlex
utilities other than READ. This
interaction between READ and AUTODEF (and possibly other utilities)
is9
agaim typfcal of most uses to which READ would likely be put in
actual use.

HOW TO CONVERT

DBASE

II

TO DATAFLEX

FILES

Involves producing two complete
copies of the
this procedure
be transferred
after the
(the intermediate one may be erased
to
files
process
is completeb the transfer of large files may require some
and even
planning of disk space,
of processing time for very large
For
this reasom
that the preparatory work
is recommended
files.
be done
is desired to
with a subset of any large file whfch
convertp and that the results of that work then be applied to the
entire file after its efficacy has been confirmed.

Since

it

be
can
This procedure
version of DataFlex.

it

executed

If

you

a demo
files using "DEMO
the error
to re-lnltialize DataFlex

on small
data
should
encounter

EXCEEDED",
will be necessary
before you can continue your work from the last disk access
prior to
Natura11yy
make sure
the occurrence of the error.
your data file is
backed
From dBASEp
proceed.
up before you
print out the databaseG
structure for reference in the following steps.
LIMITATION

MAKING
The
can

THE

it

MAIN

step
first
be amazingly

ENTRY

SCREEN

is defining
easy
database

happened
dBASE's

for your dBASE
(and
retained at least your .ZIP
need
is a plain ASCII file showing
and their
types.

Copyright

—
(C)

1984

Data

Access

in

database

your

you
if under

to

DataF1ex,,

develop

ZIP

screen

which

the

a process
main
entry

and

report formatter

screen

files

from the effort). What you
the fields of your data elments,

Corporation

05/16/84

DataFlex

If

You

2.0

User's

Don't

.ZIP

Have

DATAFLEX

Manual

Screen

UTILITIES

B-45

Files

is your origina) entry command file (.MD) full of
caption GET variable" statements, then modify the .CMD file
FORMAT TO PRINT
by SETting
right before the first "Él" and run the
which
program
That will print out your screerg
with your printer on.
then
have
for which purpose
in ASCII,
you will
to "draw" on the screen
EDITOR
will do fim. Now
your favorite word processor or DataF1exvs
screen
you can go on to the final
preparation steps below which are
and ZIP-created entry
manually
common to both
screens.

If'
"e

all
1.c

you
SAY

If

You

Kept

have

.ZIP

Ff1es

in use puts out its own file with a .ZIP extensiom a .CMD or .FMT
and a .ZPR
for dBASE which you won't need anymore,
file intended
for use in printing out a copy of the screen. This .ZPR file is what
image
you can
use to create the screen
for DataFlex. If you erased
your .ZPR file but saved the .ZIP fi1ep you can recreate the .ZPR file
(Caution:
just by loading the .ZIP file Into ZIP and resaving.
if
by ZIP
and then
you
use a .CMD or .FMT file produced
edited under its
ZIP
from
name.
with
resaving
original
will overwrite the byfile
its
renaming
You can avoid this
earlier ZIP-generated version.
your
But
ZIP
chance.
none
of this really
gives you the
output file when
you're working on a backed-up
disk, right? Right!)
matters, because
Load
the .ZPR file into your favorite word processor, or the DataFlex
EDITOR,
and erase
the first Iirm which reads
Then
01*****
File filename *****".
delete all embedded commands (those
in [brackets]) and all #variable GET commands and évariable SAY
comands»
together with the variable names.
ZIP

file

Final Preparation of the

Screen

should
whether
you got 'it from
you
now have,
a .ZPR file or
and a prompt
manua11y»
anyg
"drew"
is a screen with its tit1eg
for each data item to be input in a logical position on the screen
followed by enough space on the line for the data item to be entered
loaded
Nowo with this
into either your word processor or
into.
file
DataF1ex's
EDIT0R»
should
draw
you
a blank with underscores
after each
prompt
in the same position as you used to have your GETs and SAYs.
Each blank should
be as long as the field
length defined in dBASE
numeric
For
(this is how DataFlex
will figure out the field length).
one underscore
with a
fieldm there is one further step. Replace
remembering
go in the ffelch
place should
period wherever
the decimal
point will actually provide space for the l's
that that decimal
The
point).
position in your number (first place left of the decimal
blank for a five-digit integer (no decima1sk for examp1eg would look
four
like: "
.", without the quotes, of course. That's right:
underscores
and the decimal
any of the fields
is a datep
point.
If
make
look like this:
that DataFlex
"_/_/_"d remembering
Lastp
actually supports dates as a separate formatg
unlike dBASE.
open
up a new line at the top of the screen
(don't worry
the bottan
if
line of your image scrolls off the bottom--this new line won't be part
a
of the displayed image). At the leftmost positiom give the screen
by a diagona7
(/ENTRY_SCREENg
name for DataFlex
for
to use, preceded
What

if

it

it

^opyright

(C)

1984

Data

Access

Corporation

05/16/84

DATAFLEX

B-46

DataFlex 2.0 User's

UTILITIES

example). Save the file under a name which wi17
Now
is ready for DataFlex to read
your screen
structureg all from the screen.
DataFlex database

it

be
and

Manual

meaningful to you.
create your new

.
CREATING

THE

WITH

STRUCTURE

DATABASE

AUTODEF

AUTODEF
image
ft¶6 time to "feed" the screen
to AUTQDEF.
will
you need
fields that
define fields only if they're in the image.
If
aren't in the imagey you'll either need to add them to the image (they
using FILEDEFt
can be rwoved later),
or edit them into the database
but that's another story.

Now

From
.COM

the operating

system,
the

or

DataF1ex
prompt
with

the

méñtb

run

AUTODEF

(it's

a

the filename of the screen
first
file). and
image
yoWre creating a new database9
rather than
file
tell
Then
how many
records you're going to
editing an old one.
tell
need
the database
to hold (maximum 64,000). AUTODEF wIll then display
image
and walk
you
through each of the blanks you provided
your screen
in DataFlex), asking you what you want to
(they¥re called "windows"
but
You can
you 1ike9
use your old dBASE names
name the
variables.
DataF1ex
allows 12 characters in fieldnames, so you may wish to expand
somewhat
them
inte1ligibi1ity.
to improve
Answer

it

it

if

the
fie1d(s) are indexed. Give
will ask you which
Be sure
fields you used in dBASE.
to give
at least Qneg so
unless you are displaying the
DataFlex will be able to find recordsp
record numberg in which case you don't have to have any indexed
fields.

Then

AUTODEF

it

same

it

After this, AUTODEF will create a ffle (called a configuration file in
DataFlex) identified as "filename.FRM" which will contain not only
image
and a means
your
screen
of displaying it, but also a complete
database
by its
indexem editing, de1etingg
searching
the
for
facility
anbedded
and adding
records, with no additional comnands.
or
wish
Of course9
do later
you
otherwise.
to add bells and whistles
.FRM
you can edit the
to your entry configuratiom
file with your word
EDITOR
to provide them.
processor or the DataFiex

if

with the DataFlex
compile
or executable from the operating
It will createfromthe file
"fi1ename.FLX'4
which
be executed
can
either
the DataFlex menu or
No point
"FLEX
from
filename".
the operating system with the command,
We haverñt brought the data
in running
yet. though.
over for
the
so from
yet. This is a good time to compile it, however.
and DataFlex
operating systan, issue the command "COMP fi1enagte'4
will
do the rest over
Compilation is a step
the next two minutes or so.
DataF1ex
taken
which
be
must
configuration you createg by
with every
be re-compiled each
and a configuration
must
whatever
time you
means,
want
to make a change in the way
runs. This step isn't present in
dBASEy
so don't forget to do
in DataFlex when it's called for.
To

use this configuratiom
compiler, selectable from
systm as "COMP fi1ename.FRM".

you must
the
menu

it

it

it

Copyright (c)

it

1984

Data

Access

it

Corporation

05/16/84

User's

DataFlex

2.0

BRINGING

HOME THE

DATAFLEX

Manual

UTILITIES

B-47

DATA

should
do
you
last step Is bringing the data over, something
first
with a small test data file and then later with the whole file after
works
made
sure
right.
everything
you've
The

The

Part:

dBASE

Start

dBASE
Do not invoke
any
into USE.
bring your database
want
as
DataFlex to end up with the same record numbers
unless you use record
wouldn't be of concern
using (which
scheme).
numbers
account
you have
or some such
deleted
have
you
to manually re-delete them in
in your databasm
to eliminate the
unless you PACK your database
will readjust
record numbers
in dBASE.
and

dBASE

indexes
dBASE was
numbers
as

if

records
DataF}exg

you

If

will

first

records . This, of course,
your
a large database
wIth one or more indexem the
If you're converting
do use the largest
you
index maintained
conversion will run faster
This assumes that you will want the same index in your
i n dBASE.
The largest
index is the one whose index file
DataFlex version.
(.NDX)
is larger than any of the other .NDX files. Your record
numbers
wIll changep
of course.

if

COPY

Now

the
.COPY

If

some

database
TO

to

an

f i1ename

ASCII

SDF

delimited

with the

coimand:

DELIMITED

your
records have apostrophes
want
to make the command look
marks
instead of the apostrophes

of

will
quotation
you

file

(JerryG Pool Hail) in th€m»
like this to use double
otherwise provided by

dBASE:
.COPY

TO

filename

SDF

DELIMITED

WITH

"
AUTODEF created
the DataF1ex

from your
"filename" is the same filename as
dBASE won't write
but
directly into
file,
an intermediate
version of your
will create the file "fi1ename.TXT%
data. Also make sure your disk has space on It for a copy of your
data
If your data file is large
file that is as big as the original.
will take some time--hours for really large
(over lOOk) this process
data
files over a megabyte.

Make
image

sure

file.

it

If yoWre running on a crowded hard disk or otherwise have less free
disk space than your data file. there are options you can use in the
which
COPY command
will enable you to COPY the file in pieces. Agai n,
sequence.
an index, COPY the file out in the index
yotdre utilizing
For
examp1eg
rst
if your index is on last A name, COPYCp canthen be D run to fí Fp
through
through
output all last names beginning with
dBASE
and DataFlex
and so on.
can easily be put
into
This process
command
fi1es/configurations
that call each other until all records
brought
have
been
over. and run as a batch. After completion, check
in the DataFlex
the number of records
file to make certain that no
records were missed.

if

Copyright

(C)

1984

Data

Access

Corporation

05/

16/84

DATAFLEX

B-48

2.0

DataF1ex

UTILITIES

User's

Manual

——————,
———
The

DataF1ex

Part

DataFlex's READ Uti1ityg which is itself a
whose
operation creates a configuration
DataFlex
which
causes
to read your filename.TXT file and put data into
(DataF1ex)
as
with all indexes
fi1e9 complete
your filename.DAT
READ has
Like any good DataFlex configuration,
specified in AUTODEF.
by pressing the HELP key,
so use
lots of help in it, accessed
READ is invoked
whenever
either from the DataFlex
questions come up.
menu or from
the operating systm with the command "FLEX READ".
last step is done
DataFlex configuratiom
The

by

and

it

that lists the DataFlex files already on
starts up with a screen
see the one you created when
running AUTODE©
disk. You should
Then
with a selection number to its left. Respond with that number.
and ask you
name of this
a new screen
display
the
target
file, be
will
will
the file
the name of the file to read from. TÍÁsy of coursep
dBASEG
COPY
command
from
in the step
you created (filename.TXT)
READ
Then
ask you the name you want
above.
to
Enter this name.
will What
configuration source
give to the configuration source
file.
READ
file?
will convert your source data file using a DataFlex
configuration which will actually be written by READ when you're done
So give
needs
all
telling
to know about the desired conversion.
(I used DBASREADL
but do not give it the same name as you
ft a name image
gave
your
file (and resultant data entry configuration) in
AUTODEF above?
or your old file will be overwritten by the READ
be good.
and that wouldn't
configuratiom
READ

your'

it

it

After you've given

will

c1earp

and

the
it will

READ

name for the
ask you whether

fi1é» the screen
file is line-

configuration
your source

or

abovep
your
comma-delimited. If you did everything as recomended
by entering the
and you
can tell READ this
coma-delimited,
is
file word "COMMA"
The READ
entire
in the window.
will ask you how many
Refer to your dBASE
fields are in each record of your source
file.
structure printout and count the fields for the answer to this
question.
Next

you have
comes
the part that could be tricky
sequence
of fields as they were fn the dBASE
DataF1ex
windows
hancb
and in the
in the screen

if

in the
one
hand.

made

any

structure
image

on

change
on the
the other

For
each
field of your source
fi1ep READ will ask you which
database
goes
to.
field number (sequentially)
of the DataF1ex
If
ffeld sequence
step along
your dBASE file structure and your DataF1ex
together exactly the same9 this step is easy. One goes into I, two
But
the first field of your dBASE
into 29 three into 3, and so on.
while your
structure is LASTNN4E9 and the second is FIRSTNN'4E,
DataFlex
image
screen
starts off with FIRSTNAME and has LASTNAME
second.
you'll have to tell READ about the switching at this point.
Compare
your printouts to make sure about any possible switches. If
there are fields in your source
file that you don't want transferred
(or if there are fields in your DataFlex file that you don't want data
fields
transferred intoh you can do that here by skipping source
file
by not
with the  key or skipping target file fields merely
using their sequential numbers.

it

if

needs
After thiSg READ knows all
to know, and
to compile the configuration immediately.

want

it

———-——- -——. ———..,..——-.——
1984 Data
Access

Copyright (c)

Corporation

will

Since

ask
you

you
have

ifto

you

05/16/84

DataFlex

User's

2.0

DATAFLEX

Manual

B-49

UTILITIES

compile the configuration before you can use itp the usual response
The question is asked
would
be "Y"es.
here
to give you the
opportunity to edit the conversion configuration before compiling
if you want to. Normally. you wouldMt want to.

it.

But
will then write the conversion configuration and compile it.
hasn't done your conversion yet--it's Just put everything in
place for you to do it. Your final step is to to run your conversion
configuration from the "Run a Configuration" choice on the menw or
fi1ename'4
where
"FLEX
filename is the name you gave
give the comiand
you
the
the conversion configuration in READ.
first runworks
If
and everything
all right,
configuration on a small test database
database
doing
on the large,
real
is as simple as
the dBASE
running
conversion steps on itg putting the resultant .TXT file in the right
place where your READ configuration can find itg and giving the "FLEX
filename" cormand again. You must have the same filenames as you used
the first tiÍñé» of course.
READ
READ

it

WHAT REALLY

HAPPENED

HERE?

In the foregoingg we did one conversion step in dBASE9 creating one
copy
of your original data file with a .TXT extension.
image
Either manually
or from a .ZIP dBASE fi1ep we created a screen
with any extenslom which you might have named FLEXFILE.
for DataF1ex
number
We then
ran AUTODEF on that image
of files.
file, producing a below.
Then we ran
data
and index
W1éSo
empty
as listed
some of them
READ,
to read your
generating a DataFlex configuration specifically
dBASE-generated
file. convert its contentm and put them into the
This is a list of the files in the
files createdwhichunder AUTODEF.
sequence
in
they would have been created:
processed

original dBASE data file
version of the dBASE data file
File from ZIP for the dBASE entry screen
Printable version of the ZIP file
DataFlex
image
screen
(possibly from .ZPR file)
AUTODEF-created
code
entry configuration source
Compiled
(executable) entry configuration
DataFlex
data
by AUTODEF
file created
DataFlex
any,
index Áfí»
created by AUTODEF
any
Additional DataFlex indexes,
Names of DataFlex
fields. created by AUTQDEF
database
Definition of DataFlex
READ-created
code
source
for conversion config.
Compiled
(executable) conversion configuration

FLEXFILE.DBF

Your

FLEXFILE.TXT
FLEXFILE.ZIP
FLEXFILE.ZPR

COPYed

FLEXFILE.
FLEXFILE.FRM
FLEXFILE.FLX

*
*

*

FLEXFILE.DAT
FLEXFILE.KI
FLEXFILE.Kn

*
*

FLEXFILE.TAG
FLEXFILE.FD

*

if

DBASREAD.FRM
DBASREAD.FLX

if

*asterisk indicates the minimum files which you must retain in
database.
Additional database
and/or
order to use your new DataFlex
be created.
All the others may be
configuration files mayp of coursep
retained for future reference or modification if desired (and space
allows).
The

———————

Copyright (c)

1984

Data

Access

Corporation

05/16/84

B-50

UTILITIES

DATAFLEX

DataFlex

2.0

User's

Manual

===——_==————————————
————————————————————————————
———— —————~__
WHAT DO WE HAVE

HERE?

efforts is much more than just a data file that
indexes
for
addition, we have created complete
rapid finding of records in the database7
the fi1ey
facilitate
Furthem in
including any we may have had in the dBASE version.
AUTODEF,
we have
display and entry facility for the
created a complete
ed1tg
through
which
database
we can querµ
or add to, the new
recorcM
DataFlex database.
The

product of

DataFlex

can
tO

these

use.

In

All further processing of the data and related configuration files to
not present in dBASE
of DataFlex's many capabilities
take advantage
simu]taneous1y9
open
(multiple command
true multi-user
files
operatiom Julian date functiQnsp and moreL may be done on the
DataFlex file family entirely within DataFlex. You're on your way!

~—

.,., _"" _ = _
Copyright (C)

]984

_ ~~~~~~~~~~~
Data
Access
Corporation

~

—

05/16/84

DataFlex

User's

2.0

DATAFLEX

Manual

DATAFLEX

conversion
applications

DataFlex
DataFlex 1.6X
The

1.6X

TO

programs

to the

2.00

UTILITIES

B-51

CONVERSION

provide for the transfer of exi sting
2.00 syntactical representation.

new

is DataFlex l.6X ENTER and REPORT
input to the conversion process
configuration files. The files must be working l.6X DataFlex configuThe output of the conversion process
is DataFlex 2.00 source
ratl ons.
be compiled
must
into
can be run, the source
Before
they
files
files.
using
compiler.
DataFlex
the
configuration
executable
flies
The

compiler requires the creation of a new support fije
each
existing data (.DAT extension) file in your
This .FO file wIll be created by the 2.00 FILEDEF
l.6x application.
which
FILENAME
The DataF1ex
when a
file definition is saved.
utility
is given to a data file will be used as the base name of the new file
to
that will be createch and an extension of ".FO" will be appended
and the compiler
This file will be used by the conversion program
to assign symbolic names to the individual fields in the data file.
FILENAME
and the
These
symbolic names will be composed of the DataFlex
FIELD
NAME that each
field has been assigned. Valid characters that
NAME are
be used
[A..Z» 0..9» #9 @p _g $]. If
as part of a FIELD
can
other characters are used in FIELD NAME they will be automatically
converted to an underline character by FILEDEF.

The DataFlex 2.0
(FILENAME.FD)
for

it.

and select the
create the .FO file. run the 2.00 FILEDEF program
has been
Once the
be converted.
loaded, use
file
file that(3) is to FILEDEF
in
to inspect the data file's DataFlex FILE
option three
NAME and all
the FIELD NAMES in the file. If the DataFlex FILE NAME
has
not
been
filled in, or the FIELD NAMES are not correctp you may
correct them at this time.
To
data

use option nine (9)
in FILEDEF to
the modifications are comp1eteg
(.DAT
files) to disk. The 2.0 version
the data file definition
create and write the
of FILEDEF will at this point automatica11y
data
must
be performed
.FO
needed
on all
process
This
files
file.
which
by configurations
used
are
2.00.
to be converted to DataF1ex
The
.FO
flies must be on the same logged device as the compiler when
the source configuration is compiled. Data files created under
Versions 1.6X are otherwise completely compatible with DataFlex
Version 2.0.

Once
save

CVTFRM

used
to convert the ENTER CCNFIGURATIONS
1.6X
to DataFlex 2.00 and CVTRPT is used
( .RFT)
CONFIGURATIONS
.

is
DataFlex
REPORT

( .FRM)

from

to convert the

the
requires only two file names to perform
conversion program
conversion: the name of the version í.6X configuration fi1eg and a
source
name for the Version 2.00
file which is output by this process.
The Version 2.0
output file name must be different from the Version
l.6X configuration file name,
The

————
———— —————————

Copyright (c)

1984

Data

Access

Corporation

.,,,,, ,.., .,, ..————

05/

16/84

DataFlex

UTILITIES

DATAFLEX

B-52

User's

2.0

———————

Manual

——————-—

and the output
A sample
input filename is VENDOR.FRM.
Once
'It is
the conversion is comp1etep
filename will be VEN.FRM.
necessary
to compile the configuration into an executable file.

EXAMPLE:

A>CVTFRM
ENTER SOURCE FILE
OUTPUT FILE
NAME:

(conversion

VENDOR.FRM

NAME:

VEN.FRM
is done

here)

DONE.
CONVERSION
A>COMP VEN.FRM
ERRORS

that

a) CANNOT FIND
The conversion
name

encountered:

be

may

INPUT

FILE

program

can
not locate the input
disk directory to be sure

for spelling

on

AND OUTFUT FILENAI'ES
MUST BE DIFFERENT
b) INPUT
The conversion program
requires that input and
an ouput
of the same name
different.

If

overwritten.
C)

CANNOT

file

FIND

.FO

<<#>>

file

name

be

will

it

be

FILE

been

IS
which

is there.

output
exists7

declared by the configuration
the default drive.

fileon has

A data
not found
d) FILE
A data

it

the input

Check

file.

NOT OPEN
has not been

opened

has

been

which

program

referenced

by

is

the

configuration.
e)
A

FILE

<>,

field number
configuration
f)

<<1'>> IS OUT OF RANGE
FIELD
has been
referenced by the 1.6X
which

does

WINDOW # 

not

appear

definition

file.

#
has

which
an option number
in
is
The message
shows
versions).
the line number on
The original
configuration
the invalid option number appears.
be corrected before conversion is re-attempted.

invalid
must

data

OUT OF RANGE

g) UNSUPPORTED OPTION # ON LINE
The original
I.6X configuration
which

fn the

(under

it

both

h) OVERLAPPING
IMAGE SECTIONS
ARE NOT ALLOWED
Under
some circumstancem DataF1ex
Version l.6X

Report
section line
declarations can include one or more 1ine(s) in both of two adjacent
This condition is impossible for the conversion program
to
sections.
hand]ep
and must
be corrected in the 1.6X
configuration by actual
and changing
of the section line
duplication of the common 1inesg
declarations so as not to include any of the same line numbers.

All of the errors
process.

~_~==~=~~———~
Copyright (C) 1984

above

_
Data

are

fatab

and

will

abort

—————————
Access
Corporation

the

conversfon

05/16/84

DataF1ex

2.0 User's

DATAFLEX

Manual

MENU CREATION

UTILITIES

B-53

AND MAINTENANCE

DataFlex is supplied with a powerfuH versati1ep and easy-to-use
system
for creating and maintaining menus which supports the execution
other executable (.COM and .CMD) fi1em
of DataFlex configurations,
and prompting for the entry of necessary
operator input at run time.
be made to execute
The menu system
upon
can
cold bootp providing a
insulates the operator from the computer^s
"shell" which positively
operating system
at all times.
DataFlex configuration
(filename
and creates data
for the menus under
files
MENUDEF is
Like any good "Flex" applicatiom
the df filename "MENU".
and rapidly
be created
menus
can easily
or
fully _promptech and
and answering
MENUDEF
them.
modified simply by following the prompts
also has extensive HELP screens, which can be called at any time
during execution by pressing the HELP Flex-key.
This

utility

MENUDEF.FLX),

CREATING

is

itselfusesa

and

it

AND SELECTING

NENUS

from
Configuration menu,
the DataFlex
selecting "Menu Definition"
or invoking MENUDEF from the operating system íiith the command FLEX
MENUDEF,
and headers
a list of the numbers
of the menus currently on
The "headers" are
the legends
the disk will appear as shown below.
identifying what each one
appearing at the top center above the menus,
Upon

i S:

DATAFLEX

MENU SELECTION

MENU SYSTEM

HEADER

NUMBER

ENTER NUNBER OF THE MENU YOU WISH TO EDIT:
PREVIOUS
RECORD Command
NEXT
You may use the

or

press



or
to start

a

new

menu.

_

Key

for

more menus
(HELP screen

available)

=

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

B-54

DataFlex

UTILITIES

DATAFLEX

2.0 User's

Manual

in numerical order.
This screen will display all menus now existing
pressing the NEXT
If there are more than five menus on the drive.
RECord
Pressing the
Flex-key will display the next five menus.
Each menu
RECord
PREVious
is
Flex-key will display the previous five.
and the menu number
displayed
actually a record in the MENU database,
According1µ the number of a given
Is the record number for the menu.
be changed.
a RETURN
a new menu is desirech entering
menu may not
If
should
To delete a lTléñLb the menu
will begin creation of a new menu.
RECord
and the DELete
be selected for editing
function key pressed.
Entering the number of an existing menu will move execution to the
next screem with data filled into the blanks for the menu you
selected.
EDITING

EXISTING

This is the

menu

MENUS

configuration

screen:
MENU CONFIGURATION

MENU SYSTEM

DATAFLEX

MENU NUMBER:

HEADERI:
HEADER2:

_.

DEFAULT

MENU:

_

ACTION

PROMPT

.

(on

return)
PASSWORD

l.

2.
3.
4.
5.
6.

7.
8.
9.
(N)ew

(Q)uestions

(H)eader
(D)e1ete

Menu

(I)nsert

(C)hange

{HEI-P IS
AVAILABLE}

(S)ave

(P)rint
(A)ppend

e(X)it

_
— —

of
first
record for existing menu
"PROMPTS"
are
the actual on-screen prompts
describing what the menu choices are.

are in the
displayed under the word
displayed to the operator

displays whatever
choices. The column

column

The

windows

prompts

which
passed
are
displays the comands
to the
in the
selection of the choice. As "ACTIONS"
system
execute
second
any of the systm
will
the menu
ccmmands
described in the section of this manual on Manipulating Files
of the
except RUNPROGRAM.
It will also execute another menu by entry
Sub-menus
word
"MENU"
are
followed by the number of the desired menu.
by use of this comand.
executed
Entry of the OAIN comnand followed
by a rootname
any
in this window will cause the menu system to execute
that name.
configuration having
existing DataF7ex
The

second

column

operating

system
upon
afjovEb
column

~~

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex

User's

2.0

DATAFLEX

Manual

third column displays a password
choices from unauthorized access.

MENUDER

MENUDEF

used.

Whoever

in the

system.

be

itself

must

has

Since

if

password

MENUDEF

to

access

protect the menu
are
displayed by
passwords
protected
are
access
to all the passwords
any)
to
passwords

(if

The

B-55

UTILITIES

has

blank at the lower
in the single-character
cursor initializes
screen
will clear
corner of the screen. If "N" is enterecb the
and then
of menus) for selection
redisplay the previous screen
(list
of an unused number under which to create a new menu.
The

right

The
would

choice will
like to insert

"I"

query

as

a menu

number

to the choice
choice.

which

before

you

"H" choice will
at the top of the
place the cursor into the blanks
The header
includes
screen, where the menu header may be modified.
definition
of the "Default Menu'b which is the number of the menu
(RETURN)
should
be executed
which
is
in the event that a null response
given
to the choice query. Typically, the default menu will be the
need
which
not
menu from
the menu being defined was called, but
which
méñlb
typically
necessarily bep especially for the master
defaults to itself.
The

it

The

"D"

de1eteg

choice
and

do

will

which

ask

upon

so

menu

number

choice

entry of the

you

would

like to

number.

"Q" choice will
temporarily and display the
exit the screen
questions for the menu on another screen, which will be shown and
which
el
Questions
below.
discussed
are
operator prompts
icit further
input from the operator relevant to the choice which was made, such as
RETURN when the printer
"Press
is turned on and loaded".
The

The

"C"

change,
changes
The

very

choice will
and

place

may

be

"P"
choice
handy
for

which
line of the menu you would like to
cursor in the blanks for that choice so that

query
the

made.

which
will permit printing of the menu definition,
occasional off-line
reference to the structure of

is
a

menu.

the cursor on the next blank choice line for
"A" choice places
entry of an additional choice at the bottom of the menu.
The

The
menu

and writing
"S" choice causes an exit of the screen
permanent).
changes
to disk (making the entered

The "X"
choice causes
YOUR áiANGES?
YIN"

the question to
to

Definition system
called will appear.
Menu

OPERATOR
Questions

Once

appear.

will

be

left,

appear:

"BEFORE

this question is
and the menu from

the

of the edited
YOU EXIT,
answered,
which

it

SAVE

the
was

QUESTIONS
can

be

asked

the action of the

Copyright (c)

1984

menu,

Data

of the operatoi"»
by the inclusion

Access

included in
the responses
of the characters $L where

and

Corporation

05/

16/84

DATAFLEX

B-56

DataF1ex

UTILITIES
=

===—~———

User's Manual
——————

2.0

the dollar sigm and the seconcb
the first character is explicitly
the
represented by the # sign, is a digit l through 6p identifying
question number matching
the question defined for the menu on the
below:
shown
question screen
DATAFLEX

MENU

QUESTIONS

SYSTEM

————————
EXPLANATION:
QUESTION

l

:

EXPLANATION:
QUESTION

2

:

EXPLANATION:
QUESTION

3

:

EXPLANATION:
QUESTION

4

:

EXPLANATION:
QUESTION

5

:

EXPLANATION:
QUESTION

6

:

prompt
for each
Enter the screen
section of the other screen, or

question referenced in the
to return.

ACTION

ESCAPE

support only six questioñs» but each defined question
Each
menu.
many times as desired throughout the
defined question will display up to two lines to the operator,
neede&
for an introductory explanation and the 'Following actual
The
question.
cursor initializes in the sIngle-character blank in the
lower right of the screen. Entry of a number for which a question
already exists will place the cursor in the blanks for that question
for editing of the data in the blanks. Entry of a number for which
there is no question will place the cursor in the blanks for that
number
for entry of new data. Data for a question may be deleted with
the field delete keyg but there is no reason to delete such data until
Actual de7etion of a
the number is needed for another question.
question consists of removing
references to its number from the action
windows
of the Menu Configuration Menu.
Each

may

menu will
be asked
as

if

Each menu supports only nfne choices, so that selection
may be made by
display easy
the entry of a sIngle character, and to keep each screen
may nonetheless be
for the operator to scan.
Extensive menu systems
constructed by thoughtful arrangement
of sub-menus
of related groups
of functions called from a main menu.

~~~~~
Copyright

(C)

~

1984

~ ~~
Data

Access

Corporation

~
~~
_——
—
———————————————————————————

05/16/84

"

~

C~l
~ ~~—
~~~~~~~~———~~~—
~—~~~———~——————————————————=."———~—~—=———————
_ _ _ _ _ _ _ _ _ _ ~~ ~ ~
==========
ELEMENTS OF CONFIGURATIONS
ZZZZZ±FZZZ

~~~

~————
==========
=====:
==""=__

=:=

—————————
==========

======.===—
~

=

which
be
(see
can
Definitions)
several types of arguments
These
by a DataFlex command.
serve
the purpose
of enabling
the manipulation of various types of information both 1itera1iy and
symbo): ica1ly.
Arguments
are
established by DataFlex connands,
file
and are
or various forms
of delimiterm
structure definitions
symbols.
by
identified

There

are

acted

upon

are
declarative in
DataFlex commands which establish arguments
i.e. they provide no action other than establishing the
These
cormands
are
treated separately in the chapter on
variable.
There
Commands".
is a Definition command for each of the
"Definition
argument
typem which are listed below:
The

nature?

ARGUMENT TYPES
STRING
NUMERIC
DATE
INTEGER
INDICATOR
Most

arguments

both

have

a

type

and

one

of

the

classes listed

not

change.

below:

ARGUMENT CLASSES
CONSTANT
VARIABLE
DATA BASE

ELEMENT

WINDOW
CONSTANTS

is

a

are

numeric

explicit
constant;

data
values that do
12/12/83
is a date

For

examp1ep

3

constant.

VARIABLES
of a
represent data values that can change in the course
is maintained in the computer's memoryp
configuration's
execution.
It
A variable
and Is of a fixed length.
is "typed" as listed aboveg and
can contain only information
consistent with its type. If data is not
DataFlex will convert
to the
of the proper
type for a variab1ep
is MOVEd. (see MOVE comand) Variables in
proper type when
DataF1ex
are global in a conÉigurat1on.

it

it

smallest discrete addressable components
of
with the syntax
they are addressed
FILENAME
"FILENN4E.FIELDNAME"
where
is the DF_FILENAME
established for
and FIELDNAME
FILEDEF
is the
the data file in the DataFlex
Uti1itµ DataFlex
FILEDEF
TAG_NAME established
for the data field in the
DATABASE

the

ELEMENTS

database.

~~~
Copyright (c)

In

are
the
DataFlex

———————————————————————————————
1984

Data

Access

Corporation

05/16/84

C-2

ELEMENTS

Any
utility.
be addressed

OF CONFIGURATIONS

database
from

can

DataFlex

element

e>isting
configuration.

any

on

any

2.0

User's

Manual

addressable disk drive

EXAMPLES:
DF_FILENAME.TAG_NAME
INVENTORY.QTY_IN_ST0CK
WINDOWS are
typed
They
addressed
are

and
by

images.
formatted positions in DataFlex screen
reference to the name of the PAGE of which they
and their
The
are
a component.
sequential position in that page.
from
sequence
is established by numbering
the windows
to
rightp
left
in the PAGE;
top to bottom
i.e. the top leftmost window is number l.
The number
is combined
with the name of the PAGE in the following
format: PAGENAME.# where
is the sequential number of the window in
Symbolic
be created for windows
names
can
the page.
with the NAME

"r

command.

STRING

CONSTANTS

A

text string constant is a literal representation of a group of
"as
printable characters that is handled
is" by the command processor.
string is defined to the DataFlex command processor by enclosing
the group of characters in single ('stringñ or double
("string")
The form
quotation marks as delimiters.
of the quotation mark
selected to start the delineation of the text string must also be used
as the marker
for the close of the string.
This is done to allow the
use of either
of the text string delimiters within a string.
The

EXAMPLES:

'text

string'

"Tom's

file"

"computer" 'Press  to exit...
'In case of fire, yell "HELP"!'

'

Care
must
be taken
to use the correct combination of
ending
quotation marks with strings that contain the
For
example,
the string
can't gol' would be
as

fÍ

STRING

card.

'I

"I cáñ¶t go!",

however,

would

be

beginning and
alternate form.
interpreted by DataFlex
interpreted correctly.

VARIABLES

A

string variable is a name which you designate to represent a string
of characters which will have a consistent meaning
(but with contents
"CUST0MER_NAME").
that vary) throughout your application (for examp1e9
The variable
be declared (using the STRING
name must
commandL
and
its
length efther specified in the command or not specified, in which case
The string
defaults to 80 characters.
variable must be declared
before
is used.
After declaration, the string variable can be
by name throughout a configuration.
referenced or accessed
Variable
must
begin
names may be up to 80 characters
in 1engtM
with a 1etter9
and may not contain a space.

it

it

If

you don't specify your
four characters ("Bill"k
characters long (with 76

Copyright (c)

variable's length. but the contents are only
DataFlex will still handle
as 80
So for variables
spaces,
in this case!).

it

——————
1984

Data

Access

Corporation

07/18/84

DataFlex

2.0

User's

ELEMENTS

Manual

C-3

OF CONFIGURATIONS
—————————————

———————
—

with short contents, you can save a great deal of memory space by
below). String
defining your variables as short ones (see examples
variab7es can have more than 80 characters in them tocb if they're
defined to. They may have up to 255 characters in them,
if needed.
be 1argeg
remember,
But
even
variables defined as large will always
when their
characters if it
contents are short.
"Bill" would be as255having
length 255.
were
the contents of a string variable defined
The

format for declaring

command

STRING

var1ab1e_name

STRING
STRING

flag

STRING
STRING

an_input

a

variable

string

Is:

lengtM

{string

EXAMPLES:

l

response

IQ

lOó
my_entry
strings "FLAG'4

The

"RESPONSE",

"AN

INPUT"

"MY

and

ENTRY"

are

declared for a DataFlex configuration by the above commands.
"FLAG"
a length of one
(I) character,
is defined as having
"RESPONSE"
is defined to eighty (BO) characters by default,
"AN INPUT"
since length isn't specified in its command,
is
is
defined to a length of ten (IQ) characters, and "MY_ENTRY"
(lOó)
hundred
characters.
defined to a length of one
NUMERIC

CONSTANTS

specific

sing1eg

Numeric

constants are
expressions or' other

forms

of

numeric

numeric
arguments.

values that are

used

in

EXAMPLES:
234
l(diameter*3.l4)

the first
that can be
On

second
used

100000
lOó
(FICA_WAGES*13.7)

1ine»
example
used
wherever
1inep

example

the

-50

10.52

numbers
the
six numbers are simply that:
On the
and however
useful or necessary.
constants
values 3.14 and 13.7 are numeric

in expressions.
VARIABLES

NUMERIC

variable is a named symbolic representation of a number that
as the subject of a DataFlex commandG
execution or
The numeric
variable must be declared before
expression evaluation.
by
can be referenced or accessed
After declaration,
is used.
Only
numbers
may be stored in a
name throughout a configuration.
numeric
variable.
A numeric

can

be

used

it

it

Mu1tlp1e

definition

numeric

line.

Copyright (c)

variable arguments
The variable
names

1984

Data

Access

be defined on
can
be separated
must

Corporation

a

single
by

spaces.

07/18/84

DataFlex 2.0 User's

OF CONFIGURATIONS

ELEMENTS

C-4

=

_____=~

_

~~

Manual

————————————

FORMAT:
NLNBER

varlab1e_name2

varfab1e_namel

...

variab1e_namen

EXAMPLES:
N%ER
quantity
NUMBER amount_due
NUIE)ER

area_code

credtt

range
of values for
- 99,999,999,999,999.9999

a11owab1e

The
+ or

phone_number

phone_exchange

variables

numeric

in DataFlex is:

EXPRESSIONS

that are evaluated
type arguments
Arithmetic expressions are numeric
by DataFjex comnands.
acted
upon
Expressions ÁQjjQt have
as they are
They
are
into a variable.
to be evaluated first and then placed
autcmatical1y evaluated by the DataFlex comand
processor when
The result
encountered
of
during the execution of a configuration.
by the cormand.
the expression is then processed
of an expression
representation may be a component
valid numeric
varfab1esg
numeric
ehments in
including: numeric
constant5p numeric
as filename.fieldnameb
date variables or
the data base (addressed
by an operator and stored in a data
data
Input from the keyboard
Any

window.
The

to

used
are
following symbols
to fnstruct
the expression evaluation:

the

comand

processor

how

perform

ADDITION
SUBTRACTION

"
*

MULTIPLICATION
DIVISION
RETURN GREATER THAN
RETURN LESS THAN
PARENTHESES'

/>
<
(

...

)

However,
the
four operators above are se7f-exp1anatory.
Two numeric
expressfon operators require some explanation.
arguments
upon
the
are supplied to these operators* and depending
be
symbol
selected, the greater or lesser of the arguments
will
example:
For
returned.
In 3>59 5 will be returned; in 3<5, 3 will be
No modification
is made to the data. These evaluations only
returned.
make selections,

The

last

first
two

which
arguments
Expressions are formatted by enclosing the numeric
in parentheses. The DataFlex
up the expressiom with operatorm

make

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

2.0

DataF1ex

User's

ELEMENTS

Manual

OF CONFIGURATIONS

—

—

—————————————

——————

C-5

and evaluates the
processor recognizes the parentheses
expressiom making the result available for command processing just
used
in place of the expression.
a constant had been

command

as

if

EXAMPLES:

(argl + arg2)
(argl
- arg2)
(argl * arg2)
(argl / arg2)

(balance + sale)
payment)
(balance
(quantity " value)
(principal / months)

are
supported to control the sequence
Multiple levels of parentheses
In an expression that
of the arithmetic evaluation of the expression.
the portion of the expression contained
contains multiple parenthesesg
pair of parentheses
in the innermost
will be evaluated first.
EXAMPLE:
qty_on_hand))
(un1t_cost)*(reorder_qty
- would be
UNIT_C0ST
multiplied by the
this example,
because
RE0RDER_QTY
and QTY_0N_HAND
the
difference between
the
difference is enclosed in parentheses. WIthout
parentheses, UNIT_C0ST would first be multiplied by
RE0RDER_QTY,
and QTY_CN_HAND
subtracted from the product, a
mean'ingless
result.
In

Without
DATE
NOTE:

parentheses

In

an

expression, evaluation

Is

left

to rfght.

VARIABLES

supports two date formats in different versions of the
formats are MM/DD/YY and DD/MM/YY.
product. The two supported
For
the.
We refer to the latter
as the "Euro-date" format.
we will refer to formatted dates
purposes
of this documentation
though
accept
even
Euro-date versions of DataFlex
as MM/DD/YY,
and return dates
of DD/MM/YY.
the
format
in
DataF1ex

The displayed
in Julian form as numbers.
are
stored in DataFlex
and reports
in screens
printed date format MM/DD/YY which appears
storage format. A date
representation of the numeric
is a de-coded
variable can be defined to manipulate date information within a
command.
Multiple date
configuration by using the DATE definition
definition
line.
variables can be defined on a single argument
Dates
and

data
value.
stored in the date variable is a Julian numeric
Therefore, any operation requiring calculations on dates can be
executed
directly by reference to the variable without the necessity
and reportm
for type conversion. When dates are output to screens
routines which are flagged by the data type of the
internal DataF1ex
automatically into the MM/DD/YY format.
variable decode
The

it

..——

Copyright

(C)

1984

Data

Access

Corporation

07/18/84

DataFlex

OF CONFIGURATIONS

ELEMENTS

C-6

2.0

User's

Manual

FORMAT:
DATE

date_variab1el

..

date_variable9

.

EXAMPLES :
DATE
DATE

DATE

due

today tomorrow yesterday

invo1ce_due

CONSTANTS

Date
constants (expressed
DataF1ex
comands, but
can

be

placed

use

in

date

in date
variab7es.

as

MM/DD/YY)

can

they cannot be used
variables using the

be

used

within
DataF1ex

as the subject of
expressions. They
"MOVE"
comand
for

EXAMPL ES :
LEGAL

DATE BIRTHDAY
MOVE 01/16146

--

LEGAL

DATE

--

TO BIRTHDAY

BIRTHDAY

MOVE 01/16/46 TO BIRTHDAY
CALCULATE
(BIRTHDAY
+ 365)

(01/01/83

TI I FGM

--

CAL(JJLATE

LEGAL

—

DATE DATE_S0LD
MOVE 01/01183
cALájLATE

TO

IQ)

+

TO NEXTJ3IRTHDAY
INVOICE.DUE

TO DATE-SOLD

(DATE-SOLD

+

IQ)

TO

INVOICE.DUE

FILENAMES
data
base
filenames" of DataF1ex
files can be used as connand
be
must
Valid "df_ filenames" that can be used as arguments
established with the DataFlex FILEDEF utility (see the section of this
manual
on File Definition
for a discussion of the df_ filename
conventi ons) .
The "df_
arguments.

FORMAT:

df_ filename
"df_ filename" in the format

OPEN

OPEN

coman

d

example

is

an

argument

for the

.

———————

Copyright (c)

1984

Data

Access

Corporaticm

05/16/84

2.0

DataF1ex

ELEMENTS

Manual

User's

OF CONFIGURATIONS

C-7

EXAMPLE:
OPEN
CLOSE

Inventory
customer

The symbolic names
as
can be used
in a database
of individual elements
A spécif'ko
arguments
formatted
for a variety of DataFlex commands.
which
composed
are
of
syntax is provided to represent these arguments.

the filename

and

fieldname of the data

base

element:

FORMAT:
FILENAME.FIELDNAME
EXAMPLES:

fnventory.description
custcimer.current_ba1ance
custcmer.credlt_11m1t
INDICATORS

with the
indicator is established by issuing an INDICATOR comand
of the comnand.
takes on the
indicator name as the argument
It
characteristics
of a "flag" which is tested by the configuration to
The
determine
whether
a connand
line or group is to be executed.
does
not
INDICATOR
comand
"set"
only establishes an indicator;
to a status.
An

it

it

FORMAT:
INDICATOR

1ndfcator_argl

INDICATOR

pass

ind1cator_arg9

...

EXAMPLES:

See

the chapter

on

fall

new

INDICATORs

————————————————
Copyright (c) 1984 Data

Access

old

for

change

more

information.

Corporation

05/16/84

C-8

ELEMENTS

—— —————————
1984

Copyright (c)

OF CONFIGURATIONS

THIS

PAGE

Data

Access

INTENTIONALLY

Corporation

DataFlex 2.0 User's

LEFT

Manual

BLANK

05/16/84

=============="""""":
"""""""":"""""""""""""::"::7"""
=~"~==~===,~

="=""""""""""""""""""""""
=""=======
======="==

""""""

DEa-ARINg

DATA

ELEMENTS

———
==========

C"9

"

""""
==========

::::Z ~ -- ~~

———————
——————

There

five DataFlex Definition

are

Commands:

STRING
NUI¶3ER
DATE
INTEGER
INDICATOR
a means
of identifying
serve to provide the configurator with Once
identified,
the
typed variables to the DataFlex compiler.
used
be
can
variable argument
at will throughout the configuration.
which
must
precede
The definition
comnand
establishes a variable
the
first use of the variable in a given configuration.
They

FORMAT:
COMMAND var1ab1e_arg
EXAMPLE:
STRING

keyboard_1nput

comands
three definition
support the three data types which
defined in a DataFlex file structure: ASCII strings, numbers
(stored as packed BCD), and dates (Julian - stored as packed BCD
numbers).
In the case
up to nine
of the NUMERIC and DATE connands9
(9)
line.
variables can be defined on a single comand

The
can

first
be

STRING

Command

maximum
a default
If the maximum string length is not spéc1f"fédo
by DataFlex.
Use of defined
length of 80 characters is assigned
therefore,
string space is not dynamically allocated in memory;
conserve
memory
can
utilization.
significantly
length specification
The
Strings consume their defined length plus 2 bytes in memory.
is from I to 255
allowable range for string length specification
characters.
FORMAT:
STRING

Copyright

(C)

variab1e_name

1984

Data

Access

{string

length}

Corporation

05/16/84

DataFlex

ELEMENTS

DATA

DECLARING

C-lO

2.0

User's

Manual

EXAMPLES:
STRING
STRING

flag I
response
my_entry

lOó

STRING
The string

variables HÁG$ RESPONSE, and MY_EN1RY are declared
FLAG is
DataFlex
a
configuration by the above commands.
for
defined to one (I) character. RESPONSE is defined to eighty
(BO)
characters by default, and MY_ENTRY is defined to a
(LOO)
characters.
length of one hundred

If entry is subsequently made to
declared length of the variable,

a string
variable
excess
input

which

will

be

exceeds

the

discardecb

such

as:
STRING
code
MOVE "ABCDE"

3
TO code

will not contain ABCDE.
It will contain only the first
characters, ABC. No error will be declared unless one is
provided for the condition in the configuration.
CODE

NUMBER

3

Command

Multiple
definition

numeric

line.

variable arguments
The variable
names

be defined on a single
can
must
be separated by spaces.

FORMAT:
NUMBER

variab1e_namel

NUMBER
NUMBER

amount_due

NIM3ER

area_code

variab7e_name2

variab1e_namen

...

EXAMPLES:

quantity
credit
phone_number

phone_exchange

and has a value of zero
10 bytes of memoryp
variable consumes
m«nory
for
there is sufficient
automatically when
is declared.
If
can manage
up to 32g767
active NUMBER variables
storing them DataF1ex
in DataFlex is:
at one time. The range of numbers
+ or
- 99,999.999.99%999.9999
A NUMBER

it

DATE

Command

date variable

Mu1tip1e

arguments

can

be

defined

line.
FORMAT:
DATE

date_argl

DATE
DATE

due_date

...

date_argn

EXAMPLES:

invo1ce_date
ffrst_reminder

=,=~~———~~————~—""
(C)
1984

Copyright

Data

=
Access

on

a

single

"

comand

second_reminder

Corporation

"""""

05/16/84

DataFlex

2.0

User's

DECLARING

Manual

DATA

ELEMENTS

_—— —————
INTEGER

C-ll
————.

Command

INTEGER
command
allows the creation of a memory variable to
contain an integer value. It differs from the NUMERIC variable in
anch
for storagep
less mmory
of
that the INTEGER variable consimes
accuracy
in calculations.
course, does not support fractional
However,
the greatest value of integers in corifigurations is when they
used
are
for counters, in FOR 1oopsp and with the INCREMENT command.
Some pre-defined
integers provide access to DataFlex systan variables
(e.g. ERRLINE = the last error line).
The

available for Integers is plus or
all
storage type in the data base;
(BCD).
as binary.coded decimals
In memoryg
ID bytesp
element
constnes
while an INTEGER
2 bytes.

The
range
INTEGER

minus
327767.
There
is no
numbers
are
stored on disk
however,
a NUMBER data
data

element

occupies only

FORMAT:
INTEGER

argumentl

INTEGER

my_age
qty_so1d

...

argumentN

EXAMPLES:

INTEGER

qty_returned

qty_shipped

Integer variables are stored in an internal array in the order in
CHAIN
connand
is execute6
they are declared. When the DataF1ex
This provides the facility to
the integer array is jiQt reinitialized.
pass
integer values from one configuration to another without writing
the values to a file.

which

integer array is sequentially allocated as the variables
is desired to pass integer values in
we suggest
that the same integer names be
declared at the beginning of each configuration to provide for a
When integer values
are
not
consistency in variable referencing.
be initialized
passed
between
before use.
configurations,
they should
The

internal

are
declared. Thereforeg
QiAINed
configurations,

if it

EXAMPLE:
MOVE O TO sheep_counter

//

inlt1alize

sheep_counter

————————————————

Copyright (c)

1984

Data

Access

Corporation

05/16/84

C-12

DECLARING

DATA

DataF7ex

ELEMENTS

——

INDICATOR

2.0 User's

Manual

————

Command

The INDICATOR
which
argument
The INDICATOR

command
defines a special type of DataFlex
definition
control.
is used for conditional processing and program
comíand
creates an "Indicator".

the argument
of the INDICATOR
is tested by
of a "flag" which
a cormand
line or group is to
the configuration to determine whether
be executed.
Indicators are discussed fully in the section on
"Conditional Execution".
The named
indicator established as
command
takes on the characteristics

FORMAT:
INDICATOR

Copyright (c)

1984

ind1cator_arg

Data

Access

Corporation

05/16/84

==—————~—————~

C"l3

""""""""""===—————

—— —
—————

~~~~
——————————
——————————
==========

MANIFULATING

DATA

ELEKNTS

=========~~~—————————————————————————
— ———————————

==========

=

———————————
MOVE Command

provides the facility to "transport" data throughout a DataFlex
for the type or location of the source
application without regard
or
window
Data
can be MOVEd from
to window»
destination arguments.
element
window
to windowp
to e1%entp
to data base "e1ment"» element
etc.p etc. Where expressions are
expression to window or e1emeñt»
they will be automatica1ly evaluated with
part of the MOVE connandp
Further. any
the result being MOVEd to the destination argument.
automatically.
required type conversions will also be executed

MOVE

FORMAT:
TO

dest1nat1on_var

MOVE

source_var

MOVE

"DataFlex" TO str1ng_arg
06/01/83 TO date_arg
TO invt.qty
(invt.qty
- qty_ordered)
screen.date TO lnvo1ce_date
// then...
(invoice_date + 30) TO invoice.due

EXAMPLES:

MOVE
MOVE
MOVE
MOVE

MOVE command
decodes
the type of the destination variable and
internally
generates one of the fOllowing types of move commands for
the comnand processor:

The

MOVENUM
MOVEINT
MOVESTR

for numbers
for integers
for strings

While
the source may be
Neither variable may be a label or indicator.
The
numbem
may
variable
destination
a literal string
the
not be.
or
MOVE command
will not update accumulators in the SUBTOTAL section of
command
See the PRINT
for this purpose.
the REPORT macro.

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DATA

MANIPULATING

C-14

INCREMENT

2.0

User's

Manual

Command

comand

INCREMENT

The

DataFlex

ELEMENTS

counter for loops
indicators may not
integer I.

operates on
repetitive
used
in this

and

a

be

integer variable, and is used as
1abelm and
Literals,
operations.
command.
only by the
incrwents
It

an

FORMAT:
INCREMENT

comnand

This

MOVE

...but

fnteger_var

is equivalent

to:

('lnteger_var

I)

+

TO

integer_var

in operation.

is faster

——————
CALCULATE

Command

the
using the
argument
CALCULATE
is of
if the destination
MOVE
connand
numeric
use
instead.
you
the
the
type. If
are not sure,
MOVE can
also evaluate expressions.
CALCULATE

The

result

An

to

is

comnand

used

an expression and
numeric
type. When

to evaluate

a destination
variable of the
comand
you must
determine

abbreviation of the CALCULATE
with the full comnand

commanch

"CALC"

can

be

used

move

inter-

word.

changeably

FORMAT:
CALC{ULATE}

expressfon_arg

TO

destinat1on_var

TO

invo1ce.date_due

EXAMPLES:
CALWLATE
CALC
CALC

(12+6)

TO g_tota1

(date_ord+cust.tems)
(3.14*66.4) TO area

not be a label. indicatorp constantg or
The
integer9 numer1cg
or date variable.
It
SUBTOTAL
update
CALCULATE
comnand
section
accumulators in the
will not
See the PRINT
command
for this purpose.
of the REPORT macro.
The

ASCII

destination
variable.

Copyright

(C)

variable
may

may

be

an

—————-.————
Access
1984 Data

Corporation

05/16/84

CR 5

~ ~—~~—_~———~—__~======"="="=====

==-==: ::

DATA

"=""======

——~—

=-EFE=-==-

ENTRY

——~~———~——~~———~=======

—~ —~ ————

—————
——————
————————————
———
and
Application requirements for data entryp file maintenance
file
met by the DataFlex ENTER command
macro.
inquiry, are efficiently
data
ENTER provides a complete program
skeleton for
entry using IMAGE
The ENTER macro
can handle multi pIe rel a'ted
formats and Flex-keys.
f11esp
transaction creation and online
fileThereupdateare proceduresp
user-defined procedures for specific operations so
editing.
procedures
and
auxiliary update
error
the user can set up whatever
trapping may be required.

skeletons, they can only
macros
are stand-alone program
Specl
a configuration.
ic connand
statements are used
around
the command macros to provide functions to
a variety
of requi rements.

connand
Since
be used
once

within

and
accommodate
The
group

which
comand
is in fact an entire
invokes the ENTER macro,
of processing routines that perform the following functions:

ENTER

l.

ENTER data
via
type checking,

2.

CREATE

with validation,
error trapping.

images,
and

screen

checking

range

FIND

4.

EDIT

.

6.

records in the

data

and

imagep

screen

data
on
in the data base by key field and display
the formatted CRT "image". Single records or multiple
related records can be "found" with a single key stroke.
scannéd»
Data
be inspected,
"edited, deleted.
can then

3.

5

CRT

base
with data entered through
update
related data
in the process»
base
records, key iMéxésó etc.» all without having to
for such activities.
create routines and procedures

the

~

f

in

it

existing records in the
related data
properly update
etc. without custom routines
DELETE

requi
CLEAR

records
red

the
on-line.

from

updates

displayed

data

from

data

data
base
and

and in the
process,
records, key indexesD
procedures.

base

the

screen

base

while processing

all

image.

~

————
Copyright (c)

1984

Data

Access

Corporation

05/

16/84

C-16

DATA

DataFlex

ENTRY

2.0

User's

Manual

=="·="'="'=
The

operation of the

ENTER

command

with have previously
fijes dealt AUTODEF
FILEDEF
or
utilities.

assumes
macro
that the database
been
defined with the DataFlex

can be displayed with
Mu1tipie records from different database
files
by the ENTER macro.
However.
and f1exibi11ty
ease
the structure of
that only one record from
the ENTER comnand does impose the limitation
a given data
Íile may be displayed on the screen at one time. It will
Connot, for example,
support a multi-item format like an invoice.
be "programmed"
withfigurations requiring mu1ti-1ine formats should
The ENTERGROUP comand
is useful In
out the use of the ENTER macro.
See the INVOICE.FRM
formatting.
applications requiring multi-line
demo
file for an example of a programmed mu1ti-1ine (non-ENTER)
configuration.

specific command structure is used with the ENTER macrog and there
designed
comnands
to control the formatting
a series of optional
image.
of the screen
actions which occur within the data windows
Configuration examples
at the end of this chapter can serve as a
useful guide during the discussion of these coimands.
A

are
and

————————————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex

ENTER

User's

2.0

DATA

Manual

STRUCTURE:

CONFIGURATION

IMAGE

//
lpagenamel

---- first

image

of

page

following

image

of

pages

l*
PRE-

//

//

ENTER

ENTER

ENTER

EN7RY
ENTRY
ENTRY

--// end

...
field

{window}

....

.....
{options}
//

RETURN
OPTIONAL

---

commands

--RETURN

----

OPTIONAL

ENTER

COMMAND

="="

----

_______"___

ENTRY

for

each

required at

end

of

//one

USER-DEFINED

ENTEREND

//

""-and

all

AUTOPAGE required only for
second
and following
screens

{windjw} {options}

RETURN
ENTER.EXIT:

images

section

image

of

SECTION

field

ENTER.SAVE:
cormands

multiple

start ENTER mini program
declare related files In order:
"senior" to "junior"

//
//

page

//

have

COMMAND SECTION

//
//
//
ENTRY

=
AUTOPAGE

can

MACRO USING

fi1e2

filel

//

//

----------section

image

open

INVOKE

"""___"____

//

start

files
//
used
and
any variables
// initialize
window
formatting commands
give
//

f11el
f1le2

OPEN
OPEN

SECTION

---

/pagename2

----

C-17

ENTRY

ENTRY

PROCEDURES

//
//
//
//
//
//

save
save
end

procedure
procedure

end

of exit

//

End

of

section

------comnands

procedure
save
procedure
comands
procedure

of

exit
exit

POST-ENTRY

window

procedure

ENTER

PROCESSING

mini

program

====-

-

Image
Section. Pre-Enter Commands. Enter Command
sections:
and Post-Entry Processing
Line, Entry Sectiom User-Oefined Procedures
above
The section markers
shown
are
for instrucare
discussed below.
tive purposes
only. They are not required in actual configurations.
The

above

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

C-18

DATA

ENTER

IMAGE

DataF1ex

ENTRY

2.0

User's

Manual

SECTION:

IMAGE SECTION
start with one
using ENTER should
in a configuration
These
images
in the blanks" forms for the operator.
or more
for the fi1e(s) used in the
will be a window into the database
be used
The same images
can
for all file maintenance
configuration.
should
image
form
The
contain
functions and will use the Flex-keys.
that
prompting to inform the operator on the contents of the windows
Each
with a
page
of the image must be preceded
are displayed.
pagename
("l" followed by the name of the page). Help screens may be
included in the Image section (see the HELP comand). The image
section of the configuration is terminated with a "l*".
The

"fill

ENTER

PRE-ENTER

SECTION:

In the PRE-ENTER
ENTER macro
must

all

section,
be

OPENed.

the section on "Manipulating
required to ready the system
included here.
ENTER

of the
The

OPEN

will be used by the
is further described in
comands
Any other DataFlex
be
should
entry session

that
files
command

Records".
for a data

COMMAND LINE:

specify all of the database
files that the
The files
listed on this
during execution.
(when
SAVEd and CLEARed
the operator
line will be

in the last window of an
presses
the SAVE Flex-key or presses
image)
Other
files that are open may still be used within the ENTER
.
macro
is required to SAVE and CLEAR any such file, those
but if
FINIh
actions must be written into the configuration expiicltiy.
RELATE and DISPLAY
operations on records from such non-ENTER files
will still be performed automatically.
The

ENTER

ENTER

macro

COMMAND LINE

must

will

access
automat1ca11y

it

SEQUENCE in which
the files on the ENTER command line are declared
The "main" fi1ep the one on which
the primary file
is significant.
maintenance
is being done, MUST be the first file in the list in a
Any
right sequence.
file
file whichmain fs relatedand TOanyby the main
left to
TO which
be declared to the right
must
of the
file
file,
should
be listed
that file relates
next. This will put the files in
order with relationships pointing to the right and is required to
ensure
is properly attached to the
that when a record is SAVEd
that DELETIONS will
fi1e(s) to which
relates.
This also ensures
properly delete the relationships to the record(s) which are DELETEd.
The

it

it

explains relationships among database
chapter on "File Definition"
example
in that chapter. an ENTER comand
Following
the
given
files.
line for the Sales Transactions file would read "ENTER TRANSACTION
PARTS CUSTOMER",
and the PARTS and CUSTOMER database
files would be
updated
through entries made into the TRANSACTION mal n database
file
and changes
in both).
(including new PARTS, new ajsToMERs?

The
.

Copyright (c)

1984

Data

Access

Corporation

05/16184

DataFlex 2.0 User's

ENTER

ENTRY

DATA

Manual

C-19

ENTRY

SECTION:

interface with the data entry operis the primary
connect
the
of the entry section is to logically
elements
data
base
This is done
in the image.
with the data windows
handles
The ENTRY command
the display of
with the ENTRY command.
data, finding records, moving data into the record buffer and clearing
When each
of the above operations is executed. the
the windows.
for ENTRY comands. One or more
entire entry section is scanned
line to provide formatting
options can be placed on each ENTRY cormand
for the data controlled by the command.
The

ator.

ENTRY SECTION
The object

command
command
in that
differs from any other DataF1ex
in any
functions and that they can be executed
several different
window
FIND
used
EXAMPLE:
sequence.
Flex-key is
in a
the
If
controlled by an ENTRY command, all of the ENTRY commands are scanned.
If the FIND is successfub EVERY data element in that file for which
there is an ENTRY command will display its contents in its data

The
has

it

ENTRY

window.
GOTOs,
(INDICATORs,
commands
etc.) can be included in the ENTRY
of operation or set conditional
section to control the sequence
When
should
be avoided
SAVE commands
in the ENTRY section.
entries.
data
is put into a data window with the ENTRY command, the data is
window;
JUST in the data
record buffer until
isn't moved into the
The CLEAR Flex-key will
controlled by
clear windows
a SAVE is done.
DISPLAY
(see
by
commands
those
ENTRY commands,
controlled
but not
section on Di rect Control of Data Entry for DISPLAY command).
Other

it

The

format of the
ENTRY
where

file

ENTRY

cormand

is

as

follows:

wIndow
{options}
element
"fi1ename.fie1dname" Is any database
fields).
or an expression (for calculated
fl1ename.f1e1dname

this instance, the brackets {} are to be actually typed
in this
configuratiom
contrary to the notation elsewhere
brackets are used only to signify optional cormand e1«nents
reader of the manual.
Format
options for the ENTRY command are as follows:
In

POINTS

open

in the
manual

where

to the

{P0INTS=n}
where
"n" is the number of places to the
This can
point in the window.
right of the decimal
reformat a window or can be used to configure an
integer-only numeric
field by setting a value of zero
(O)
for "n".

— ————

——————
———

Copyright (c)

an

SJLNIU

F|INcTTnN
DECIMAL

in

1984

Data

Access

Corporation

05/16/84

DATA

C-20

DataFlex

ENTRY
=

~———

FIND

IF

Manual

index
Executes
on the main
of
a FIND EQuals
data elment on the EN7RY command line is a
part.
If the desired FIND is on a multi-segment
index, the AUTOFIND should be on the last entry
command
that make up the index, so
for the segments
has
been
entered
for FINDing
that all data necessary
Record
number
may
prior to execution of the AUTOFIND.
AUTOFINDing
data
which
the
not be part of the index of
Windows
element
for data from related
is a part.
will also be fi11e& provided there are ENTRY
files
connands
for those windows.
{AUTOFINCñ
which
the

AUTOFIND*

SKIP

User's

2.0

~——~——————

FOUND*

REQUIRED*

a record is
the window
the data in the wiñájwY
and move the
cursor to the next window.
If no such
record has been F0UNlj, leave cursor in window and
accept
operator input.
{SKIPFOUNCñ
FOUND with

Display

key

data

if

data
in
matching

Requires that an active record be in the
before the operator can pass this window in the
The
image.
in this window until a
cursor will rémaln
successful FIND Is completed. The BACKFIELD Flex-key
the FIND on
can move the cursor in reverse to execute
another window.
Pressing the CLEAR Flex-key will
return the cursor to the first wfndow on the image.
{FINDRECÜ

buffer

UPPER

CASE

REQUIRE

RANGE

ENTRY

CHECK

{CAPSLOCK)
Converts all lower
entered in the window to upper

alpha
case
case.

{RE(JLJJIRED}

moved

data

been

The
cursor cannnot be
entry window until data has
current window.

characters

to the next
entered into the

= #L iC2} {RANGE.=
nn/ddlyy. m/dd/yy} Provides
automatic check of entered data and declares an
window
the date
error and returns the cursor to the
or numeric
value entered does not fall within the
specifications
in the comand. The first value is the
and the second
low
end of the rangep
is the high end.
and lower values in the comand
The upper
are
included
Literal numbers and dates can
within the valid range.
be used.
Variables may not be used.
{RANGE

an

if

VALIDITY

MECK

{mECK="entryl|entry2|entryn"}{MECK=string_var}
Provides an automatic check of entered data and
declares an error and returns the cursor to the window
if the entry does not match any substring in the aiux
comand. Where an eligible entry has fewer characters
than the window9 the excess characters must be speciThe vertical
bars
below
(shown
as 16).
fied as spaces
optional delimiters.
(I) shown below are recomended
be characters unlikely
to
De1imitersp if úSéd,r should
The connand
be input erroneously by operators.
may
in-memory
alternatively
reference a previously-defined
element):
string variable (not a window or database
{MEa(="YEslNoBlYBBlNBB"}

"

"————————————————————
05/16/84
Corporation
Copyright (c)
1984

Data

Access

User's

2.0

DataFlex

ENTRY

C-21

to the record
Puts data in the windows
changed
been
any data has
regardless of whether
Norma11yg
from
a put will
displayed.
that originally
not occur unless some data has been changed.
{FORCEPUT}

PUT

FORCE

DATA

Manual

buffer

DO NOT PUT

DATA

being

changed

from
{NOENTER}
Data
the found record is displayech but
preventing entry.
the cursor skips the wiñdowo
NOENTER skips the window
no record is found,
even
unlike SKIPFOUND (see above).

ENTRY

NO DATA

into the

from
{NOPUT}
Do not put data
the window
This protects data from
record buffer.
by the operator.

if

Combination
of NOFUT and NOENTER above.
is not moved from the window into the record
buffer, and the cursor skips the window.
{DISPLAY0NLY}

ONLY

DISPLAY

Data

RETAIN

DISPLAY

RETAIN

ALWAYS

Maintain the data in window
is execute6 but clear the
successive CLEARs are keyed.
{RETAIN}
command

{RETAINALL}
never

Maintain

data

in

even
window

window

at all

ifif

a CLEAR
two

times;

clear.

cotmands
comandm and may be
with asterisks are all FINDing
(see
elements
database
the
relating to indexed
only on windows
Databases"
on
more
indexing).
on
for
information
"Designing
chapter

The
used

*

The

options,

command

cumulatively
EN1RY

on

an

and
ENTRY

file.field

the formatting
line:

options

above

can

all

be

used

command
page.5

{AUTOFIND,SKIPFOUND,CAPSL0CK}

maximum
length of any DataFlex comnand line is 255 characters.
within
Multiple options on an ENTRY command line are all enclosed
brace
(,)¿
characters {braces}, separated by comas
The

special form of the ENTRY command is
The default mode of the
displayed.
when this format is used.

A

be

where
used
expressions
window
becomes
display

are

the

to

only

FORMAT:
w1ndow_arg

ENTRY

(expression)

ENTRY

(date_today+30) screen.5

EXAMPLE:

ENTRY

AND AUTOPAGE

The ENTRY command
can be used
by using the-AUTOPAGE
windows

cally in
explicitly

Copyright

the

ENTER

written

(C)

1984

macro

reference to image
functions automatiand needs
imagep
to be
more
screens.) AUTOPAGE

without specific
command.

for the
there

(AUTOPAGE

firsttwoscreen
or

only

if

Data

————————————
———————
_ ___=~_=~~~~>=————
Access
05/16/84
Corporation

are

C-22

DATA

sequentially
down)

of

accesses
the command

Data
NOTE:

the

Entry),
The
ENTER

DataF1ex

ENTRY

User°s

Manual

starting witht the top line and working
image
named as the argument
of the screen
(see
the section of this manual on Direct Control of
and permits the window
references to be left off.
to right9

(left

windows

the

ENTRY

command

macro

or

Since
ENTER
command
is

2.0

can

ONLY by used
ENTERGROUP

within the

within

the

ENTRY

section of

command.

composed
of a set of subroutines, a RETURN
is internally
required to terminate the ENTRY section of the configura-

tion.

If you don't
processing,

need
you

of the user-defined procedures
or post-entry
simply end the ENTER configuration with an

any

may

ENTEREND.
a totally
straightforward,
unimaginativeg
illustrates
makes
use of the AUTOPAGE
configuratiom
It
page window
references are not necessary.
It has all of
of an ENTER configuration:

The

next page
yet efficient
function, so
the components

ENTER

labeled

image

1.

A

2.

An

OPEN command

3.

An

ENTER

4.

ENTRY

commands

with

5.

ENTRY

commands

terminated

6.

An

with filename
with filename

command

ENTEREND

argument

command

data

to

element

end

by

argument
arguments

a RETURN

the configuration

~
Copyright (c)

1984

Data

Access

Corporation

07/18/84

2.0

DataFlex

User's

DATA

Manual

="=———___—~—

EXAMPLE

ENTRY

C-23

———————

FOR ENTER

FORMAT

/LIST
My

Mailin'

List

Name:
Address:

City:
State:

l*
// --

ZIP:

_

pre-enter

--

OPEN MAIL
ENTER

// --

MAIL

'

//

open

//

start

data

enter

begfning of entry section
AUTOPAGE

LIST

ENTRY

MAIL.NAME

ENTRY
EN1RY

MAIL.ADDRESS
MAIL.CITY

EN1RY

MAIL.STATE

ENTRY

MAIL.ZIP

RETURN

ENTEREND

file
macro

--

sequentially assign windows
not actually required in this
single-screen configuration

//
//
//{AUTOFIND}

{CAPSLOCK}

//
//
//

end

//

end

of entry section
not actually required since
is enterend

next

command

of enter

macro

———————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DATA

C-24

DataFlex

ENTRY

User's

2.0

Manual

——————
PROCEDURES

USER-DEFINED

THE

in related
configurations will need to perform updates
These
error checking or delete protection built im etc.
which
by five user-defined
procedures
are
operations are accommodated
when the corresponding DataFlex Flex-key is
automatically executed
The Userpressed
during the execution of the ENTER configuration.
Defined procedures
are:
ENTER
have

Many

files,

ENTER.SAVE:
ENTER.DELETE:

executed
executed

on
on

ENTER.EDIT:

executed

on

ENTER.CLEAR:

executed

on

a SAVE command
a DELETE command
and on a DELETE
an EDIT
a CLEAR command

ENTER.EXIT:

executed

on

an

EXIT

command

command

are automatically called by the ENTER
from
any other
functiona11y no different
labeled DataFlex sub-routine called by your own GOSUB comands. The
name is
inclusion of the colon ": at the end of the procedure
required to identify them as labels; om!tting the colon will cause an
error.

These
ljser-Oefined procedures
command
macrog
but they are

"

If

an

ERROR

function
The

or
The

is declared within
be disabled.

ENTER.SAVE
an

any

procedures

of the

the associated

will

existing

ENTER.DELETE

procedure
reccmi

is executed
is edited.
is

procedure

whenever

whenever

executed

a

new

an

record is created
existing

record is

deleted.
The

ENTER.EDIT
OR an

deleted
save

procedure

related
The

procedure

existing
to keep

whenever
an existing
record is
is executed
This works well with the
record is edited.
the consistency of counters and totals in a

file.

ENTER.CLEAR

procedure

is

executed

whenever

the

CLEAR

Flex-key is

pressed.
The
and
key

whenever
procedure
the escape
is executed
is primarily intended to allow conditional disabling
by declaration
of an error.

ENTER.EXIT

Each of the User-Defined
with the use of a RETURN

Copyright (c)

1984

Data

procedures
command

Access

must
(see

the

be ind1vidua1ly
example
on the

Corporation

key
is
of the

hit

escape

terminated
next page).

'

05/16/84

DataFlex

2.0

User's

DATA

Manual

ENTRY

C-25

the use of the ENTER.SAVE and
executed
every time a record is saved
An application
and edited/deleteck
requirement for a
respectively.
However,
uses
information.
only one
for the
mailing
in
is desired to maintain an on-line counter of how many records
illustrates

below
The configuration
ENTER.EDIT
procedurem

which

are

list

file

list

are
this we will establish a field in the system file
file.
that contains the number of records in this file.
be incremented
when
To maintain the count correct1y? the counter must
when
a record is dejete6
the counter must be
a record is created;
and when
decrementéd»
an edit is donep
the counter must be left

it

To do
the
(SYSFILE.COUNTER)

unchanged.

/LIST
Mai1in'

My

List

Name:
Address:

City:
ZIP:

ST:

_
l*
//

only those parts of this
OPEN
OPEN

that

example

MAIL
SYSFILE

//

ENTER MAIL
AUTOPAGE

are

open

changed

other

have

comments

file.

LIST
{AUTOFIND)

ENTRY

MAIL.NAME

ENTRY

MAIL.ADDRESS

ENTRY
ENTRY

MAIL.CITY
MAIL.ST

ENTRY

MAIL.ZIP

{CAPSLOCXJ

RETURN
whenever
ENTER.SAVE
procedure
a record
will execute
// The
executed,
procedure
When a record is createcb only this
is
//
incrementing
the
counter.
//
ENTER.SAVE:
CALC (SYSFILE.COUNTER+1)
TO SYSFILE.COUNTER
SAVE

The

//

from

save

procedure

procedure

For

decrements
SAVEm
which

return

whenever
a record is deleted
is executed
the counter.
delet1om it decrements
It also
the counter in an edit, but true edits are followed by
ENTER.SAVE,
execute
offsetting the decrement
to zero.

ENTER.EDIT

or edited.

ENTER.EDIT:
SAVE

saved.

SYSFILE

RETURN

//
//
//
//

is

a

CALC (SYSFILE.COUNTER-I)
SYSFILE

RETURN

//

return

from

delete

TO SYSFILE.COUNTER
procedure

ENTEREND

Copyright (c)

1984

Data

Access

Corporation

05/16/84

C-26

ENTDISPLAY

DataFlex

ENTRY

DATA

2.0

User's

Manual

Command

comand
causes
all ENTRY data elments for the data
to display on the screen, along with all
in the argument
those in other related files. Its apparent effect is exactly as
by the operator.
though
the SUPERFINO Flex-key had been pressed
It
may be used
in the ENTRY section of an ENTER or ENTERGROUP configuration and/or in a KEYPROC (for the FIND key, for example).
ENTDISPLAY

The

file

named

FORMAT:


ENTDISPLAY

ff1ename>

is the
the displayed record is to

Where

 TO ABORT,
subroutine below would give the prompt
key was pressed,
and then, depending
on which
OTHER KEY TO CONTINUE",
or
either resume execution at the predefined procedure "RPT.LOOP"
(Pressing any key
abort via the predefined procedure "END.OF.REPORT".
other than ESCape actually would cause execution to resume.)

REPORT macroG
default mode of operation
by the operator while the
key
any
is
mode may be disabled entirely
or modified to
confirming question when a key Is thus
The

hit

if

EXAMPLE:
RETURN
RPT.KEYPRESS:

//

Must

be

added

l

PAUSEKEY
STRING
 TO ABORT,
"PRESS
INPUT
[KEY.ESCAPE]
RETURN END.OF.REPORT
RETURN

end

ANY OTHER

of section
KEY

commands

TO CONTINUE"

PAUSEKEY

RPT.LOOP

should
This procedure
immediately after the
RETURN

after

command

shown

in the configuration

located before the REPORTEND command, and
The
of the last group of section commands,
be added
above
explicitly
on the first line must
in order to insert this procedure.
be
end

END$0F$REPORT
is used instead of
the predefined procedure
would
tota11ing and other terminating procedures
would
be appropriate
to use in
skipped. Use of this procedure
printer misfeed, ribbon breakage,
or a similar mishap.

If

END.0F.REP0RTg

PAGE

be
case

of

BREAKS

automat1ca11y
maintains the number of lines remaining
macro
current page in manory at all times while outputting.
It will
things like number of lines required by a SUBTOTAL or BODY
image
allowed to operate in its default mode,
automatically, and
and subheadings
as required at the top
of each
reprint headings
will
doing
you are
"fancy" pagfng that requires direct
new page.
If
have
you will
to provide commands within the
controb howevem
The PAGECHECK command
appl1cab1e
section(s) (typically
the BODY).
checks
whether
in the command argument
the number of lines given
sends
The FORMFEED command
remains
a "raw"
on the current page.
formfeed
at the top of the new
(that is, it does not print headings
[PAGEBREAK]
GOSUB NEWPAGE utilizes
the PAGEBREAK
page). The sequence
predefined indicator and the NEWPAGE predefined procedure to print
commancb
The following
headings
for
at the top of the new page.
would
examp1eg
at the top of
eject the current page and print headings
The

REPORT

on the
handle

it

if

Copyright (c)

1984

Data

Access

Corporation

05/16/84

C-44

the next

page

page:

if

there

PAGEQIECK
Cpagebreak]
The

following

DataF1ex

AND OUTPUT

REPORTING

less

were

6

than

lines

left

2.0

on

User's

Manual

the current

6
GOSUB NEWPAGE
would

command

do

the

same

thing unconditiona11y:

FORMFEED
GOSUB NEWPAGE

REPETITIVE

REPORTS

multiple times for different
report can be put in a loop to execute
selection criteria. Put a label at the beginning of the report and
then, at the end of the reportp CLEAR the report data file and GOTO
Remember
to provide some
the label at the beginíng of the report.
means
for the operator to exit the loop.
A

MULTIPLE
To
a

make

disk

COPIES:

multiple

file;

and

copies of
(2)
print

a

"TEMP.$$$"

OUTFILE
REPORT

//
//

INDEX.I

X BY

report -----REPORTEND

//

The

following

//

You

[NOT

"LST:

COUNT

INTEGER
SIRING

STRVAR

"

//

Output to
Do report

to

file

temporary

multiple
file
Output

OUTFILE

times

to printer

132

have
must
set up NUMBER 0F_COPIES previously.
TO NUMBER OF_C0PIES
FOR COUNT FROM
"TEMP.$$$"
DIRECT_INPUT

l

SEQEOF]

REPEAT
READLN
WRITELN

[NOT

the disk

lines print

DIRECT_OUTPUT

(I) set your
times.

report you must:
that file multiple

SEQEOF]

STRVAR
STRVAR

LOOP
FORMFEED

LOOP
CLOSE_INPUT
ERASEFILE

Copyright (c)

1984

"TEMP.$$$"

Data

Access

//
//
//

Reads

li//

End
Close

//

a

Writes
End of

line
a line
REPEAT

from

TEMP.$$$

to the printer
loop

FOR loop
before delete
File no longer needed

Corporation

of

07/18/84

User's

2.0

DataFlex

REPORTING

Manual

"",_

C-45

AND OUTPUT

~

TO REMEhdER

THINGS

l.

2.

The

REPORT

The

be

may

used

used

only

which

can

be

subtotal breakpoints
or in any other RELATEd

a

configuration.

output is
be

must

255

characters.
They

indexed.

should
be processed
Data
only from
The contents of formatted
variables.
for calculations or other processing.
AUTOPAGE

invisible
section.

An

command

and

command

invisible

an

database
windows

is executed
at
RETURN command

BODY section of the report is executed
satisfies the selection criteria.

REPORTING

WITHOUT

be

commands;

elements
cannot

The

which

can

file.

and total
only by PRINT
registers are updated
update
CALCULATE
and DISPLAY
do not
the registers.

5.

7.

within

MACRO

Subtotal

MOVE,

6.

REPORT

once

as

file

THE

e

line length

maximum

3. Fields
in the main
4.

macro

ABOUT

or in-memory
re?lab1y be used

the beginning of
at the end.

once

for

every

each

record

REPORT

of configuring reports is by use of the Report macrcn
with the QUERY program
to generate the configuration.
howevem
The Report
macro,
is by no means the only way of configuring
convenience
a pre-programmed
suitable to a wide
reports--it
is merely
The following
range
configuration outputs a data file
of purposes.
(called SAMPLE in this example)
to the printer in record number
Note
sequence,
that
using a format image with a pagename of IMAGE.
found
in reports
lacks headings, totals and subtotals commonly
produced
by the Report
macro.
The

usual

way

often starting

it

/IMAGE

l*

OUTFILE
OPEN

°'LST:

SAMPLE

output to the printer
the data file to output
//Clear the record buffer
//Clear the screen
//Direct

"

//Open

CLEAR SAMPLE
CLEARSCREEN
REPEAT
FIND GT SAMPLE
IF0UNDI
BEGIN
PRINT

SAMPLE.NAME

PRINT
PRINT

SAMPLE.CITY
SAMPLE.STATE

PRINT

SAMPLE.ZIP

OUTPUT
[NOT

END
SEQEOF]

BY RECNUM

//Find

the next record

TO IMAGE.3

(C)

//Stop at

Data

command

used

IMAGE

LOOP

1984

//AUTOPAGE

//not

IMAGE.4

ABORT

Copyright

number

//Must state TO
//Window.# since

TO IMAGE.I
TO IMAGE.2'
TO

by

Access

Corporation

end

of

file

07/18/84

C-46

REPORTING

AND OUTPUT

DataF1ex

—

2.0

User's

Manual

——

.

THIS

PAGE

Data

Access

INTENTIONALLY

LEFT

BLANK

—————————

Copyright

(C)

1984

Corporation

07/18/84

ZZZ±ZTZZZZ±ZFF2:

ZZZ::2:::7:::::::7:::7:::::::-----

==========
ZZZZZZTZZZ

FILE

DEFINITION

(FILEDEF)

-

C-47

=========

=Z======

== —=_—___—

==========
———————
OVERVIEW

FILEDEF
file definition
utility enables you to create a complete The
for data base files used in a DataFlex application.
file definítiom once created, contains information about the file namep indexed
Each DataFlex
fieldm and field information.
file must have certain
etc.,
information about the structure of the data? file name, indexes
Once
donm
be used.
can
this information is
established before
avai1ab1ep
through the data base managéí"» to any DATAFLEX program.
can adjust thei r operation to the type
During execution, the programs
and length of the
files and fields in use. This gives DataF1ex its
The

it

unique

APPLICATION

INDEPENDENCE.

APPLICATION
INDEPENDENCE
means
that the same data file
multiple applications without the duplication of effort
found
In most conventional application programs.

be used
can
and storage

in

EXAMPLE:
payable
and a
accounts
We may want
receivable, accounts
to implement
three files with name and address
mailing list.
Instead of having
informatioñ» we could have one name/address
file which is referenced
Only
by all
this one file need be defined, stored
three applications.
and updated
thus saving both time and
for names and addresses,
storage... a real bargain!
these
data
base
with the
files potent1a1ly are so integrated
be put into the
total application picture, thought and care should
contents and eventual relationships of the files. A well-designed
will almost automatically mean an effective and
file structure
successful app1 ication.
Because

~ ~ ————————
—————
——————
—
————
—————
1984 Data
Access
Corporation

Copyright (c)

05/16/84

FILE

C-48

DataFlex

(FILEDEF)

DEFINITION

"=============———————————————————
STEP

ONE

-

PLAN

THE

AMONG 7HE

RELATIONSHIPS

DATA

FILES

2.0

User's

Manual

—

DataF1ex
applications uses only one independent
file, there
To gain the benefits
of the interrelationships.
inter-fileDBMS
structureg read the following section carefully
file relational
A thorough
understanding
to see how to build a multi-file structure.
DataFlex
will be extremely
the
single
configuration at
of
file level more
comp1exg

If

are

your
no

in rapidly gaining an understanding of the
The following
section treats data theory
structures.
definitely
pertains to DataFiex (although
not just as
There
is irrelevant to less-capable software products).
are a number
and
mastery
of this area
of good books available on this subject,
your
by referring
may be enhanced
to some of them.
helpful

multi-file
genera11yg

WHAT FILE

it

it

ARE FOR

RELATIONSHIPS

managemeñt»
but
concept
in database
File relationships are an advanced
applications.
its benefits probably apply to most serious database
Although
none
provides
the capabi11typ
some software products offer
with the ease and power of DataFiex. File relationships are typica71y"
which
is the
invisible to an operator running a DataFlex application,
best
Most
way for it to be.
existing microcomputer applications are
designed
to use only one data file, but many of those would benefit
approach.
Compared
with single-file
greatly from a multi-file design
design
approaches,
file relationships offer the following advantages:

it

efficient

utilization

of disk

a.

More

b.

Equal

c.

Greater consistency of data
data
elements
in comon.

d.

Improved
records

support wIth

data

efficiency
the

having

in

data

a

smaller

space.
number

of records.

of records

having

data applying to
in comon.

groups

in

groups

changing

of

simple mailing list of
illustrate the conceptg let us use a Each
record in the list would
indivuals at their business addresses.
have
the individuaVs name, name of the company where they worG
Sq far,
address
this would se«n
of the company7 and a phone number.
But
suppose
that groups of
application.
to be a typical sing1«fi1e
You
all worked at the same company.
fifteen or twenty
of these people
would
want
one of
an individual
but
record on each persom
still
have
movecb
you would
to find each record for someone
the companies
who worked
Ifb on
in each one.
at that company and change the address
were
takem company names and
the other hand, a relat1onal approach
would
addresses
be kept in a separate
file
file, and each person's
The company
but
would
have
no address.
name
namey
in
his company's
would
be in the company
and address
(to support the relationship)
file
would
be many fewer
There
to which each person's file related.
be
would
each
persoMs record
company
flies than person fiiesjphoneand number
when the
in it). Moreover,
smaller (having no address
or
ABC company
moved,
of all 27 people on your list who
the addresses
work
in every record) by changing
(consistently
there would be changed
be
And there would
only the company record for the ABC company.
To

if

it

Copyright (c)

1984

Data

Access

Corporation

05/16/84

DataFlex

2.0

User's

FILE

Manual

DEFINITION

(FILEDEF)

C-49

—————
———
—

either.
nothing apparently missing from each person's recorvh
DataFlex can be configured to show each personG full company name and
address
as though
were
part of the person's actual record. Th is
provisions are
process
is fnvisible to the operatom unless explicit
And
made to render
visible (which wouldn't normally be desirable).
changing
from
when john Doe moved
the ABC Company to the XYZ company,
would
be as easy
name from
as changing
his company's
his whole address
ABC to XYZ (provided there was already a record for the XYZ Company
in
your company file--if there wasñft, you could create a new onm right
there "in" John Ooefs record entry screen) .

it

it

It goes even further, DataFlex can relate ten files to each other
online simultaneously (In l6-bit computers--capacity in 8 bits is
we could keep
all our
individuals,
f ive) . If we were selling to these
by the person's name.
sales in a file related to our persons
file
Then,
when looking at a sa1ep
we could view
the customer's complete
(now
name and address
looking through two fi1esp all the way to the
only the
related company record) with each sale, even though
number)
is part of the sale record.
customerG name (or account

But

then, are the hallmarks of the need for related files: groups
which
be the same at all
must
times
of records having data elements
for groups
(like customer
of sales transactions),
or, looking in the
data
groups
in a
series of identically-structured
opposite directiom
type of file
record. Dataflex provides a he1rarchica1, or one-to-many
the speed and efficiency of your
relationship which can improve
application greatly.
These,

GENERAL

LAYOUT

OF FILES

of your file relationships as a "tree" structure
This exercise gives
in configuring the application.
you a
to establish not only the files involved in the application but also gives the ability to see how data can be grouped
and specifically
to each of the files.
together effectively
Drawing

is the

a

schematic
step

first
chance

EXAMPLE:
DATA

FILE

RELATIONSHIPS

CUST(MER
FILE

VENDOR
FILE

^
I

^
l

—--->
I
I

FILE
"

i
I

I

I

I
I

TRANSACTIONS
FILE

(C)

1984

Data

Access

PARTS

I
I

SALES-----'

Copyright

"TREE"

l
PURMASE
TRANSACTIONS
FILE

Corporation

05/16/84

C-50

FILE

DataFlex

(FILEDEF)

DEFINITION

2.0

User's

Manual
———

"Data
Relationships" to maintain the inter-file
utilizes
The lines
connecting the files show
relationships you have defined.
the relationships among the files. In the actual file definition
these
relationships are established through the use of related fields.
A representation
among
the
like this one will make the RELATIONSHIPS
The fields
through which different
readily
apparent.
are
files
files must be
numeric
or date) and the same
of the same type (ASCIL,
related
length.
DataFlex

The

four

There

relationships in this representation point UP the tree.
structure:
file relationships in the illustrated
2)
3)

SALES TRANSACTIONS
IQ PARTS
IQ_PARTS
PURCMSE
TRANSACTIONS
SALES TRANSACTIONS
IQ CUSTOMER

4)

PARTS

l)

are

IQ-VENDOR

remember
that the topmost
visualizing
files as a tree structurm
those
that do not draw on other
files or "leaves" of the tree are VENDOR
PARTs
in it,
for information (e.g.g the
file above has no Lower
files
down on
but
in it).
every
record In the PARTS file has"a vendor
the tree there are files (like PARTS) which depend on the VENDOR file
The bottom
of the tree is the TRANSACTION files
for information.
from
where
data
all of the other files contributes to existing and new
(TRANSACTIONS).
records

When

In DataFlex, the lower
files on the tree are RELATED TO higher a files.
VENDOR
is related to
This means that art inventory PARTS record which
(display or print) information in that
record can automatically access
VENDOR record.
In relational
multi-file structuresp one element of data could have a
field entry in several levels of the tree ü.é.» VENDOR ID could be
part of the VENDORg the PARTS and the TRANSACTION files). Like fields
"related" together by DataFlex. In
in dffferent files are logically
and in the prompting you
this manuah
will encounter in the wi71 be
configuration utilities, the term "relates" or "relationship"
used
linking of
frequently.
It is used to refer to this logical
is controlled by DataFlex's Data Base
fields in different files which
Manager.
The

relationships

point

UP

the tree;

the

PART

ID

in the

TRANSACTION

in the PARTS file and the VENDOR ID in the
file relates TO the TOPART IDVENDOR
ID in the VENDOR
PARTS
the
file. ThereforeD PARTS
file relates
can autcmatica11y include not only PARTS data. but
transactions

AND VENDOR data.
from
these

the tree

HOW TO CREATE

DataFlex can automatically
relationships.

RELATED

find records

up

and

down

FIELDS

by which
two criteria
are
to choose the fie1d(s) through which
to relate two files: (l) for the Data Base Manager to find a record
in one file from a record in another file (i.e.9 find the VENDOR
(2)
and
to have the system automatically
record from a PARTS record);
There

Copyright (c)

1984

Data

Access

Corporation

05/16/84

User's

2.0

DataFlex

FILE

Manual
_

carry the value in
report selection.

THE RELATED
BE OF THE

FIELDS
IN
SAME TYPE

C-51

_______—~—=======

forward to another

field

a

(FILEDEF)

DEFINITION

__________

file

FILES
DIFFERENT
AND LENGTH!

for indexing or
MUST

the field
Is created for FINDING purposes,
field relationship
related TO must uniquely identify the record. If the relating
be an
then
there should
field isn't the higher recordts record number,
numbers
are
inherently
index made up of that field alone. (Record
which
is why they are the prime choice
indexed, and inherently uniqueg
The lowest-numbered
relating field in the file
for relating fields.)
Thi s
is the one which provides the primary relationship.
definition
is referred to as the PRIMARY re1at1onsh1p. (Again. the record number
field in any file definition.
the lowest-numbered
is always

When
being

a

relationships to other records is FOUND, th8
a record that has
This makes the
records
relates TO will be found automatically.
as though
they were part of the original
records related TO appear
invisible to the
record. The use of mujtipje files is typically
operator) .
When

it

fl1eG

related-to

The

record

number

is normally the best choice of
Relating by record
access
no index
is

on which
to base a primary relationship.
number
has three advantages:
is fast (since
requiredL the record number is ALWAYS unique,

field

it

and

changed.

it

cannot

be

that relates to a record number in another should
of Ip 2 or 3 bytes' length. The length is
maximum
by
in the file
potential number of records
DataF1ex
stores two digits per byte of field
rel ated TO. Remember,
field will store related record numbers
length, so a one byte numeric
up to 99g 2 bytes up to 9999.
etc. Three bytes is always a safe
This field, and any other related field in a new record, will
length.
by the field
be updated
relates TO when the record is saved.

A
be

field

in

file

one

a numeric
determined

field
the

it

using a record number as the primary relationship between
the records of different files, you may still wish to have other
relationships between the records for more convenient multi-file
FINDi rig.
Rem«nber
relationships must be based on
that these secondary
field numbers that are higher than the numbers of the fields on which
the primary relationship is based.
When

are

you

In

the typical

rel

ated

FROM
would

VENDOR
being
related

find
PARTS

an

records
would
be many
being
in the
TO each
related TO (each
record in the
W1htout
supply
many PARTS) .
the field
this relationship,
NOT uniquely identify
FROM would
a record (you
can't
PART ijtSt by knowing
Thereforeg the
the VENDOR).

there

case,,

re1atl

individual

file

would

be

file

ng

for tasks like listing all the
else, like part Ilb to facilitate the
part irrespective of who its vendor might be.

indexed
by
something

parts for a vendor AND
finding of an individual

file

VENDOR

Name,
Numberg
Part Numberp
at this point which fields (Record
Below
in your application.
etc.) will be used for RELATIONSHIPS
are
Thi s
four of the five files in the schanatic shown two pages ago.
Decide

Copyright

(C)

1984

Data

Access

Corporation

05/

16/84

DataFlex

(FILEDEF)

DEFINITION

FILE

C-52

User's

2.0

Manual

displays the actual fields in each f|1e9 and the
one
Hint:
fields the relationships are based upon.
Can you
find
relationship.
of the relationships shown is a secondary
it?
rendition,

show

arrows

however,
which

EXAMPLE

VENDOR

STRUCTURES

OF FILE

FILE

PARTS
O

,
O

RECORD NUMBER

2

l*

VENDOR ID
ADDRESSI

3

ADDRESS2

<-------1

<-----------2*

3*
4

"

5
6

AND RELATIONSHIPS:
SALES
TRANSACTIONS

FILE

RECORD NUMBER
VENDOR RECORD

O
S

RECORD
DATE

NUMBER

QUANTITY
PART ID

2
VENDOR ID
PART ID <—-------3*
QTY IN STK
:
PRICE
:
DESCRIPTION
:
P
0
Q
0
:

FILE

CUSTOMER

I

FILE

:
O

RECORD NUMBER

2

l*

CUSTOMER
ADDRESSI

3
4

ADDRESS2
LIMIT
CREDIT

5

TOTAL

The

<

NAME

4*

CUSTOMER

5

AMOUNT

RECORD

#

SALES

(<-—) represent a relationship and the mH' represents a
could exist
is indexed. Note that other relationships
fi1eSg
these
and/or to other files, and other fields might be
for finding and reporting purposes.

arrows
which

field

among
indexed
VENDOR

in the PARTS file is used for the PRIMARY relationship
process
since no indexing
file to speed up the RELATE The
VENDOR ID is also
with Field 09 the record number.
by
relationship to allow reporting and FINDing
as a secondary
ID in the PARTS
file.

RECORD #
VENDOR

with the
is needed
provided
VENDOR

The VENDOR
VENDOR and

ID field
PARTS

must

be

of the

same

length

and

type in

both

the

files.

file and in the SALES TRANSACTIONS file must
length in both files. PART ID in the PARTS
'is used
must
as the only segment
in an index since
file
SALES TRANSACTION
from
the
as the primary relates-to
file.
field

The
be

ID

PART

of the

in the

same type
be indexed

PARTS
and

it

ID in the SALES TRANSACTIONS
file is listed as indexed,
did not want part ID to be included in the SALES TRANSACTION
fi1ep we could have made its Field 4 the smaller and faster PART
RECORD S, and based
the relationship on that field instead.

The

if

PART

but

we

Reports

record
TIONS

of transactions could be printed either by PART ID or CUSTOMER
are
since both indexes
present in the SALES TRANSAC-

number,
FILE.

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex 2.0 User's

Manual

STEP

FIELDS

TWO

-

LIST

THE

FILE

DEFINITION

(FILEDEF)

C-53

of the data fields that will be required
the specifications
fields,
including their typeg length and. for numeric
A convenient
point.
the
of places to the right of the decimal
IMAGE of the data
way to do this
entry form
Is to create the screen
(Refer to the section of this manual on 'rFormatting
for each file.
With
Option 7 read this IMAGE and create
Images".) Then let FILEDEF'S
a preliminary
Option 7 will prompt you
file definition automatically!
through the process, as described below in Step 4. If this file will
to be sure that the fields used for
relate to other files, remember
the relationships have the same length and type in each of the related
Determine
in each

file.
number

files.
EXAMPLE:
/VEND

P
0
:
0
0

VENDOR
ID:

VENDOR

:
0
0
:

CONF'ANY

P
0
:
0
b

RECORD

:
O
4
:

NINE:

ADDRESS:

:
:
V
a

ST:

CITY:
CREDIT

:
0
b
:

LIMIT:

ENTRY

DATE:

S

TOTAL

._

_

ZIP:

:
:

$

:

O

CREDIT:

._

_J_J_

0
0
:
e

0

l*
This image could later be used directly by FILEDEF to create a
Note
definition.
that the image is terminated by a "l*" character
and is necessary
for
combination. This Is an "end of image" marker
DataFlex
to distinguish the image from the configuration commands.
After
this:
FIELD
NMBR

Option

7 has

FIELD
OFFSET

FILEDEF'S

rum

FIELD

FIELD
TYPE

LEN

Option
DEC
PTS

3

would

MAIN
INDEX

produce

a

chart like

RELATES--TO
FILE
FIELD
ID

ASCII

O

O

O

VENDOR

2

9

30

ASCII

O

O

O

C0MPANY_NAME

3
4

39
69

30
30

ASCII
ASCII

O
O

O
O

O
O

ADDRESS
CITY

5

99

O

O

101
lOó

2
5
5

ASCII

6
7

ASCII
NUMERIC

O
O

O
O

STATE
ZIP CODE

2

O
O

O

CREDIT_LIMIT

8
9

Ill

5
3

NUMERIC

2

O

O
O

O
O

T0TAL_CR£DIT
ENTRY_DATE

l

8

I

116

~~~

Copyright

(C)

DATE

~~
1984

Data

O

LINEA

—
Access

Corporation

05/16/84

C-54

DEFINITION

FILE

OVERLAPPING

EXPERTS

(FOR

FIELDS

DataFiex

(FILEDEF)

Úserfs

2.0

Manual

CNLY)

need
may be times when you
to have more than four field segments
in an index (four is the segment
limit for an index fn 8 bits; six is
See the section of this manual
on "Designing
the limit in 16 bits).
Databases"
of single- and multi-segment indexes
for a full dSscussion
these
and indexing.
For
special cases,
DataFlex has another field
the user
type called the overlapping field. This field type enables
The
a group
they were one large field.
of fields as though
to address
overlap field spans other fields already existing in the file
spanned
The fields
by the overlap must
occur
definition.
consecutively in the file definition.
There

this featurep first append a field to the file of the type
Then
set the FIELD OFFSET of the overlapping field to the
field offset position of the first sub-field and the FIELD LENGTH of
the overlapping field to the total length of al) of the sub-fields you
wish
specify the index
to include in the index. Them ,of coUrseg
number
for the index based on the overlapping field (rather than on
the fields
Is composed of).
To use
OVERLAP.

it

what

This is
the chart
overlap field comprised
FIELD
NMBR

FIELD
OFFSET

I
2

l

g

FIELD
LEN

on
on

the preceding
the first two

FIELD
TYPE

DEC
PTS

look like

would

page

fields

MAIN
INDEX

were

added:

if

an

RELATES--TO
FILE
FIELD

—
8
30

ASCII
ASCII

O
O

O
O

O
O

VENDOR_ID
COMPANY_NAME

3
4

39

30
30

ASCII
ASCII

O
O

O
O

O

ADDRESS_LINE_1

69

O

CITY

5

99

2

ASCII

O

O

O

STATE

6

101

ASCII

O

O

O

ZIP

7
8

106

5
5
5

O
O

O
O

O
O

CREDIT_LIMIT
T0TAL_CREDIT

9
IQ

116

O
O

O
O

O
O

ENTRY_DATE

—————

Copyright

Ill
l

~
(C)

NUMERIC
NUMERIC
DATE
OVERLAP

3
38

1984

2
2

Data

=
Access

CODE

—~——_

Corporation

05/16/84

2.0

DataFlex

User's

FILE

Manual

===——~~——
STEP

THREE

-

DEFINITION

(FILEDEF)

C-55

~~~~~———~

DETERMINE

THE

KEY

FIELDS

indexes
allow you to FIND records by fields which are
be determined
defined as indexed. The fields you wIsh to index should
Each DataFlex index can
be
at this point in the FILEDEF operation.
6 fields
composed
on 16 bit
of up to 4 fields on 8 bit systemm
There
be up to 4 indexes
systems.
can
for each file (9 on 16 bit
systems). Each index defined will be stored in an index file that has
as the data
the same rootname
file. It will be opened automatically
when the data
file is opened.

DataF1ex's

that each index requires disk storage and a small amount
time when saving or deleting records. System size and
performance
a consideration
of your key file
may become
in the design
A rule of thumb
is that an index will take about 2 times
structure.
the amount of disk space as the number of bytes in the data fie1d(s)
ten
For
example,
an index is made up of 1000
is indexing.
that
All indexes
the index file size will be about 20K.
byte part numbers,
are
kept up-to-date on-line automatically.
for a database
Keep

of

mind

in

update

if

it

for
field does NOT have to be indexed
during output
records from the database
STATE field
in a mailing list record was
make a report of all
a
records matching
would
DataF1ex
have
dich
you
to evaluate
indexing often
record. For this reason,
process.
A

to be used to SELECT
For
examp1e9
operations.
not indexed, you could still
particular STATE value.
If
the STATE field of every
does
speed
up the selection

it

if

a

field in one file is being related to by records in anotherg
the only field in the index. This is required for the relate
process
to uniquely identify a rel ated record. Overlapping fields can
be used
here
to create a single-element index for relating tOo which
is actually made up of data from several fields.
If this is done, the
relating file must also have an overlapping field of the same length
to support its end of the relationship.

If

it

a

must

be

DUPLICATE

RECORDS

to allow multiple records in a file to have the same key
as the last segment
of
include field zero (the record number)
uniqúé»
their inclusion
the index. Since l"8corcj numbers are always
key
can make otherwise duplicate
values
with other index elements
with record number AND
unique. Note that a field CAN NOT be indexed
be the target of a relationship.

If

you
va}ueg

wish

as field
zero
in DataFlex, can
record numberp which is addressed
Thi s creates an often useful access
be considered INDEX ZERO.
by order of entry)
method
(e.g. transactions which need to be accessed
There
which
has no disk storage overhead.
is actually no INDEX ZERO
(no
this is Dataflex's method of defining
file called FILENAME.KO);
FIND
You may always
or
is to be made by record number.
that access
The
A
may exist with no other indexes.
report by record number.
file
record number for the record currently in the buffer is maintained
The

also

under

as

Copyright

filename.RECNUM.

(C)

1984

Data

Access

Corporation

05/

16/84

FILE

C-56

DataFlex

(FILEDEF)

DEFINITION

========~——————

2.0

User's

Manual

—~~~~~+—~—~~~

a field
in more than one index (perfectly
participates
must
be designated during the
acceptablek one of the indexes
MAIN
operations.
as the
index for the fi?1d for FINDing
definition
Index
The MAIN
will be the one automatically used by DataFlex to FIND
of
records from the file when a given field is selected as the source
a key
value for record retrieval.
Where

"EXAMPLE:

In the

example

file

above

structure

2)

VENDOR ID (unique).
COMPANY NAME plus RECORD NUMBER

3)

CREDIT

I)

Number

LIMIT

l,

VENDOR

ID,
would
be
would

while the others
and reporting.
Notice that

VENDOR

plus

VENDOR

ID

we

might

have

three indexes:

(duplicate company names
(duplicate credit limits OK).

generally
useful for

be used
FINDing

OK).

to support relationships,
records for maintenance

participates
in two indexes. This is fine, but
the MAIN index for that field. In this case,,
Ilj is the first segmentg
is deslgríated.

ID

be selected as
one must
where
VENDOR
Index
One,

allow for duplicate company names in Index T\Ñqp Field Zero (the
combinations.
is included in the index to create unique
record number)

To

STEP

FOUR

-

USE

FILEDEF

This section takes
FILEDEF
an

utility

can

application.

a

TO PUT

IT

ALL

TOGETHER

procedural step-by-step look at how DataFlex's
used
to create and maintain the data files of

be

"A>"
the program type "FILEDEF"
at the operating system
CONFIGURATION
NENU.
The program
the
from
will
or select
in order to obtain the data
sign on and present a serles of prompts
FILEDEF
from
needed
is
to define the data file, Each of the prompts
presented here with the how to's on their use and their relationship
to the rest of the DataFlex system.
To execute
prompt

IF

it

YOU MAKE

AN INCORRECT

ENTRY:

which
choices proceed
through a series of prompts,
in order to continue.
at any pofntp you are not
If
sure
is still necessary
of the answer9
or you key a wrong response9
that satisfies
to answer all of the questions, at 1east'w1th something
and get back
in order to proceed
to the FILEDEF
the program,
however,
Once
all the questions have been answerech
operations menu.
gives you the opportunity to modify your earlier
the menu (see below)
answers
or to abandon them altogether (choice 10)» and leave your
original file (if any) unchanged.

Some
must

FILEDEF
be

menu
answered

it

———~———
="=~=__"=="=="""—
(C)
1984 Data
Access

Copyright

Corporation

05/16/84

DataFlex 2.0 User's

FILE

Manual

(FILEDEF)

DEFINITION

C-57

=
NUMBER:

FILE

ENTER

prompts
the configurator with a list of
run, the FILEDEF Program
enter an unused
currently defined files. You may modify one of theseg
number
to start a new file or reactivate one not currently on the
file
1 i st.

When


may enter FILEDEF
at the operating
level to pass a file number directly to the program
without going through the files menu.
As a
system

shortcutg

you

command

(YIN)

NEW FILE

If you have selected a file number
list then you must tell FILEDEF if

that does not
this is a new

appear

file

or

in the file
an inactive

one .

If

you are
a "Y".

creating

this

with

file

for the

first

time

the question

answer

already exists, answer the question
If a file definition for(you thiscan fi1e
just press enter to default to the "N"
with the "N" response
The
responseL which will give you the chance to reactivate the file.
system
will then ask for the ROOT name, USER DISPLAY nameg and DataFlex filename of the file.
DataFlex

ication configurations
existing DataFlex
as described above.

appl

installed on
re-activated

If

you
FILEDEF

an

purchased
system
must

separately
their

have

are
modifying
be
menu will

preliminary

an existing
or re-activating
displayed.
Otherwise, for a
information will be required:

file
new

which

are

file

numbers

definitiong

file,

the

some

ROOTNAME
data
ROOTNAME refers to the base
name of any DataFlex
or
configconform
The ROOTNAME must
to
uration file created by FILEDEF.
filename conventions of up to eight letters and
operating system
numbers.
DataFlex will append the appropriate extension based on the
use of a particular
physical file (see the appendix). Make up an 8
for your file WITHOUT AN EXTENSION!
character or smaller rootname

The

wish
to specify the drive on which DataFlex is to place the
in the
filem prefix the file name with the drive specification
standard format: drive letter (A..P) followed by ": followed by
filename.

If

you

data

"

EXAMPLE

This

ROOTNAME

would

be

Copyright (c)

a

W/DRIVE

file

1984

called

Data

B: MYFILE

SPEC.:
"MYFILE"

Access

located

Corporation

on

disk drive "B".

05/16/84

DataFlex 2.0 User's

(FILEDEF)

DEFINITION

FILE

C-58

Manual
———

DISPLAY

USER

Nm:

will be displayed in the FILE
Enter the name you would like to
see displayed to the operator for this
file. If the file name is
preceded
will not display on the runtime file display
with a "@"
The maximum
length of the user display name is 30 characters.
menus.

The User
SELECTION

display
menus

name is the one which
by DataF1ex
programs.

it

DataFlex

FILENAME

filename can be up to ten characters long and must start
The DataFlex filename is used
to reference a data file
letter.
does
from
In that
not contain drive specifications
configurations.
is a "soft" reference to a file that makes an application indepenconfiguration.
dent of a particular hardware
It is also usedg along
to define DATA BASE ELEMENT names within a
with a field's Tagname,
DataF1ex

The

with

a

it

it

file.
RECORD

LENGTH

This is the physical size (in bytes) of the record you will be
DataFlex
will automatically block sma?1 records into 512
creating.
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
autwat1ca11y by
recorcb
record length will be blocked
the necessary
FILEDEF
when you enter the record length.
know the record length at this
point, you may enter it.
If you
from
an IMAGE and don't know the record
creating a definition
to zero. The READ SCREEN option will then
size, you may initialize
will block records in all
set the record length for you. DataF1ex
sizes from l to 26 bytes, 28 bytes, 3Ó9 32p 35» 39, 42p 46p 5L 5&
256,
128,
l7Ch
and upward
649 73,t 85» l029
in multiples of 128 bytes,
to a maximum to 4 kilobytes.

If

you

are

it

MAX

# OF RECORDS

value entered here is the maximum number of records to be stored
in the database
for this file. The figure entered here is nonyou elected the system
option (see Installing
critical unless
DataFlex) which provides for pre-a11ocation of disk space for the
maxium
you may feel free
possible size of your database. Otherwisep
room
available for the number of records in a
to make some growing
particular
file.
The

of records in a DataFlex file is 64AOO.
expand
the maximum number of records after
re-enter FILEDEF and enter a larger value for
the REINDEX utility to rebuild the index(s)

number
The absolute maximum
NOTE:
the need arises to

If
datag
file contains
Then,
run
field.
parameter.
under
a

this

the

new

Copyright (c)

1984

Data

Access

Corporation

05/16/84

User's

2.0

DataFlex

FILE

Manual

REUSE

(FILEDEF)

DEFINITION

——————

C-59
-—————-

————————

DELETED

SPACE

(YIN)

applications you will want DataFlex to reassign the disk
in
released when a record is deleted from a file, howevem
applications where you want to use the record number as an audit trail
To allow the
this would not be desirable.
or as a transaction number,
otherwiseg enter o.
re-use of deleted spacep enter es;
For

most

space

mLTI-UsER

(YIN):

RE-READ

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
at the same
of allowing multiple users to write to the same recordMULTIUSER
NOTE:
option
time then enter a 'Y', otherwise, enter 'N'.
of SETSCREEN must be set to (Y) to utilize RE-READ.
DEFINITION

FILE

THE

MENU

After completing the entries just covered
FILEDEF
operations menu will be displayed.
FIELD

CREATE/EDIT
CREATE/EDIT

3:
4:

FILE
DEFINITION
DISPLAY/PRINT
PARAMETERS
AND NAMES
SET FILE

5:

ERASE

6:
7:
8:
9:
IQ:

R00TNAMEp

It

looks like

etc.,
this:

the

SPECIFICATIONS

l:

2:

about

INDEXES

DATA FILE
INACTIVE
SET FILE
DEFINITION
CREATE FILE
DEFINITION
CREATE FILE
SAVE DEFINITION
ABORT FILEDEF,

FROM SCREEN

IMAGE

FROM .DEF IMAGE
AND EXIT
FILEDEF
DO NOT UPDATE DEFINITION

FILE

numbers
next
(l - 10) to selectandyour
2,
either execute
Options l
or
7 are
the same:
of using Option I or Option
used
The methods
definition.
to reach
file
option one takes you field by field through
that end are different:
where
you make the specification
entries
the record definition
7 functions just
like the DataFlex AUTODEF Utility
manually. Option
and determines
the record structure autanatical1y from the screen
You

may

enter

action.

one

of the option

files

For

new
Option
7. The results
creation of a DataFlex

you

MUST

image.

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

C-60

FILE

OPTION

I

-

(FILEDEF)

DEFINITION

CREATE/EDIT

DataFlex

2.0

User's

Manual

FIELDS

This option allows you to create new field
existing ones in a record definition.

attributes

or

change

the file which is currently active in FILEDEF is not a new fi1e9
all entries under this option will contain a default to the
(except for 'any new
existing value fbr each field that is prompted
fields you may be adding).

If

then

the existing value in darts:
will be displayed withdarts
is to be maintained as the
value in the
If the then
 to skip the question and maintain
response,
hit
then
the new

The prompt
.

current
the val ue;
informatiom

the default
iffollowed
by

is not correct

enter

.

Each
field in the record will
tion unless you enter a field
verification
step (SEE BELOW).

be presented sequentially
number
"E"
to jump to

or

for modifica(exit) on the

you
select Option l for the FILEDEF operations menu. you will be
will display
positioned at Field l. The current field specification
The field
edit menu looks like this:
with the field edit menu.

When

OPTIONS:
G

I
D
A
C
R
+
E
ENTER

EDIT

FIELD

-

Go

to field number
Insert before this field
Delete this field
Append
a field
to end.
Change
this field
Reposition field offsets
Display next field
display previous field
menu
Exit to master

á-K)ICE:

OPTIONS:

Repositions you at the field number entered
to field number
of that field. You will be
displays the current- definition
prompted
for the field number to go to after entering the  option.

G
and

-

Go

rcjcm
for a
I - Insert before this f'kjd - Creates
by one.
incrementing all the higher field numbers
specifications
for a new field may be entered under
available field number.

by
new field
Them
the field

the newly-

this field
Deletes the current field and reduces
- Delete
higher
field numbers by- one to adjust for the deletion.
D

A

field

speci

a field
to end
in the File Definition.-

Append

ficati ens

Copyright (c)

(see

1984

below)

Data

A new
You

field
must

all the

will

be created as the last
enter the new field's

.

Access

Corporation

05/16/84

Dataf1ex 2.0 User's

FILE

Manual

Change
or edit this field
- for the
tions
current field.
C

-

Allows

you

(FILEDEF)

DEFINITION

C-61

the specifica-

to re-enter

to reset field positions after
offsets - Required
- Reposftion field has
been modified.
The positions
of the fields in
the file definition
any
the record buffer (field offset) must be recalculated whenever
in length.
field is added,, deletecb or changed
R

-

Moves

you

forward

- -

Moves

you

back

E

Exit to

+

-



You

in

Always
moves
2 and press

a

file

****** FIELD #
# is the number
NAME:
FIELD
The tagname

Returns

-

you

FILEDEF

to the

menu.

if

to the next field. For examp1ep
Field 3 will be displayed.
on the last
you are currently
field

editing

,

create a new
definition.

******
of the field

you

if

the following

asked

be

will

menu

-

are
on Field

will

field

fie?d.

one

master

field.

one

each

questions for

you

are currently

field:

editing.

(tagname)
be
you enter here
and
and documentatSom
be used,
along w¶th

utilized by FILEDEF and QUERY for
be displayed in the
file definlon.
the
DataFlex filename as part of
will
ti Data It Base Element name,
Command
Language.
The
in the DataFlex
the
tagnames
are
stored for each file in a separate ASCII file called
rootname.TAG.
The maximum
tagname
Valid
length is 15 characters.
characters in tagnames
are:
pranpting

will

[
The

first

invalid.
FIELD

This

'A...Z', '0...9'. 'e'. C'. '#'

]

and
Spaces
(A...Z).
character must be alpha
(_).
will be replaced with an underscore

slashes

are

and

(

TYPE:

will

will

N=NUMERIC,

A=ASCII,

D=DATE,

0=OVERLAP

)

to either:

set the field

letters)
only)
DATE
Stored
Jul ian; output format: MM/DD/YY
which
OVERLAP
A field
re-defines areas of the
record.
(numbers
and
ASCII
(numbers
NUMERIC

-

The

next

For

ASCII

NUMBER

This is

fiel

depends

prompt

on

the field

type entered

above.

fields:

OF QURACTERS
the maximum

number

of characters to

be

assigned

for this

d.

Copyright

(C)

1984

Data

————
———
Access
Corporation

05/16/84

C-62

DEFINITION

FILE

For

—

fields:

NUMERIC

NUMBER OF MARACTERS
Each
number
is broken

TO THE

OF THE

LEFT

NUMBER OF CltARACTERS
Enter the number of

TO THE

RIGHT

OF THE

———

POINT

DECIMAL
and

into two parts: left
Enter the number of characters to the
(Minimum
of 19 maximum of 14.)

point.
point.

Manual

DataFlex 2.0 User's

(FILEDEF)

=======

right

left

DECIMAL

of the decimal
of the decimal

POINT

point (O to
characters to the right of the decimal
point are
4). The characters to the left and right of the decimal
DATE'
For
added
the total field length.
together by FILEDEF to compute
Dates
fields, no questions are asked,
are ALWAYS stored as three-byte
(

numbers.
For
FIELD

OVERLAP

fields:
OFFSET

OFFSET:

OF FIELD

IN

RECORD

This number represents the relative number
of bytes from the beginning of the record
to where the current overlap field starts.
If there are no previous overlap fields in
the recor6 then this number will be the
number
of bytes in the record up to the
If there are
first overlapped field.
their combined
previous overlap fie1dSg
in developing
length must not be counted
this number.
FIELD

LENGTH

LENGTH:

OF FIELD

IN

BYTES

This is the number of bytes the overlap
will span in the record. It should
field
be the total
length of the overlapped
fields.
For

ALL

field

RELATIONSHIP

types:
TO FILE:

NUMBER·0F

FILE

RELATED

FIELD

this field relates TO a field in another
fi1e9 enter the number of that file here.
A printout
of the
of the file definition
related-to file would be helpful for
answering
this and the next questiom
there is a relation.
If there is no a
FROM this
relationship
field, enter zero.

If

if

RELATIONSHIP

TO FIELD:

(FIELD

NUNEIER OF RELATED

FIELD)

in the
the question above was answered
then
(with a numberL
enter the
affirmative
number
of the field which is being related
TO.
Otherwise, enter a zero.

If

creation or editing of the selected field is now complete.
information for this field will be re-displayed for inspection
purposes.
If you wish to make further changesg enter a 'C',
is correct, enter a "+" to move on to the next fie16 or enter
menu.
to return to the activities

The

The

Copyright (c)

1984

Data

Access

Corporation

If

an

all
'El

~~~~~
05/16/84

DataFlex

2.0

OPTION

-

2

Manual

User's

the index(s) for a
to easily define

2 allows you to create or change
following "dialog" with FILEDEF allows
want
to your file indexed:

HOW MANY

you

The

file.
how

you

TO 4

(One

YOUR RESPONSE

PROMPT

FOR THIS

INDEXES

C-63

INDEXES

CREATE/EDIT

Option

FILEDEF

(FILEDEF)

DEFINITION

FILE

FILE:
A NUMBER

IN

THE

RANGE FROM

l

This will
to nine in 16-bit computers)
correspond to the number of unique
indexes you wish to have automatically
maintained for this file.

-******

THE

INDEX

HOW MANY

FIELD

if

FOLLOWING

WILL

REPEAT

FOR EA(>I

INDEX

NONE
The number

******

-will

SEGMENTS

IN

INDEX:
# OF

--

be

of the
displayed.

FIELDS

on 16
six segments
examp1é»
you
(6

USED

bit)

Each

--

index

IN

you

INDEX»
index

in 16-bit
might want

are entering

RANGE:

may have
computers.

l -

4

up to
For

to find on a
field named LASTNAME7 but also include
fields in the
the FIRSTNAME and MIDLINIT
index (for a total of 3) in order to
have
records with the same last names
Samuel)
properly
(Smith, Robert; Smith,
by
sequenced
first name and middle
initial within the list of Smiths.
Enter the number of fields to be
included in this index.
ON LINE

INDEX

(Y

be
If you answer Y(esL the index will
every
maintained on line and updated
time a change is made to the database.
the index will
If you answer N(Ó)9 only
passively as part
function normally
and will
be
of the file definition,
processed
updated
only when specifically
through REINDEX as an "ad hoc" index.
N(o)
Reasons
(a)
include:
for answering
your
systetds capacity for maintaining
by
indexes
on line
is already consumed
this index
more
important indexes; (b)
is needed only at infrequent intervals
for a periodic report, and not for
(c) this index is
routine FINDing;
and on line
updating
large and complex.
would
slow
in a large database
processing time down more than is

OR N)

justified.

——

Copyright (c)

1984

~
Data

~~
Access

Corporation

05/16/84

FILE

C-64

DataFlex

(FILEDEF)

DEFINITION

===========———~~~~~—~

-SEG X FIELD

THE

FOLLOWING

2.0

——
REPEAT

WILL

FIELD

NUMBER:

FOR EACH

NUNBER

SEGMENT

User's

Manual

"""""""""""""
--

SEGMENT.

OF INDEX

Enter the field number you want for this
The order in which
you
index Segment.
enter each field number will determine
its indexing precedence.

-\NHIW

THE

FOLLOWING

INDEX,

INITIALIZE

(X

APPEARS
OR

INDEX

Y),

(Y

ONLY

SHOULD

OR N):

FOR FIELDS
BE

ALREADY

IN

ANOTHER

BY THIS
specified above

USED WHEN FINDING

INDEX

--

FIELD?
is used

in
If the field
either this (the
another index a1ready9
current--X) index or the earlier one
from
should
be designated for FINDing
a
screen
with the cursor in the window for
this field. Generally, the index In
which
this field is first, or nearest
Your
the flrStg should be chosen.
choice will be designated the "main"
index for the current field in the File
(see
Definition
printout below).
of the above information was
from previous (default) data for
then
index9
an existing
the index will
However
automatically be initialized.

If

any
changed

if

ñQ changes

have

been

madeg

you

will

the option to initialize or not.
and there is
If an index is initialized
data present fn the data file a message
wIll appear
telling you to "REINDEX" the
section,
index. (See UTILITIES
have

REINDEX).

DELETING

AN

INDEX

select Option 2 from the
to delete an jndexp
Then
in
enter the OLD number of indexes
and
for number of indexes
press .
If
Ip enter
zero for its number of segments.

indexg
For
press
repeatedly to default
a higher-numbered
for the index
the prompt
through the questions until you have reached
you wish
to delete. Then enter a O for that index's number of
fo11owfng
The index
numbers
segments.
the deleted one
for indexes
i.e. if index 2 was deleted from a 3 index
the same
will ranain
...
When you
remafn.
would
delete an index, its
file, 'Indexesbe l and 3 from
will
the
disk.
deleted
file
time you
operations
responding to the
you want
to delete
at any
If
FILEDEF

wish

menu.
prompt
Index

~"""==""========,————————————————————————
"
Copyright (c) 1984 Data Access Corporation

——————

05/16/84

OPTION

3

PRINT

-

FILE

Manual

Dataflex 2.0 User's
FILE

(FILEDEF)

DEFINITION

C-65

DEFINITION
PRINT

The

third option on the menu,
inspect the file that has been

will

DEFINITION,

FILE

allow

you

to

defined.

have
the output to either the screen
the choice of sending
(default),
the printer, or a file.
If you send the output to the
printer make sure that ft is turned on, and set ON LINE before
entering this command to avoid a lockup.

You

you are sending
the output to a fi1eg the filename will be the
ROOTNAME that you have
supplied for the
that you are editing. and
Sending
have
an extension ".DEF"
(or rootname.DEF).
the
document
can help you
the application.
After sending
output to a

If

file

it will

file

the output to the fi1ep you can edit
include
in other documentation.
FILE
DEFINITION
FROM .DEF FILE"
for

it

file

A completed

DEFINITION

FILE

LISTING

more

with your text editor
to Option 8 be1Owg
information.

printed out, looks like

when

definition,

it

Refer

FOR FILE

and/or

"CREATE

this:

#21

***************************************************
ROOT NAME
= VENDOR
DISPLAY
NAME = VENDOR
DATAFLEX
FILENAME
= VENDOR

FILE
USER

***************************************************
RECORD LENGTH = 128 (USED =
MAX NUMBER OF RECORDS = 400
DELETED SPACE IS REUSED
RE-READ
INACTIVE
MULTI-USER

112)

(USED

= 5)

***************************************************
FIELD

FIELD

FIELD

FIELD

DEC

MAIN

RELATES--TO

Nt4BR

OFFSET

LEN

TYPE

PTS

INDEX

FILE

FIELD

2

l

31

I

30
30

ASCII
ASCII

1
O

O
O

O
O

VENDOR_NAME
ADDRESS

3
4

61
75

14
2

ASCII
ASCII

O
O

O
O

O
O

CITY
STATE

5

77

9

ASCII

O

O

O

ZIP

6

86

3

ASCII

O

O

O

PH0NE_AC

7
8

89
92

3
4

ASCII
ASCII

O
O

O
O

O
O

PHONE EXCHG
PH0NE_NUMBER

9
10

96

2

98
102

4
4

O
O
O

O
O

O
O

O

O

TERMS
CREDIT_LIMIT
CREDIT_USED

106
110

4
3

O
O

O
O

O
O

PURMASES
LAST_PURCHASE

li

12
13
INDEX

I:

FIELD

NUMERIC
NUMERIC

O

NUMERIC

l
l

NUMERIC
DATE

SEGMENTS:

<1>

I

<0>

-——————————————————————

Copyright (c)

1984

Data

Access

Corporation

—-—————

05/16/84

C-66

FILE

OPTION

4

Option

4 on
the

change
data

-

file,

OPTION

5

-

User's

Manual

will

PARAMETERS/NAMES9
SET FILE
allow you to
menu,
number
maximum
in a
namesg
of records
record 1engthp
Defaults are supported
the REUSE DELETED SPACE OPTION.
Refer to the NEW FILE section for
of operation.

the

file
and

here for ease
information on

2.0

FWUMETERS/NAMES

FILE

SET

DataFlex

(FILEDEF)

DEFINITION

questi

these

ERASE

DATA

ons.

FILE

Thi s
This optfon is used when ALL data in a file is to be deleted.
could come in handy when you want to delete sample data9 and bring the
system
up under
actual conditions, or when an end of period zeroing of
You
a data
is necessary.
This is a POWERFUL command.
will be
fije
asked
to confirm that you actually do want to zero the file before
to a capital "Y" (we want you
executes. This prompt will only respond
to be abso1utdly sure) . After the data file has been erased, the
without data, may be saved with Option 9.
remaining file definition,
If this is not done, the file definition will also be erased.

it

OPTION

6

-

SET

FILE

INACTIVE

This option will allow you to delete a name from the list of files
that appears
at the start of FILEDEF without actually deleting the
data
files from the disk. You will need toa confirm
file definition or want
capital
(Again, with
that you actually
to perform this action.
"Y"
only) . N0TEp to reactivate a fi1e9 upon entry into FILEDEFp
select the file number of the file that you want to reactivateg and
respond
for
to the question "NEW FILE" with "N". The procedure
removing
is to first set the file
all trace of a file from the system
ERASE eommand
then
use the
in the MENU or
inactive through FILEDEF,
your operati ng system.
OPTION

7

-

CREATE

FILE

DEFINITION

FROM SCREEN

IMAGE

This option reads in an IMAGE (created with a text editor) from a file
and all
you
the window
specify in response
to its prompt,
information in the image file is used to create a basic file
and optionally
an ENTER configuration.
Refer to the
definition
for more on how to create IMAGEs.
section on "Formatting With Images"

which

IMAGE to read
in.
for the file name of the screen
is located on a drive other than the default driveg
the file name with the proper drive speciffcation.
If you
want
an ENTER configuration
created for this fi1e9 answer "Y" to the
The configuration
created will have the ROOTNAME of
next questi on.
the IMAGE used, with an .FRM extensi on added.
If you want only to
and
with
not a configuration fi1eg respond
create the file definition
"N"
to this prompt.
You

will be
the file
If
precede

prompted

=" ".== ~ —~ ——

Copyright (c)

1984

Data

Access

Corporation

05/16/84

DataFlex 2.0 User's

(FILEDEF)

DEFINITION

FILE

Manual

C-67

——————
—————————————
———————————
image
screen
will be evaluated from top to bottom.
left to Thiright»
s
to extract the types and lengths of the fields in the image.
that may already exist under
process
will replace any field definition
the selected file name.
If you require a more complex file definition
with related fields or overlapping fields, you may use this option to
create the basic field structure and add the needed relationships
using Option One.
The

79

define the

FILE

DEFINITION

After using Option
8

OPTION

CREATE

-

indexes

with Option

FROM .DEF

2.

FILE

filename extension .DEF which can be created with
be used
can
to recreate the structure of the file
Sayg
that you
for example,
This option has other uses.
definition.
had a
you wanted
on an B-bit computer
that
to move to
definition
filemodel.
We wIll
asstme
is installed on both
that DataFlex
a l6-bit
You can
machi nes.
use Option 3 to create an ASCII
text file for the
This ASCII file can be transported to the 16-bit
definition.
file
Once on the
communications
by a data
machine
program.
l6-bit machine,
this .DEF file can be read by FILEDEF Option 8 to recreate the file
A new
created in this manner will
there.
definition
file definition
be empty
serves
to transport file
this process
of data. Of course
in the other direction also.
definitions
The ASCII
3
Option

OPTION

9

with
file above)

(see

SAVE

-

DEFINITION/EXIT

FILEDEF

just created or edited to the
This option saves the file definition
di sk.
another
After this option is executed, you will be asked
Respond
"Y"
to be loaded for file definition.
file definition is mol"é»
you
desire to edit
or "N" to exit FILEDEF.

if

if

disk space for the maximum
If you elected pre-a11ocat1on files of inrequired
DataFlex (see Installing
installing
possible size of database
DataFlexñ the files will be created at this time (If you are
maximum
In their
sIze when completely
establishing a new database)
enough
should
make certain
space
is available for
full of data. You
of dots during the
the new files. Your screen will display a sequence
time
is creating the new filem which may consume an hour or more
the new files are sizable.

if

it

respond
to the prompt
If another file is to be 1oadeL you may isalso
known.
the
This reduces
with the next file number to load
time required to load the menu and begin editing on the next file.

if it

OPTION

10

-

ABORT

FILEDEF

lO will
to the file
exit FILEDEF without making any changes
NOTE:
definition.
If you used Option Five to erase datag and you
then
abort with this optioñ» the selected erasure will not occur.
same is true if you deleted an index or took any other action.
Option

The

—-———

Copyright (c)

1984

Data

Access

Corporation

05/16/84

C-68

FILE

DEFINITION

(FILEDEF)

THIS

PAGE

Data

Access

DataFlex

INTENTIONALLY

LEFT

2.0

User's

Manual

BLANK

————

Copyright

(C)

1984

Corporation

05/16/84

ÉTTZT:

C-69

:::::::áF::;::F:F:::::F:::Z7IZ:II]I:I:ZZ:Z---

======="""
==========
==========

SAMPLE

——————————
——————————
__"__
==========
==========

APPLICATIONS

is an
multi-file configuration is provided with DataFlex. It Howinventory / order entry system which you may find quite useful.
The order entry sample
is, rather.
ever, that is not its purpose.
you wish to
intended as a teaching tool and as a starting place should
construct such a system.

A sample

order entry configuration
sample
data
files on your
become
you
thoroughly familiar
attempting to create your own
The
ing

as suppl
master

with

led is
disks.

how

multi-file

and

fully
It is
why

it

operational
works

step In understanding DataFlex is to run the
first From
"DATAFLEX
Menu.
you may select
the Master
rati on.
the order entry system.

FILE

BEFORE

configurations.

The

A SINGLE

includthat

recormended

demo configuDEMO" to run

SCREEN...

deal
with DataFlex using only ONE file at a time. To
operation at this level we will use the CUSTOMER file.
Although
the WSTOMER file is related TO by other files. It relates to
by
and thus can
be used
no others,
itself.

First

we
demonstrate

will

Copyright (c)

1984

Data

————

——————
Access
Corporation

~~~

05/ 16/84

THE

ájSTOMER

is only one
Select "CUSTOMER
look like this:
ACCESS

Manual

SCREEN:

There

DATA

DataFlex 2.0 User's

APPLICATIONS

SAMPLE

C-70

used
screen
to access
FILE
MAINTENANCE"
from

and

update

the

the

menu.

The

CUSTOkiER

CORPORATION

CUSTOMER

CUSTOMER
should
screen

NUMBER:

file.

MASTER

FILE

.

NAME:
ADDRESS:
ST:

CITY:

ZIP:

_
.%

DISCOUNT:

_

.

PURCMSES/MONTH
AMOUNT

DUE

$

$

.

$

PURMASES/YEAR

._

_

._

configuration to do file
single file screen
look-up on the CUSTOMER file. Refer to the Operator's
Guide
section of this manual on how to use the DataFlex Flex-keys to
operate the screen.
This is

maintenance

a simp1ep
and

This screen
displays all of the data in the CUSTCNER file. The first
autofield  is actually the record number assfgned
matically by DataFlex. Note that the use of record number this way Is
CUSTOMER numbers
assigned
User
optional.
or ID'S could also be configured with only a small modification to the system.
If an existing
CUSTOMER number
is entered into this field, the data from the CUSTOMER
file for that record will display when the  key is pressed:
EXAMPLE:

Enter

a <2> and
ájSTOMER
two



will

in

window

one.

and

the

data

for

display.

————————————————
————————
Copyright (c) 1984 Data Access

Corporati

on

05/16/84

DataF1ex

User's

2.0

SAMPLE

Manual

APPLICATIONS

C-71

CJJSTOMER
file is also INDEXED by the byCOMPANY NAME data field.
placing the cursor either
This allows us to FIND custaner records
over
entering all or part of a company name
the CONPANY NAME window9
and pressing FIND,
or using the above procedure on the 
EXAMPLE:

with the CLEAR Flex-key
l) Clear the data windows
Hit  to move the cursor to the COMPANY NAME
command
3) Type
a 
in "DATA" and execute
4) The CUSTOMER data
for "DATA ACCESS" will display.
2)

up to
systems

files
To

window

could be indexed
in this way on 8
four fields on this screen
which
have
(9 fields
Screens
multiple
on 16 bit systems).
per
displayed can have up to thismany indexes
file.

ENTER

customers

new

into

the

CUSTOMER

bit

with this screen:

database

l) Clear the screen.
The
Strike  to bypass the CUSTOMER number window.
number
automatlcally.
will be assigned
3) Type
data
into each window and press .
4) When all
are
fillech the record will
the required windows
be saved
in the database
2)

After reading the OPERATOR'S GUIDE,
comfortable with what the

you
feel
keyboard

I)
2)
3)
4)

comnands.

You

should

FIND ANY RECORD BY EITHER
CREATE NEW RECORDS.
EDIT

EXISTING

DELETE

Copyright (c)

be

experiment with this
program

does

as

yctú

screen
use the

until
various

able to:
KEY.

RECORDS.

RECORDS.

1984

——————————————
——
————-———
Access
Corporation

Data

—-—————

05/16/84

2.0

Manual

User's

DESCRIPTION:

FILE

CUSTOMER

DataF1ex

APPLICATIONS

SAMPLE

C-72

(sizep content and indexing) of the CUSTOMER data
displayed or printed out with the FILEDEF program.
looks like this:
display/printout
specifications

The
base

file

The

be

can

LISTING

DEFINITION

FILE

FOR FILE

#25

***************************************************
FILE
ROOT NAME
NAME
USER DISPLAY
SHORT

NAME

= CUSTOMER
= CUSTOMER
= CUSTONER

FILE

***************************************************
(USED =
RECORD LENGTH = 128
MAX NUMBER OF RECORDS = lOó
DELETED SPACE IS REUSED
INACTIVE
MULTI-USER
RE-READ

103)
(USED

= 4)

***************************************************
FIELD
OFFSET

FIELD
NMBR

FIELD
TYPE

FIELD
LEN

DEC
PTS

MAIM
INDEX

RELATES--TO
FILE
FIELD
O
O

CUSTOMER
ADDRESS
CITY
STATE

O

O
O
O

O
O

O
O

DISCOUNT
PUR MONTH

O

O

O

PUR

O
O

O
O

O
O

PROFIT
DUE

things

about

the

1
31

30
30

ASCII
ASCII

O
O

O
O

O

2
3
4
5

61
75
77

14
2

ASCII
ASCII

O
O

O
O

O
O

ASCII

O

O

6
7

87
88

l
4

NUMERIC
NUMERIC

O
2

O
O

8

92

4

NUMERIC

2

9
10

96
lOó

4
4

NUMERIC
NUMERIC

2
2

1

FIELD

l:

INDEX

10

SEGMENTS:

This display

tells

The

file

CUSTOMER

When

fileFILE"list

a
"CUSTOMER

Each

one

file
that will

number
show

and

file

can

(C)

file:

on

a

disk directory)

it will

show

is

as

file

(record

(provided there is sufficient
contain up to lOó customers
but
that only four records currently exist.

====."=====".======"==="=====—_———————————__—

Copyright

ájSTOMER

record will take up 128 bytes in the data
that of the l28g 103 bytes have been used.

disk storage)

YEAR

25

is displayed to the operator

CUSTOMER

length)
The

(the

ZIP

<0>

the following

is DataFlex

NAME

The ROOT FILE
"CUSTOMER"

us

<1>

O

1984

Data

Access

Corporation

—————————————

05/16/84

DataFlex

If

2.0

SAMPLE

Manual

User's

APPLICATIONS

C-73

to be added will be
is deleted. the next customer
deleted custanerts disk and record number automatically
DataFlex (deleted space is REUSED).

a custaner
assigned
the
by

file

The CUSTOMER
ment.
(Multi-user
There

types,

10 data
are
and names

One index
customer
Note

the

is not

is set

fields in each
are also shown.

to be used
INACTIVE).

in

a

custaner record.

multiuser

environ-

Their lengths,

for the CJJSTOMER file, composed of field
field <0> (the system
record number).

is active
name),

expected

Re-read

and

NUMERIC

that the 4-byte
point.

fields

decimal

will

each

hold

8

digits.

<1>

2

data

(the

after

file the record number is used as a system assignThis provides for maximum operator and systan
when
speed
since the operator
record (particularly
finding a custcmer
numbers).
Where
would
remember
this doesn't
frequently used customer
work
field for userwelb you could create an additional indexeci
assigned
account
using the
IVS or not use any codes at all by always
FIND the record by QJSTOMER
CUSTOMER NNE.
The operator can easily
by record
NN4E since that field
access
is also indexed. Although
number
is fastest, the INDEXING in DataFlex is so fast that indexing
should
of performance.
for reasons
not be avoided
Notice that in this
ed

account

number.

The

record number
index
create unique

THE



file

The
name
"CUSTOMER.FRM".

is made part of the index with CUSTOMER
with same
entries to allow two customers

<0>

CONFIGURATION

of the
The

ájSTOMER

NAME

to

name.

FILE

file

configuratfon

configuration on your
file looks like this:

demo

disk is

—

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

APPLICATIONS

SAMPLE

C-74

/F0RM
DATA ACCESS

DataFlex

2.0

NAME:

Manual

CUSTOMER

CORPORATION

CUSTOMER

User's

NUMBER:

MASTER

<_.>

'

<

ADDRESS:
ST:

CITY:
DISCOUNT:

_.%
$

PURMASES/MONTH
$

PROFIT/YEAR

with

Windows

l*
//
//
//

.

$

PURMASES/YEAR

._

_

._
be

> can

<

used

to

FIND

customers

file

maintenance.
simple ENTER configuration for customer
sequentia11y9
windows
the AUTOPAGE function
are processed
named.
do not have
and the windows
used
to be explicitly
be opened
must
OPEN CUSTOMER
All

This is
Since
be

ZIP:

_

a

the

ENTER

AUTOPAGE
ENTRY

//

CUSTOMER

files

FORM

is followed

connand

by

the

database

element

it

references.
the

//
//
//

Each

//
//
//
//

Do data
Translation:
entry on the record number of the customer
Automaticaily FIND by this field when data in input, but
file.
do not
put data back into the record buffer since record number
caMt be changed.

//

Translation:

//
//

The

window

options

assigned

is

can

by

After the

autopage.

by {}.
CUSTOMER.RECNUM

command

surrounded
ENTRY

ENTRY

{AUTOFIND,N0PUT}

CUSTOMER.CUSTOMER

ENTRY
ENTRY

Do data
entry on
CUSTOMER.ADDRESS
CUSTOMER.CITY

ENTRY
ENTRY

CUSTOMER.ZIP

ENTRY
ENTRY

CUSTOMER.DISCOUNT
CUST0MER.PUR_MONTH

the

customer

name

of the

customer

file

CUSTOMER.STATE

Translation:
for the month

When

the customer
in this window

{DISPLAYONLY}

file

is

founcb

display

ENTRY

CUST0MER.PUR_YEAR

{DISPLAY0NLY}

ENTRY

CUSTOMER.PROFIT

{DISPLAYONI-Y}

RETURN

//
ENTEREND
//
ABORT
//
KEYPROC KEY.USER//
OUTPUT

FORM

ENTAGAIN
RETURN

//
//
//

purchases

return from entry section
end of enter configuration
abort after escape key.
Define action of user defined key
Output
the page
Return
to same window
End definition
of user defined key

————————————

Copyright (c)

1984

Data

Access

Corporation

05/16/84

FILE

DataF1ex

The

the

User's

2.0

HELP
above

screens

listing
image

screen

SAMPLE

Manual

in the actual configuration have
to save space» as have certain

APPLICATIONS

been
spacing

C-75

eliminated in
lines in the

.

format of the screen.
top of the configuration
file is the IMAGEappears
in the first part
DataFlex will display the form exactly as
First the page is named with the "/F0RM",
of the configuration.
designating "FORM" as the name of the page. The DATA WINDOWS are
from
numbered
Notice that the last four
left toandright, top to bottom.
windows
that the last three contain exactly two places
are numeric
There
in this
point.
to the right of the decimal
are ten windows
image
format.

The

it

between
the fields
there is a one-to-one correspondence
this image,
Images
do
on the CRT screen.
in the data file and the display windows
not need to display all fields from a file; a single data field from
a file might be all
that was needed to be displayed.
In

contains a "l*". This mark
line following the end of the screen
of
indicates the end of the image format. It is a required e1«nent
compiler where the end of the
the DataF1ex
the configuraton.
tells
It
image
is, and where the command part of the configuration begins.

The

command
line opens the CUSTOMER
in a configuration must be OPENed.
beginlng of the configuration.

first

The
be used

in the configuration

The next
line
Command Group.
more
whole

"ENTER

All files that
file.
be
OPENS should

are to
at the

the ENTER
that is really
controls the
since

CUSTOMER"

is a DataFlex
just a comnand
like a complete
operation of this configuration.
The

ENTER

command
than
program

begins

macro

it

next line, "AUTOPAGE FORM", tells the DataFlex compil er that we
By using AUTOPAGE,
we don't have
will be using the page named "FORM".
assigned
They
are
automatically
to specify each window on the page.
by the connand.
in sequence
The

The next 10
ENTER ccmnand

work
ENTRY comands
with the
lines are ENTRY commands.
The window
and window.
data
element
and specify each
be emitted because
of the use of the AUTOPAGE Command.

numbers

can

See the
complete

section of this manual on the ENTER Command Macro
discussion of the functions and uses of ENTRY.

The

first

ENTRY

connand

AUTOFIND:

(C)

Executes


uses

a FIND
key
is

not put data
the record number
riot be changed.

NOPUT:

Copyright

line

Do

1984

Data

Access

for

a

options:

two

using data
pressed.

in the

INTO the
(the window

BACK

Corporation

record
data

window

when

the

buffer since
in this case) can

05/

16/84

SAMPLE

C-76

DataF1ex

APPLICATIONS

Manual

2.0 User's

———————

Refer to the

ENTER

Ccmmand

section for

Macro

a

full list

of options.

each
of the command lines to see how the file and
this time, review
image
and
in the screen
names
correspond to the windows
field element
Note
that in line one, record number is
the data file definition.
connected
This is typical in files
to window one (account number).
number.
where
the record number is used as a system-assigned account
At

The last line of the ENTER configuration
maintenance
ABORT.
When a
session
ESCAPE key will
cause
the configuration

file

WSTOMER
You

total

FILE

REPORT

for CUSTCNER FILE is an
is complete. pressing the
to abort.

EXAMPLE:

list

need
a simple report to
The following
purchases.

ájsToMER

our
customers, their
is the output of the

and

discount

REPORT

program:

FILE
DISCOUNT

CUSTOMER

PUR/YEAR
100.00

4
3

DATA ACCESS CORPORATION
DYSAN CORPORATION

15%
5%

49,713.50

2

MAXELL
MT MICROSYSTEMS»

20%
30%

57,000.00

l

INC.

12,056.00

118,869.50

Copyright

(C)

1984

Data

Access

Corporation

~

05/16/84

User's

2.0

DataFlex

SAMPLE

Manual

APPLICATIONS

C-77

— —

is

This report

produced

wIth the following

report configuration:

/HEADER
QJSTOMER

FILE
DISCOUNT

CUSTOMER
/BODY

PUR/YEAR

RESIDENT

/TOTAL

_O%

0

l*

OUTFILE
OPEN CUSTOMER
REPORT

//Print

//direct the output
//open the custaner

INDEX.I

CUSTOMER BY INDEX.I
the customers
in custcmer

HEADER
SECTION
OUTPUT HEADER
SECTION
PRINT
PRINT
PRINT

»D_

name

order.

//slmply

BODY
QjST0t·ER.RECNUM
ájSTOMER.CUSTOMER
ájsToMER.DIscoUNT

file

output the
id

//customer
//custcmer

name

number

//subtotal

will

page

is

headings

system

assigned

PRINT
ájsT0MER.pUR_YEAR
OUTPUT BODY
SECTION
TOTAL
SUBTOTAL
BODY.4

OUTPUT

take the accumulator
print

window
and
//for any numeric window.
in
another
//it
//print the total purchases
database

//custcmers

TOTAL

for all

in the

REPORTEND
ABORT

—————— —

Copyright

(C)

1984

Data

Access

~

Corporation

05/16/84

SAMPLE

C-78

2.0

User's

Manual

FILE:

VENDOR

THE

DataF1ex

APPLICATIONS

like the CUSTOMER file, is a single file configuraat a later time. The first
relate other files to
Then
step
is to run the VENDOR configuration from the DEMO menu.
examine
with that of the
for VENDOR and compare
the file definition

file,

vendor

The

tion.

We

it

will

it

file.

CUSTOMER

FILE

DEFINITION

LISTING

FOR FILE

#21

***************************************************
FILE

ROOT NAME

USER DISPLAY
SHORT NAME

NAME

= VENDOR
= VENDOR
= VENDOR

***************************************************
(USED =
= 128
MAX NUMBER OF RECORDS = 400
DELETED SPACE IS REUSED
RECORD LENGTH

RE-READ

MULTI-USER

.

112)
(USED

=

15)

INACTIVE

***************************************************
FIELD
OFFSET

FIELD
NMBR

LEN

FIELD

FIELD
TYPE

DEC
PTS

MAIN
INDEX

RELATES--TO
FILE
FIELD

2
3

31

l

30
30

ASCII
ASCII

O

l

O
O

O
O

VENDOR
ADDRESS

61

14

ASCII

O

O

O

CITY

4
5
6

75

2

ASCII

O

O

O

STATE

77
86

9
3

ASCII
ASCII

O
O

O
O

O
O

ZIP
PHONE-AC

7
8

89
92

3
4

ASCII
ASCII

O
O

O
O

O
O

FH0NE_Exá-g
FH0ME_NUMBER

l

9

96

2

NUMERIC

O

O

O

O

TERMS

10

98

4

NUMERIC

2

O

O

O

CREDIT_LIMIT

li

12

102
106

4
4

NUMERIC
NUMERIC

2
2

O
O

O
O

O
O

CREDIT_USED
PURCHASES

13

110

3

DATE

O

O

O

LAST_PURCHASE

INDEX

Note

l:

FIELD

SEGMENTS:

<1>

<0>

number
is used here
of record number as an account
indexing is also very much the same as in the CUSTOMER
file. The only real difference is the content of the

that the

as well.
data
base

The

Copyright

(C)

use

1984

Data

Access

Corporation

05/16/84

DataFlex

fields.
mation

User's

2.0

SAMPLE

Manual

This is an important DataF1ex
is dealt with remains
constant

concept:
even

though

APPLICATIONS

C-79

that the way inforthe application may

change.

introduces us to the DATE data type and field format.
are kept in JULIAN format, or, the number of days
since day zero. SInce dates are kept as numbers we can use them in
arithmetic expressions (add or subtract them). This is quite useful
for ageing
reports and due date calculations,
etc. Even though
dates
they are always
displayed in a DATE format
are stored as numbers,
window
(_J_J_) automatically converted to the conventional MM/DD/YY
format.

file

The VENDOR
Dates
in DataF1ex

File

maintenance

on

the

VENDOR

file

uses

——————————————————-————————————
————
Access
1984 Data
Corporation

Copyright (c)

the following

configuration:

—-——

05/16/84

C-80

SAMPLE

/F0RM
DATA ACCESS

DataFlex 2.0 User's

APPLICATIONS

VENDOR

CORPORATION

VENDOR NUMBER:
CCN'ANY:

<

<

_

TERMS

_

)

(DAYS)

LIMIT:

CREDIT

_.OUTSTANDING
REMAINING

Data

in

l*

<

> can

be

ENTRY

//
//
//

Translatiom

._
_J_J_FIND
used

//

Translation,

._

files must be opened.
// all
// inltalize enter macro. windows
automatically assign
//{NOPUT,AUT0FIND}

FORM

Do standard data
VENDOR.ADDRESS
VENDOR.CITY

entry

ENTRY
ENTRY

VENDOR.STATE
VENDOR.ZIP
VEND0R.NONE_AC

ENTRY
ENTRY
ENTRY

VENDOR. PHONE EXOlG
VENDOR.FHONE _ NUMBER
VENDOR.TERMS _

ENTRY
ENTRY

VENDOR.CREDIT_
VENDOR.CREDIT

ENTRY

When

the

on

LIMIT
_USED

vendor

Translation,

//
//

Translation, When a record is
minus
of credit limit (FORM.II)

window.

is

FOUND,

ENTRY

VENDOR.PURMASES

ENTRY

VENDOR.LAST_PURMASE

RETURN
ENTEREND
ABORT

note: the entry
//
KEYPROC KEY.USER

command

can

FORM

——————
—
1984 Data

founch

Access

name

of the

display credit

display the result

credit

vendor

used

file.

in this

used
(FORM.12)
{DISPLAY0NLY}

fn

of the calculation
this window.

{DISPLAYONLY}

return from entry section
// end
of enter cormand
//
after escape key.
// bestop
used

only

//
//
//

ENTAGAIN
RETURN

vendor

{DISPLAY0NLY}

(FORM.II-FORM.12)

ENTRY

the

{DISPLAYONLY}

file

//
//

(C)

$

VENDOR. VENDOR

ENTRY
ENTRY

Copyright

CREDIT:

._
._

with the record number of the vendor
file
the record buffer since
find record, do not update
can't be changed.

number
ENTRY

OUTPUT

$

vendors

to

VENDOR.RECNUM
Do data
entry

automat1ca11y

record

$

CREDIT:

$

OPEN VENDOR
ENTER VENDOR
AUTOPAGE

ZIP:

:

TOTAL PURMASES:
LAST PURQUiSE:

FILE

'
ST:

CITY:
(

MASTER

.>

ADDRESS:

PHONE:

Manual

inside an enter or entergroup
Define action of user defined key
Output the page
Return to same window

Corporation

05/16/84

DataF1ex

User's

2.0

SAMPLE

Manual

APPLICATIONS

C-81

—————

Notice the similarity
Each

ENTRY

this

between

line

connand

—

the one for
field with a

and
file
base

a data

links

new:
to the bottom. we see something
This is a calculated field that translates

ENTRY

Close

FILE
21,
WHEN DISPLAYING
(FORM.12)
FROM THE VALUE
RESULT

IN

(F0RM.I1-F0RM.12).

to:

SUBTRACT
THE
OF WINDOW

VALUE OF WINDOW 12
(FORM.ll)
AND PUT THE

li

13.

WINDOW

CUSTOMERS.
WINDOW.

is not a report for the vendor
file supplied with the sample
this one is up to you. Create a report format for
configurations;
VENDOR and use the CUSTOMER report as a model.
After making the
report, add
to the MENU using the MENUDEF program.

There

it

After.making your reportg try your hand at a simple file definition
AUTODEF takes a screen
and configuration
using the AUTODEF Program.
and makes
both
IMAGE format created with a text editor
the file
from
and compilable configuration
After making
definition
file
it.
and type
thesep
look at the file definition
with the FILEDEF program
Then
out the configuration with the operating system TYPE command.
compile the configuration.
THE

INVENTORY

FILE:

the inventory file we start to see the true power of DataF]ex.
Each
inventory part is supplied by a VENDOR, so the INVENTORY file is
said to RELATE to the VENDOR file. When an inventory part is found
(called into memory),
the RELATED VENDOR record automatically comes
with it. This relationship is automatically maintained by DataFlex.
With

DATA

INVENTORY

CORPORATION

ACCESS

MASTER

FILE

——————
VENDOR NUNBER:
PART

ID:

YOUR PART

ID:

VENDOR

_

NAME:

.

DESCRIPTION:
STOCK

QUANTITY:

REORDER

QUANTITY:
$

PROFIT/YEAR:

$

AVERAGE

PRICE:
COST:

.

.

SALES/YEAR:

$

.

._

_

._

$

._

$

.

WHOLESALE
STOCK

VALUE:

_

PRICE:
$

$

._
._

———————

—

Copyright

QUANTITY:

QTY ON ORDER:

.

SALES/MONTH:

LIST

MINIMUM

.

(C)

1984

Data

Access

Corporation

05/16/84

SAMPLE

C-82

DataFlex

APPLICATIONS

2.0
—

— ————————————

User's

Manual
—————

running the inventory data entry screen, the first two fields are
of interest
actually out of the VENDOR file. You can find the vendor
by either
keyp
screen
just like you could in the VENDOR
on this
VENDOR PART ID:
to find
screen. You can then move the cursor down to
number
and then
the first (or any) part for that vendor. The vendor
key", that is, you must
vendorG part number make up a "two segment
part number
then, put in all or part of the vendors
find the vendor,
to find a record by that index. To find the first part for any
vendor,
key.
enter the VENDOR NUMBER or NAME and hit the "SUPERFINO"
When

The INVENTORY
is also
and "DESCRIPTION".
PART ID"

file

windows

and

find

a

indexed
(able
You can put

particular

to find records by) "YOUR
the cursor in any of these

partt

fill

In
firstp then
partg find the vendor
This
configurain
the
other
did
the other
screens.
from
this inventory
tion will also allow you to create new vendors
number,
and when
vendor
vendor
name
no
a
new
with
screen. Just enter
Later we will see
will be created.
you SAVE the partg a new vendor
how to disable this
you want.
feature

When

you

are
creating a new
windows
like you

if

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DataF1ex

INVENTORY

APPLICATIONS

C-83

DEFINITION:

FILE

DEFINITION

FILE

SAKPLE

Manual

User's

2.0

LISTING

FOR FILE

#22

***************************************************
FILE
USER

ROOT NAME
DISPLAY
NAME

SHORT

NAME

=
=

INVT
INVENTORY

=

INVT

FILE

***************************************************
RECORD LENGTH
- 128 (USED = 104)

(USED

MAX NUMBER OF RECORDS = lOó
DELETED SPACE IS REUSED
MULTI-USER
RE-READ
ACTIVE

= 33)

***************************************************
FIELD

FIELD

FIELD

FIELD

DEC

MAIN

RELATES--TO

NMBR

OFFSET

LEN

TYPE

PTS

INDEX

FILE

FIELD

----I

————-—

-—---

--O

-——--

-—-—
21
O

-—---

2

3

2
15

-—-—NUMERIC
ASCII

3

15

ASCII

4
5

18
33
68

l
l
2

35
3

ASCII
NUMERIC

O

3
O

6
7

71
73

2
3

NUMERIC
NUMERIC

O
O

O
O

8

76

3

NUMERIC

O

9

79

5

NUMERIC

2

10

84
89

5
4

NUMERIC
NUMERIC

2
2

12
13

93
97

4
4

NUMERIC
NUMERIC

14

101

4

NUMERIC

l

II

INDEX
INDEX

2:

l:

FIELD
FIELD

SEGMENTS:
SEGMENTS:

INDEX

3:

FIELD

SEGMENTS:

.

O
O

VENDOR
VENDOR PART_ID

O
O
O

O
O
O

PART_ID
DESCRIPTION
QUANTITY

O
O

O
O

MINIMUM
REORDER

O

O

O

ON_0RDER

O

O

O

SALES_M0NTH

O
O

O
O

O
O

SALES YEAR
PR0FIT_YEAR

2
2

O
O

O
O

O
O

LIST_PRICE
WH0LESALE_PRICE

2

O

O

O

AVG_C0ST

<1>
<3>

<2>

<4>

<0>

record number (field
first field "VENDOR NUMBER" RELATES toallthethat's
This is
required to RELATE
zero) of the vendor
file (#21).
makes
and
essentlaily
the
the inventory file to the vendor
file
vendor
file a logical extension of the inventory file.

The

it

indexes. The first index is by vendor
part id (field two). This combining
fields to make one index is called a multi-segment index. Since
record number is NOT appended
to this index, two parts Cáñft have
which
would
be a duplicate
AND part number,
record.
same vendor

The INVENTORY
number
(field

file

one)

has THREE
AND vendor

of
the

the same part to be
field 39 or YOUR PART ID, a1lowing
different part numbers,
yours and the vendoMs. Could
two
parts have the same part number?
If notp how could you allow that
Answer:
No, two
you wanted?
parts could not have the same
but
number,
circumstance could still be dealt with
if they coulcb the ZERO
by appending
field
(the record number)
to the indem
effectively
index
despite the duplication.
entry unique
rendering the composite
Index
known

TWO is
by two

on

if

Index
column

allows access by
of the file definition.

THREE

Copyright (c)

1984

Data

Access

DESCRIPTION.
The main

Notice the
is the

index

Corporation

"MAIN
number

INDEX"

of the

05/L6/84

index

there
there
THE

used

that will be
are
no fields
are9
the main

INVENTORY

IFORM
DATA ACCESS

DataFlex

APPLICATIONS

SAMPLE

C-84

In this file
field.
one index, but where

FIND
by that
you
used
in more than
becomes
important.

when

that are
index

CONFIGURATION:

ENTER

(some
image

lines are deleted
area
to conserve

NUMBER: <

VENDOR PART

ID:

YOUR PART

<

STOCK

QUANTITY:

REORDER

QUANTITY:

$

AVERAGE

>

'
MINIMUM

$

COST:

QUANTITY:

_.

QTY ON ORDER:

._
._
._
._

$

PRICE:

FILE

'

.

PROFIT/YEAR:

MASTER

>

.

$

the

NAME: <

.>

<

SALES/MONTH:

LIST

_

ID: <

DESCRIPTI0N:

from
space)

INVENTORY

CORPORATION

VENDOR

Manual

User's

2.0

$

SALES/YEAR:

WHOLESALE
STOCK

._
S

PRICE:
$

VALUE:

._
._

l*
//
//

This enter configuration is a
with two files. The inventory
OPEN INVT
// All
OPEN

VENDOR

ENTER

INVT

AUTOPAGE

//
//
//
//
//
//
//

These

VENDOR

FORM

fields use the
to the FORM

assigned
ENTRY

little
file

more
sophisticated
RELATES
to the vendor

since

it

deals

file.

files must be OPENED before use.
// The order of opening the file Is
// not important.
INVT and VENDOR.
will maintain TObothVENDOR
// ENTER
// Since INVT relates
it MUST be
on the ENTER line.
// first
// INVT is the main file.

Set
AUTOPAGE

//

page.
VENDOR.RECNUM

up to automatically
option--the windows

assign windows.
automatically

are

{AUTOFIND}

Translation, do data entry on the record number of the vendor
file.
by number.
Automatically try to find the vendor
Note
that the element
of the related TO file is used here
PUT to the VENDOR field
and automatically
of the INVT ff1e.
be used
The
should
always
in a case like this.
related TO element
(This configuration

Copyright (c)

1984

Data

Access

is continued

Corporation

on

the

next

page.)

05/16/84

DataF1ex

User's

2.0

SAMPLE

Manual

C-85

APPLICATIONS

—————

VENDOR.VENDOR
data
entry

ENTRY

Translation, Do
Skip
this entry
that a vendor be

{SKIPF0UND,FINDRECL}
on the vendor
name of the vendor
and REQUIRE
found
has already been

//
a record
Iffound
//
to continue.
//
{SKIPF0UND,RETAIN}
ENTRY INVT.VEND0R_PART_ID
Do data
part id of the
entry on the vendor
// Translation,
Skip
this if a record has been found (preventing
// file.
the entry after a clear window command.
// and retain
{RETAINALL,REQUIRED}
ENTRY INVT.PART_ID
ENTRY
ENTRY

These

//
//

//

INVT.MINIMUM

ENTRY
ENTRY

INVT.REORDER
INVT.ON
ORDER

inventory
changes)

{CAPSLOCK}

INVT.DESCRIPTION
INVT.QJJANTITY

ENTRY

file

do not
use autopage--they name each
form
is acceptable.
OISPLAYONLY}
ENTRY INVT.SALES
MONTH FORM.IO
UJISPLAYONLY}
ENTRY INVT.SALES
YEAR FORM.ll

fields

window.

Either

The

ENTRY
ENTRY

INVT.PR0FIT_YEAR
INVT.LIST_PRICE

ENTRY

INVT.WH0LESALE_PRICE

ENTRY
ENTRY

INVT.AVG_C0ST
FORM.15
(INVT.QUANTITY*INVT.LIST_PRICE)

line

above

//

RETURN
ENTEREND
ABORT

KEYPROC

//
//

KEY.USER
OUTPUT FORM

//

Notice that there are now
the configuration section.
both

the

FORM.16

Define action of user
Output form to list
Return
to same window

files
and
files

two
INVT

OPENED on
VENDOR,

the

This

defined

key

two lines
first ENTER
to
tells
The ORDER

INVENTORY
in this screen.
are
listed on the ENTER line is important.
RELATED TO by the others go to the right
are
of
The
TO them.
is called the MAIN

VENDOR

these
which

FORM.14

displays a calculated field.
return Is required at the end of the entry section.
// as is ENTEREND.
// After the ESCAPE key is hit, abort.

ENTAGAIN
RETURN

which

FORM.12
FORM.13

and

files

of
use

in

The

the files
relate
file. The
first
file
MAIN
file is the one that relates (directly or indirectly) tocanallbt the
(there
others. INVT is the main file in this configuration.
files that areMt related to at all).

files

which

the VENDOR file while all the others are
the same (related) field is present in
RECORD NUMBER in the VENDOR
both
such
as;
file and VENDOR TO
files,
ALWAYS use the field
NUMBER in the INVENTORY
that is related
file,
by the other(s)
That's why VENDOR.RECNUM
in the ENTER configuration.
VENDOR NUMBER in
is used in the first window instead of INVT.VENDOR.
when a record is
the INVENTORY file will be automatically updated
The
from

two
fields are
the inventory file.

first

from
When

saved.

Copyright (c)

1984

Data

Access

Corporation

05/16/84

DataFlex

APPLICATIONS

SAMPLE

C-86

User's

2.0

familiaribasic

This ends the sample section of the demo for your initial
be studied after
The rest of the demo should
you
zation.
operations with some application work of your own.
APPLICATION

Select "INVOICE
look like this:
ACCESS

INVOICE

ENTRY"

BILL

TERMS

_.

—.

PART

from

the

demo

one

in

or

files at a timep but
order entry application.

two

our

menu.

The

invoice

will

screen

INVOICE

CORPORATION

NUMBER:

DISC

master

STRUCTURE:

been
So fam we have
considering only
what
is happening
to really understand
LetG look at the whole picture:

DATA

Manual

ID

ájST0NER#

.

.

TO:

VIA

DATE

SLSMN

ORDER

OJSTONER

—J—l—
QTY

PRICE

DESCRIPTION

AMOUNT
~~~~~~

——————————
TOTAL

To

a new invoiCeg
enter the invoice number.
ájSTOMER
NUMBER in window
two
or the CUSTOAR

create

$

You
NAME

._
may then
window

ENTER

three
the CUSTONER data will
ship-to address; you
This will
display.
The
these
you wish.
to
may change
fields
cursor will then move
invoice header area and take the default values (these are coming from
In the LINE ITEM section the object is to find an
the ájSTOMER file).
inventory item by either of the two keym and then ENTER the QTY sold.
A default
for the unit price will come from the inventory file less
will be
the discount in the ájSTOMER file. The other affected windows
keys
You may use the arrow
updated
and you can save
to
the line itan.
The delete record key
deletes an
up and down through the items.
move
entered line item. Press the ESCAPE key to print the Invoice.
the
and

do

a FIND.

Once

in

found
have
a customer.
you
become
the default for the

if

Copyright (c)

1984

Data

Access

Corporation

05/16/84

User's

2.0

DataF1ex

SAMPLE

Manual

C-87

APPLICATIONS

Vendorp
are
five files open in the Invoice screen; Customerp
The
Line itans (inventory transactions).
Inventoryp Invoice header9
structure of the files looks like this:

There

CUSTOMER
t
I
I

VENDOR
I
l

l
I

INVENTORY
l
l
LINE

l

ITEMS-----r

a multi-line
configuration that produces
multi-file report like
is included on your disks as the
"Flex-gramming".
is advanced
It
understand
You should
basic operations with ENTER
file "INVOICE.FRM".
which
and REPORT before trying
uses
a configuration
like INV0ICEp
comand
descrfbed in the next section.
The

this

The

f11esg

and

screens

reports that

make

up

the

demo

are:

REPORT
CONFIGURATION

ENTER
CONFIGURATION

NONE

DATE.FRM

VENDOR

VENRPT.RPT

VENDOR.FRM

22

INVT

INVT.RPT

INVT.FRM

25

CUSTOMER

ájsTRFT.RFT

CUSTONER.FRM

29

INTRAN

MOVEMENT.RFT

INVOICE.FRM

FILE
NUMBER

FILE
NAME

l

SYSFILE

21

(SYSTEM

FILE)

(INVENTORY)

(LINE

ITEMS)

~

Copyright

(C)

1984

Data

Access

CorporatiotÍ

05/16/84

C-88

SAMPLE

APPLICATIONS

THIS

Copyright (c)

1984

Data

DataFlex

PAGE

Access

INTENTIONALLY

Corporation

LEFT

2.0

User's

Manual

BLANK

05/16/84

"
=""""_""""__—"____———""~~""""""~~"_
"===~"====="""""""""~"""""""""

=
__~~~—~—

=======

ENTRY

——

DIRECT

~~—

—~———————

======="""""_"""""""_
___

= ""

CONTROL

OF DATA

=

D~l

"====

==========
===
==========
============
"
""""""""===,==============,=============———_

PAGESp
image
DataFlex Forms command group controls screen
with datm
including display of the PAGE Image, filling the windows
moving
to the record buffem formatting display
the data from windows
of data, and clearing both data and images from the screen.
The

Command

PAGE

action of the PAGE command is to display any labeled PAGE of a
configuration on the screen. PAGEs are labeled through the use of a
"pagename"
of Configuraas discussed in the chapter on "Elements
The prerequisite
for the PAGE command is that at least one
tions".
defined and labeled image page be present as part of the configuration
Images"
See the section on "Formatting With
processed.
being
for
details of the page configuration.
The

FORMAT:
PAGE

pagename

PAGE
PAGE

ffrstscreen

PAGE
PAGE

pageheadfng

EXAMPLES:

PAGE

secondscreen

subNadlng
reportbody

MOVE
or DISPLAY to a page will be immediately displayed in the
for that page.
appropriate window when a PAGE command is executed
It
is important to note that since windows
are variables and can be used
just like any other defined and typed variable in DataFlex, data can
be MOVEd to or from
a window
without the necessity of displaying the
Any

PAGE

image.
———————————

ACCEPT

CXmmand

and waits for keyboard
places the cursor in an image "window"
for the ACCEPT command is a
Further. the QIÜjL valid argument
window,
is the
referenced either as the format PAGENAMEÁ where
number
of the window in the pagep or as a named window with the window
command.
by the NAME definition
name established
ACCEPT

input.

"r

input into a
displays the operator's keyboard
pass
the input data
above). It can, optfonaljy,
configuration using the optional
in the DataFlex
extension as part of the execution of the same command.
field edit keys are active during an ACCEPT command.

ACCEPT
On executiom
(as
window
specified
to any legal argument
"TO
The

argument"
DataFlex

——-———-————-——————-——-——————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DIRECT

D-2

CONTROL, OF DATA

DataF1ex

ENTRY

2.0

Manual

User's

ACCEPT,
remember
using
that the window reference itself is a
Data
does
valid variable that can be used throughout a configuration.
not need to be moved to another variable for processing in calculations, data base operations etc. Useful amounts of memory can be
conserved
by using the window
a
as a variable
to contain data;
a dual
variable is defined only to hold the data input from a windorg
overhead
is created to store the same information.
When

if

FORMAT:
{TO

ACCEPT

window

ACCEPT

screen.3

ACCEPT

screen.3

ACCEPT

window7

argument}

EXAMPLES:

TO

¶nventory.descript1on
defined

ACCEPT

screen.3

TO
P

previously

(w1ndow7

inventory.qty

TO

by

NAME command

screen.lO

{T0 argument}
is omitted from the ACCEPT command
"window"
be processed
manner.
can
in any normal
{TO argument}
Where
the
is used, an automatic MOVE command is executed
"window"
from
when the input is received, placing the data
into
has no
election
"argument". The "ACCEPT window TO argument"
which
will hold the same data as
effect on the contents of the wlndcm
may
is executed. The window argument
after the comiand
the argument
be
of the ACCEPT command line by using the AUTOPAGE command.
Where

the

line,

the

optional
data
in

itself

(see

out
left
AUTOPAGE)

already exists in a window from a previous
will be the default entry for the next
appropriate PAGE is not displayed at the time that
executed, the PAGE will be displayed by the ACCEPT.

If

data
DISPLAY9

it

=
DISPLAY

ACCEPT.
ACCEPT.
an

MOVE

ACCEPT

If

or
the

is

—

Command

in the same manner
as
explicitly
outputs data to a window
allows input.
Accordingly, the QñiY valid output destination
either as PAGENAME.#
for DISPLAY is a window in m image addressed
where
"iV is the sequential number of the window in a page image9 or
DISPLAYed
data
as a name established with the NAME command.
will not
clear when the CLEAR ALL Flex-key is pressed; only data displayed by
wf71
respond
the ENTRY comand
to the CLEAR ALL Flex-key.
DISPLAY
ACCEPT

FORMAT:
DISPLAY

argument

TO window

DISPLAY

1nvt.descrfpt'lon

EXAMPLES:

DISPLAY
Where

~~+~
Copyright (c) 1984

name"

Data

screen.3

TO mem_name

member.name
"mem

TO

was

Access

previously

created with the

Corporation

NAME command

05/16/84

User's

2.0

DataFlex

AUTOPAGE

be

reference

The window
AUTOPAGE.

may
AUTOPAGE)

(see

out of the

left

OF DATA

CONTROL

DIRECT

Manual

DISPLAY

command

D-3

ENTRY

by

using

Command

on a
of windows
performs m automatic sequential numbering
ACCEPT and DISPLAY
the ACCEPT, DISPLAY and PRINT commands.
which
in
follow an AUTOPAGE command will reference windows
from
for the
sequence
to r1ghtg top to bottom. The argument
left
AUTOPAGE command
is any pagename valid for the current configuration.
only to be used on a portion of a PAGE, the number of
If AUTOPAGE iswindow
The
be added
{}
may optionally
to the command.
the starting
should
below
shown
braces
not be typed--only the number of the
to process
starting window.
every window in the
It is not necessary
but
PAGE after
an AUTOPAGE commandg
the list of windows
to process
must
be continuous (no gaps)
after each AUTOPAGE command.
AUTOPAGE
PAGE for
commands

DISPLAY
AUTOPAGE allows the use of the ACCEPT)
without the necessity of specifying the window
action is to take place.

and PRINT
commands
where
the command

FORMAT:
AUTOPAGE

pagename

uu

AUTOPAGE

emp1oyee_record

EXAMPLES:
DISPLAY
DISPLAY
DISPLAY
DISPLAY
ACCEPT

//D'lsplay
//Dlsplay

emp.city
emp.phone
TO data.ver1fied

AUTOPAGE emp1oy8e_tax_status
DISPLAY
emp.marftal
emp.exemptions
DISPLAY

CLEARFORM

and

BLANKFORM

//Dlsplay the screen
//Dlsplay the 8th window
//Disp1ay the 9th window

8

Commands

data
commands
remove
pagename),
(by
image

These

entire

the screen
the 1st window
//D1sp1ay
the 2nd
//D1spiay the 3rd
//D1sp1ay
the 4th
//Accept input to the 5th

emp.name
emp.address

from
an

image

windows.
window

individual

They

or

a

can address
range
of

an

windows.
For

example,

to the
data

after

data

diskó

from

has been
entered
commands
can be
ready
the image

to

one of these
and
the windows

a screen
executed

image

and

saved

to clear the input
for the input of more data.

CLEARFORM removes
all data from the
follows:
character" in the window as defined in
and
image
Utility; BLANKFORM removes all data Thein the
two
different
displays ASCII space characters in the windows.
forms
of operation are provided to allow as much flexibility as
possible in application design. Most configurations will probably use
BLANKFORM when
CLEARFORM.
The DataFlex READ configuration
uses
displaying the field tag names for reference.
The commands
differ
and displays
image
the SETSCREE

Copyright

(C)

1984

as

the

Data

"fill

Access

Corporation

05/16/84

DIRECT

D-4

OF DATA

CONTROL

ENTRY

DataF1ex

2.0

User's

Manual

FORMAT:
pagename
pagename

(clear entire

BLANKFORM
CLEARFORM
BLANKFORM

window
window

(clear

CLEARFORM
BLANKFORM

window.nl
window.nl

CLEARFORM

THRU
THRU

page)

a window)

window.n2
window.n2

(clear a range of windows
starting at window.nl and
stopping at window.n2)
OUTFILE

Command

to identify the sequential device (printer,
screen, a
is to receive data controlled by the OUTPUT command.
The
for the OUTFILE command is any valid file or device name
OUTFILE
command
exists in
addressable by the operating system.
If no usecb
and the OUTPUT command
a configuration,
is
output will be
directed to the printer port.
If the OUTFILE comand is provideb but
provided with the
this means that an argument
with no argUment7
operating or menu command which runs the configuration will designate
DAILYREPORT
CCN: would
command
FLEX
system
the device (the operating
cause
the configuration DAILYREPORT to be output to the screen).
If
no argument
is entered on the command 1inep output will again go to
LST:
Finally, the OUTFILE command may
(the printer in most systms).
an argument
in the configuration as shown below.
itself havemarks
are
required for literal arguments.
Quotation
OUTFILE

disk

is

file)
argument

used
which

FORMAT:

btr1ng_arg}
"string_arg" is a literal text string in quotation marks
or a string variable containing the name of a legal output
device or file.

OUTFILE
Where

EXAMPLES:

(list

device))

OUTFILE

"LST:

OUTFILE

"abc.dat"

(output to

OUTFILE

destdev

(output to device or file indicated by
the contents of string variable DESTDEV

"

(output to printer

OUTFILE

(looks for

file

ABC.DAT)

argument

from

command

line)

OUTFILE
command
permits output in the same configuration with
For
exampieg
after data for an invoice has been
other operations.
be sent to a printer
can
for demand printing.
inputg

The

it

OUTCLOSE

Command

OUTCLOSE is used
After a file or device is established with OUTFILE,
when the configuration
is being terminated.
to "close" the file/device

Copyright

(C)

1984

————
Data
Access

——————

Corporation

06/08/84

DataFlex

2.0

Manual

User's

======="====—

"———
This

is

uses

no

CONTROL

OF DATA

ENTRY

D-5

—————~——~~~——=========="=
= == —~——————~—————~m———~~

==

command

which

DIRECT

it

since

argumentp

open.

operates

on

any

device or

file

FORMAT:
OUTCLOSE
===================W======

———~
OUTPUT

=

Command

OUTPUT

addresses
argument
a "pagename"
by "pagename"
to OUTFILE.

tin>

data.

and

prompts.

All

data
OUTFILE.

sent to

are

transfers the entire page
in the page--format-

and

referenced

See

OUTFILE

command.

FORMAT:
OUTPUT

pagename_arg

OUTPUT

invoice

EXAMPLE:

&

=====~~

———~———~

NAME Command
NAME

is

rather
be

can

windows
There

used
to identify
PAGENAME.#.
than
NAMEd:
explicitly

in a
are two

page
forms

with a specific identifier
A window
of the command.

FORMAT:
NAME
Or

a group

of

NAME
Using

page_name.#
windows

window_name

in

page_name

a

page

can

window_namet

be

NAMEd:

window_name2

...

window_name8

be NAMEd on
can
of the command, multiple windows
multiple NAME command lines can be used to
do
of the windows
in a page,
the names of all the windows
Care
should
be taken
conveniently on a single line.
to avoid
not
(such
word
as NAME, PAGE,
using any command or opticm
of DataF1ex
datep
number,
etc.) as a window NAME. The names are applied to
windows
in order froru t® left to rightp and then down by line.

the

a single
NAME all

second
comnand

form

line;

if

fit

EXAMPLES:

quantity

NAME

invt.6

NAME

lnvt part_id

of an AUTOPAGE with a
group
of windows
starting
the
should
pagename
not be
multiple NAME lines may be
Use

descr vndr cost price quantity
starting
with that
repeated
used

if

window
window

after
necessary

i¥ enables
number.
the

NAMEing

of a
instancep
AUTOPAGE command.
Agaim
to NAME all the windows.
the

In this

EXAMPLE:
AUTOPAGE
NAME

Copyright

(C)

invt 7
quantity stock

1984

Data

pmfit

Access

total

Corporation

05/16/84

D-6

DIRECT

FORMAT

Command

CONTROL

OF DATA

DataFlex

ENTRY

—

2.0

User's

Manual

———————————

DataF1ex
window
one or more
may have
format and data verification
The options are
applied by use of a FORMAT comand
options.
the desired options, and any applicable
specifying the window.
In this instance, the brackets {} used to delimit
parameters. NOTE:
·
the options are literal, and are to be typed.
Each

FORMAT:
FORMAT

w1ndow_arg

{optionl.

opt1on2

...

optionN}

"pagename.#"
be in the form
can
or a named reference
The following
options are
established with the NNE Command.
available for window formatting:
"Window_arg"

FUNcTTñN
DECIMAL

.SYNTHX
FORMAT

{P0INTS=n}
where
"n" is the number of places to the
This can
point in the window.
right of the decimal
reformat a window or can be used to comfigure an
integer-only numeric
field by setting a value of zero
(O)
for "n".

entry

and

UPPER

CASE

{CAPSL0CK}
This option accepts upper case
converts lower case entry to upper case.

RANGE

CHECK

í¥2} {RANGE = m/dd/yy,
nn/dd/yy} Provides
= #1,
automatic check of entered data and declares an
the date
error and returns the cursor to the window
does
numeric
the
within
value
entered
not
fall
or
where
the
values specified in the RANGE coímand,
first
value is the low end of the rangep and the second is
The
high
end.
and
upper
lower values in the
the
command
are
included within the valid range.
{RANGE

an

if

VALIDITY

MECK

{a1E«="entryl1entry2lentryn"}{NECK=string_var}
Provides an automatic check of entered data and
declares an error and returns the cursor to the window
the
entry does not match any substring in the eEcK
Where
command.
an eligible
entry has fewer characters
the
wIndow,
than
characters must be specithe excess
below
The vertical
bars
(shown
as B).
fied as spaces
below
recommended
shown
are
delimiters.
optional
(I)
Delimiters, if used, should be characters unlikely to
The comand
be input erroneously by operators.
may
in-memory
reference a previously-defined
alternatively
element):
string variable (not a window or database

if

{WECX="YESlNOBlYl6BlNBB"}
{OECK=password}

Calculations and string manipulations on data in formatted windows
should be avoidéd»
since the formatting can change the apparent
of the calculation or
"value" of the contents for purposes
be done
on the
Calculations and manipulations should
manipulation.
(database
data
e}ementg
source
literal string, in-memory variable,
Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex

2.0

User's

DIRECT

Manual

CONTROL

——————

OF DATA

was

if

D-7

——-————-————

———————————

etc.) from which the window
of the results to the windoic,

ENTRY

with, with replacement
output purposes.

to begin
filled
desired for

following additional options are valid for formatting output for
Like the other format options, they
the DataFlex PRINT command only.
are
set using the FORMAT comand.
The

BLANK

{SUPPRESS)

SUPPRESS

Strips
data
QIARACTER

spaces
and

with

numeric

spaces
remaining after data
character specified in "x".

is put in

window

{SIGNRT}

ON RIGHT

on

the right

dollar

sign

a minus

sign
less than O.

Places
va7ues
FLOATING

in

spaces

{FILL="X"}

FILL

Fills theIn

SIGN

output (leading spaces
in a7phanumeric).

from

trailing

side of

numeric

{FLOATA

DOLLAR

Places

a

numeric

floating
value.

line
Multiple formatting options on a comand
and separated by
single pair of braces
comas:

($)

on

are

enclosed

the

left

of

within

a

a

EXAMPLE:

"}.

{CÁPSLO,MEÉ="YESINO

=====—
PRINT

Command

data
PRINT
command
moves
to a window and uses special formatting
In particular,
options where they are Included 'In the configuration.
the PRINT command is the only comnand which can update SUBTOTAL
accumulators in the REPORT macro.

The

FORMAT:
{TO

window}

PRINT

arg

PRINT

lnvt.descr
fnvt.descr TO BODY.2
payrol1_amt TO BODY.3

EXAMPLES:
PRINT
PRINT

in the first
forcep since the

Note

example
connand

above
that
contains no

—————————————————
————
Access
(C)
1984 Data

Copyright

an AUTOPAGE connand
window
reference.

Corporation

must

be

in

05/16/84

DIRECT

D-8

CONTROL

OF DATA

DataFlex

ENTRY

2.0

User's

Manual

=======—~——~———~—————————"——

ENTERGROUP
data
entry environment. The
inclusion in more custom-programmed
been
may have
configurations
in whicht for one reason
or anothem
The
use of ENTERGROUP will
elected not to use the ENTER macro.
first
procedures
load
that define the operation of
a set of predefined key
the function keys: NEXT RECORD, PREVIOUS RECORD, BACK WINDOW, CLEARp
SAVE,
howeverg
and SAVE.
will not save the record under ENTERGROUP,
end of the
Rather,
as
will under ENTER.
will simply go to the
ENTERGROUP and resume
Likewisep CLEAR will
execution from there.
ENTERGR0UPg
under
rather than clearing both the
clear only the screen
ENTER.
SAVE and CLEAR
does
under
and the record buffer,
as
screen
be redefined to provide whatever
action is appropriate
can,
of course?
as can
all the other Flex-keys, using KEYPROC
to the application,
(see
procedures
Function Keys".
the section on "Using
The ENTER macro
provides a complete
ENTERGROUP command
is intended for

it

it

it

it

Multiple
group
access

must

ENTERGROUPs
be ended

Each
same configuration.
key
The use of multiple
command.
by ENTERGROUP.

can

be

included in the

with

an

ENDGROUP

to records is

fully

ENTERGROUP
ENTRY

commands

supported

FORMAT:

ENDGROUP
Any

the

changes
end of

will be moved to the record buffer at
in the ENTRY windows
the enter group unless NOPUT was used on the windows.

EXAMPLE:
ENTERGROUP
ENTRY
ENTRY
ENTRY
ENTRY
ENDGROUP

INVT.ID
INVT.DESCRIPTION

{AUToFINcñ
{FINDREQ,SKIPFOUND}

INVT.VENDOR

{DISPLAYC)NLY}

INVT.PRICE

would
allow FINDS in the INVT file by either ID or DESCRIPTION
The record buffer would
be edited
allow the PRICE to be changed.
with PRICE but the record would NOT be saved.

This
and

options are available in an ENTERGROUP, as is the
The
described in the section on "Data Entry".
SUPERFINO
and DELETE Flex-Keym howeverp
are
not defined, as they are
the
more
flexible possible applications of
in ENTERg because
programming
ENTERGROUP require application-specific
of these
These
as they do not in ENTER.
Flex-keys can be programmed
functioim
on
as described in the section of this manual
with KEYPROC comandm
"Using
Function Keys".
is desired for some reason to alter the
If
pre-programming
of other Flex-keys as provided in ENTERGROUP for a
those
specific application,
other Flex-keys also can be re-programmed
with KEYPROC comnands.
ENTRY
ENTDISPLAY

All

formatting
command,

it

———
Copyright (c)

1984

Data

Access

Corporation

07/10/84

DataFlex

CONTROL

DIRECT

Manual

User's

2.0

OF DATA

ENTRY

D-9

using one ENTERGRQUP.
is a sample configuration
It is the same
Tutorial" section
configuration as is shown in the "Programming
used
the ENTER macr"o» and the
except that that example
of this manuab
The di fferences between
the
uses
an ENTERGROUP.
one on the next page
two versions of the configuration
are
instructive.
Below
ENTER

/SCREEN

..

PERSONNEL

..... ..... ,., ..,... .... ...

Fi

Last
EMPLOYEE

NAME

:
:

CITY

:

SEC.

SOC.

#

:

HIRED

DATE

RATE

:

PAY

TYPE

:

...... ... ...... ... .....
MI

rst

_'
ST

:

ZIP

_

:

>

<

_J_J—

:

PAY

..

<

:

ADDRESS1
ADDRESS2

FILE

$

._
(H=Hour1y

_

or S"Sa1aried)

Enter a Name or Soc. Sec. S and press FIND to display record,
OR
press  to exit and return to the DataFlex Menu...
*
/
OPEN PEOPL E
START:

//begin loop
//enter·grou p

ENTERGROUP
AUTOPAGE SCREEN
ENTRY PEOPLE.LNAME
ENTRY

PEOPLE.FNAME

ENTRY
ENTRY

PEOPLE.MI

ENTRY

PEOPLE.ADDR2

PEOPLE.ADDRI

ENTRY

PEOPLE.CITY

ENTRY

PEOPLE.ST

ENTRY
ENTRY

PEOPLE.ZIP
PEOPLE.SSAN

ENTRY
ENTRY

PEOPLE.DATE
PEOPLE.PAYRATE

ENTRY

PEOPLE.PAYTYPE

{CAPSL0(X,8IEá(="HS"}

//endgroup
//save record
//clear buffer
//cIear screen
//begin loop
//define esc key
//to abort

ENDGROUP
SAVE PEOPL E
CLEAR PEOPLE
CL EARFORM
GOTO START
KEYPROC KEY.ESCAPE
ABORT

Copyright

(C)

1984

Data

Access

Corporati

on

05/16/84

D-lO

DIRECT

CONTROL

THIS

Copyright (c)

1984

Data

OF DATA

PAGE

Access

ENTRY

INTENTIONALLY

Corporation

DataFlex 2.0 User's

LEFT

'

Manual

BLANK

05/16/84

É:

====

___———————_~———~

__

D"ll

————————

::É:EE:E

MANIPULATING

::::::====

STRINGS

————————
—

—~———

—~—+

String commands allow manipu1atton of various forms of
string data. They can be used on literal string arguments,
windows,
string variab]esp or data base elements. If a non-string
will be
for a string comanch
variable is used in the argument
String variables
converted to a string before the string operation.
in the
are
declared using the STRING command, which is described.
be
That
section should
of Configurations.
chapter on Elements
reviewed
and understood
prior to attempting the use of commands
described in this chapter.
The

C)ataF1ex

text

it

most
cases9
the string comiands
act upon an existing string.
and move
the
specified by its variable name, or entered as a Jiterab
"TO"
The word
is the
result of the action to a destination variable.
designator preceding the destination variable which is to receive the
Certain string commands return the results of
output of the command.
These
back
variable name.
"replacing"
their processes
to the source
should
be used
for the fact that the
with due regard
string comands
string will not be available after
original contents of the source
execution of the connand.
In

The

general

format of DataFlex string

COMMAND

src_strtng_var

TO

dest_string_var

all comands
require the length
DataFlex
integers.
string commands
both
and destination
source
for the

Not

is:

comands

and

length position

specifiers,
variable
action.

position

can
use
comand

the

same

which
name

are
as

EXAMPLE:

a_str1ng TO a_string 10
will take the leftmost ten characters of a_string
the result back ínto a_str1ng.
LEFT

and

place
——————

LEFT

Command

LEFT command
extracts a specified number
string starting with the leftmost character
the extraction into a variable.

The

of characters from a
places the result of

and

————————————————————————————————
—————— —

Copyright (c)

1984

Data

Access

Corporation

———————

05/16/84

D-12

MANIPULATING

DataF1ex

STRINGS

2.0

User's

Manual

—————

FORMAT:

source_string TO dest_str1ng §#
LEFT is the conYnand9
source_string is the string argument
being acted upoñ» TO designates dest_stringp and ## is an
integer number or variable which specifies the length of the
sub-string to be extracted starting from the beginning of
the command will output a null string
source_string.
If #í¥0 and less than or equal to
is greater than the
string length.
the source
If ##2<1 while
string will be outputp
string, the entire source
length of the source
string, the
while if ##2 is greater than the length of the source
string will be output.
rightmost character only of the source

m

m

m

=

The

""""

=

Command

ASCII

ASCII

source

comnand
and

string

takes the ASCII value of the
places the result in a numeric

character of
variable.

first

a

FORMAT:
ASCII

string

Where
ASCII

INITIAL
1n1t1a1

TO

numerfc_variab1e

EXAMPLE:

will

Copyright (c)

a value of "Abernathy"
fn1t_val
value of 65 in "INIT_VAL".
has
TO

return

a

1984

Data

Access

Corporation

05/16/84

D-14

DataFiex

STRINGS

MANIPULATING

2.0 User's

Manua7

——————————
MARACTER

Canmand

it

CHARACTER corrmand
to
takes an integer (O to 127) and converts
its equivalent ASCII character, then places the result into a string
useful for creating strings needed for
variable.
This is particularly
be
printer or other device control where the string values cannot
conveniently created from the keyboard.
The

FORMAT:
MARACTER

integer

TO

stríng_var

EXAMPLES:
Where
LEAD_IN
CFIARACTER 27

has been
TO 1ead_1n

will

value of

place

a

declared
27

(the

as

ESC

declared

EIGHTLPI
has been
Where
MARACTER
65 TO arg
will place an "A" (ASCII

code

string

a

character)
as

65)

a

in

string

variable
in

LEAD_IN

variable

EIGHTLPI

.
POS Command
POSition
comand
scans
a source
string for the occurrence of a
result
designated "target" substring9 and returns an integer numeric
which
is the starting position of the target string within the source
string.
In the event the target substring is not found within the
source
stringp the POS command stores a zero in the specified
variable.
The

FORMAT:
TO num_var
IN string2
STRINGI
is the colmlandp
is the string to be scanned
for, IN designates STRING2p STRING2 is the string to be
TO designates the
scanned
for an occurrence of STRINGln
variable NUM —VAR which will contain the
destination numeric
result.

POS stringl
Where
POS

EXAMPLE:
Where
S7RINGI
= "DEF%
POS strlngl
IN str'lng2

and
TO

will

4

Copyright (c)

return

a

value of

1984

Data

Access

STRING2

= "ABCDEFGHI"

posit
in POSIT.

Corporation

05/16/84

2.0

DataFlex

MANIPULATING

Manual

User's

STRINGS

D-15

=

=====~~~———~———
LENGTH Command

LENGTH returns the length of a designated string
as an integer number
LENGTH counts
the number of printable
variable.
in a numeric
LENGTH will
give a different
in the argument.
characters and spaces
the
result for what may seem like the "same" data according to whether
See the
e1«nenG
argument
a variable.
a windowg
a database

is
discussion at the

end

of this chapter

on

or
"String

Operations".

FORMAT:
TO

LENGTH string
LENGTH
Where

num_var

is the comand, STRING is the string whose
variable
is to be determined. TO designates the numeric
action.
contain the result of the commandG

length
to

EXAMPLE:
STRIN="ABC"
Where
TO how_1ong
LENGTH string

will

return

a

value of

3

to

HOW_L0NG
—————

PAD Command
The
is used to make strings of specified length.
is the source
of the data
the variable which
identifies
PAOded,
and the second
the destination string in
identifies
to
which
the PADded result is stored after processing. The third
argument
is an integer value or variable designated as the length cjf
the string to result from the execution of the PAD convnand.
If the
w,i11
be added
spaces
to string
original string is shorter than 1engthp
to length.
to extend
If the stringbe is longer than 1ength»
eliminated
of length will
characters in excess
The

PAD

firstbe

comand

argument

it

FORMAT:
#if
TO dest_string
PAD source_string
Where
PAD is the comand, S0URCE_STRING
contains the string
DEST_STRING
be PADdedp
contains the PAOded result of the
##
and
comnand,
is the integer value or variable which

specifies the number
required) that will

to

of characters (including spácés>
if
contained in the resultant string.

be

EXAMPLE:
Where
ALPHA_ STRING
" "ABC"» and spaces are
TO beta_string
5
PAD a1pha_str1ng
will store "ABCBB" in variable BETA_STRING

represented

as

"kS"

BEFORE = "ABCDEFG"
Where
PAD before TO aftor 3

will

store

"ABC"

in variable

AFTER

——————-———————————————-———

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

TRIM

DataFlex 2.0 User's

STRINGS

MANIPULATING

D-16

Manual

Comand

The TRIM comnand
from
the contents

strips both leading and
of a string variable.

trailing
Embedded

blanks, if presentf
blanks are not

affected.
FORMAT:
TO dest_string
TRIM source_string
S0URCE_STRING
Where
contains the string to be
DEST_STRING
will contain the TRIMmed string.
replacement
and DEST_STRING
may be the same

if

operated

on,
SOURCE_STRING

and

is desired.

EXAMPLE:

are represented

Where
spaces
"C2BifBbybseaBBB"
TRIM

will
APPEND

as

"B"9

and

LQNGSTRING

=

longstring TO shortstrtng
in SHORTSTRING
place "2Mif8byl6sea"

Command

to join two or more strings together.
together can be 1itera1sg variables. and/or
string cormands
strings created through the use of other DataF1ex
be a
(such
as CHARACTER).
Stringl in the FORMAT below must always
This variable will contain the APPENDED string after the
variable.
command
has
been
executed. Strings cannot be APPENDed to a litera]
string constant.

facility

APPEND provides the
APPENDed
The strings

FORMAT:
APPEND

APPEND

name,

and

STRING2
STRINGI.

joined to
executed

str1ng2 ...stringN
is the command, STRINGI is a string variable
through STRINGN are literals or variables
remains
STRINGI
after the connand
is
string.
the variable name of the expanded

strlngl

Where

as

EXAMPLE:
SIZE
Where
= "big"
COLOR = " blue"
Where
APPEND size color " balloon"

will

result

in the value of "big blue balloon"

in

SIZE

"collect"
strings into a ñéWY mpty variable,
that target variable with d MOVE "" to STRINGI
your variable's name for STRINGI).
If this fs not
APPEND command
the
done,
will attanpt (and fail) to operate on the
(to the
string in its default initialized
statep which is a17 spaces
in
String variables are initialized
declared length of the string).
for the stringfs maximum
this way to reserve enough space in mtmory
be APPENDed
cannot
sIze, but
to in this state, since It is "full"
of spaces.

it

you wish
to
necessary
to clear
command
(substitute

NOTE:

is

If

it

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

2.0 User's

DataF1ex

,
UPPERCASE

STRINGS

MANIPULATING

Manual

D-17

———

~and

The

UPPERCASE

case

letters

connand

to

scans
uppercase.

and

designated string

a

converts

al?

lower

FORMAT:

UPPERCASE
string
UPPERCASE
Where

comand

is the

acting

on

STRING.

EXAMPLE:

STRING="Smith"
Where
UPPERCASE
string
will return STRING

CMDLINE

as

"SMITH"
————————————

Command

comnand
arguments
entered at
executing a DataFlex configuration,
the operating systan level as part of the initial command entry line
use?
variables for later repetitive
with the
can be stored to string
CMDLINE
comnand.
This permits certain run-time choices to be made by
Separate
and entered without
the operator (or the menu system)
prompting
from
within the configuration.

When

EXAMPLE:

FLEX MYREPORT CON:
and runs
Executes
the configuration called
the FLEX.COM
The "CON:
"MYREPORT".
until a later point in
is not executed
the execution of the configuration when a CMDLINE cotmand
and stores
to a string variable
retrieves that argument
which
in
is subsequently read by the configuration (and used,

this

casep

file

"

it

to direct

the reportfs

output to the screen).

from
as to number
with no limitation
will retrieve arguments
the last prior-executed operating system comand
or the last pr"kr
Arguments
whichever
CHAIN commancb
more
was executed
recently.
are
from
each
separated
above), and, once
other by spaces
(per the example
retrieved by CMDLINE, are no longer available from the same sourceg
argument,
having
been
any.
replaced by the next succeeding
(MOLINE

if

FORMAT:
CMDLINE

string_arg

aqDLINE

output_device

EXAMPLE:

——

———

Copyright (c)

1984

Data

Access

Corporation

~~~~~ G
05/16/84

D-18

MANIPULATING

——————
SIRING

~,

OPERATIONS

class (in-memory
of a string affects
the differences are

database

variab1ep

The

the
as

way

2.0 User's

DataF1ex

STRINGS

================.========————~———

—

~~~~
e1aneñt»

trailing
(B

blanks
indicates

follows

are
a

Manual

·~.———————————

—

——

or window
contents)
handled. Basically,
blank space):

fill

Element:
the
All characters plus additiona1 blanks to
Example:
(set in File Definition).
declared length of the eWnent
(IQ characters)
"The8Hague8"

Database

Only
"TheBHague"

WIndow
Example:

Contents:

Whatever
In-memory
was
Variable:
loaded
from
the
database
element

characters, including the
above9
the window illustrated
blank characters plus the embedded
all

10

from

Windows,
which
and

back

This is
database

from

a window.

and

variable
would

were

the

does
the TRIM connand
traf1ing blanks without

"Miami,8F1orida"

file.city

a

would

TRIM strings
just as
to TRIM leading and

how to display
e7elnentsp

it.abovegIf

it
tráiling blank. If it
only
contain
it
blank.

a way

then,
is

input to
illustrated

from

two

blanks.

embedded

actual characters, fncludlng
(trailing
blank dropped)

were

contain
loaded
8

non-

(see
abovek
MOVEing
tOg

lO-character

fi]e.state:

city 10
state 10
fi1e.city
to city
f'l1e.state to state
city
state

STRING

STRING
TRIM
TRIM
SHOW

This is
var.cíty
contents
space

could

".r

variables
to display the same thing from in-mcmory
var.state, each of which has length equal to their
The
(5 and 7 respectively
for Miami and Florida).
coma and
handled
they
only to illustrate an alternative;
differently
handled
either way in either instance:

how
and

are
be

STRING
comma 2
MOVE "gY' TO comma
SHOW var.city
comma
In

generañ
manipulation

it

by

var.state

is preferrable to use
the String comands.

———

Copyright

(C)

1984

Data

Access

in-memory

Corporation

variables

for

05/16/84

"""

- -------------"
""="===""""""""""""
=~==~=~
CONDITIONAL

EXECUTION

=Z=====Z==
=_=====~==

————————————

0~19

":::"::J::::

—

=""====""»
~———"~—=
===ZZZZZ

for obtaining conditional execution of
Indicators will be discussed
tests.
argument
They
(often referred to as
a
special
of
type
are
first.
There
controls command line execution.
"flags") which conditionally
TRUE and FALSE.
two
are
possible statuses for an indicator:

DataFlex provides
commands,

two means
INDICATORS
and IF

(See
the chapter
indicator is created with the INDICATOR command.
in
indicators remain
Declaring Data Elements.) Upon declaration,
their default status of FALSE until an INDICATE comnand or some other
to the other
event in the execution of the configuration resets
status of TRUE.
An
on

it

on a command
If an indicator is TRUE» the cormand which follows
an indicator
is FALSEp
line in a configuration will be processed.
If
will be skippe& and execution will move
line (or group)
the connand
A TRUE indicator
to the next line.
will also cause the processing of
a WHILE - ENCL, REPEAT - UNTIL
or BEGIN - END structured cormíand group
which
line.
follows the indicator on a connand

it

by enclosing
may be used
in brackets
an indicator
command
to the DataF1ex
to identify
processor.
connand
1ine(s)
is intended
at the beginning of the
The command
to control.
processor recognizes the bracketm and does
indicator.
the appropriate conditional testing on the enclosed
Once

definecb

("I"
must

and
be placed

"I")

it

it

it

It

FORMAT:

[ind1cator_arg]

command

[salel

MOVE
SHOW

EXAMPLES:

[mentber]

[cred1t_ok]
[sIngle male]
[s1ng1e][male]

SHOW
SHOW
SHOW

TO lnvt.qty
(lnvt.qty-amt_sold)
code:
'
IEnter membership
up to ' cust.l'lmit
'Credit approved
fNot1ce
format for multiple indicators'
"This format works the same!"

this format, the connand
processor tests the INDICATOR for a
the INDICATOR is TRUE, COMMAND is processed.
status.
If
If
and the
INDICATOR
then
the command is skippech
is not TRUE (FALSE),
(or the next indicator
in the configuration is processed
next comiand
fs tested, etc.).

Using
TRUE

useful to be able to
status of an indicator rather
done
using the word NOT in front of an
line to reverse the sense of the test applied

a configuration,
based
on the
a connand
TRUE status.
This is

When
execute

creating

than

its

indicator on a
to its status.

comand

—————————————
Copyright (C) 1984

it

is

sometimes

FALSE

———————————————————————————-—-——————-—
——-————————
Data

Access

Corporation

05/16/84

DataF1ex

EXEájTION

CONDITIONAL

D-20

User's

2.0

Manual

FORMAT:
INOT

indicator]

comnand

EXAMPLES:

[a_test]
"argl"

MOVES

if

Cnot

a_test]
MOVES "arg2"

if

MOVE argl
A_TEST
is

TO screen.l
TRUE.

MOVE arg2
A_TEST
is

TO screen.l
FALSE.

is this

[NQT

member]

SHOW 'Who

INOT

cred1t_ok]

SHOW

guy?'

the credit

'Confiscate

cardll'

be used
can
together
separated by spacesp
to three indicators,
be
a comand
line should
within the brackets to test whether
processech
or, if space a11OWSg a set of brackets may be used for each
both
and
improve
are
readability.
Either format works,
indicator to
A NOT can
precede
used
any
indicator
in this manual.
in illustrations
the sense of the test on the indicator which follows it.
to reverse
them
through
Concatenation of indicators in this manner interrelates
"ANDS"
(that fSg all of them must be TRUE for a TRUE result--if any is
FALSE,
then
the combination is FALSE).
Up

FORMAT:
[{NOT

}indicatorl

{NOT

}ind1cator2

{NOT

}indicator3]

ccmmand

EXAMPLES:

[sale][cred1t]
Icred1t sale]
function

Same

[saiej[N0T
Indicators

be

can

[member]

SETTING
There

SHOW

as

SHOW 'Enter item ID:
example
above.

credit]
used

charge

i

'Sorry? credit

to conditionally

limit

exceeded.'

set other indicators:

TRUE

STATUS

formats for using the
status.

three distinct
an indicator's

are

establish

SHOW

INDICATE

INDICATOR

°Enter item ID: '

First, and most simply, indicator
reset using the following command

arguments

can

INDICATE

be

comand

explicitly

to
set

or

format:

EXAMPLES:
INDICATE
INDICATE

Copyright

(C)

1984

indicator
indicator

Data

TRUE
FALSE

Access

Corporation

05/16/84

OataFlex

Secondly,

lished

User's

2.0

the
the

by

EXECUTION

D-21

of an fndicator can be estabor FALSE condition
There
mode operator.
are
eight (8)
of a comparison
for an indicator:

TRUE

use
modes

comparison

CONDITIONAL

Manual

lass than
less than or equal to
equal
to
greater than or equal to
greater than
not equal
string Inclusion
string matching

LT
LE
EQ
GE
GT
NE
IN
MATQI

mode operator,
using
a
with a comparison
the INDICATE comiand
status of TRUE or FALSE is given to the named indicator based on the
and the selected mode of
outcome
of two arguments
of the comparison
comparison.
That status is then tested each time that the indicator
the comnand line which follows the
to determine whether
is encountered
indicator In a configuration should be processed
or not.

When

For

the following

example
IR!JE

5 GT 3
666 EQ 666
999 LT 1000

3 GT 5
666 EQ 999
1000
LT 999

IN

'ABC*'
and

are:
EALSE

'B'
"IN"

comparisons

'ABC'
MATQ1

"MATM"
IN scans
example

indicator

'A'
'A'

'ABCDEF'

have

the following

IN 'XYZ'
MAT(J1 'B'

differences:

of another string;
string for the presence
When one string
is IN anothem
fs IN "DAC".
is returned TRUE.

one
"A"

for
the

equal1ing another. If the strings
from
the
returned TRUE.
It variescomparison
MATQI will
perform
the
is equal to the same
against only part of the string and
part of the other string the indicator will be returned TRUE.
The partial
string
to be tested is represented with the
"AB*"
where
asterisk convention used by most operating systems
means
anything that starts with "AB" is considered TRUE with
whatever
follows in the rest of the string not being evaluated
The asterisk
may be used
only in
test.
or considered for the The
be a completely
second
argument
must
the first argument.
explicit
string.
tests for one string
equal
are
the indicator is
mode
EQ comparison
in that

i'«re

if it

————————————
1984 Data

Copyright (c)

Access

Corporation

05/16/84

CONDITIONAL

D-22

DataF1ex

EXWJTION

2.0

="="==""""—."="=—"""====————
The

In

mode

comparison
this manual.

operator will

be

represented

as

"MODE"

User's

Mama?

—
in

examples

with a mode operator creates an
format of the INDICATE comand
the
easy-to-read "sentence" which includes the INDICATE comnand,
compared
by a
which
and two other arguments
are
indicator argument,
comparison
mode operator:

The

FORMAT
INDICATE

AS

'lndicdtor_arg

argl

mode

arg2

components
are
All of the illustrated
required for a correct INDICATE
"INDICATE"
command
instructs the DataFlex
"sentence". The connand
command
the indicator_arg is the
processor to set an indicator;
indicator which will receive the TRUE or FALSE status that is the
from
"AS"
the
provides a syntax transition
result of the comparison;
argl and
establishment of the indicator to the comparison
itself;
arg2
must
be present to create a valid comparison; and
finally the
comparison
mode operator must
establish what test is to be applied to
argl and arg2 to arrive at the TRUE or .FALSE status result to be
applied to indicator_arg.
EXAMPLES:
AS age

GT 21

INDICATE

of_age

INDICATE

in_stock

INDICATE

credit

ok

AS

INDICATE

eureka

AS

strlngl

INDICATE

gotcha

AS

'ab*'

AS

GE order_amt

lnvt.qty
cust.ba1
IN
MATM

LT

strfng2
string2

third format for setting an indicator
To support this
established indicators.
the following syntax is provided:
The

GROUP,

ANY,

ALL.

AND,

OR and

cust.cr_1imit

uses
form

other previously
of the INDICATE command,

NOT

is used to define up to three other indicators which will be
tested together to estab7ish TRUE or FALSE status of the Indicator
"AS"
defined by the INDICATE comand. It replaces the transitional
"sentence".
the INDICATOR command definition

GROUP

in

argument
ANY creates a TRUE status for the indicator
if any of the up
ALL requires that all
to three indicators Included in GROUP Is TRUE.
of the fnd'lcators in the GROUP be TRUE to pass a TRUE status to the
indicator being set. The format for this form of INDICATE is:

""—"""————
Copyright
(C)

1984

Data

————————————————————————
Access
Corporation

05/16/84

DataFlex

2.0

User's

CONDITIONAL

Manual

—

———————

D-23

EXEájTION

————————————

FORMAT:
INDICATE

Ind GROUP ANY/ALL [ind ind {ind}] {AND/OR ANY/ALL [fnd fnd]}
"C" and "J",
used
The bracket characterm
to enclose the
GROUPed indicators
part of the convnand syntax.
are a necessary
and up to 2 GROUPS
Each GROUP may contain up to 3 indicators,
(conjoined by and or OR) may be in one comand. Each group
ALL.
by ANY
be preceded
must
"
or

EXAMPLES:
INDICATE
us_car
would
set the

indicators

GM.

GROUP ANY [gm ford chrysler]
US CAR TRUE when
any
CHRYSLER was TRUE.

indicator
FORD,
or

[male citizen of_age]
all three indicators MALE, CITIZEN?
for the indicator CONSCRIPT to be set

INDICATE
conscript
would
require that
0F_AGE

be

TRUE

of the three

GROUP ALL

and
TRUE.

testing to be compounded
of an indicator to be

The AND and OR conjoiners
allow conditional
NOT enables
the sense
to set an indicator.
reversed for a particular test.
EXAMPLES:
INDICATE

SINGL,
and
and 0F_AGE
TRUE.
HANDSOM were
INDICATE

[squirrel possum]
set the indicator HUNT TRUE
SQUIRREL
or POSSUM were true, or
GROUP ANY

hunt

would
were
INDICATE

of_age] AND ANY [rich handsoml
TRUE only
if indicators MALE»
at least one of the indicators RICH and

e1ig1b1e
GROUP ALL Cma1e singl
would
set the indicator ELIGIBLE

TRUE.

spanish
would
TRUE,
BRAZIL

[bear 1n_season]
either of the indicators

OR ALL

if
if

both

BEAR

and

IN

SEASON

NOT braz11]
GROUP ALL [cent_amer] OR ALL [south_amer
indicator CENT_AMER were
set indicator SPANISH TRUE
TRUE and indicator
or if indicator SOUTH AMER were

if

were

FALSE.

on number
limitations
of indicators in a group and number of
by
in a comnand (3 and 2 respectively) can easily be overcome
and within
GROUP connandsg
a consecutive
use of successive INDICATE
the
can be reset many times to
same indicator
series of such connandm
space
memory
for many different indicators.
avoid consuming

The

groups

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DataF1ex

EXEQJTION

CONDITIONAL

D-24

2.0

User's

Manual

—— — —

PREDEFINED

INDICATORS

predefined 'Indicators

Several

are available

as

part of the DataFlex

syntax:
TRUE
TRUE

FINDERR
FOUND
SEQEOF

TRUE
TRUE

SEQEOL
KEYPRESS
PAGEBREAK

TRUE
TRUE

MULTIUSER

TRUE

if

if
if
if
if
if
if

record returned to buffer on FIND
record returned to buffer on FIND
end of sequential
file
end of line
in sequential file
pressed
has been
(set by KEYMECK)
a key
new page
(set by F'AGEOECX)
is set multi-user
your
DataFlex system

no

indicators can be used at any point in a configuration to make
which
on the condition
sets
portions of the configuration dependent
be
The status of the indicator
even
can
indicator.
the
of
status
the
should
be done
INDICATE
connand,
with
great
this
but
using
the
reset
depend
on internal.settings
care, since other operations are likely to
indicators.
of the status of these
These

IF

TEST

IF test
is an alternate means of obtaining conditional execution.
Indicators provide a means of applying the results of a test to
The IF
lines throughout a configuration.
individual comand
numerous
test, on the other hand, allows a specific test to be created on a
command
or not the single comnand
line that determines whether
following the IF test on the same line will be executed.
The

What

is

an

IF test?

IF test
a
sets up a "comparison" sentence. In the sentencep
statement is made regarding the relationship of two items. They are
mode operator to see
compared
using a comparison
if they are equab
one greater than
the other, or any of several other relationships.

An

EXAMPLE:

car is bigger than a breadbox.
compares
a car and
This sentence
mode
This sentence
is "bigger".
A

a breadbox.
is TRUE.

Its

comparison

The objective
of the test is to arrive at a status result of TRUE or
FALSE.
For
executing a cormand line,
the purposes
of conditionally
comand
sentence
relat1onshfp between the
the
correctly
states
the
following the IF
is TRUE and the comand
variables, the sentence
command
will pass by the comíand
will be executed. A FALSE sentence

the
line.

on

IF

Copyright

line,

(C)

and

1984

go

Data

on

to the

Access

comand

on

Corporation

the line following

if

the IF

05/16/84

There

User's

2.0

DataFlex

eight

are

CONDITIONAL

Manual

for IF tests:

modes

comparison

less than
less than or equal to
to
greater than or equal to
greater than
not equal
text string inclusfon
text string matching

LT
LE

equal

EQ
GE
GT
NE
IN
MATCH

using
the IF testp a status of
of two
the outcome of the comparison
the selected mode of comparison.

When

The followíng
commands:

Now

are

examples

of

TRUE

which

comparisons

EALSE

5 GT 3
666 EQ 666

3 GT 5
666 EQ 999

999 LT
'El'
IN
'ABC*'

1000

1000
'ABC'
MATQ1

'A'
'A'

'ABCDEF'

LT

might

be

based

line

stated in

on
and

IF

999

IN 'XYZ'
MATQI
'B'

in place for the

are

is created
in the comnand

FALSE

or

arguments

IBUE

of the pieces

all

D-25

EXECUTION

full

command

sentence.

FORNAT:

IF argl

mode

ccmnand

arg2

components
are
required for a correct IF
illustrated
IF specifies
The coímand
the correct action to
"sentence".
to
the command processor; "argl" is a variable which will be compared
"argl" and "arg2" must be present
"arg2" according to the mode;
comparison
mode
and the
because
compare
one thing;
operator
you cannot
comnand
must
establish what test is to be applied;
will be executed
if the test is TRUE.

All of

the

command

EXAMPLES:

"Hoorayl" TO screen.5
then
the
greater than numberb
be executedD
DISPLAY
comand
placing "Hoorayt" in window
5 of pagename
"screen" in the configuration.
If numberl is
then
smaller than numberb
there will be no DISPLAY.
IF
In

numberl

this

DISPLAY
GT number2
numberl
example
is

if
wi71

(balance +
this case,
credit_l1miC
called "sale".
GOSUB will
the
IF
In

if

then

If

not

be

executed.

————————————"_"—""—"____"_ ""__====.======X
—————————————-————————————————

——————

Copyright

GOSUB sale
LE credit_lim1t
result of the expression is less than the
the configuration is sent to a subroutine
exceeds
credit_1imitp
(balance + purchase)

purchase)
the

(C)

1984

Data

Access

Corporation

05/16/84

D-26

DataFlex

EXECUTION

CONDITIONAL

=====—————————

IF

LT

payment
commands

Manual

User's

2.0

————~——————————

BEGIN

balance

END
Herep

of

IF

the

statement is being

of

a group

commands

enclosed

used
to
by BEGIN

control
and

the execution

END.

However.
mode operators
of the comparison
are self-explanatory.
IN scans
one string
for
"IN" and "MATM"
warrant further explanation.
When one
"A"
string; for example
is IN "DAC".
the presence
of another
string is present IN another, the test is TRUE.
Most

tests for one string equa1ling another.
If the strings are
A special case
exists for MATM where only
the IF test is TRUE.
part of the string needs to be tested for equality for the status to
be returned TRUE.
This partial string match is represented by the
"AB*"
where
means
asterisk convention used by most operating systems
to compare only the first two characters for anything that starts with
"AB"
regardless of the rest of the string.
If the first two
TRUE.
characters are "AB" the test is comMdered
MATCJ4
equal

USING

NOT

"sense" of any IF test can be reversed by placing the
of the IF comnand:
in front of the first argument

The

"NOT"

word

FORMAT:

IF

NOT

argl

mode

command

arg2

Point of interest...
When

the
internally
indicator

DataFlex
expands
"LASTIF"o

it

processor encounters an IF command
the statement as a macro using the pre-defined
example
A model/macro
is:

comand

MODEL:

IF

xx

GT yy

command

MACRO:
INDICATE
[LASTIF]

Copyright (c)

LASTIF

AS xx

GT yy

COMMAND

1984

Data

Access

Corporation

05/16/84

D-28

CONDITIONAL

EXEájTION

THIS

Copyright

(C)

1984

Data

PAGE

Access

DataFlex

INTENTIONALLY

Corporation

LEFT

2.0

User's

Manual

BLANK

05/16/84

2.0

DataFlex

User's

CONDITIONAL

Manua7

EXECUTION
——

D-27

-—-

———

.
STATUS
Two

File Indicator

forms
of the STATUS
from
a specified

record

indicator are available to indicate
file is active in the buffer.

whether

a

FORMATS:
INDICATE
ind_arg STATUS f1'lename_arg
The
indicator IND_ARG is returned

(record is foundL
IF STATUS
The comaná

and

f11ename_arg

FALSE

if

TRUE when the
file is active
the record is not found.

comand
is executed

on the line
(record is found), and not
found.

executed

ifif

the file is active
the record is not

STATUS indicator
is used in a manner similar to the FOUND
but is useful in situations 'inolving successive
predefined indicator,
FINDs
unlike the FOUND indicator, which
in a number of fi1em because
is set according to the last FIND attanpted, the STATUS indicator
returns a result which is specific to the file which is named in the

The

command.

Copyright

(C)

1984

Data

Access

~~

Corporation

05/16/84

D-29

------------—~———————~

==Z::::

CONTROLLING

"

"~
_
_ _ _ _ _ _ _ _ ~ _ _ _ _ _ _ _ _ _ _ __ _ _ _

EXECUTION

==: :=:==:=
==""="=="=

SEQUENCE

=

———————————————~——~——

————————

Control comnand
configuratiom
error
tion procedures.
The

group
provides structured flow
message
handling, a debugging

of control
mode,

and

within
termina-

a

group's actions alter DataFlex's default
of the control comand
comand
sequence
lines execution.
of configuration's
(top to bottom)
comtands
Norma11y»
executed
in the order in which they are
are
used
are
in
Control cormands
to provide other sequencé»~
written.
and
whicM
once
may be written
for examp1e9 often-used processes
"called" for execution from any of several other points in a configuterm
The usual
is "subroutines".
for these called processes
ration.
and
Control commands can also provide conditional skipping of comands
The "target"
for these
groups
in a confíguratfon.
of comnands
coimands
that tells DataFlex Where to go and continue execution is
and is defined as any continuous string
of
called a "LABEL",
characters at the beginning of a line followed 'lmediately by a colon
begin
must
with a 1ettem which may be followed by up to
(: ). Labels
These
examples
(no spaces
and letters
79 numbers
are
or punctuation).
of labels (they must be the first characters on their lines):

Many

EXAMPLE:
command
LABEL:
EXAMPLELABEL:
command
P0 0
command

label may optionally be followed by a comand
aboveh or the following
in the first example
(as
on following
lfnes for readability
in the
A

(as
on the same line
comands
may be placed
second
example).

GOTO Command

execution of a conf'lgurat'lon to a labeled jocatlon
Execution
line,
of
other than the next comand
comand(s) following the "target" label will continue until the
control command again transfers
configuration ends, or another
7ocat1on.
As with all corwnandsp
the
execution to another 1abe11ed
by indicators
GOTO may be preceded
GOTO transfers
the
in the configuration

FORMAT:
GOTO

1abel_arg

EXAMPLES:
GOTO update
GOTO de1_rec

Copyright (c)

1984

Data

Access

Corporation

05/16/84

CONTROLLING

D-30

SEQUENCE

EXECUTION

DataF1ex

2.0 User's

Manua7
———

ON GOTO Command

transfers execution to a label that is part of a
label is selected for execution based on the
value of the integer variable or expression specified in the comnand.
The value of the integer variable
or expression will be used to count
into the label list to an ordinal position designated by the value of
NOTE:
In the event the expression evaluates to less
the argument.
than
greater than the number of labels in the 1iStp the comnand
lbe orignored
command
and the following
will execute. If this is an
will
happenL
your confierror condition in your application (should never
declare an error (see ERROR command) on the next line.
guration should

The

list

ON GOTO cormand
The
of labels.

FORMAT:

integer_arg

GOTO

ON

(ftems-l44)

GOTO

If

ITEMS-144

ON

1abe1_l

labe1_2

1abel_n

EXAMPLES:

that point.
from
there.
to BANANASg

peaches.
bananas
apples, orangesg
from
Ib go to the label APPLES and execute
ITEMS-144
equals 29 go tO ORANGES and execute
3, go to PEACHES»
for 4,
the expression equals
otherwise go to the next line.

equals

If
If
and

ON screen.3 GOTO
ERROR 198
Go to labels EXIT,

exit

saveit de1eteit

SAVEIT»
DELETEIT
according to the value in
Ip 2»
SCREEN.3
has a value other than
the window SCREEN.3.
If
or 39 declare Error #19& where Error #198 has been defined
for the circumstance in FLEXERRS.DAT
=

""""""_"_

GOSUB Command

elsewhere
procedure
in
transfers command execution to a 1abe11ed
is
the configuration with provision that when a RETURN comand
encountered
in the label1ed procedure, execution will return to the
command
on the
line imed1ate1y following the line on which the GOSUB
The RETURN comnand,
appears.
of course, is written at the end of the
called procedure. DataF1ex
supports nesting of up to 20 GOSUB
procedures
at one time (that is, a GOSUB whídí
itself calls a GOSUB,
and so on).
GOSUB

FORMAT:
GOSUB

1abe1_arg

EXAMPLES:
GOSUB my_routfne
GOSUB check_for_credit

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

0
DataF1ex

2.0

User's

===========.———
=~_ ~=" " ————

CONTROLLING

Manual

SEQUENCE

EXECUTION

D-31

—~~————~
—————————

—

ON GOSUB Command
whose
procedure
ON GOSUB comand
transfers execution to a 1abe11ed
with provision
in the comnand,
label is one of a 1ist of labels given
procedure9
in the 1abe1led
that when a RETURN command is encountered
1rm'ied'late1y
on the line
following
execution will return to the comand
The RETURN cotrmañd»
of course9
the line on which the GOSUB appears.
is written at the end of the called procedure. The label is selected
for execution based on the value of the integer variable or expression
The value of the integer variable
specified in the comnand.
or
expression will be used to count into the label list to an ordinal
NOTE:
In the event
position designated by the value of the argument.
the expression has a value during running less than I or greater than
and the
the number of labels in the listo the corrmand will be ignored
following cormnand will execute. If this is an error condition in your
declare
app1icatlcm (should never happen),
your configuration should
DataF1ex
(see
ERROR comand) on the next line.
supports
an error
GOSUB
at one time (that 1»»p a
nesting of up to 20 GOSUB procedures
which
itself calls a G0SU& and so on).

The

FORMAT:
ON

RETURN

GOSUB

fnteger_arg

label

_1

1abel_2

1abel_n

Command

The RETURN comand
a GOSUB command
to

is

used

cause

at the end of a labeled
the execution to transfer

procedure
back
to

of the control transfer.
If RETURN has no argumentg
line following the
will transfer back to the comand
called the procedure.
line which originally

then

called by
the origin
execution

GOSUB command

an argument.
Valid arguments
for the RETURN comand
can have
This allows the
in the configuration.
other labeled comands
within a configuratiom
chaining of labeled procedures
or conditional
at locations other than the line
branching to labeled procedures
following the calling GOSUB.
RETURN
are

FORMAT:
RETURN
RETURN

after
// return to line
label _arg
// return to

GOSUB
a

labeled

connand

EXAMPLE:

[rainy]

RETURN

d1fferent_p1ace

RETURN

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

eAIN

DataFlex 2.0 User's

SEQUENCE

EXECUTION

CONTROLLING

D-32

Manual

Command

the
terminates the execution of one configuration and begins
as if an
execution of the configuration named in the command argumentp
operating system command were being executed. All data files (random
used
and sequential)
in the configuration containing the MAIN command
are
closed. All integer variables used by the terminating configurafor use by the succeeding
with their va1uesp
tion remain avai1ab1eg
one.
after they have been redeclared in the succeeding
configuration,

CHAIN

the CHAIN command may be either a literal string
within a pair of quotation marks,
or a string variamay contain as many
the argument
literal contents of system
allow in a command (typically
characters as your operating
will The
up to 128 charactersg counting spaces).
literal string and the
the
contents of the variable will be interpreted in the same manner:
characters preceding the first space will be considered the rootname
append
and DataFlex will
the .Fl-X
configuratiom
of a DataFlex
The characters
following the first space
extension and execute
and preceding the second
will be retrieved by the first CMDLINE
(see
command
explanation of CMDLINE in this
in the configuration
the
are
following the second space,
section).
there
characters
If command
any)
CMDLINE
up to
second
will
those
characters
retrieve
(if
the third space9 and so on.
The argument
of
enclosed
entirely
The
ble.

it.

FORMATS:

{string

CHAIN

"config_name

CHAIN

string_var

CHAIN

"inventory"
next_config

...

string}"

EXAMPLES:

//Execute configuration INVENTORY.FLX
//Execute first substring in variable
//NEXT_CONFIG
and pass
following substrings
//Execute configuration
"accts_rec LST: cust_name"

CHAIN
OAIN

//ACCTS

REC.FLX
and pass
CUST__NAME
LST:

//substrlngs

——————
MOLINE

Command

command
arguments
entered at
configuration,
executing a DataFlex
level as part of the initial command entry line
operating system
use,
can be stored to string
with the
variables for later repetitive
CMDLINE
command.
This permits certain run-time choices to be made by
system)
and
entered without separate
the operator (or the menu
prompting
from
within the configuration.
When
the

EXAMPLE:
FLEX

MYREPORT

CON:

and runs
the configuration called
until a later point in
is not executed
the execution of the configuration when a CMDLINE command
and stores
retrieves that argument
It to a string (andvariable
used,
which
in
is subsequently read by the configuration
this casep to direct the report's output to the screen).
Executes

the

"MYREPORT".

Copyright

(C)

1984

FLEX.COM
The "CON:

Data

Access

file

"

Corporation

07/18/84

OataF1ex

2.0

User's

Manual

CONTROLLING

EXECUTION

SEQUENCE

D-33

CMDLINE

will retrieve arguments' with no limitation as to number from
the last prior-executed operating system command or the last prior
áU\IN
whichever
Arguments
command,
was executed
more
recently.
are
separated
from
each
aboveb and, once
other by spaces
(per the example
by
aqDLINEp
icmger
from
are
no
same
SOWCéo
retrieved
available
the
having
been
argument,
replaced by the next succeeding
if any.
FORMAT:
CMDLINE

strfng_arg

CMDLINE

output_dev1ce

EXAMPLE:

DEBUG

===========

" "~" "

===

=

===

Command

which
a mode command
toggles on and off from its default
When on,
cause
of "OFF".
the line number in the
compiled
.FLX
being executed
configuration
to display on the
screen
as
is being executed whenever
the configuration is run.
Constants
and variables
also be displayed as they are declared
The
command
the DEBUG command is the
in the configuration.
Macro
Processor is also
intermediate FCODE output of the DataFlex
DEBUG

is
condition

it will

ftle

it

displayed with the line number
is compiled. Natura11y?
a
finished configuration
in
left

when

command

=====——~~———
ERROR Command

if

will
first

a

this
ready

containing a
not normally
for running by operators.

configuration
command

would

====

~

DEBUG
be

===

The trapping of the
Error reporting is done using the ERROR command.
System
error must be done prior to the ERROR command executiom
errors are trapped by DataFlex. The system errors (those under lOó)
"RUN TIME ERRORS'4
under
and may also be
are
listed in the appendix
FLEXERRS.DAT,
read
directly from the DataFlex database
Errors
file
which
occur during execution must be trapped by the configuration.
The

argument
is
of the ERROR command is the number of the error which
be declared, specified
either 1iteral1y in the command or by the
INTEGER)
The
use of a(n
variable.
errors are defined in the DataFlex
FLEXERRS.DAT
Custom
messages
may
supplied with the system.

to

error
file
to the file by use of the DataFlex configuration FLEXERRS.
numbers
lOó.
The
than
added
wil7
using error
greater
error message(s)
then
be displayed on the screen
on the last line
the ERROR command
if
with the number of the message (on an error
is ever executed
be

added

=========———~——~

Copyright

""" 1984

(C)

— ==
Data

=======
Access

=

—~~——————~——============
~ ~~—~~~—~=~——————~~—~~~=="====

Corporation

05/16/84

CONTROLLING

D-34

DataFlex

SEQUENCE

EXE(1JTION

2.0 User's

Manual

——-—————
—————————————————————————————
—————

condition).
DataF1ex

Such
error
configurations

will then be "standard" to
with the FLEXERRS.DAT
file.

message(s)
run

all

FORMAT:
ERROR

A'

EXAMPLE:
ERROR 4
would
display

the

message

"SEEK

TO

UNWRITTEN

EXTENT

(CP/M

ERROR)."

CLEARWARNING

Comnand

and
Warnings
ERROR comand
the line and
automattca11y

messages
can be

removed

deletes

whatever

printed

executed

after

line of the CRT using the
prints spaces to
It CLEARWARNING
is
was displayed there.
an ACCEPT comand.
It has no argument.
on

with

the last

CLEARWARNING.

FORMAT:
CLEARWARNING

ABORT

Command

Menu.
Any open
data
returns control to the DataF1ex
files are
is done,
closed when ABORT is executed. However no "cosmetic" cleanup
when this
would
be in order in most
cases
so at least a CLEARSCREEN
ABORT has
from
command
a screen-oriented
configuration.
is executed

ABORT

no

argument.

FORMAT:
ABORT

Copyright (c)

1984

Data

Access

Corporation

05/16/84

=======FZZZZZZZ¶EZZZ:

0"35

:""::::7:::::[:"I7I::::::Z::"

=====

BLOCKS

::::=Z====

AND LOOPS

——————————
—————
== ==== =

,

provide a means of executing
DataFlex Structured Control connands
and/or in loops. The parts of
parts of a configuration conditionally
under
a configuration
control of Structured Control commands are
called "blocks", and they are made up of a sequential series of
which
placed
between
commands
are
the "beginning" command (e.g.p
UNTIL,
(END,
FOR),
and the "ending" command
BEGIN,
REPEAT? WHILE,
and
LOOP).
control whethem
Indicators and parameters
of the comnands
the
how many times3
blocks are executed.
The

BEGIN

END

-

Cand

of the structured control commands is BEGIN - END. The
the
until
start of a group of commands that are executed
is encountered. Indicators and "IF'S" can be used to
do not
The BEGIN
and END comands
test both BEGIN and END commands.
After execution of the line containing the END
support arguments.
command,
execution goes to the next line of the configuration.

The simplest
BEGIN
defines
an END comíand

FORMAT:
BEGIN
COINAND

GROUP

END
EXAMPLE:

[found]

BEGIN
DISPLAY
DISPLAY
DISPLAY

1ist.name TO screen.]
1ist.address TO screen.2
TO screen.3
list.city_state

END

is TRUE,
If [FOIJND] FALSE,
they
If it is
REPEAT

-

UNTIL

the DISPLAY commands
will be skipped.

will

all

be

executed.

———————

Command

a group
of commands in a loop
construct executes
condition is met or created, inclusive.
If the
the
condition is already met at the time execution first encounters
1OOPg the loop
will still be executed
at least once.

The REPEAT
UNTIL
UNTIL
a specified

FORMAT:
REPEAT
commands
UNTIL

arg

mode

arg

————-———

————

Copyright (c)

1984

Data

Access

Corporation

05/16/84

BLOCKS

D-36

DataF1ex

AND LOOPS

2.0 User's

Manual

—
——
EXAMPLE:
REPEAT
MOVE

(count+1) TO count
count
UNTIL
count EQ 5
REPEAT until
The loop would
SHOW

REPEAT

COUNT

equa11ed

(inclusive).

5

LOOP Command

-

LOOP construct
REPEAT
requires that execution
is a loop which
continue until a conditional statement (indicator or IF command)
line terminates the
within the cormand group or on the LOOP comand
processing and causes an exit.

The

FORMAT:
REPEAT
connands

conditional
comnands
LOOP

or indicator-contro11ed

exit

connand

EXAMPLES:
REPEAT
SHOW
INPUT
[KEY.ESCAPE]

"*"
"Enter data: "

some_data

ABORT

[KEY.RETURNJ

LOOP

only if RETURN
is pressed.

Loop
key

REPEAT
CALCULATE

IF count

(count
GE lOó

key

is pressed.

Abort

if

ESCAPE

TO count
+
GOTO a routine

l)

LOOP

=========

Copyright

========—
(C)

1984

Data

Access

Corpciration

05/16/84

DataFlex 2.0 User's

BLOCKS

Manual

AND LOOPS

D-37

———————————

WHILE

-

END Command

establishes a test like an IF command which is
The END establishes
the end of
the test becomes FALSE.
checks
the
after execution of which the process
the comnand group,
WHILE condition,
and
is TRUE, loops back to the beginning of the
it
continues on with execution of comands
group, and if it Ís'FALSE.
"IF"
following the END statement.
If upon first execution, the executed
(not
at
condition is FALSE, the comnand group will be skipped
comand

The WHILE
executed

until

if

all).
FORMAT:
WHILE

arg_l

mode

arg-2

comiands
END
(see
mode
mode
is an IF comparison
arg_l is a variab1eg
and arg_2
is a string, date or
discussion of IF commandL
numeric
value. or a variable whose value is reset within the
loop.

Where

EXAMPLE:
WHILE
in_stock GT O
INPUT sale
CALC (in stock

- sale)

END

FOR

-

FROM

TO

-

-

TO

ín_stock

LOOP Command

This is a loop construct that has a specified range for its operation.
execution for a certain number of repetitions defined
It is based on(FROM)
(TO)
and ending
by starting
integer limits.
If execution first
encounters the loop while the value of the integer is outside the
once
limits in the comand. the command group will still execute
before exiting.
FORMAT:
FOR

1nteger_var

FROM

argl

TO arg2

comnands
LOOP
Where

integer variab1ep
integer_var is any previously-declared
or
constants, expressionsp
arg_l and arg_2 is are numeric
variables.
and

EXAMPLES:
FOR

timer FROM I to 500
timer TO an_integer

MOVE
LOOP

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

D-38

BLOCKS

DataFlex

AND LOOPS

2.0

User's

Manual

+

in the Structured Control command
or IF commands for multi-level
should not be used
conditional execution.
Structured Control comands
because
the
in the ENTRY sections of the ENTER and ENTERGROUP macrcm
which
BACKFIELD
key
is capable of defeating the initial comand
controls entry to the loop.
All

group

BÉGÍÑ7
can

Copyright

LOOP, and END comands
be used
with indicators

(C)

1984

Data

Access

Corporation
,

05/16/84

===="============------------—

_

-=

__====

0"39

——————

"
—

DIRECT

-======2==

CONTROL

OF THE

_

CONSOLE

=Z====Z===

——

Console
Input/Output (1/0) command group provides a facility for
and to perform a
directly addressing the CRT device (terminal screen)
useful in the development
range
of CRT operations which are sometimes
Before any of the console I/O group of
applications.
of more advanceA
be considered whether
commands
might be easier
is uséd» it should
imaging
facility
or more direct to utilize DataFlex's powerful screen
which
is available at the beginning of any and every configuration.
than
The console I/O command
screen
group
less
efficient
generally
is
images
to elaborate displays, and is intended for use
for moderate
only in exceptional situations.
The

it

independent
I/O command group are totally
actions of the Console
functions
of the particular codes and routines which activate screen
DataFlex
computer
acquires and
on any particular
or terminal.
maintains system-specific data about your CRT when the SETSCREEn
is run. The data from SETSCREEn is stored in the file
utility
each
FILELIST.CFG.
about
Data
is read from FTLELIST.CFG
your system
system-specific
to provide the necessary
is initialized
time DataFlex
data
for the execution of the comiands.
The

SHOW Command
SHOW command
provides the facility to output data to the CRT
output is directed
device. It will not output to the printer even
The data
output to
to the printer (see WRITE and WRITELN commands).
numeric,
the CRT"may be of any type (constant, variab1e»
strin>
which
The SHOW command
defines
acts on an argument
expression, etc.).
be
must
on the CRT.
Literal arguments
the data that is to be "shown"
and produce
embedded
a display of
quotation marks,
in single or double
and
the
argument
itself. Arguments without quotes are variables,
produce
Multiple arguments
a display of the contents of the variable.
No carriage
be used.
can
return is output at the end of execution of
Two consecutive SHOW command
lines will output data
a SHOW command.
to the same 1ineg one after the other, left to right, on the screen.
80 characters.
be longer than
Literal strings to be SHOWn cannot
The

if

FORMAT:
{argument

SHOW argument

...

argument}

EXAMPLES:
"p "
SHOW name ". " address
cIty'
by a
Display the va?ue of the string variable NAME, fo77owed
and a @ácEjb
then the value of the variable ADDRESSp
coma
followed by a coma and a spácév followed by the value of the
at the cursor position.
variable CITY on the screen
(continued next page...)

===

=
———————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DIRECT

D-40

CONTROL

OF THE

DataFlex 2.0 User's

CONSOLE

Manual

———

(continued

EXAMPLES

from

SHOW "Hei1o9

"

Display Hello,
PERS_NFME

pers_name

the contents of the variable
at the cursor position.

followed
the

on

page)

preceding
by

screen

"Input today's date
Display Input today's date
cursor position.
SHOW

(MM/DD/YY):
(MM/DD/YY):

"
on

the

at the

screen

SHOW (12.70+TOTAL)

Display the results of adding
variable named TOTAL on the

to the value of the
at the cursor position.

12.70
screen

SHOWLN Command

This command is the same as SHOW, except that SHOWLN outputs a
outputs
that
carriage return after displaying all of the arguments
giving the cursor a new line on which to disp1ayg
to the teminab
SHOWLN connands.
is useful, among other
including succeeding
of output on the screen, which
thingsg for displaying vertical columns
is usually done in a loop.

it

It

FORMAT:
SHOWLN argument

{argument

...

argument}

EXAMPLE:
WHILE

LT 500
area_code
Code
SHOWLN "Area

"

area_code

"processing completed"

LOOP
would

reading "Area
display successive lines on the screen
Code

processing completed" until the value of
500»
where

AREA_CODE equa11ed
or exceeded
represents
the value of the individual area code.
—————————
INPUT

INPUT

The

to

Cmmand

a

comand

variable,

accepts
named in

keyboard
comnand

the

input

and

argument.

data
received
be INPUT only
can
INPUT data is in

assigns the
Data

Once the
keyboard.
the
and by no other means.
from
the
under
upon or processed
variable
can be acted
the variable,
INPUT
functions with all valid
name within the configuration.
the input data does not match the type of the
variable types, and
be declared (e.g.,
an
an error wÍT1
variable named in the argument,
INTEGER
type variable is named and alpha characters are input from the
keyboard9
an error will
occur).
After entry of the dátáo any Flex-key
will cause
to be loaded, although the RETURN key is the usual key
to use for the purpose.

it

if

if

it

FORMAT:
INPUT

Copyright (c)

'optional

1984

Data

prompting string'

Access

Corporation

var_arg
05/16/84

DataFlex

2.0

User's

DIRECT

Manual

================——===_———————~———~—

EXAMPLES:

OF THE

CONTROL

D-41

CONSOLE

"""

—————

-

—

" todays_date
"Enter the date (MM/DD/YY):
at the current cursor
Display Enter the date (MM/DD/YY):
posltiom pause execution, and store subsequently-keyed
under
response
the variable TODAYS DATE
INPUT

INPUT quantity
Halt execution and store
variable QUANTITY.

GOTOXY

keyboard

under

input

the

Command

specified in
the CRT cursor to a position on the screen
providing control of the location of the
to the connanch
actions of other console I/O commands on the CRT device. GOTOXY
positioning;
other commands must be
provides no other function except
used
after the cursor has been moved to the desired
to do something
location.

GOTOXY sends
the arguments

FORMAT:
GOTOXY
Where

argl arg2
argl is the

is to

be

placed

LINE

on

the

and

is the

arg2

COLUMN

where

the cursor

CRT.

EXAMPLES:
GOTOXY

O O

Position
screen

the cursor at the
(line Op column O).

GOTOXY

12

range
by

left

upper

(HOME)

of

the

40

Position the cursor on line
screen).
24-1irm BO-column
The valid
determined

extreme

column

l2ó

for values of the line
the system configuration

and

40

column

(exact center of

a

arguments
is
SETSCREEN.

defined in

as

——————
CLEARXY

Command

CLEARXY command
position
clears from the coordinate screen
to the end of the screen. After
specified in the command argument
This
coordinates.
execution, the cursor is positioned at the argument
command
must
will cause an exit
not be used within a named PÁGÉ? as
PAGE
whatever
from
is invoked
in.

The

it

it

FORMAT:

argí arg2
Clear the screen

from

1984

Access

CLEARXY

~ +
Copy'right

Line argl.

column

arg2.

———————

(c)

Data

Corporation

05/16/84'

CONTROL

DIRECT

D-42

————

DataFlex

CONSOLE

OF THE

2.0

User's

Manual

————-————

———

EXAMPLES:
CLEARXY

O O

Clear the entire
CLEARXY

Clear

13
from

CLEARSCREEN

(see

below).

O

the beginning of line 13 to the
half of a 24-1ine screen).

bottom

of the

(bottom

screen

CLEARSCREEN

screen

Commánd

and sends
clears all printable characters from the screen
No argument
is used with this
the cursor to the "HOA" position.

CLEARSCREEN
command.
FORMAT:

CLEARSCREEN

Command

KEYMECK

a KEYCHECX connand
is execute6 a predefined indicatorg KEYPRESS9
TRUE
a key was pressed
at any time since input was last
(The
accepted
character generated
to a window or an ACCEPT stat«nent.
KEYCHECX
key was pressed
by whatever
is useful
is discarded.)
In
long processing cycles and reports.

When

is set

if

primarily
such

line with
has

been

for interrupting
is recormended

such
as
to display a prompt to the screen
KEYCHECX may be followed on the same
TO INTERRUPT".
KEYPRESS
which
comnand
another
is TRUE (a key
is executed
KEYPRESS
is FALSE (no key has been
pressed), and skipped
The KEYPRESS
indicator may be used at any time after
stateL so that
of a KEYCHECX comnand (to set

uses,
"PRESS
ANY

pressed).
execution
intervening

it

KEY

comnands

be

may

its

unconditionally
before the
KEYCHECX
on the state of KEYPRESS.
responds
the same to any key
does
not respond
to CTRLg SHIFT) or

executed

whose
execution depends
not distinguish among keys;
generates a character (it

command
does

if

if

which
BREAK).

it

FORMAT:

{optional

KEYQIECK

following

command}

EXAMPLES:

//Set KEYPRESS to TRUE or FALSE.
unconditionally
//tO execute
on KEYPRESS
//executes depending

KEYQÍECK
commands
[KEYPRESS]
KEYQIECK
a key

If

NOTE:

If

it

KEYCHECK

comand
GOSUi3 shutdown
has been
pressed,
comands

Copyright (c)

1984

Data

not be
branching

should

is desired to control

execute

Access

subroutine

under
used
by keypresses

Corporation

SHUTDOWN.

the REPORT macro.
in the REPORT

05/16/84

DataF1ex

DIRECT

Manual

User's

2.0

CONTROL

="=======——_———————————

OF THE

CONSOLE

macro,
the appropriate subroutine under the name RPT.KEYPRESS
ending
be defined in the configuration,
with the special form
RETURN RPT.LOOP.
RETURN connand
for the REPORT macro,

INKEY

D-43

— ———~——————~——

should

of

~

Ccmnand

the
into
inputs one character
It
execution
not display the character on the screen. It
aríd
key
is pressed,
is very useful for
of the configuration until a
be used
cannot
The cotmand
requires an argument;
this purpose.
without one.
from

INKEY
does

keyboard

an argument.
does
halt

it

FORMAT:
INKEY

argument

EXAMPLES: .
INKEY

a_key

Store the first
variable A_KEY.
SCREENMODE

key

input to the

keyboard

under

the

Command

SCREENMODE command
screen
sets the high- and low-intensity
The
as established
attributes
in the DataFlex SETSCREEn utility.
until another SCREENMODE comnand is executed, or
attribute will remain
a PAGE is displayed,
at which time the attribute will be set to low
There
SCREENMODE does
are
intensity.
not affect display of a PAGE.
no arguments
for this connand
other than the two shown below:

The

FORMAT:
SCREENMODE

I

sets

high

SCREENMODE

2

sets

low

Data

Access

intensity
intensity

——————-——————

Copyright

(C)

1984

Corporation

05/16/84

D-44

DIRECT

CONTROL

OF THE

CONSOLE

DataFlex 2.0 User's

Manual

=========

THIS

Copyright

(C)

1984

Data

PAGE

Access

INTENTIONALLY

Corporation

LEFT

BLANK

05/16/84

=============_"________"______"__""______""_

——

: :::-:

D-45

__

==="==="==

MANIPULATING

: :::::::::

RECORDS

=~

"""""

""""""""""""""""========—====""""""""
The

comnands
DataFlex Database
delete records in the database,
between
and among
records.

provide the facility to finch save
and to establish
"relationships"

and

that
individual DataFlex commands far exceeds
of these
making
"Flex"
in conventional high level 1angUages>
sma1]erg
and
more
easier to maintain than
configurations
consistent
application development
techniques.
alternative
The power
ava11ab1e

Database

Commands

and

FILEDEF

connands
linked to data
DataFiex Database
are integrally
FILEDEF
and
dictionary information established with the DataFlex
These
AUTODEF ut11ities.
a dictionary
of
create
utilities
specifications
for a data structure and stores it on disk. The data
dictionary contains data on each file's number of fields, field length
decimal
and type9
fie1dm name including drive
formatting on numeric
reference, multi-user statum key index structure, etc. All other
DataFlex
in the
operations can then "look up" the file specifications
needed.
data
This precludes the necessity for
dictionary whenever
data
and substant1a?1y
reduces
each
program
to maintain file-specific
time.
application development

The

Understanding

Record

Buffers

One
in your DataFlex
files resides on the disk drives.
The place in
record from each file can reside in RAM memory.
When a
where
memory
this record resides is ca?1ed the RECORD BUFFER.
record is read from the disk to the record buffer, data can be
be
The record
can then
in the buffer.
extracted from and/or changed
The buffer
does
its
is where DataFlex
written back to disk (SAVED).
work
on a given record.
The data
ACTIVE

record buffer contains a record that has been previously
the
database.
That is, the record exists both on disk and
have
been made
to
in main memory in exactly the same form. If changes
An edited
an active
that record is considered EDITED.
record bUfferB
in order to retain the
record MUST be saved back to the database
An edited record is
which
been made.
changes
have
still active.
An ACTIVE
from
read

record buffer contains either no data or data that does
(specifica]1y» newly entered data
exist in the database
A CLEAR record buffer is an
which
has not been
SAVEd to disk).
at all. In a CLEAR
inactive record that has had no data PUT into
and date
fields are zerop and all ASCII fields
buffer all numeric
When an inactive
but not clear record buffer is
contain spaces.
SAVEIL
be created.
a new record will
An

not

INACTIVE
(as yet)

it

—————————————————————————————
1984 Data
Access
Corporation

Copyright (c)

OÉJl6/84

.

MANIPULATING

D-46

DataFlex

RECORDS

2.0

User's
—

FILE

Manual

———————

MANIPULATION

cocrmandm
like ENTER and
the highest level of the DataF1ex
SAVEing
and
of the details of the record buffers, FINDing,
these
The way in which
CLEARing
operations
are taken care of for you.
done
are
is completely transparent to the operator and the configwhen you have
But
a requirement that necessitates
manipulaurator.
the basics of file
ting the files manually, you must understand
comandsg
When using the manual
records are NOT
manipulation.
file You must ensure
and cleared.
saved,
that these
automatically re1atech
operations are done, and done in the proper sequence.
When using
REPORT,
all

There

four basic

are

I)

FINDING:

Read

2)

EDITING:

Read

the

The

records,

Create

4)

DELETING:

Delete existing

for

b)
C)
d)

FINDING

database:

modify

them,

and

write

them

back

records.
records.

record is:

CLEAR

the record buffer.
the KEY data into the record buffer.
FIND the record by the KEY
field.
0ptiona11yg
RELATE the found
record.

for

data
data

EDITING

an

out of the record buffer.
If the FIND
be in the buffer and the record

will

existing

record is:

above)
FIND the record (see
to edit.
Put
new data
into the record buffer
SAVE the record.

fields

to edit the record.

done
after a "put" to an active record buffer to
disk.
Continuing processing after editing an active
record without SAVEing
will cause Error 82v and the file will
to be REINDEXed.
A SAVE must
the
data
to

be

it

The

The

for

procedure

CREATING

a)
b)

CLEAR the record
Put
the data into

C)

SAVE

procedure
a)
b)

to

Put

procedure

c)

new

a

After a FIND you may get
is unsuccessfuK the KEY
buffer will be INACTIVE.

a)
b)

a

database.

CREATING:

procedure

on

records for reference only.

3)

a)

The

operations to perform

manual

a

fields.

the record.
for

(C)

have

is:

buffer.
the record buffer

DELETING

a

FIND the record (see
DELETE the record.

Copyright

reccmd

move

1984

Data

Access

record is:
above)

to delete.

Corporation

05/16/84

O
DataF1ex

User's

2.0

Manual

MANIPULATING

RECORDS

D-47

—————

OPEN

=
Conunand

=

files associated with a file
available for DataFlex
operations.
for information on df_fi1ename).
Spec1f1caI1y»
when a
data
file, and all
file is OPENedg the referenced
associated key index files are opened,
buffer space is autcmat1cal1y
and upon
allocated in memorµ
completion of the OPEN operatiom all
files are available for on-line processing.

An

OPEN command

"df_fi]ename"
(See

the

FILEDEF

and

database
Kay files)

documentation

The

OPEN canmand(s)

and

be executed
must
be addressed
by

can

all

makes

(data

should be at the beginning of the configuration
before the flies associated wIth the df_fi1ename
other commands.

FORMAT:
OPEN

fi1e_name_arg
OPEN is the

{lndex.n}

"ff1e_name_arg"
is the "SHORT
(created in
of the file to be 0PENed,p and n
be
represents the number of an index that may optimally
loaded
to
into a memory "buffer" to speed sequential access
records in a fi?e.

Where
NAME"

command,
FILEDEF)

EXAMPLE:
OPEN

lnvantory

OPEN

personnel

1ndex.2

abovep
the "index.2" option after
In the second example
df_fi1ename "personnel" elects to load the second index
database
file fnto a memory buffer.

the
for that

optional Index buffering only provides a speed improvment when
Random
the access to records Is sequential, as in a report.
recordm wIll
operations, such as transaction entry to non-sequent1a1
not benefit from buffering.
The

usefulness of the index buffering option is, as with most other
The number
of the index is established
options, subject to tradeoffs.
as previously
created in the FILEDEF funcin the index definitions
locations required by FIND
tion.
If the option is selected, record
and other accessing
operations are read directly from the computeMs
active m«nory (RAM) rather than via a separate (slower) disk access
and file-read
operation.
The

The tradeoff
when
using
record buffering is the sacrifice of a portion
by this
RAM that is consumed
of tho computerG
process. The overall
RAM capacity of
number
of files opened,
size of your configuration.
determines
how (ñüch RAM is available
and so om
over
your computerg
and above
what
is required to carry out the applicationG basic
the index-buffering option is
functions, and will dictata whether
worthwhile, or even possible.

+_

_

Copyright

(C)

1984

Data

Access

~ »

—————

Corporation

————————
——————~——

05/16/84

MANIPULATING

D-48

DataF1ex

RECORDS

2.0 User's

Manual

—

environment, the optional
proper1y9
indexes
will maintain
are updated.

In a multi-user
and DataFlex
buffered indexes

index
even

buffering is allowed
in those cases where

a special
configuration source
files are being compilech
the compiler macro processor must be resident on the
The needed
device on which the compiler is located.
file is
"OF FILENAME"
established
in the
is
referenced as OF FILENAME.FD.
—
FILEDEF
Its name is maintained
utility when the file is defined.
wIthout assuming
separately so that the ".FO" file can be addressed
attached to the data file.
the drive specification
When

file
logged

DataFlex
needed

by

—————————
FIND Command
The FIND command
is used to get a desired specific record from a data
FIND
data
uses
base
on disk and place
into the record buffer.
keyboard
placed
input) to
in the record buffer (normally by prompted
indexg
search
a key
"find" a match and get the record. For examp1e9
maintenance
for a
situation,
the operator could be prompted
in a
number,
ID
some kiñdv an account
part code9 etc.

it

file

record
or "key" of
is placed
to the prompt
entered in response
for a match (or other relationship--see
by the FIND command.
performed

Data
search

The

All
FIND

FIND command
segments
in

operation,

into the buffer
below)
is

and

a

MODES

must
reference an existing index or record number.
the index will be used to locate the record with the
including record numbem
if included in the index.

by which
FIND must
be given a parameter
to execute. Do we want to
search
for a record with an exact match to the "key% or do we want
with a "key" greater than the value entered to the buffer?
the record
Five MODEs are
is called the MODE of the FIND.
This parameter

available:
LT
LE

Less
Less

EQ
GE

Equal

Than

than or

Greater
Greater

GT

than

Equal

or

to

Equal

to

Than

Finally, we must define what index is to be used for the FIND
This is specified by the number of the index to be usecb
operation.
where
(see
n
as INDEX.m
File Definition)
as defined in the database
is the index number.
FORMAT:

filename BY INDEX.n
is a number between
l and 5 (for B-bit computers) and or
I and ID (for 16-blt computers). INDEX.BATM
The index
must
RECNUM may be used
alternatively.
first have
been
definition.
defined in the database
FIND

mode

Where
n
between

~
Copyright

(C)

""

1984

Data

_
Access

Corporation

~

05/16/84

2.0 User's

DataFlex

MANIPULATING

Manual

RECORDS

D-49

EXAMPLES:
FIND

EQ

Find

a

equal
FIND

lnvt BY INDEX.2
record in the INVT file by
to the data in the buffer.
BY

GE member

The filename In
OPEN command.

number

with

2

a

key

INDEX.3

Find a record in the MEMBER file
the value is equal to or greater
NOTE:

INDEX

command

the

INDEX

by
than

number

previously

must

3

where

in the buffer.

data

the

have

been

OPENed

with the

command/MODE
used
GE is probably the most
combination.
It
retrieve a record based on an exact match with data in the
next
match
bufferD
is found, the
record following the value
or if no
of the buffer data.
The

FIND

will

result of executing a FIND operation is shown by either of two
FINDERR
FINDERR
and FOUND.
will be TRUE when the FIND
indicators:
operation is not successful by the specified MODE. FOUND will be set
TRUE when
a record is found
according to the specified MODE. These
indicators-can be used to direct the action of the configuration based
on the outcome
of the FIND command execution.
The

form
An alternate
of
number
is not known.

FIND

the

connand

can

be

where

used

the

index

FORMAT:
FIND

mode

FIND

GT

fi1ename,f1e1dname

EXAMPLE:

The

fi1ename.fie1dname

of

of

coursep

when

the

works
FIND command
only
commands,
specifically:

when

it

3.

CLEAR the record
MOVE the finding
Execute
the FIND.

4.

Execute

I.
2.

The

must,

occur at runtime

error will
The

INVENTORY.DESCRIP

following
INPUT
CLEAR

name

[FINDERR]

—

be

a

matched

definite

or

not»

example

wish

of this

to find:

"

an

sequence

related

tO).
FIND.

sequence:
find_name

people

TO
MOVE find_name
FIND EQ geop1e.lname

———·

Copyright (c)

you

an

within

is

successful or unsuccessful

on

represent

"Enter the

occurs

buffer.
data
(data to

conditionally

commands

If it

be indexed.
command
is executed.

1984

people.lname

GOTO no_match

-.——————
.. .
Data

Access

Corporation

05/16/84

D-50

DataFlex

RECORDS

MANIPULATING

I*
STRING

START:

[FOUND]

l

pause

ma'í1list

CLEARSCREEN
CLEAR

mai11ist

INPUT

"Enter

FIND

User's

Manual

EXAMPLE:

CONFIGURATION

OPEN

2.0

GE

NAME

mai11ist

BY

//
//
//
//

BEGIN

"

to display:

configuration

//

starts

//

declare variable

//

opens

//

clear the

//

clear before

mail1ist

//

search

file

screen

mai1list,name
// get keyboard

INDEX.Z

PAUSE

for

FINDing

input
match

is set TRUE automatically by a
successful FIND operation
here
from
Commands
to the next END are
executed
only if the FIND was successful
FOUND

SHOWLN

mai71ist.address

SHOWLN

mai]1ist.cty

st_zip

END

//
//
//
//
//
IFINDERRI

SHOWLN "No
INPUT

[KEY.ESCAPE]

RETURN

"PRESS

****

ERROR

TRAP ****
is set TRUE automatically by an
unsuccessful FIND operation
The
only if the
is executed
next comand
FIND
attempt was unsuccessful (no match).
FINDERR

names

matching: " mai11ist.name

TO FIND

ANOTHER.



TO QUIT"

PAUSE

ABORT

GOTO START

Copyright (c)

1984

Data

Access

Corporation

05/16/84

DataFlex 2.0 User's

RECORDS

MANIPULATING

Manual

D-51

=

_________
SAVE Command

DataFlex SAVE connand takes data in a record buffer and "saves"
on the comand
disk. The comnand can have mu1itip1e arguments
OPEN and relationships
are
exist, all files
multiple
line.
files
If
(see
related to the file being saved will be automatical1y ATTAMed

The
on

below)

and

it

saved.

FORMAT:
{f11ename_arg2

SAVE

f1iename_argl

SAVE
SAVE

inventory
client transaction

...

f11ename_argn}

EXAMPLES:

NOTE:

The
fi1ename(s)
OPEN command.

in the

system
command

must

previously

have

been

OPENed

with the

The action
placed
in

of the SAVE comnand
the buffer, and what

varies

on

how

has

based
happened

to

it

there.

has

it

been

arrived

buffer that has data moved into
...see below)
(window another fi1ek will simply move the data
into a newly created record on disk.

(or

An empty
from
any

data
once

CLEAR

source

the buffer

If a record is FOUND (past
modified (e.g.p by keyboard
altered data) will be SA\lEd
originally
stored.

it

from

and the data
in
is then
of FIND).
entry) then the buffer (containing the
back
was
to the same record in which

it

tense

it

of editing in
is important to remember that the process
Thereforep
occurs when data is moved to the record buffer.
made to the database
a SAVE comnand
on disk until
is
no changes-are
executed
is an
after the modification of the data in the buffer.
It
error to edit a record and not SAVE
NOTE:
DataFlex

It

it.

SAVERECORD

Command

SAVERECORD saves
ATTAM
fs executed

is the

argument

a

record
and

of the

from

its buffer to the disk. No automatic
only the file that
files are saved;

no related
command
is

saved.

FORMAT:
SAVERECORD
NOTE:

The

with the

fi1ename_arg

f1lename(s) in the

OPEN

command

must

previously

have

been

OPENed

command.

——

Copyright (c)

1984

Data

Access

Corporation

05/16/84

MANIPULATING

D-52

DataFlex 2.0 User's

RECORDS

Manual

—————
CLEAR

Command

CLEAR command
acts upon the record buffer of the filename
referenced in the comnand argument(s). Any data in the buffer
flushed by the execution of a CLEAR.

The

is

FORMAT:
CLEAR

f'l1ename_argl

{f11ename_arg2

CLEAR
CLEAR

myffle
myfi1e yourfi1e

...

f11ename_argn}

EXAMPLES:

NOTE:

The fi1ename(s)
OPEN ccmnand.

ourfile

in the

ccmnand

previously

must

have

been

OPENed

with the

should
be used
CLEAR command
at any time that an initialized
keyboard
For
examp7e9
entry has been
record buffer is required.
used
to create data in the buffer for a FINCh and no record is found
(FINDERR
is TRUE)g then a CLEAR would purge any entries that had been
made to the buffer before making
fresh entries in an attempt to
and FIND other records.
proceed
Iñ on the other hand, you w.ish to
de-active an active (FOUND) record and retain entered data in the
that.
buffer, a MOVE O TO RECNUM command will accomplish
The

if

DELETE

Cmmand

DELETE command
r«noves
an existing
record
be FOUND before
must
can be DELETEd.
a71
executecb
key
indexes
ccimand
for the
is

The

it

record

on-line

updated

to

key

remove

entries

the
data
base.
from
When the DELETE

A

record being deleted are
for the deleted record.

FORMAT:
DELETE

f'i1ename_arg

DELETE

names

{ff1ename_arg2

...

fi1ename_argn}

EXAMPLES:

NOTE:

notes

The f11ename(s)
OPEN command.

reminders

in the

command

must

previously

have

been

OPENed

wfth the

———————————
RELATE

Command

works
RELATE comnand
in conjunction with the FIND comand. After
record has been found with FINIL RELATE will find all related
For
examp1eg
a transaction
record is
records in the database.
found
and placed
in the bufferg the execution of a RELATE comnand
and place
record(s) in the database
could find a related master
(them)
in the buffer additlonally.

The
a

if

it

Copyright

(C)

1984

Data

—

Access

Corporation

05/16/84

DataFlex

User's

2.0

MANIPULATING

Manual

D-53

RECORDS

=======
FORMAT:
RELATE

f'j1ename_arg

EXAMPL ES :
FIND GE 'lnvt_ trans.posting
RELATE
1nvt_trans
The ff1ename(s)
OPEN command.

NOTE:

In the

//executed

command

must

f i rst

previously

have

OPENed

been

with the

The record buffer for the
be executed
A FIND must
before RELATE.
be "active"
fi1ename_
Files to be
arg must
for RELATE to function.
be OPENed prfor
must
used
to
as the argument(s) of the RELATE command
that are not OPENed are ignored
Related
the command executi on.
an
by the RELATE command.
In the case of a "chain" type relationship,
RELATE a
that is not OPENed precludes access to other

files

attempt to
files further
use of
established
The

ATTAQ1

file

up

the chain.

RELATE assumes
that
in FILEDEF between

have

the proper relationships
(among)
the files.

been

Command

the ATTACH
relationships have been established in FILEDEF,
provides the means of placing the data on which the
is desired
record. If
relationship
is based into a new database
to ATTAN them.
is not necessary
only to SAVE related recordm
is done automatica)jy in execution of the SAVE
since ATTAMment
be used
command.
only where further
Thereforep ATTAQI should
processing is required before the SAVE is done.

file

When
comnand

it

it

FORMAT:

m"uai

f11ename_

ATTAQI

transactions

arg

EXAMPLE:

NOTE:

The ff1ename(s)
OPEN command.

in the

command

must

previously

have

been

OPENed

with the

DataFlex
Upon execution of the ATTACH commancb
moves
the record number
into
or field data that is defined as the basis for thewhenrelationship
the convnand is
the new record. All related files that are open
executed
will have a relationship created.
command
record. That
only moves data into the new database
part of the
the entire new record, is not a permanent
database
to put the information on
until a SAVE command is executed
disk. ATTMXI moves data from "higher" to "lower" data files only
Brief1yg a "higher" file is one
within an application data structure.
(such
are
as "employer") which
related to many other
with records
records (such as "employee"L and a "lower" file is one which contains
The ATTACH
datá»
and

——————

Copyright

(C)

1984

Data

Access

Corporation

05/

16/84

MANIPULATING

D-54

DataF1ex

RECORDS

2.0

Manual

User's

———————

those
more
Step

-

These
terms
records which relate to the "higher" one.
are
discussed in the section of this manual on Fi1e Definition
Among
Data
Plan
the
Files.
the Relationships

many

fully
One

ZEROFILE

-

Command

destructive of data, and
Its effect is to permanently
may be useful to do this
in
erase
all data from a database
file.
It
order to remove experimental or sample data from a set of database
and having to redefine the
files (without erasing the files themselves
for a new period.
entire databaseR or to reinitialize a database
comiand
The ZEROFILE
should
be used
only

very
is potentially
with great caution.

FORMAT:

filename

ZEROFILE
NOTE:

The f11ename(s)
OPEN command.

in the

cammand

have

previously

must

OPENed

been

wIth the

Agaim improper
disastrous.
SYSTEM

use
Great

of this comand
caution is advised

on

valid. needed
in using this

data
can
command.

be

FILES

have
a file with only one
record to hold
It is frequently desirable to name
and addresm the last-used
invoice
today's dateg your company's
number,
information.
cumulative tota1m and other-system-oriented
This type of file is referred to as a SYSTEM FILE.
A system

DataFlex

just like any other
ff1e is deflnech created and changed
but system files can contain only one record.

f'[1é»

set the "MAXIMUM NUMBER OF RECORDS" in the
of FILEDEF to one (I) when the file is set
reads
and automatically
the
up.
DataFlex recognizes this parameterg
single record from this special type of file into a buffer without a
Any data
FIND opration.
in the systm file is then available in the
buffer with.out a disk access.

file,

To define a system
"SET SYSTEM PARAMETERS"

System

When used
system

example

Invoice

the
should

with

file

An

should

fijes

of
uses

a

the

not

have

ENTER
not be

system
date

any

indexes

comand, systm files must be
Included on the ENTER command

can be
file SYSFILE.

found

1984

Data

in the

DEMO

from

that file one be used
It Is recomended
as the
that File I, Field I be assigned
Field 2 be the date. Append other system
There
these
may be multiple
as needed.

Copyright (c)

since there is only

Access

as the
company

file

system

Corporation

system
name

fields

0PENedg

l

record.
but the

line.

files
file.

as

SYSFILE.

A1SOg

that Fi7e 19
to the end of

and

files.
05/16/84

========k==============--

D-55

-==========

===~~~~

"

."=======,"=

=="====".==
EÉE2ÉEÉE=Z

MANIPULATING

FILES

————————————

~

==============.====~~—==——————————————————————— —~"""—"""—

provides for the execution of operations that
These
at the operating system command level.
within a DataFlex conffguration file as
cocrmands
In that these
required.
are very powerfuC and can make
be used
with respect and
major alterations to a system they should
prior to the
care. Supportive operator prompting and verification
recommended.
are
execution of these comnands
The System
command
group
would
normally be done
commands
can be executed

of commands wihtin this group manipulates the operating
Filename
arguments
that are
in the sub-group
directory.
Those
double
quotation marks.
literals must be enclosed in singledata or elements
(string variables or
filenames that are referenced in
windows)
ASCII
do not require quotes.
A sub-group
system

""""""""

=
ERASEFILE

C=Iand

Deletes the file
system
directory.

named

in the

command

from

argument

the operating

FORMAT:
ERASEFILE

fi1ename_arg

ERASEFILE

"myfile.dat"

ERASEFILE

file_to_kí1l

EXAMPLES:

RENAME

Command

Changes

the

name

of

a

file

in the operating

system

directory.

FORMAT:
RENAME

fl1ename_argl

RENAME

fi1e_to_rename

RENAME

oldfi1e

fllename_arg2

TO

EXAMPLES:

Copyright (c)

1984

Data

TO

"TEMP.DAT"

TO n0wf11e

Access

Corporation

05/16/84

MANIPULATING

D-56

==
COPYFILE

DataFlex

FILES

2.0

User's

Manual

____"""_

Comand

Transfers data from one file to anothem
or transfers fi1e(s) from
device to another. "Wild card" or ambiguous
file name entries are
supported for the purposes
of this command so that groups
of files
be manipulated.

one
can

FORMAT:
COPYFILE

sourcef1le(s)

COPYFILE

"a: current.dat"

COPYFILE

"a: *,f1x"

COPYFILE

screen.6

destfi1es(s)

TO

EXAMPLES:

TO

TO

"b:history.dat"

"bT
'b: newstuf.txt'

TO

=

=
DIRECTORY

Convnand

Displays

directory

a

of the disk

FORMAT:
DIRECTORY

files

specified

in fi1espec_arg.

fi1espec_arg

EXAMPLES:
DIRECTORY

"c: *.dat"

DIRECTORY

screen_window.20

Comnand

FILELIST

The FILELIST
data
DataFlex

file

name

files.number
It
file

and

stored in a pre-defined
three variations on the
FORMAT

from
the
of current
NAME, DataF1ex
PATHNAME,
DISPLAY
read
the
can
The
number
FILELIST.CFG.
from
is
There
are
integer variable called FILENUMBER.

displays information

cormand

list

file

use

of the comand.

l:
TO str1ngl_arg
{string2_arg]
is the number of the desired fi1e9
stringl_arg is where the fijds user display name is stored
and/or displayed, and stringZ-arg Is where the file's DataF1ex
file name is displayed or stored.
FILELIST
Where

EXAMPLE

f11enum_arg

fi1enum_arg

l:
FILELIST
Puts
page

22

—"—————"""""

Copyright

(C)

TO

the file's
"screen",

screen.6 screen.7
user
display name for File 22 into Window
and its DataFlex
filename into Window 7.

"
1984

________—_+
Data

Access

Corporation

6 on

———===

05/16/84

DataFlex 2.0 User's

MANIPULATING

Manual

D-57

FILES

— ——

FILELIST.CFG
NEXT comnand
and returns the next
scans
The
(the next larger number for an existing active file).
The value of FILENUMBER
is the
is returned in FILENUMBER.
To get a complete
point for the execution of the command.
FILENUMBER
(O).
to
zero
initialize

The FILELIST
ACTIVE

file

file
number

starting

FILELIST,
FORMAT

2:
FILELIST

EXAMPLE

NEXT

TO

strlngL-arg

{string2_arg}

2:
MOVE O TO FILEN%ER
REPEAT
NEXT TO
EQ O

FILELIST
FILENUMBER

UNTIL

1ist.2

11st.3

sequentially output the entire list of display
DataFlex file names for all active files to Window 2
Window
3 of Screen
list.
Would

The

FILELIST

PATHNAME

comand

file

DataFlex filename of the
FORMAT

and

and
(optionally)
by FILENUM.

3:
FILELIST

EXAMPLE

outputs the pathname
currently pointed to

names
and

PATHNAME

TO

stringl_arg

PATHNAME

TO

screen.l5

{string2_arg)

3:
FILELIST

screen.l6
— ——

SYSTEM

Command

command
to your operating
returns control of the computer
All files opened in the configuration will be closed in the
No CRT screen
"clean-up" is
process
of the executing the command.
be done
by other
must
performed
by SYSTEM,
so any cosmetic work
SYSTEM differs
from
commands.
the ABORT command in that ABORT will
Menu
is on the disk drivep while SYSTEM
return to the DataFlex
explicitly
exits to the operating system.

The

SYSTEM

systw.

if it

FORMAT:
SYSTEM

If DataF1ex is being run under control of a batch or submit
operating system f11eg SYSTEM will cause the next entry in the batch
to begin executing just as any other return to the operating
file
would
do.
system
If the "RETURN TO OPERATING SYSTEM" prompt which an
occurs
upon
use of the SYSTEM cormand
is confusing to operators,
explanatory prompt just before the SYSTEM command can help alleviate
such
confusion.

CAUTION:

Copyright (c)

1984

Data

———-——
Access
Corporation

————

05/16/84

DataF1ex

FILES

MANIPULATING

D-58

program

comand

It

Argument

name,

Manual

—————

———————
Comnand

The RUNPROGRAM
.CMD FILE).

the

User's

————

———————

RUNPROGRAM

2.0

have

can
Two

runs
an operating
two
arguments.

Argument

One

(.COM

program

Is the

or

program

line to pass to the program.
is returned to the operating

is the comand
execute6 control

has

systan level

After
system.

FORMAT:
RUNPROGRAM

prog_name.com_arg

RUNPROGRAM

"PIP"

RUNPROGRAM

screen.2 screen.3

RUNPROGRAM

"edit"

prog_arg

EXAMPLES:
"B:

=A:*.*"

prompt_input

Command

REGISTRATION

command
The REGISTRATION
will
number
license
of a DataFlex
can

be

used

in

a

retrieve the registered name and serial
place the data into variables that

and

configuration.

FORMAT:
REGISTRATION

str1ng_arg

REGISTRATION

1icensee_name

numer1c_arg

EXAMPLE:
seria1_number

cormand
to display the name of the application
of the REGISTRATION
is effective in identifying the
author (company
or individual)
for
software to the creator/ownem and is one of the main purposes
which
this comnand is provfded.
Use

— —————————
SYSDATE Comand
SYSDATE comand
retrieves date and time information from the
operating systam provided the date and time have been properly set in
The SYSDATE comand
stores the system date to
the operating system.
the first variable named after the coman6 the hour (in 24-hour
and the minutes
to the
format) to the second (optional) argument9
The date will
argument
a third
is specified in the cotmand.
third,
be returned as
and the second
two will
be returned in DATE formatg
The name DATE should
not be used, since that is a
two-digit numbers.

The

if

—————————————————————————_______========

——————————————

Copyright (c)

1984

Data

Access

Corporation

05/16/84

2.0

DataFlex

MANIPULATING

Manual

User's

DataFlex reserved

FILES

D-59

——~———=~——~—

==",========".=~————————~———

word.

FORMAT:

{hour_arg} {m1nute_arg}
is a date variable, and
optional 2-digit numeric

SYSDATE 

Where

{minute_arg}

are

{hour_arg}
variables.

and

command
returns the year in two digits (as in 12/24/44).
can be obtained
four-digit
format is desired (12/24/I944R
adding
the amount 693975 to the returned value.

The

it

If

a

by

EXAMPLE:

minute
TO sdate

SYSDATE sdate
hour
MOVE (sdate+693975)

All
the

MS-DOS-based
MP/M (BÉX)S

CP/M-86

1.0

do

which
and operating systems
systems
system
call are supported. CP/M 2.2

operating

105)
not

DATE

have

time

and

which
systems
are
supported are:
and MS-DOS,
as well as TurboDOS,

support
and

Among

operating
functions.
3.0, Concurrent CP/M, MP/M-86
DPC/OS 3.0, MS-DOS,
and NStar.
date
CP/M

——
—————————

————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

D-60

MANIPULATING

FILES

THIS

Copyright

(C)

1984

Data

PAGE

Access

DataFiex

INTENTIONALLY

Corporation

LEFT

2.0

User's

Manual

BLANK

05/16/84

======————~~———~~——~—
EEEEEFFáEE
——————————

————————————"
—
DIRECT

INPUT

0"61

======
===t======

AND OUTPUT

—

"_————

~

========~——~————————————————~————

—

group
provides a means of reading data
Sequential I/O connand
from, and writing data to, physical input/output devices (such as
by,
printers) and disk files produced
or for further processing byp
CBASIC,
These
commands
etc.).
programs
other than DataFlex (WordStarp
Data
do not use "image"
formatting.
sent to files and devices from
in the
this command group must be formatted (where necessary)
etc.) of the
configuration to satisfy the requirements (delimiters,
program.
destination device or non-OataFlex

The

The
this group use an underline
first four commands of name.
This character is Integral
character (_) within the comand
name and cannot be emitted wfthout causing a compilewith the comand
time error.
NOTE:

————DIRECT_INPUT

CQmnand

specifies a disk file name or device from which sequenconfiguinput is to be received for processing by a DataFlex
The argument
for the cocmand is the name of the file or
ration.
dévicéo
or the name of a variable or wIndow which contains the desired
argument
is the literal name
file name or device designator. If the
should
be surrounded
by quotation
of the file or device &sigñátwt
should
marks
argument
marks.
a string
variab1ep
quotation
is
the
If
the
command
used.
be
opens
automatically
the
of
Execution
not
necessary
buffers and makes the file or device fully ready for input
be found
cannot
in the
operations.
If a specified file or deviceTRUE.
need
in
indicator is set
system the end-of-file
If there is message
can
the application to declare an error in this casé» an error
which
be established
is triggered by the state of the end-of-file
Indicator.
DIRECT_INPUT

tial

it

FORMAT:
DIRECT_INPUT
str1ng_arg
Where
string_arg contains

the

file

source

designator.

name

or

device

EXAMPLES:
DIRECT_INPUT
Open

a

file

"wsmerge.txt"
named

WSMERGE.TXT

"RDR:
DIRECT_INPUT
Open the port designated RDR:

"

for input
in the operating

system

for

input
INPUT screen.l
Evaluate the contents of
file or device identified
DIRECT

Window

#1

on

the

screen

and

open

the

thereby

—

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

DIRECT

D-62

DataFlex

AND OUTPUT

INPUT

User's

2.0

Manual

———————
DIRECT_0UTPUT

Command

a disk file or physical device to which
identifies
The
is to be sent from a DataFiex configuration.
comand
argument
is the name of the fije or device. Execution
buffers and makes the
automatically opens the necessary
of the comand
to
or device fully ready
for output operations.
If the argument
file command
should
be
is the literal name of the file or device,
the
argument
embedded
is the
in quotes
("). If, on the other hand, the
which
name of a variable
contains the file name or device designation,
should
quotes
not be used.
If a file or device 'Is specified in the
command
which
does
not exist in the system a new disk file will be
CAUTION:
created under the name specified in the command.
If the
by the
command
names
an existing
fi1e9 that file will be erased
DIRECT_0UTPUT
cormand,
with no warning
to the operator unless one is
explicitly
written into the configuration.
DIRECT_0UTPUT

sequential

data
for the

it

FORMAT:
DIRECT_0UTPUT

str1ng_arg
the file or device specified
string variable named STRING_ARG.

Opens

by

the contents of the

EXAMPLES:

"myfi1e.txt"
for output the file

DIRECT_OUTPUT
Opens

DIRECT_0UTPUT
Get name of

CL0SE_INPUT

screen.4
device or

& CL0SE_OUTPUT

file

named

MYFILE.TXT.

Window

from

or

file

which

Page

SCREEN.

or device opened by the
They
respectively.
operate
and require no argument,

file

device

on

Commands

These
two comands
simply close the
comands
AND DIRECT_0UTPUT
DIRECT_INPUT
any

4

may

be

opem

on

FORMAT:
CL0SE_INPUT
CLOSE_0UTPUT

———————————————
READ

(»nmand

READ comand
reads
sequential data from a file or device and
given in the argument
assigns data thus read to the variable name(s)
READ recognizes the
of the READ command.
coma (p) as the delimiting
elements»
and ignores
data
character between
comas which are consingle
tained wIthin double or single quotation marks.
If there are
be used
double
quotes
quotes
as
(") should
in embedded material
(')
single
there is need for double qUotesg
character.
the embedding
If
quotes
to attempt to
may be used
for embedding.
It is not recomended
element
embed
any single data
containing both types of characters.
The

Copyright (c)

1984

Data

Access

Corporation

05/16/84

DataFlex 2.0 User's

DIRECT

Manual

INPUT

D-63

AND OUTPUT

EXAMPLE:

would

interpreted

be

l:

Ring
Mahoney

3:

Miami

4:

Florida

2:

ArnerM1ambF1or1da

and

Rfng,Mahoney

four

as

and

data

specifically:

elments,

Amer

while:
"Rfng»
would

interpreted

be

Miami

3:

Florida

is encountered
data
assigned

three data elements.

as

Mahoney

l:

Ring,

2:

The READ cotmand
given
ments
in

Arner%MiamiMorida

and

Mahoney

and

will read
the connandD
in the source
elements.

as

follows:

Arner

many data elements
as there are
arguunless the CR/LF end-of-record character
have
been
data
before all arguments

as

FORMAT:
READ

argumentl

READ
Read
under

an_e1ement
one element

argumentN

...

EXAMPLES:

variable

from
name

the current

input line

and

it

store

AN_ELEMENT.

name address
cIty state zip
under
in the record and store
the first data element
and assign
the variable name NAME, read the next element
it,to
and so on.
ADDRESSp the next to CITY,
READ
Read

it

the number of
in a record exceeds
execution will stop short of the end of
for which there is an
the recoi"d»
after reading the last data element
example
shown
argument
to. Thus, if the second comiand
to assign
above
run
were
against this data:
the number
If
arguments

in

of data

a READ

elements

command,

it

Data

Access.129th

Terr.,Mfami.FL»3315&(305)987-6543

first five elements (name, addresm cÍtyp statep zip) would
into DataFlex. The phone number would not be read (although a
read
READ command
succeeding
could, and would,
it). If the number of
READS for a record exceeds
the number of fields in the record, the
READS output null
exceeding
fields for the output record.
only the
be

read

———————————
Copyright (C) 1984 Data Access

——~

Corporation

05/16/84

D-64

DIRECT

Thus,

the

if

~~""

second

resultant

The

==================

example

were

against this

run

data:

Terr.gM1amfpFL

in DataFlex

data

above

Manual
======

""""

comand

Access.129th

Data

DataFlex 2.0 User's

AND OUTPUT

INPUT

========
=

would

be:

NAME:
Data
Access
ADDRESS:
129th
Terr.
CITY:
Miami
STATE:

FL

(blank)

ZIP:

~~——=========================
========"=
READLN Command

=

=

The

READLN command
(see
above), except
is similar to the READ cotmand
reads
all data from wherever
the comand
that
is invoked
to the end
of the record (defined by a carriage return (CR) character in the
source
data).
Like the READ commanch argument(s) set the name(s)
of
the variab1e(s) under which read data will be stored.

it

all data from
is issued with one argument,
line is stored under a single variable
When multiple
arguments
name.
as its
having the
uséd»
data
elements
will be stored sequentially under the argument
data
names,
is delimited by comas (as
provided that the source
CBASIC*,
custcx'narily is in sequential files created under MBASIC*,
WordStar*
MailMerge*),
Where

a READLN

source

command

the

or device on a
file command
argument

are

it

FORMAT:
READLN

argumentl

argument2

...

argumentN

EXAMPLE:

fnput_string
line of data and store ft under
INPUT_STRING
(regard1es5 of delimiters
line).

READLN
Read a

READLN
Read a

line of

variable
CITY.
The
same

address
data

name

NAMEg

name

and

so

city
and

the

state zip a/c
store the first
second

under

—=——
~~~— ~

Copyright

phone
data

ADDRESS9

be

the

e1went under
the third under

execute in exactly the
coímands:

C

the last command causes a READ
to the next 9 inclusive.

1984

from

the third

data

=====================================

=
(C)

within

may

A
B

READLN
Where
element

name

which

on.

multi-argument command READLN A B C would
fashion as the following group of READ
READ
READ

the varfable

Data

Access

Corporation

05/16/84

2.0

DataFlex

User's

DIRECT

Manual

"

INPUT

AND OUTPUT

D-65

——

on a source
line happens to exceed the
data elements
the "exceeding" data elements
in a READLN command,
for
will be stored under a variable together with the last element
(group
The variable
which
name for this last
there was an argument.
in the READLN command.
will be the last argument
of) data e1ement(s)
each
In this
pair of
sltuatiom
the (comma) delimiters between
"exceeding" data elwents will also be stored in the resultant data
element.

If the
number

number
of
of arguments

multi-argument READLN commands
elements.
constitutes one

Generai1y»
number

data

of

will

recorch

be
as

where
used
where:

a

fixed

Name.Address,Cfty.State,Z1p

represents a record.
under
the appropriate
READLN

It

would

be

represented

Name

The

READLN

variable
Address

which
command
would
be:

would

CIty State

and

nocessary
in this instance
by a delimiting
as
commm

SEQEOL

this

data in

ZIp

that
in:

any

empty

2nd Nat1ona7
Bank,gAnytown,Anystate,l2345
element
Where
is blank or non
the address

SEQEOF

read

names

data

eleent

be

applicable.

Predefined Indicators

DataFlex provides two predefined indicatorm SEQEOL (sequential end of
line) and SEQEOF (sequential end of fi1eL which can be used to
Both
control operation of READing and other configurations.
¶ndicators are set FALSE upon execution of a READ or READLN comandg
and are
reset TRUL respective1yp upon the READing of an end-of-line
character (), and upon the READing of an end-of-file
READLN
NOTE:
character ("Z).
will always read to, and including, the
character
next end-of-line character, but will not read an end-of-file
WITH the last
record if there is an EOL immediately ahead of it.
It
will have to do one more READLN (creating an empty record) to detect
READ
EOL
READ
wf11
EOF.
an
the
last
with
Similarly,
not
the
field
by a
will require an
the EOL is immediately preceded
coma;
These
EOL.
READLN)
READ
factors should
(or
to detect the
additional
be kept in mind
record
of READing configurations,
in the design
data.
the exact format of your source
counters and the like, as should

it

—============~~——~—————————"——
Access
1984 Data
(C)

Copyright

—"""—
Corporation

if

—-————-—..—

05/16/84

DIRECT

D-66

WRITE

INPUT

DataFlex

AND OUTPUT

User's

2.0

Manual

Command

sends
data
WRITE command
sequentially to the device or file name
Arguments
command.
to this comnand
given in a preceding DIRECT_OUTPUT
identify the variable names under which the data is found for output.
No carriage
be used
returns
can
with this cormand.
Multiple arguments
cormand,
by use of this
are
for which reason
delimiters
provided
or
as
to the comand
they must be added to the data in the argument
is desired to include quotation
below). If
1itBra1s (see examples
marks
quotes) in the literal, most non-OataF1ex
(", also called double
programs
permit the use of single quotes
(') as the embedding chardelimiting
This provision affords total flexibility in adding
acter.
characters to data being output.
The

it

FORMAT:
WRITE
Output
WRITE

argument
one data

argl
Write the
ARG2>

from

stored in the variable

elment

argN
element

arg2

...
data
first
and
so

variable

from

through

on

ARGUMENT.

ARGb

the

second

ARGn.

EXAMPLES:
WRITE
Output

"datadata"
the literal string

datadata

balance
is: " cust.ba1_due " as of " due_date
followed by the value of
is:
the literal Your balance
the variable cust.bal _due followed by the literal as of
followed by the value of the variable due_date.

WRITE
Output

"Your

It is important to note that all
for the output information must
Where

EXAMPLES:

FIRM.NAME

formatting
supplied

be

= Dewey9

WRITE
would

fim.name
output Dewey,

Cheatum

WRITE
would

rm fim.name
output "Dewey9

fn9
Cheatum

WRITE

tnr flm.name t",¥
output "Dewey9 Cheatum

would

=====."===—"===-======——==MMM——=:

Copyright

(C)

1984

Data

Access

-——

Cheatum

and

spacing
by
and

the

and
WRITE

punctuation
Command.

Howe

Howe

and

Howe"

and

Howe%

—~—————————

Corporation

05/16/84

2.0

DataF1ex

WRITELN

DIRECT

Manual

User's

INPUT

D-67

AND OUTPUT

Command

data
sequentially to the physical device or
commanck
a preceding DIRECT_OUTPUT
just as in
in
file
command.
Just like the WRITE command, WRITELN outputs data
the
under
the variables and/or literals specified in the command argument.
The difference
is that WRITELN outputs a carriage return (CR) after
data
on the command
line has been sent. This
for the last argument
programcharacter signifies the end of a record in many non-OataFlex
and devices, such
ming
languages
as WordStar*
Mailmerge*, CBASIC* and
mu1tip1e
arguments
WRITELN
MBASIC*.
on the command
can have
line MÁp
to include any needed
is necessary
just as with the WRITE command,
delimiting characters as literals in the command line.
The

command

WRITELN
name
WRITE

sends

specified

it

FORMAT:

WRITELN
Output
WRITELN
Output
ARGn,
EXAMPLES:

where
WRITELN
Would

argument

the contents of variable
argN
argl arg2
the contents...of ARGI,
the last followed by a

argl
argl
output

WRITELN
argl
Would
output

=

apples,

arg2

followed

ARGUMENT,

then

ARG2,



character.

= peaches,

and

and

(C)

1984

arg3

on



a

through

= pumpkin

pie

app1es

","

","

arg2
arg3
app1es,peaches,pumpkin

pie

———————————————_—————————'
———— ——_" " —_""

Copyright

so

by

Data

Access

Corporation

' _"' ==="

07/18/84

D-68

DIRECT

INPUT

__—_—————~~—

AND OUTPUT

DataF1ex

2.0

User's

Manual

—==========———~~~——~~~~==================.=====.

THIS

PAGE

INTENTIONALLY

LEFT

BLANK

—~~~

Copyright

(C)

1984

Data

Access

Corporation

07/18/84

l

~~~~~~~~~~~~~~~~~~
————————
==========

USING

——————————

FUNCTION

——————————
FFFFFZ=---

KEYS

——————————
—————————————

~

set of system-independent function keys to perform
functions, as described in the section on
procedure. They are referred to as DataFlex Command
On terminals
Keys,
lacking function keysg the
or simply "F1ex-Keys'°.
On terminals
Flex-keys must be assigned
to control key sequences.
to the various function
having function keym they can be assigned
keys
In either casé» the name and function
available on the keyboard.
and applications.
of the key Is maintained over all systems
DataFlex

provides

a

and

numerous
entry
the SETSCREEn

search

is very important to note that the Flex-keys have NO Intrinsic
They
derive their various functions from the DataFlex
functions.
either from KEYPROC commands discussed
configuration which Is runn1ngg
in thfs section, or from the use of the ENTER or ENTERGROUP command
discussed
macros
respectively in other sections of this manual.

It

input-terminating
Flex-keys are divided up into two main groups:
The field
editing keys include
Flex-keys and field editing Flex-keys.
backspace,
the
keym
arrow
insert character, and delete characterg and
all have effects on the contents of a window or other means of
The input-terminating
keyboard
keys, on the other hand.
entry.
from
field to field, and any of them functions in the
control movement
manner
of the  key to enter any characters which may have been
Flexentered into the active window at the time the input-terminating
Key is pressed.
The

THE

INPUT-TERMINATING

FLEX-KEYS

TNnT¢ÁTnf?

Fl!NcTTnN

KEY.RETURN
KEY.ESCAPE

RETURN OR ENTER
EXIT
THE CURRENT

KEY.FIELD

BACK

KEY.FIND

FIND

KEY.SFIND

SUPERFINO

KEY.SAVE
KEY.DELETE

SAVE A RECORD
DELETE A RECORD

KEY.CLEAR
KEY.NEXT

CLEAR THE FORM OR SCREEN
GO FORWARD ONE RECORD

KEY.PREVIOUS
KEY.UP

BACK UP ONE RECORD
UP ARROW

KEY.DOWN
KEY.USER

DOWN ARROW
FUNCTION
DETERMINED

KEY.HELP

DISPLAY

that
normally

the
under

When

ENTER

Note

the

field

edit

the

ACCEPT

macro

automatically endowed
list of the Flex-keys

Copyright

(C)

1984

keys

FUNCTION

UP ONE WINDOW OR FIELD
A RECORD

HELP
are

comand.

BY CONFIGURATOR

SCREEN

not listed

here

since they function

command
is uséd» all the Flex-keys
by the macro
with their customary
above).
ENTER macro
Where
the
is

Data

———————
Access
Corporation

are

functions
uséd»

it

(see

is

05/16/84

USING

E-2

FUNCTION

DataFlex 2.0 User's

KEYS

Manual

desirable to alter the default functions of the FlexENTER macro
is not useL the Flex-keys have no
effects at alb and they must be provided in the configuration by use
The effect(s)
of using
described below.
of either of the two methods
(a)
by two
different means:
the Flex-keys can be altered or extended
indicators which are automatica1ly controlled
use of the pre-defined
(b)
and
by use of the Flex-keys;
use of KEYPROC subroutines.

Keys.

sometimes
Where

THE

USER-DEFINED

still

the

FLEX-KEY

automatically to the User-Defined Flex-key.
function is assigned
key
is provided so that the configurator may have the option of
providing any chosen function to be available with a single keystroke.
Such
special function can be provided only through a Key Procedure
below)
(see
within one or more configurations.

No
The

USING

THE

FLEX

KEY

INDICATORS:

Flex-keys is used. the
time one of the field-terminating
predefined fndicator relating to that key is set TRUEp and all the
For
examp1ep
when the
other Flex-key indicators are set FALSE.
 key
is used to terminate entry to a window9 the indicator
KEY.RETURN
These
fndicatorm which are listed abovep all
is set TRUE.
which
term
have
the
refers
followed by a distinguishing
prefix "KEY."
Subsequent
actions or branching
to the default function of the key.
by use of the reset indicators.
may be controlled
Each

EXAMPLE:
GETNAME:
[KEY.ESCAPE]

ACCEPT
ABORT

COMPANY.NAME

ACCEPT
ABORT

COMPANY.ADDRESS

[KEY.ESCAPE]
[KEY.FIELDJ

GOTO GETNAME

the configuration for input to the variable
with the 1abe7 GETNAME: at the beginning of the example.
The second
1ine9
beginning with the indicator reference [KEY.ESCAPEI
provides thatp if the ESCAPE key is pressed, execution of the function
key
is pressed, the
will cease (ABORT).
If other than theon ESCAPE
and execution goes
to open for input to the
input is accepted
The following
line, again beginning with
variable COMPANY.ADDRESS.
[KEY.ESCAPE],
provides the same ABORT result of use of the ESCAPE key.
The next
line (IKEY.FIELD])
provides that if the BACK FIELD key Is
used
during or after input, execution will return to the first step of
(GETNN\E:
this example
If neither key is pressed, execution goes on
following the example.
to other comands

This

example

opens

COMPANY.NAME,

).

USING
Using

KEY

the
relatively

PROCEDURES:
key

indicators

little

Copyrfght (c)

1984

inpUtg

Data

be practical
in configurations involving
involving a large
but in configurations

can

Access

Corporation

05/16/84

DataFlex

2.0

User's

USING

Manual

FUNCTION

KEYS

E-3

——————

number
wIll normally be preferable
of ACCEPT or INPUT state|nentsp
Key procedures (activato standardize the actions of the Flex-keys.
command
KEYPROC)
by
means
use
provide
the
of programming
the
of
ted
function key effects uniformly across an entire configuration for
key
whenever
a particular
is used.
Like general-purpose subroutines
KEYPROC
GOSUB command
(see
in the chapter on Control Commands)»
subroutines must be terminated with either a RETURN command to resume
following the ACCEPT or
execution of the configuration at the comand
INPUT statement which
called the KEYPROC» or an ABORT command to
terminate exec'ution of the configuration.

it

FORMAT:
KEYPROC

f1ex_key

f1ex_key
is one of the Flex-key indicators listed above.
the Flex-key which relates to the indicator given in the connand
branch
argument
to the
is pressed, execution will automatica11y
KEYPROC subroutine.

Where

When

EXAMPLES:
KEYPROC KEY.ESCAPE
CLEARSCREEN
ABORT
use of the ESCAPE key to clear the
termínate execution of the configuration.
Causes

screen

and

KEYPROC KEY.CLEAR
CLEARFORM
RETURN
Causes

and return
use of the CLEAR ALL key to clear the form
to execution of the next command of the configuration.
be in effect
under
not
certain
is desired that a key procedure
If
indicator-driven
conditions during execution of a configuratiom
KEYPROC
be
subroutine to provide
included within the
conditionals can
the desired conditional effect.

it

EXAMPLE:

INOESCAPEI

KEYPROC
RETURN

KEY.ESCAPE

ABORT

illustrates
the provision that pressing the
will cause execution to ABORT unless the indicator
set TRUE, in which case execution RETURNS to the
next comnand in the configuration (the ESCAPE key is prevented
from
"working").

This

example

ESCAPE key
NOESCAPE
is

are
some other commands
that can ONLY be used within key
can alter
the place the key procedure
procedures. These connands
to do things like trap an error
returns to and allow key procedures
window:
and return to the original

There

===============——————~——————— —

Copyright (c)

1984

Data

Access

Corporation

~ ————————"_
————————

05/16/84

ENTAGAIN

Cocmand

ENTAGAIN

stands

place.

same

and
command

for enter again

same window
determines
procedure

to the
the

DataFlex

KEYS

FUNCTION

USING

E-4

and

ACCEPT

that there
ENTAGAIN

does

was

not

User's

2.0

Manual

make the key procedure return
that called it.
If a key
an error
can then
go back
to

will

use

it

arguments.

FORMAT:
ENTAGAIN
EXAMPLE:
KEY.ESCAPE

KEYPROC
ENTAGAIN

[NOESCAPEI
[NOESCAPE]

RETURN
ABORT

is provided
In this examp1eg
execution ABORT (first and last
indicator is set TRUE by action
uration. in which case execution
the ESCAPE key was pressed, and
came
beginning of the window

it

it

ENTERMODE
The

from.

Command:
command
establishes the begíning of a series of data
and serves
to set up the correct modes for the next few
command
should
always
be the
The ENTERMODE command
in
(see
when
is
the BACKFIELD
next cormand)
of ACCEPT comands

ENTERMODE
comnands

entry

commands.

,

that the ESCAPE key trigger an
lines). unless the NOESCAPE
of other parts of the configreturns to the place at which
the cursor goes back to the

a series
used:

BACKFIELD

first

Ccxnmand

The BACKFIELD
ACCEPT comand

comand
will
PREVIOUS
to

the

cause

key

procedure

to return to the

executed. This makes
one that was just
command
The BACKFIELD
will not
the cursor seem to back up one window.
ENTERMODE
A properly-placed
go back
past an ENTERMODE command.
command
should
be used
since otherwise the BACKFIELD command will go
back
necessary
as many command
lines as
to find an ACCEPT to
the

is

controlled by the status of
judiciously
in configurations
GOTCM
GOSUBs and the like.
conta1n'lng
since the comnand in
a GOTO to the previous ACCEPT comand, and this may
effect executes
seriously upset processing
occurs in a loop. The operator may
making
such
be prevented
from
an error by manipulation of arMnverse"
user-named
included within the KEYPROC
indicator (NOBACK, for example)
tCj disable the key at the appropriate
This
poInts in execution.
above
for the ESCAPE key.
technique is illustrated
execute.
indicators,

The

BACKFIELD

This
loops,

comand

command

can
be

should

be

used

if it

==—.====________________
Copyright (C) 1984 Data Access

____

Corporation

~

—~~_~ ====
05/16/84

FUNCTION

USING

Manual

User's

2.0

DataFlex

KEYS

E-5

———— —————————————————

— ——————————
EXAMPLE:
KEYPROC KEY.FIELD
BACKFIELD
RETURN
This example
(KEY.FIELD)

HELP
The

merely
key

to

defines the function
back

up

one

of the

BACK

WINDOW

window.

KEY:
key

is called

standard

keyboard.

The HELP
implemented
procedure

command

in

KEY.HELP

can
ENTER

and

is generally

be used
within
and ENTERGROUP.

a

assigned

to

"Q

on

the

and
standard key procedure
is
standard format for this

The

key

is:
KEYPROC KEY.HELP
HELP
ENTAGAIN
RETURN

HELP

Ccxnmand

comnand
help
will go to the next sequential page
with no arguments
after the currently displayed page and see if the word "HELP" is on
the pagename line ("l" line).
If so, that page will be displayed as a
help screen. Pressing the help key again will display the next help
screen
(if available). Pressing any other key will return to the
original page and window.

The

If

will

HELP
begin

the

command
help

the

————————
(C)

Copyright

is

used

screen

with an
sequence.

argument

of

a page

name,

that

page

————————-————
1984

Data

Access

Corporation

05/16/84

USING

E-6

FUNCTION

DataF1ex

KEYS

2.0 User's

========""====""=——————————————

Manual

———————————

EXAMPLE:
/SCREEN1
SCREEN

INPUT

NAME:
/SCREENIHELP
Please

HELP

enter your

Press
any
/SCREEN2

key

name

in the blank provided.

to continue

ADDRESS:

HELP

/SCREEN2HELP
Now9 please
Press

any

enter your
key

don't

you

license
Press

and

any

to continueg

address.
or

press

HELP

for

more

help

HELP

/SCREEN2HELP2

If

home

know
Copying

key

try getting
your home addressp
off of it.
the address

out your driver's

to continue

l*

============

Copyright (c)

——
1984

Data

——
Access

Corporation

05/16/84

——

==========
—

———

~~~~
~~————————————

—————————————————————————__==—=

———

EFZZE=====

MULTI-USER

Z"="=:

FUNCTIONS

_

"

—
——

This means multiple
provides true multi-user operation.
with simultaneous write privilege to the same record at the
time. This provides a transparent multi-user operation with data
No other microcomputer
product can
protection to the field level.
match
DataFlex in the multi-user environment.
DataFlex
users

inherent in the "traditional"
operations (record lock on each read)

Problems

_

same

of handling multi-user
by the following
illustrated

method
are

example:
say 20A0M but
only sells
a large number
of custaners9
locking on custaner records would
items. Traditional
a visible
lock, but if one of 10 inventory part records
unusable
with
the system would become virtually
was locked on READ,
DataElex
to
allows unlimited READ access
only two or three operators.
SAVES
changed
and RE-READs
a
the data when the operator
the database
record.
A company
has
10 different
produce
seldom

the record or systan is locked only for the time of the
are then done based on the freshg safe? data. And only
those
fields that have actually been changed are saved to the recorch
This type of multi-user is
thus preserving any other changes.
undetectable to the operator9 greatly in contrast to a readvirtually
time lock.
In DataF1ex,
SAVE.
Updates

are
of two basic types: transactional and
Multi-user updates
adds
are
generally numeric
replacement. Transactional updates
or
is based
record. Since the update
subtracts from totals in a master
be accurate.
on the
of totals will always
re-read (safe) data7 updates
Replacement
an address
updates, (changing
or credit limit) do not
but
do require that the
usually require multi-user interaction,
as
rewrite fields that were not changed
application not arbitrarily
methods
provide. DataFlex keeps track of which fields
traditional
changed
were
in order not to rewrite an old value over changes made by
subsequent
another
user
to the first user's READ.
Here

is

an

example

of

how

this

works:

have
the inventory part "ABC" on their screens. The
in stock (ID) and the description (WIDGET) are shown on each
User
screen.
l is invoicing the sale of one wIdget, while Userto 2 is
the description
invoicing a sale of two. User 3 is changing
GREEN".
"WIDGETp
All three users read their (identical)
screens, key
Let's say
their input, and then press "SAVE" within the same second.
of SAVES fell out as User l first, then User
that the actual sequence
3 last.
2, and User

Three

users

quantity

unchanged.
User
His sale
l's SAVE will re-read the record and find
of one widget will then be subtracted from the quantity in stock, and
the quantity in stock written back as 9.

it

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

SAVE
two»

2G
subtract

User

DataFlex

FUNCTIONS

MULTI-USER

E-8

.
then

will

write

and

2.0

take control, reread the record
back
the proper number (7).

User's

(9

Manual

in stock).

then
SAVE wflj
3$s
get control, reread the record (with 7 in
back
and write
All
correctly.
stock), ONLY update the description,
is imperceptible to any user.
this occurs with speed which typically
User

it

to transactionally-updated
to responsib]e9 thoroughlyusers. To make sure two users do not sell quantities in
excess
of the quantity in stock, the app7ication configuration should
be written
quantity in stock (and
to check for amount sold exceeding
declare an error while rejecting the sale).
In such
fields
trained

a system
should
be

replacement

very carefully

privilege
limited

the time a system or record is locked
foregoing provisions reduce
to the very brief interval actually required for the SAVEing of a
Since
record instead of the reading and entry speed of the operators.
does
one field
not interfere with another and transactional updates
optlma11y
are
handled, the statement "DataFlex provides transparent
multi-user protection to the field level" is amply justified.
The

UNDER

OPERATION

MULTI-USER

THE

ENTER

MACRO

operation is provided autanatica11y within the ENTER macro.
will only update
the database
if data in one or more
has been changed
windows
(unless the FQRCEF'UT QptiQn
is in effect).
A1SOp the actfve records are
reread from the disk BEFORE the save or
is desired to re-display the buffer data
delete procedures. If
be used
after REREAD but before SAVE. the ENTDISPLAY command should
During the save and delete procedure, only one
for the purpose.
and all
initiated
other updates
terminal will have write privilege,
is
until that update
during the processing interval will be delayed
fol'lowed when
done.
For
these
reasorm the following rules must be
using ENTER in a multi-user environment:
Multi-user
An

ENTRY

command

it

I) When in the ENTRY section. refer to the data windows
instead of the record bufferg since the record buffer is not
changed
until the record is SA\lEd.
When in a SAVE
refer to the record
or DELETE procedurep
since data in the record
buffer instead of the data windowsp
during a re-read.
buffer could have changed
2)

allow data entry of any kind within a SAVE or DELETE
since other users will be locked out of SAVE
operations while the first operator is in the procedure.

3) NEVER
procedure

MULTI-USER

C0~DS:

The fo71owing
There
is no

compatibi7ity7

Copyright

(C)

will only function in multi-user
providing them in single-user systems
since they have no effect in single-user

comands
ham
in

1984

Data

Access

Corporation

systems.

for
mode.

05/16/84

DataF1ex

User's

2.0

MULTI-USER

Manual

FUNCTIONS

E-9

——
Command

LOCK

comnand
wIll prevent other users from LOCking the databasep
Once
write privileges.
only one user at a time has database
until the
invoked, no other user may update the database
is complete. The LOCked condition should be
invoking user's procedure
comands
is truly
for which
kept in force for only those succeeding
required.

The

LOCK

so that
LOCK is

it

— —————————————
UNLOCK

Cand
state after a
restore the system to normal
is imperative that the system be UNLOCXed after
is issued.

The UNLOCK command
REREAD.
LOCK

or
or

LOCK

REREAD

REREAD

FOR EVERY

It

will

OR LOCK

THERE

a

MUST BE AN UNLOCXI

— —————————————
REREAD

Command

re-reads all of the
first LOCKs theSincesystemthisandis then
done
In a LOCked
the database.
Use
condltiom the resultant re-read records are "safe" for update.
(edits) to an active record
of this comnand requires that all updates
only be
buffer are done at one time, since the LOCked condition should
is required.
kept in force for those few commands for which

The REREAD command
ACTIVE
records in

it

from
a LOCK or
INKEY
ENTRY

the locked condition resulting
statements such as INPUT, ACCEPT,
in a configuration.
In

or

a REREACb data
NEVER be

should

entry
used

optionally be followed by a list of files to
of the command, only those files listed will be
data
among the open
files. Without the option, all open
for which there is data active in the buffer will be re-

The REREAD command
can
form
REREAD.
In this
REREAD

from

files

data
read.

IFMANGE

Command

it

multi-user environment
based
on
conditionally
The connand
window.
to do this
and the command
number
a window
In a
execute
has

may be
whether

is

desired to
there has
is to

certain

be

cotmands

in a
is followed by
the window

a change

IFCHANGE

IFCHANGE.

which

have
been

if

executed

changed.

EXAMPLE:
IFMANGE

form.l
the operator

If
The

If

IFQIANGE

the

execute

MOVE form.l
has changed

TO lnvt.id
window
one,

Copyright

it

to

INVT.ID

buffer.
can also respond
to change in the record
will only
is a file name» then the command after
since the last FIND.
the record buffer has been changed
comand

it

argument

if

MOVE

(C)

1984

Data

Access

Corporation

05/16/84

DataFlex

FUNCTIONS

MULTI-USER

E-lO

2.0

Manual

User's

— ———————————————————

—————————
Camnand
SETMANGE
The

SETQUNGE

altering
of the

command

It

any
data.
comand
IFMANGE

in the window without
creates a "change"
satisfies the conditions required for execution
unconditionally.

FORMAT:
SETQIANGE

DESPOOL

wIndow

Command

will cause the spooler to start printing
is provided in the operating system.

The DESPOOL comand
spoo'Áng
function

if

a

FORMAT:
DESPOOL

EXAMPLE

OF UPDATE

IN

MULTI-USER

ENVIRONMENT:

FIND INVT BY INDEX.I
DISPLAY
INVT.ID
TO FORM.I
TO FORM.2
INVT.PRICE
DISPLAY

Get

//

accept

ll

ACCEPT

FORM.I

ACCEPT
REREAD

FORM.2

IFMANGE

FORM.I

IFCMNGE
FORM.2
SAVE INVT

MOVE

Copyright

(C)

1984

Data

data

multi-user update
changed
fields

TO INVT.PRICE

//
//

Access

to default

changes

for
// prepare
update
only
//
FORM.I
TO INVT.ID

MOVE FORM.2

UNLOCK

the record to update
display default data

//

save
and

the file
unlock

Corporation

———
05/16/84

"====
: :::::::::
————————."'.——

=="==================———————————

———
ez====

FIELDINDEX

=====

________

=

"

AND WINDOWINDEX

———————————~———————————~———_————=======———

and WINDOWINDEX
provide means of accessing and processing
of fields in a data file or of wIndows on a screen, affording
in both the writing and execution of configurations
greater efficiency
for sequentially accessing ranges of fields and windows.

FIELDINDEX
ranges

in screen
predefined variable which counts windows
fields in databases.
similarly counts
WINDOWINDEX
and FIELDINDEX
Where
start counting is controlled by the
(&)
placement
in the case
character which is appended,
of an ampersand
and in the case
of FIELDINDEX,
to a
to a window number,
of a window,
examp1e»
For
the current value of WINDOWINDEX is 3d
field number.
if
SALES.1&
means
"the third window after window SALES.IJ' or the fourth
window
in the PAGE named SALES.
If the value of WINDOWINDEX is
would
changed
refer to the next, or fifth, window in
to 4p SALES.I&
FIELDINDEX
equal
were
to I, EMPL0YEE.LNAME&
Likewise.
the PAGE.
The
would
refer to the first field after field EMPLOYEE.LNAME.
window
number.
by
be used
ampersand
cannot
as a fie7d number
or
itself
to an actual wIndow name or numbem or to an
It must be appended
actual field name (as defined in FILEDEF)
or number.
WINDOWINDEX
PAGEs,
image

is

a
and

FIELDINDEX

if

would
SHOW the contents of fields
following example
of the record currently in the buffer:

The

O

through

20

FROM O TO 20
FOR FIELDINDEX
SHOW EXAMPLE.RECNUM&
LOOP
The

FIELDINDEX
from
zero
initial FOR statement increments
through 20 with each repetition of the loop. The SHOW command
record from the EXAMPLE data file is
takes the whichever
currently in the buffer and shows RECNUM (the record number-always
the first9 or 0th. field in any record) and the 20
the presence
of
fields which follow it, on the screen, through
the & after the field name RECNUM. On the second pass.
RECNUM& evaluates as "the
first field after the record
number",
and so on through 20.
and WINDOWINDEX
to MOVE data, make
Caution: When using FIELDINDEX
is the
certain that the data type of the destination fields or windows
line to
name in the command
same as that of the field
(or window)
(RECNUM
example
which
above).
in the
is appended
the ampersand
and
check
FIELDINDEX
and WINDOWINDEX
the type of this data element
assume
that the destination windows
or fields will be of the same
a
exists between the data typem it will produce
type. If a mismatch
data
BAD FORMAT IN EXPRESSION
types are
error at run time. If source
(as when the field
mixed
referred to is RECNUM, a NUMERIC typeg and
those
use of one or more
of the typefollowing are ASCII fields),
The
changing
forms
the problem.
of the MOVE command will overcome
(MOVENUM, KK)VEINT»
and MOVESTR)
commands
described under Element
are
and should
be used
according to the data
Processing Commands,

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

type(s)
The

where

fields

of the destination

steps for using

windows

DataFlex

AND WINDOWINDEX

FIELDINDEX

E-12

WINDOWINDEX

Manual

User's

windows.

or
and

2.0

FIELDINDEX,

then, are:

at which the range of
l. Identffy the ffe1d.# or w1ndow.#
begins. You can start and stop
or fields you want to process
1ikeg
you
but you can't skip fields or windows;
processing

Write

the
window.#&,

2.

fie1d.#& or

Set
up a
whichever

3.
WINDOWINDEX,

command(s)

you

want

for either

and

or other counter to drive
is appropriateg through the

loop

FIELDINDEX
range

you

or

wish

to

process.
a page
we could have
(display screen) called SALES
In another examplm
as wIndows
displaying totals by
with the twelve calendar months on
month,
and two
for the entry of additive
at the bottom
entry windows
amounts
and of the number
of the month to which the entered amount is
numbers
shown
The month
on the screen
display below are
to be added.
used
by the system.
Likecue the
operator--they
not
to
are
strictly window numbers shown are merely
wise7
for explanatory purposes.
the
They
would
not normally be displayed on the screen:

it

/SALES
SALES

# MONTH

2

l

January
February

$
$

3

March

$
$

_

4

April

5

May

6

June

7
8

July

S

August

$

9

September

$

October
November

$

December

$

10

li

12

MONTH

$
$

#:

l*

_

.
.

$

.

ACCEPT SALES.13
CALC (SALES.13-1)

(window

_
_
._
_
._
._
._
._
._
._
_
_
.

.
.

(window
(window

2)

(window
(window

3)
4)

(window
(window

5)
6)

(window

7)

(window
(window

8)
9)

(window

10)

(window

li)

(window

AMOUNT TO ADD:

13)

l)

12)
$

.

(window

14)

_

TO WINDOWINDEX

ACCEPT SALES.14
CAl-C (SALES.14+SALES.I&)

TO SALES.I&
4

through
line accepts
the month number as shown on the screen
The second
line reduces
the entry (in the
of Page SALES.
The third
12)
by one
(making
line
the range O The last line takes the
accepts the additive amount to Window 14.
in the window
additive amount and adds
to the amount a7ready
which
is the month
specified by SALES.1&,
or one plus WINDOWINDEX.
number
entered in Window lZb and stores the new total back to the
window
for the specified month.

The
Window

first13
range
l -

li).

it

=== ===============
===
Copyright (C) 1984 Data

Access

Corporation

—

— 05/16/84

=—"====""=~=~—=—————————

—

~~~———~—~

" _ ~~—

E"13

——————————
——————————

——————
——————————

====

AND EXTENDING

MODIFYING

: EE::E::::

DATAFLEX

————————
——————————

___=~==~=_____

_ ____
NOTE:

and powerful features
of
This section describes some unusual
DataFlex. The vast majority of users will not have the need
here
The information
as a
Is Included
to make use of them.
matter of interest for the general user and to provide further
access
to the powerp flexibility and utilfty of DataFlex for
user
with specfal requirements.
the advanced

opportunity to
configurator the unusual
DataFlex offers the advanced
actually define new command words that become an integral part of the
the command
software syst«n--in effect» the ability to extend
language.
These
operations create macros that may be used for special
requirementm or to
types of functions to satisfy highly unusual
enable
impart his personal
a configurator
to distinctively
or company
"style" to the final application product.
framework
for the
Macros
can be thought
accept
User-defined macro comands
of as compile-time subroutines.
and textually
arguments
into the comnand
substitute the arguments
compiled
and
then
commands
model.
The resultant
are
included with the
The commands
provided
extended
"macros", and

with DataFlex
are

themselves

form

the basic

macros.

Using
a cormand
created through macro operations
rest of the program.
is exactly like using any other DataFlex command: the basic syntax is
a comnand
verb followed by one or more optional arguments.

be defined directly
or
within one or more configurations,
can
they can be added to FMACp the standard macro file which DataFlex
of all commands in a configuration at
refers to for the definition
compile time. Macros defined within a configuration will operate only
must
The definition
appear
within that configuration when executing.
Definithe defined macro is first used.
in the source code before'
will make the new macro
tions added to FMAC on the other hand,
under
available to every configuration which is compiled
it.

Macros

adding
to FMAC, the modified version of
FLEX.CFL
is the file
into the file "FLEX.CFL."
the
which
definition
of each
actually
for
compiler
refers
the
to
command
encounters
in a configuration as the configuration is being
supplied with DataFlex, is used from the
compiled. The PACK program,
operating system prompt to pack FMAC by the following comand:

If

a macro
FMAC must

is defined

be

it

by

re-packed

it

d:PACK d:FMAC
D: in both
where
drive on
found.
FLEX.CFL
command

which

will be written
is issued.

places
PACK.COM

shown
and

above
represents the logical
the (uncompiled) FMAC files are

to the default

drive

from

which

the

above

———————————————-———————————————————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

AND EXTENDING

MODIFYING

E-14

DATAFLEX

DataFlex

2.0

User's

Manual

REPLACEMENT

simplest form of macro operation is replacement. Any consistent
string occurring in a configuration can be replaced by another string.
example,
For
a
you establish
while deffn1ng field names fn FILEOEF,
long, descriptive field name such as
"TRANSACTIM_FILE.LAST_PART_COST'4
tedious to type
you might find
that name into a configuration a number of times. By including the
in your program you can have the compiler
following macro definition
configuration everywhere
substitute the long name into the compüed
"LCOST"
(or any other short string that seems descriptive to
you typed
you while writing
the configuration):
The

if

it

FORMAT:

before_str1ng after_string

fREPLACE
EXAMPLE:

1cost transactfon_fl1e.1ast_part_cost

#REPLACE

(uncompiled) version of the configuration would
but as long as either FMAC. had the replacement
in it, or the configuration had the replacement cormiand in
configuration
before the first occurrence of LCOST g the compiled
FILE.LAST_PART_COST
TRANSACTION
would
have
substituted for each occurrence
Especially note the initial pound sign (S) on the
of I-COST.
symboL
That
and certain
command
others which will be illustraline.
the distinctive
syntax of macro operations.
ted be1owp comprise
Of coursep
the
source
I-COST in
always
have

it,

it

COMMAND DEFINITICN
Command
using sequences
definition
allows you to make up new cormands
When used
in a configuratiom
of existfng DataFlex commands.
your new
but
command
will
other command in DataF1exg
will look just like a anysequence
of other DataFlex comands.
in fact cause execution of
(instead of in
is defined In a configuration
Again, if the comand
FMAC.L
be defined before the connand
must
is first used in the
configuration.

it

it

FORMAT:
#C0RNAND

new_command_name
command

(existing)
additional

existing

{symbol

line
command

list}
lines

* 0g0000 00
#ENDC0MMAND

to check
optionally be followed by a list of symbols
given to the comand
in the configuration are of the
Sytnbol
checking is more thoroughly explained in and
correct type(s).
after the explanation of the #(ME(X comand, which uses the same
syntax. Do not type the {} braces; they only signify that the
connand
component
Is optional.
The command
may
whether
arguments

Copyright (c)

1984

Data

Access

Corporation

05/16184

User's

2.0

DataFlex

MODIFYING

Manual

sign_on
CLEARSCREEN
SHOW
SHOW
SHOW

'

'
'

(C)

DATAFLEX

E-15

—

EXAMPLE:
KOMMAND

AND EXTENDING

EXAMPLE
1983
DATA

SHOW
#END(j0mAND

PRCGRAM'
ACCESS CORP'

is
defines a new commandg SIGN ON. Whenever
This
used
the five indented command lines above
in a configuration,
and
will be executed
in its place (it clears the screen
surrounded
by
in quotation marks,
displays the two-line banner
This is useful to
a couple of blank lines on the screen).
To do that we
the language.
save
typing but doesn't "expand"
have
within our new comnand.
to be able to use arguments

it

macro

,

that we wish to be able to insert the name OÍ the
for example
PROGRAM'
'EXAMPLE
shown
legend
(instead of the hard-coded
to the SIGN ON command written into
to sign on as an argument
The syntax for an argument
is an
the running configuration.
I and g after.it. The
exclamation point with an integer between
model
comand
will then textually substitute the first argument
a !1 appears
written after the command into the command model wherever
in itg the second argument
(if any) wherever !2 appears, and so on).
Suppose
program
above)

EXAMPLE:
#C0MMAND

s1gn_on
CLEARSCREEN
SHOW
SHOW
SHOW

'
'

'
(C)

1983

II DATA

ACCESS

CORP.'

SHOW
#ENDC0NIAND
used

"II"

The
fo1low1ng

could

the

above
use

of

would
SIGN

be
ON.

replaced
A use

by the
of this

argument
firstcommand
macro

new

be:

'ACCOUNTS
sign_on
"ACCOUNTS
PAYABLE

PAYABLE PROGRAM'
then
PROGRAM" would

be substituted
at the !1
be
can
position when the command was executed. Nine arguments
replaced in this manner (i.e. !1 !2 !3....!9). The symbol
that have beeñ passed to
"!0" is the total number of arguments
a macro

connand.

A macro
used
Macros
five
are
not subroutines.
each
timep
so
configuration will be expanded
times in a source
frequent use of a large macro can result in excessive mtmory consumed
by the executable configuration.
Generally, larger macros can be more
written as
simply installed and used within less file space
The exception to this guideline
is where the same macro
subroutines.
is required across a group of several configurations.
A WORD OF CAUTION:

if

——————

————

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

MODIFYING

E-16

AND EXTENDING

DATAFLEX

DataFlex

2.0

User's

Manual

be made anywhere
Replacements
can
macro
is a powerful tool.
The
and a macro
can even
call other macros.
within the expansion
and replace
is like the multiple search
substitution
for arguments
function found in some word processors. The following utilities
further enhance the utility of macros:
The

INCLUDE

FILES

You

keep
these

can

include

and subroutines
macros
in an external
at compile time with the #INCLUDE connand:

common

file

,

and

Sinclude filename
entire file "filename" will be included in the compilation process
One INCLUDEd
at the point(s) of the INCLUDE(s).
file can INCLUDEnot yet
(ASCII)
be source
format.
another file. INCLUDEd files should
The lines qjf the INCLUDEd
fi7e(s) will not
separately pre-compi1ed.
except
be displayed during compilatton,
for any #REM lines which the
file may contain.

The

COMPILE

TIME

VARIABLES

evaluate integer numbers
generally used for assigning
There
26 such
are
integer
sequential numbers to labels or variables.
an upper
case
letter is used, the value of the
variables (A..,Z).
If
a lower case
letter is usech
before use;
variable is incremented
unchanged.
The compile time variables
are
the value will remain
referenced with a preceding exclamation point "!". The value of the
variable in text form is substituted for the "lx" in the line output.
Macros
and configuration
and expressions at COMPILE

files
TIME

use and
can
which
are

if

The

value of

integer variable

any

can

be

set with the

#SET

command.

FORMAT:
#SET
The

"!".

ment.
uated
The

variab1e_7etter$

expression

by a
not be preceded
variable can be any letter (A...Z) and should
from
The "S" separates the variable
expression
the
arguletter
be any
The expression can
integer expression that can be evaland
can
compile
time,
at
itself contain integer variables.
include parentheses.
expressfon should

it

EXAMPLE:
#SET
SET

F$

(Ir-l)

the integer variable "F" to the value of the integer
Since
variable "r" minus one.
"r" is lower caseg It will
be automatically
incremented.

Copyright

(C)

1984

Data

Access

Corporation

not

05/16/84

DataFlex

MODIFYING

Manual

User's

2.0

AND

EXTENDING

E-17

DATAFLEX
—————

CONDITIONALS:

included or excluded
lines may be selectively
Portions of your source
These
be
can
from
configuration by use of #IF coímands.
the compiled
used
on the number
of
within a macro to modify its output depending
arguments
set the condition and an
or their type. The IF comiands
"#ENDIF"
terminates it. You may also have an "#ELSE" to change the
for every "#IF", but
sense
of the last IF. There must be an "#ENDIF"
is optional.
the "#ELSE"
FORMAT
#IF

expression
command
line to compile
command
line to compile
etc.

if
if

expression
expression

TRUE

line to compile
line to compile

If

expression
expression

FALSE

TRUE

#ELSE
comnand
command

etc.

if

FALSE

#ENDIF

the expression has a value other than zerop
be included in the compiled
configuration.
example:
For
command
lines will be included.

If

will

#IF

!0>0
SHOW 'THERE

#ELSE
SHOW 'NO

ARE

!0

the TRUE command lines
Otherwise, the FALSE

ARGUMENTS'

ARGUMENTS'

#ENDIF

generate only

This will
there are

If

we

could
use

an

false

any

arguments

one
and

compiled
the second

1ineg

the

SHOW

if

first

there

SHOhh
are

if

not.

debugging
statements in our configuration that
based
we could
on a single statementg
or excluded
integer variable "d" that would be true (l) for debug mode and
(O)
for runtime mode.

wanted
to have
be included

EXAMPLE:
D$ TRUE
command

#SET

l1nem generatfng value for testvar)

...(other
#IF

Id
SHOW 'TEST

VARIABLE='

testvar

Sendif

,

shows
to TRUE, followed by
the debug flag initialized
This example
th1ngsp
comnand
among
generate a
other
lines
which,
configuration
Where
the debug flag was set TRUE9
value for the variable TESTVAR.
"TEST
then, the value of TESTVAR will be displayed after the legend
VARIABLE
the #SET line can
=". When the configuration is debugged.
compj1edp
rewritten to set the debug flag FALSE, and when the file is
statements will not be included.
the lines triggering debugging

be

—

Copyright (c)

1984

Data

Access

Corporation

05/16/84

MODIFYING

E-18

AND

EXTENDING

DataFlex 2.0 User's

DATAFLEX

Manual

———————

The

other IF

#IFDEF

symbol

#IFTYPE

symbol

#IFCLASS

commands

symbol

are:

if
if
list)
if
if

list
list

(TRUE

the type

(TRUE

the class of

#IFSAME

symboll

You may
cormand.

check
the type and class
#(>tE(X
will generate an

of the

symbol

is not in

been

symbol

(TRUE

symbo12

has

(TRUE

list.

defined.)

class of

and

is in

symbol

is in

symbol

list.)

symbo?2.)

symboll is the

same

of an
error

with the "#MECK"
if the type or class

argument
message

as

FORMAT:
#QdECK

symbol

list

and an optional
#CHECX connand
type check line on the #C0NAND
line are both intended for error checking. An error will be generated
one of the type check
the type or class of symbol matches
characters in list (see symbol-checking characters below). An error
is the same type or class as the
the argument
will be generated
symbol-checking character in list.
The

if

if

=========================———~——~—~~~—~—~~

Copyright

(C)

1984

Data

Access

Corporation

——

~

——————————""""

05/16/84

2.0

DataFlex

User's

MODIFYING

Manual

AND EXTENDING

DATAFLEX

E-19

~
eARAcTERs

SM3OL-MECKING
Meaning

Character
S

Types.
STRING

N
D

NUMBER
DATE

I

INTEGER

E

EXPRESSION

#

INDICATOR
NOT AN INDICATOR

X

GROUP OPTIONS
{}
GROUP INDICATORS
LABEL

O
El
L

[]

Classes.
C

CONSTANT

F
W
V
G

FILE
ELEMENT
WINDOW
IN MEMORY VARIABLE
GROUP ({options}

or [indicators])

Literal Content.
.
of
error will be generated
if the contents
do NOT
the variab1e(s) named in the argument
match
one of the strings
in quotes
entered in
the list.
An

"any""characters"
"in quotes"

Other.
ERROR

U
R

ERROR IF
ARGUMENT

.
%

NO MORE ARGUMENTS
SPECIAL,
changes

our

SIGNON

TYPED

UNTYPED
REQUIRED

constant number
to constant integer.
SPECIAL,
changes
all windows
to type string.

S

In

IF

(DEFINED)

T

examp1ep

the following

would

be

a

reasonable

symbol-

checking line:
EXAMPLE:
SIGNON GURA
A'CONAND
.
This would specify that
CAN'T

be

SIGNON

have

one
be

group, undefined or

a LABEL9

required argument
an indicator.

order of the type check characters has no significance.
the basic DataF1ex
don't include type checking in your macrom
comnands
will probably pick up any type errors.
The

The

best

example

Copyright (c)

of using

1984

Data

macros

Access

is the

FMAC

Corporation

If

that
you

file itself.

05/16/84

E-20

MODIFYING

AND EXTENDING

DataFlex 2.0 User's

DATAFLEX

Manual

—
— ——————————————————

TYPING

INTERNAL

OF SYMBOLS:

following information
internal workings
of the
DataFlex.

is intended for
processor

The

macro

those
and

interested in the
is not required to use

symbol,
whether
constant9 window or file, is REPLACED from its
symbolic name to one which 'Is meaningful to the DataFiex runtime
by a vertical
bar
can be identified
": in the
system These symbols
The next two
symbol.
the
characters
replaced
character
of
first
and the value of the symbol
represent the CLASS and TYPE of the symbol
field and/or file numbers follows
is a constant) or its window8
(if

Each

"

those4

it

EXAMPLES:
ICNO

means

NUMBER,

C0NSTANTg

ZERO.

means
means
lCS'USA'means
IWN3
means

WINDOW NUMBER
WINDOW, STRING9
INTEGER,
ONE
C0NSTANT7

lFD2gl

FIELD,

lWS2
ICI1

The following
symbols:

means

USA
WINDOW

C0NSTANTp
STRING,
WINDOW, NUMERIC9

are the type

DATE,
and

FILE

2.

NUMBER

FIELD

class characters

QURACTER

INTERPRETATION

C

CCNSTANT

TWO.

THREE

I
used

to identify

CLASSES:
y

VARIABLE

W

WINDOW

F
G

FIELD
GROUP

S
N

STRING

D

DATE

I

INTEGER
EXPRESSION

TYPES:
NUMBER

E

LABEL
GROUP OPTION
GROUP BOOLEAN

L
O
B

(INDICATOR)

configuratiort,
If you put the command "#N0ISY 99" at the top of your
at compile time0
all of the conversion will display on the screen
The option
together with the final output of your comand lines.
code
SNOISY
O will
cause
statments to
only your original source
disp1ay9
the
while #N0ISY l will cause everything to display except
intermediate code and expansions.
by the compiler with
file that is generated
rootname
plus the extension
of your configuration's
This is the internal DataFlex configuration code.
If you

There

is

name

made

".IC'°.

Copyright

a temporary

a

up

(C)

1984

Data

Access

CcÑporation

use

05/16/84

2.0

DataFlex

User's

MODIFYING

Manual

AND EXTENDING

DATAFLEX

E-21

————
#N0ISY

an error,
this file will not be deleted from your
inspected. Otherwisep
the file will be deleted
automatíca11y
The
upon
completion of a successful compilation.
general
format of the ",IC" file is as follows.

disk

99

and

or

can

have
be

FORMAT:
LINE_NUI¶3ER
INDx
Where
and CONAND

INDI
stands

IND2

IND3

COMMAND ARG1 ARG2
ARGy stands
number.

for indicator x,
is the internal command

for

argument

y»

the ".IC'° file is not generally used at the configuration
be of interest
and help in debugging
sometimes
can
level
difficult
command
numbers
The
the
is contained
Internal
configurations.
of
list
and library
on the Pascal
source
disk in the file called
Although

it

"COMMAND.DEF".

Copyright

(C)

1984

Data

Access

Corporation

05/16/84

E-22

MODIFYING

AND EXTENDING

———————

2.0

User's

Manual

————————————
——-—————————————————————————————

THIS

Copyright (c)

Dataflex

DATAFLEX

1984

Data

PAGE

Access

INTENTIONALLY

Corporation

LEFT

BLANK

05/16/84

"==_

_~"===="""""""""——~——~—~——

———————Tr
_
———————————

==========
ZZZZZzIzzz
————————
——————--,-

RESERVED

____
==========
——————————
~_____
————-—————

WORDS OF DATAFLEX

"""""

=
THE

RESERVED

WORDS OF DATAFLEX

the next page are those used by. and
DataFlex uses these words as corwnandm
system
ind1catorsp system procedures, options, and
recognize most of them.

The words
DataF1ex.

FA

_

on

built
system
so

on.

into,
variables,
You

will

into an alphabetical list as a convenient reference
are assembled
to words that must not be used in DataFlex configurations as
indicatorm variable names, field names, window namesp page namesy
usech
string.
If they aremeaning
file namesp or any other functional
and
DataFlex
is likely to mistake them for their reserved
something
execute
in no way similar to what you intended. The words
may.
they may be included
of course, be used as data within databases,
and they may be used
or report captions.
in
in images as screen
prompting
in quotes
(single or
strings or any other material enclosed
double)
They
may also be included
within any DataFlex
configuration.
by the
(material preceded
within connents
"//" comment character) in
configurations.
They

to DataFlex are words which
Unavoidably, many of the words reserved
be
very useful as variable names or for other prohibited uses.
The deliberate
use of small
differences will effectively
restore the
words
use of these
to you while at the same time avoiding use of the
actual word itself. For examp1ey
your configuration prints the run
date
at the top of a report, you may not bring the date into your
But
is entirely
report by use of a variable named DATE.
permissible to use the word within a longer variable namep such as
RUN_DATE
(note the use of underscore
to simulate a space for
readabi)ityp but to maintain continuity of the variable name string).

would

if

it

may wish
of the following page to keep where
to make a photocopy
may be referred
to readily while you are writing configurations.
Copying
is expressly prohibited under the terms of your
this manual
You

it

license

agreementp

except

for the above-described

use

of the following

page.

——————
Copyright (c)

1984

Data

Access

Corporation

05/16/84

F-2

RESERVED

THE
ABORT
ACCEPT
ALL
AND
ANY
APPEND
AS
ASCII
ATTAM
AUTOFIND
AUTOPAGE
BACKFIELD
BEGIN
BLANKFORM
BREAK
BREAKINIT
BREAKPOINT
BY
CAl-C
CALCULATE
CAPSLOCK
(>ÍAIN
NARACTER
MECK
CLEAR
CLEARFORM
CLEARSCREEN
CLEARWARNING
CLEARXY
CL0SE_INPUT
CL0SE_OUTPUT
CMDLINE
COPYFILE
DATE
DEBUG
DELETE
DESPOOL
DIRECT_INPUT
DIRECT_OUTPUT
DIRECTORY
DISPLAY
DISPLAYONLY
END
END$OF$REP0RT
END.OF.REPORT
ENDGROUP
ENT$PERMISSIVE
ENTAGAIN
ENTDISPLAY
ENTER
ENTER.CLEAR
ENTER.DELETE
ENTER.EDIT
ENTER.EXIT
ENTER.SAVE

Copyright

(C)

DataFlex

WORDS OF DATAFLEX

RESERVED

ENTEREND
ENTERGROUP
ENTERMODE
ENTRY
EQ
ERASEFILE
ERR
ERRLINE
ERROR
FALSE
FIELDINDEX
FILELIST
FILENUMBER
FILL
FIND
FINDERR
FINDREQ
FLEXKEY
FL0AT$
FOR
FORCEPUT
FORMAT
FORMFEED
FOUND
FROM
GE
GOSUB
GOTO
GOTOXY
GROUP
GT
HEADER
HELP
IF
IFCHAMGE
IFNOT
IN
INCREMENT
INDEx.BATe

INDEX.1...IO

INDICATE
INDICATOR
INKEY
INPUT
INTEGER
KEY.CLEAR
KEY.DELETE
KEY.DOWN
KEY.ESCAPE
KEY.FIELD
KEY.FIND
KEY.HELP
KEY.NEXT
KEY.PREVIOUS
KEY.RETURN

1984

Data

Access

KORDS

2.0

User's

Manual

OF DATAFLEX

KEY.SAVE
KEY.SFIND
KEY.UP
KEY.USER
KEYCHECX
KEYPRESS
KEYPROC
LASTERR
LASTIF
LE
LEFT
LENGTH
LINECOUNT
LOCK
LOOP
LT
MATM
MEMAVAIL
MID
MOVE
MOVEINT
MOVENUM
MOVESTR
MULTIUSER
NAME
NE
NEWPAGE
NEXT
NOENTER
NOISY
NOPUT
NOT
NUMBER
NUMPAGE
NUMWINDOW
ON
OPEN
OR
OUTCLOSE
OUTFILE
OUTPUT
PAD
PAGE
PAGE.LINES
PAGEBREAK
PAGEC11ECX
PAGECOUNT
PAGEEND
PAGEFEED
PAGE1...255
PATHNAME
POINTS
POS
PRINT
QUIET

------

Corporation

RANGE
READ
READLN
RECCOUNT
RECNUM
REGISTRATION
RELATE
RENAME
REPEAT
REPORT
REPORTEND
REQUIRED
REREAD
RETAIN
RETAINALL
RETURN
RIGHT
RPT.anything
RUNPROGRAM
SAVE
SAVERECORD
SCREENEND
SECTION
SELECT
SEQEOF
SEQEOL
SETNANGE
SHOW
SHCMLN
SKIPFOUND
STATUS
STRING
STRLEN
STRMARK
SUBHEADER1...9
SUBTOTAL
SUBTOTALI...9
SUPPRESS
SYSDATE
SYSTEM
TERMCHAR
THRU
TO
TOTAL
TRIM
TRUE
UNLOCK
UNTIL
UPPERCASE
WHILE
WINDOWINDEX
WRITE
WRITELN
ZEROFILE

05/16/84

ARGUMENTS

FILES.

==========

~

AND COMMANDS

ZZFFZF±Z==

——————
FILE

NAME

AND EXTENSION

TYPES

of a "family" of operating
for the DataFlex user as a
single unified whole. The data file "rootname" (specified by the user
of a family of
in the FILEDEF routine) is common to all the m«nbers
denote
data
various
standard funcextensions
while
differing
files,
tions for each of the different
files.
Each
system

DataFlex

files

database
is actually composed
which
function with each other

following are the standard extensions and file names used by DataThe
The "*" indicates
india file required" for runtime.
CAPITAL
letters
cates a file required only at compile time. SOLID
Lower
case
denote
letters are
explicit
content (usually extensions).
any unique
string of
descriptive of a filename which may be virtually
as a file name
characters recognized by the CP/M operating system
element.
The
F1ex.

FILE

"r

NAME

—
rootname.DAT

TYPE

DESCRIPTION

*RAND

DataFlex
and

rootname.K??
rootname.DEF

*RAND
SECt

rootname.TAG
FILELIST.CFG

#SEQ
*RAND

TERMLIST.CFG
program.COM

RAND
PROG

program.CND

PROG
SEQ
PROG

module.ERL
program.OVF

*FLEX
#SEQ

config.FLX
config.FD
config.lC
config.RPT

SEQ
SEQ

data

data
(one

Contains file
file.database)

Dataflex index file (one for each index)
File definition
listing
Field tag names file
List of active file numbers and screen control
codes
for configured terminal
Available CRT configurations pre-coded
(CP/M
and MS-DOS systems)
Executable program
(CP/M-86
systems)
Executable program
module
MT+ library
Unlinked Pascal
Program
overlay ftle
configuration
Executable DataFlex
File definition
info for compiler
code
Intermediate DataFlex
file.
code
Source
for sample reports
Source
code
sample
screens
for
Source
code
for COMDEX show demo

config.FRM
SHOWDEMO

SEQ
SEQ

FLEX.CFL
FMAC

SRAND
SEQ

PACK.COM/CMD

PROG

ENTER

SEQ

command
Packed
macro
connand
Unpacked
macro
Program
to pack FMAC (command=PACK
List of the ENTER macro

REPORT
FLEX.COM/CMD

SEQ
*PROG

DataFlex

RUN.OVF
COMP.COM/CMD

*OVF
#PR0G

CCNP,C!VF

#OVF

READ.FLX

FLEX

NOTES:

definition

per

file
file

List of

the

REPORT

FMAC)

macro

runtime program
DataFlex runtime overlay
DataFlex compile program
DataF1ex
compile
overlay
Program
generator to read

file
file

sequential

files

reside on the logged-in disk drive.
files
ItS-bit versions do not haveg or use, COMP.OVF
In 16-bit versions, RUN.OVF is replace by RUN.OOI thru .004
.OVF

C¿pyright

(C)

and

1984

.FO

Data

must

Access

Corporation

05/16/84

F-4

FILESr

ARGUMENTS

DataFlex 2.0 User's

AND COMMANDS

==

——
PREDEFINED

The fo11lowing
are the
discussed
in sections

Manual

——————

ARGUMENTS

system
variables
they pertain:

predefined indicators
of the manual to which

and

INDICATORS:
ENTSPERMISSIVE
'
ERR
FINDERR
FOUND
KEY.CLEAR
KEY.DELETE
KEY.DOWN
KEY.ESCAPE
KEY.FIELD
KEY.FIND
KEY.HELP
KEY.NEXT
KEY.PREVIOUS
KEY.RETURN'
KEY.SAVE
KEY.SFIND
KEY.UP
KEY.USER
KEYPRESS
LASTIF
MULTIUSER

Set

PAGEBREAK

If new page, set
Sequential end of
Sequentfal end of
Triggers selection

SEQEOF
SEQEOL
SELECT
STATUS
SUBTOTAL1..9
SYSTEM

Disables resetting of FIND and AUTOFIND
Error indicator
Result of last FIND (opposite of FOUND)
Result of last FIND
Clear screen
Flex-key
Delete record Flex-key
Dom
arrow
Flex-key
Escape?
end function
Flex-key
Back
Field, window Flex-key
Find Flex-key
Help
Key Flex-key
Next
record Flex-key
Previous record Flex-key
Return/enter Flex-key
Save
record Flex-key
Super
Find
Flex-key
Up arrow
Flex-key
User-defined Flex-key
by

KEYCHECK,
most

Result of
Set

Shows

by

MULTIUSER

whether

if

key

recent

press
IF

test

system
option
by PAGEMECX

file

file

7ine

REPORT macro
named
Is ACTIVE

in

Breakpoint indicators

VARIABLES:
ERRLINE
FILENUMBER
FIELDINDEX
FLEXKEY
LASTERR
LINECOUNT
MEMAVAIL
NUMPAGE
NUMWINDOW
PAGECOUNT
PAGEEND
PAGEFEED
RECCOUNT
STRLEN
STRMARK
WINDOWINDEX

Configuration line number of last error
Number
of last DataF1ex
file for FILELIST
Indexed
addressing for fields
Number
of last Flex-key used
Number
of most recent error triggered
Output
line counter
Amount
of mmory
of available
Number
of pages
Number
of windows
Output page counter (set by PAGEMECX)
Printable lines per page
Action to take on page feed
Running
total of records selected in REPORT
String length
-String position marker
Indexed
addressing for wIndows

======_———————————————————————————————————————————
—
(C)
Access
1984 Data
05/16/84
Corporation

Copyright

User's

2.0

DataFlex

FILESg

Manual

ARGUMENTS

=

WINDOW FORMAT

AND COMMANDS

OPTIONS

AND ENTRY

brackets {} shown below are part of the comand
included with the desired option(s) when written
configurations.

The
be

FORMAT

WINDOW

*

*
*

ENTRY

syntax,
into

and

should

OPTIONS:
EFFECT

SYNTAX

OPTION

*

F-5

— ———————————

DECIMAL

{PQINTS=Q}

FILL
FLOATS

{FILL="*"}

Numeric

decimal
points
character
Fill
Floating "$" sign
Numeric
range
checking
Minus
sign on right
Space
suppression

RANGE

{FL0AT$}
{RANGE=l*l0}

SIGN ON RIGHT
SUPPRESS

{SIGNRT}
{SUPPRESS}

UPPERCASE
VALIDITY

{CAPSL0CK}

Force

upper

{eEcK="YlN"}

Valid

response

FIND
AUTOMATIC
POINTS
DECIMAL

MUTOFINW
{P0INTS=Q}

FIND
record automatically
Numeric
decimal
points

DISPLAY
ONLY
FIND REQUIRED
FORCE PUT

{DISPLAYONLY}
{FINDREQ}
{F0RCEPUT}

always
Cursor
skip window
Successful
FIND required

NO PUT
NO ENTER
RANGE álECXING

{N0PUT}
{NOENTER}
{RANGE=l¶l0}

Do NOT
No data
Numeric

REQUIRED

{REQUIRED}

case

checking

OPTIONS

ALWAYS

{RETAIN}
(RETAINALL}

FOUND

{SKIPF0UND}

RETAIN
RETAIN
SKIP

IF

{CAPSLOCX}
{NECX="YN"}

UPPER CASE
VALIDITY

*0ption

may

C(·'-riC:-)t

(C)

be

used

1984

by

Data

PRINT

Access

command

buffer uncondittona11y
put to the database
entry to window
range
checking
Required
entry.
clearablé
Retain window,
Retain window,
not c1earab1e
Skip
entry if record found
Update

Force

Valid

case
upper
response
checking

only.

Corporation

05/16/84

F-6

FILES9

ARGUMENTS

DataFlex

AND COMMANDS

User's

Manual

LIST

SYNTAX

COMAND

2.0

(do not type darts).
elements
indicate required substitutive
(do
elements
not type
{Brackets} indicate optional substitutive
where
{{ and }}).
they are shown below in double
brackets except
and
GROUPed indicatorsn
[Braces] enclose
are to be typed.
e1ement9
WindOWg
which
may be a database
"Arg" signifies an argument
variable.
or in-memory
Three
periods (...) indicate a non-specific quantity of the elements
which
appear
on either
side of the periods.


CONSOLE

I/O GROUP
CLEARSCREEN
<1ine>
CLEARXY
GOTOXY <1ine>




INKEY



INPUT

{'prompt'}



{colnmand}

KEYCHECK

{arg
SHOW 
SHOWLN 
krg
CONTROL

arg}

...
...

arg}

GROUP
ABORT
CLEARWARNING
CHAIN
"

{string

...

DEBUG
ERROR

string}"



GOTO <1abel>
GOSUB <1abel>
ON



ON 
RETURN {1abeR
DATABASE

GROUP
ATTACH 
CLEAR 
DELETE
FIND





{label
{label

GOSUB

<1abel>
GOTO <1abel>

iuen
... 1abe1}
...

{filename 0.. filename}
filename}
{filename

...

M0DES=LT,LE,EQ,GE,GT


{INDEX.n}

OPEN 
RELATE


SAVE 
filename]
{filename
SAVERECORD 
filename}
{filename

...

ZEROFILE
DEFINITION



...

GROUP
DATE 
INDICATOR
INTEGER

date}
{date
... {indicator
indicator}

...
'Integer}
 {integer

NUMBER



{number

STRING



{length}

Copyright

(C)

1984

Data

Access

...

...
number}

Corporation

07/18/84

FILES»

Manual

2.0 User's

DataF1ex

ARGUMENTS

AND COMMANDS

F-7

——————

ELEMENT

GROUP

PROCESSING
CALCWLATE}

 to

INCREMENT
MOVE 

ENTER



<1nteger>
TO 

MOVEINT
MOVENUM



TO
TO





MOVESTR



TO





MACRO GROUP
ENDGROUP
ENTDISPLAY
ENTER 

{filename

...

ENTEREND
ENTERGROUP
ENTRY

{window



FORMS GROUP
{TO
ACCEPT 
AUTOPAGE 

filename}

{options}}

}

BLANKFORM
BLANKFORM




{THRU

}

CLEARFORM




{THRU

}

CLEARFORM

{T0 }


{{optiorisñ

DISPLAY
FORMAT

NAME 
OUTCLOSE

OUTFILE
OUTPUT



{windowname

...

windowname}



PAGE


{TO
PRINT

INDICATE

CROUP
IF 
INDICATE

}


{NOT}

INDICATE

MODES:
{NOT)

INDICATE

{AND/OR
{NOT}





AS


LT,

LE.

EQ,




MATCH
GE, GT, NE, IN,
GROUP ANY/ALL
[indicator


ANY/ALL
[indicator
 STATUS
TRUE

 FALSE

INDICATE
INDICATE

indicator

indicator]
{indicator}]}



KEY GROUP
BACKFIELD
ENTAGAIN
ENTERMODE
KEYPROC



GROUP
MULTI-USER
DESPOOL
IFCHANGE
LOCK
REREAD

(compile, but


Copyright

(C)

1984

not

execute

under

single-user)



{filename

UNLOCK

do

...

———————
Access
Data

filename}

——————————————————

Corporation

07/18/84

F-8

FILES,

ARGUMENTS

DataFlex

AND COMMANDS

2.0

User's

Manual

————————
———————

REPORT

MACRO GROUP
FORMFEED

OUTPUT SECTIONS: SUBHEADER#, HEADER, <1ines> {BY BODY, SUBTOTAL, TOTAL PAGEMECK REPORT file.fie1d REPORTEND SECTION
) fi1e.fie1d} {BREAK fi1e.field ... SEQUENTIAL I/O GROUP CLOSE INPUT CL0SE_OUTPUT DIRECT_INPUT DIRECT_0UTPUT {arg {arg READLN {arg WRITE {arg WRITELN READ STRING arg} ... arg} ... arg} ... arg} ... GROUP APPEND string} {string ... TO TO CHARACTER CMDLINE <1ength> TO LEFT TO LENGTH <1ength> TO MID <7ength> TO PAD TO IN POS RIGHT TO <1ength> TO TRIM UPPERCASE ASCII STRUCTURED CONTROL GROUP END BEGIN - TO FOR FROM UNTIL REPEAT END WHILE EQ, GE. GT MODES: LT9 LE, SYSTEM GROUP COPYFILE DIRECTORY ERASEFILE FILELIST REGISTRATION RENAME TO TO RUNPROGRAM SYSDATE TO LOOP LOOP {filename} {program_arg} {number} SYSTEM Copyright (C) 1984 Data Access Corporation 07/18/84 ——— _~___~ F"9 —————————————— ———————— — """""==".==",===="=========",====".===", __ ——————— ========== SPECIFICATIONS ===--===== ========== _ ____~ ————————— Provided by DataF1ex: File File · Maintenance (on Update (on (on Entry Report Generation Data Query Command (on line, line, line, ¶nteractive) interactive) interactive) 1inep interactive) language Data Base Management Pascal Library (optional) Program-independent Microprocessor Environment: Supported Operating 8080. Z-80, 8085 8086, 8088, 80186» Systems: CP/M, etc. 80286 MP/M-86, CP/M-86, system menu etc. MS-DOS, PC-DOS, 3COM, Novell Sharenet, PC-Net, Te1evideo Molecular N-Star» Network. Action DPC/OS, Omninet, with Corvus TurboOOS, OMS Hi-Nét» khmOST, IBM "PC" Requirements: Transient Program (8 Area: (16 CRT 60Ok with addressable cursor of disk storage bit): bit): 52k lOOk Purpose: Development Applications Structure: Extended Data Host Relational Independent DBMS With and Utilities language. comand Language: Pasca1/MT+ (C) Digital required for execution NOTE: Many themselves DataF1ex actually DBMS Files: Maximum data elements per Maximum indexes per file: file: _==_=_========================——~— Copyright Data (NOt configuration.) utilities DataFlex are configurations. 255 (8 (16 bit): 4 9 bit): "ad Pius 1984 or 125 Maximum (C) Research) Access — Corporation one hoc" index. —————————— ——————-—— 05/16/84 Maximum elements per (8 (16 index: bit): bit): Manua7 4 6 8 Megabytes Maximum File sIze: Maximum records Maximum record size: 65g536 file: per 49Ó(jÓ bytes to Multi-1evel B+ Indexing: Data 2.0 User's DataF7ex SPECIFICATIONS F-lO *MEML ISAM Packe& File type fixed-length random access fixed point. Numeric Type: Packed Numeric precision: 4 places after Numeric range: + or - 99,999,999,999,999.9999 Maximum data sfmu1taneous1y: files Maximum line length: Maximum argument lines: bit): bit): 32AOO 255 80 size: of characters windows: 32>000 configuration: 255 number Maximum pages Maximum number of indicators: 89 Maximum number of variables: 32AOO Maximum INTEGER Integer range: + l89 Sub-category breakpoint levels: 9 (disk or (plus or - pre-defined) (*MEML) 32»767 terminal-independent Protected sourcep semi-compiled. —— ——————— Copyright 38 residentj mmory Line- or comma-delimited Device-independent. files: f't7e characteristics: Command (*MEML) 40 variables: Flex-keys: Sequential files) (*MEML) characters Maximum per point only at least 5 at least 10 (plus associated index (8 (16 configuration decimal (*MEML) Qpen Maximum BCD (C) 1984 Data Access Corporation ————————— 05/16/84 2.0 DataF1ex SPECIFICATIONS Manual User's — =."=== ————————————— ~ — ———_~___—_"""""" Types Types of of F-ll Text strings arguments: (bcd) Numeric Integer Date (extended julian) Mov«nent & conversion Indicators (conditionals) Calculation Control, unstructured ControL Structured Data cotmands: IMAGE Data forms Entry Reporting Base Data Manipulation String Sequential I/O Console I/O (terminal-independent) Macro pre-processor Data Data Uti1itles: Base Base Definition recovery installation Terminal & system Text editor Program generation Query Configurable Configuration Memory 1imfted, affected primarily - the computer and the memory system in the configuration. *MEML (TPA) MENU compiler by the available memory by the rest of consumed ———— ————— Copyright (C) 1984 Data Access Corporation 05/16/84 F-12 DataFlex 2.0 User's SPECIFICATIONS Manual ======================================= ===~ =""===~=~===="============================= ——~=======~~========= THIS Copyright (C) 1984 = Data PAGE ~"" Access INTENTIONALLY == Corporation LEFT BLANK ====== ""~=="==== 05/16/84 ""======== -———+————— ===~~~————————~~ ""__ =ZEFÉ== ERROR MESSAGES COMPILER TYPES F"13 ==""""=== ~ _=~__=: ::: OF ERRORS those time and RUN time: It is important to distinguish from those is compiled actions and errors which occur when a program which compiler takes your is run. The DataF1ex occur when a program and translates code into a "compiled" form English command source form is not machine to execute, This compiled that is more efficient language, to DataFlex. but an internal form unique COWILE it (compilation) takes place, the compiler may run this translation this (s doesn't know how to translate; line which into a comíand Most as called a compile time error. errors in the use of commandsp at compile time, which well as typographical errorsg are caught guarantees correct when is syntactically that your program runs. Other the data errors may be caused by the action of the operator, by which or faulty logic the programmer. is acted upon by the program. These program is actually flagged when the compiled errors are usuaRy For this reason, compile time errors and runtime run (runtime). into separate groups. Be sure to look at the errors are separated an error! correct table when trying to diagnose When it it CCNFJGURATION SYNTAX ERRORS a DataF1ex reserved word in a command line, misspell or misuse These will get a syntax error when you compile the configuration. Simply to correct. errors are the simplest to find and the easiest make corrections on the indicated 1ine(s)» and edit the configuration, the recompile. You may need to refer to the manual to determine Pay particular required syntax for the connand you are trying to use. is of the command and what type of argument attention to the arguments and legal to put in a particular reasonab.le position (é.g.o trying to illegal and unreasonable). move a new value into a constant is both Most syntax errors are caused by simple misspellings or typographical Very few syntax or usage errors will occur at runtime. Those errors. which and field-indexing, which do usually arise from use of windowcan change a variable's type at runtime. If you you type of compile time error is the use of duplicate symbols. two variables or labelm you will get an If be uniquel must (DataFlex won't detect error. consistent duplicate use of a variable if both uses are syntactically You must also with each other, so this is not a total failsafe.) words words. These reserved reserved avoid the use of DataF1ex Words of DataFlex") canNOT be used (listed in the section on "Reserved IS legal to use symbol for command names. substitution as symbol It names. This will not generate an error, but great care must be exercised and this practice is not recommended. If you use a comand you will get an error when you then try to use that name as a symbob In summary, when naming command. your filem pagesg variables and are names which not reserved words. labels, make sure to use unique Another you same name for use the Each label and symbol ———————————————————————— ————————— Copyright (C) 1984 Data Access Corporation 06/08/84 ~ (COMP.COM) completes There is a The DataFlex compiler program two passes through the source each process: l) Initialization Forms 3) 4) Macro Compile four processes class of errors in for ~_"_—0 PASS ONE > PASS TWO —————g ERRORS: INITIALIZATION SOURCE file. 1-------> 2) Manual = __________=— __ ~ 2.0 User°s DataFlex ERROR MESSAGES COMPILER F-14 FILE NOT FOUND for correct disk directory Check FORMS ERRORS: IMAGE NOT FOUND Check that desired begin file line of with "l*". first file name. "/". begins with If no image MACRO ERRORS: 'amount_m«nory_avai1ab1e' MEMORY: time a is less than of memory remaining available. declared, see compiler option Warning updated remaining 150 every memory MACRO BUFFER Macros as SIZE symbol is encountered Displays amount kilobyte. "Out of Memory" error is If "M" for possible fix. if new one EXCEEDED in available buffer defined are too large to 0therwisep space. Usually the result of a syntax error. "M" may permit compilation with larger macro compiler option expansion buffer. 151 fit INCLUDE FILE NOT FOUND Check device directory to ensure that the specified exists. 152 UNEQUAL Open 155 INDICATOR file PARENTHESES IN EXPRESSION and"c1ose parentheses not matched. NOT RESOLVED: used has Indicator 'symbol not been TOO MANY INDICATORS Maximum of 3 indicators per _name' defined. Often caused by m1sspe11ing. 155 156 CONDITIONALS NO ACTIVE A #ELSE appears in — Copyright (C) 1984 Data a macro Access line exceeded. wfthout Corporation a #IF being open. 06/08/84 2.0 DataFjex User's 157 FORWARD REFERENCE: (GOTO Label or inconsistencies. H1éo 'symbol GOSUB) NOT RESOLVED name' not found. Often caused by spelling the error is not apparent in the source If may be using an one of the cotmands check whether GOTO GOSUB. internal 159 F-15 —_—~ =————— ———~=================== = ~___________ ERROR MESSAGES COMPILER Manual or TOO MANY CONTROL BLOCKS number The maximum of control blocks which may be open is 20. This error is triggered when there are more than 20 open at one time. Control blocks are created by IF statements and among other things. structured control commands, 160 TERMINATED A CONT'L initializer. LOOP UNTIL or 162 TYPE BLOCX Examples (require MECX ERROR IN comand was The number W/O BEGIN appears without a preceding block END (requires BEGIN are or WHILE), REPEAT), etc. block terminator control of REQUIRED ARGUMENT ARGUMENT: issued with fewer the than minimum required arguments. NOT ALLOWED 162 TYPE CHECX ERROR IN ARGUMENT: CONSTANT 162 TYPE QIECX ERROR IN ARGUMENT: DATE 162 TYPE MEO ERROR IN ARGUMENT: EXPRESSION 162 TYPE (MECX ERROR IN ARGUMENT: FILE 162 TYPE CJ1EO ERROR IN ARGUMENT: GP 162 TYPE CHECK ERROR IN ARGUMENT: GROUP NOT ALLOWED 162 TYPE C1IECX ERROR IN ARGUMENT: INDICATOR NOT ALLOWED 162 TYPE eux ERROR IN ARGUMENT: INTEGER NOT ALLOWED 162 TYPE auxx ERROR IN ARGUMENT: INVALID LITERAL 162 TYPE NE(X ERROR IN ARGUMENT: LABEL 162 TYPE mEcx ERROR IN ARGUMENT: MUST BE AN 162 TYPE áiEcK ERROR IN ARGUMENT: MUST BE DEFINED 162 TYPE lMECX ERROR IN ARGUMENT: NUNBER NOT ALLOWED 162 TYPE QIECX ERROR IN ARGUMENT: OPTION "{}" 162 TYPE mEcK ERROR IN ARGUMENT: SHOULD NOT BE DEFINED 162 STRING NOT ALLOWED ERROR IN ARGUMENT: TYPE MECK A string, variable. was used in a command or string does etc.). not deal with strings (uses numericsp ——— Copyright (C) 1984 Data Access NOT ALLOWED NOT ALLOWED ELEMENT INDICATOR NOT ALLOWED "Cl" NOT ALLOWED NOT ALLOWED INDICATOR NOT ALLOWED — ~ ~"""""""""""==——==—"—==—————— Corporation which — == = = === 06/08/84 F-16 DataFlex ERROR MESSAGES COMPILER 2.0 User's Manual — —————— — ———————— 162 TYPE ERROR IN arguments OECK Multiple or one argument, which can handle comands in other 162 ARGUMENT: TOO MANY ARGUMENTS used were with a command which allows only used were with a command multiple arguments only a certain number (see explanations of sections of this manual). VARIABLE ERROR IN ARGUMENT: TYPE mEcK A variable name was used in a command NOT ALLOWED which cannot deal with variables. 162 164 TYPE OEQ( A window ERROR was WINDOW NOT ALLOWED IN ARGUMENT: deal used in a command which cannot with windows. name' 'symbol COMMAND NOT FOUND: A command in the source file is not present inNotFLEX.CFL rePACKing Misspellings frequently trigger this error. FMAC after modifying for new macros can trigger this error, as a variable use of a reserved word as can or other improper FLEX.CFL is not on the default use. This error occurs drive. it if 170 TO ITSELF REPLACE CANNOT is not valid. Logic of replacement reserved word(s) or syntax error(s). COMPILE ICODE by misuse of NOT FOUND Intermediate code file from Usually a failure of hardware full condition is a frequent 101 caused ERRORS TIME FILE Often NUNBER EXPECTED expected A numeric pass of compilter or operating systan. cause of this error. first but not found. ICODE error not found. disk A in the cormiand sequence. 102 LINE OUT OF SEQUENCE code inconsistency. NUK3ER Interna) 103 104 105 VARIABLE TYPE ILLEGAL Compiler type check DUPLICATE Same VARIABLE variable ERROR IN compiler conf7ict FILE WRITING .FLX system error Operating 107 ERROR IN CLOSING .FLX system Operating Copyright (c) 1984 Data a user-defined macro. ICODE. DEFINED defined twice NOT FOUND TYPE/CLASS Internal 106 of the Error in as different . caused by a types. Coding error. coding error. (Disk or Directory Full). (Disk or Directory Full). FILE error Access Corporation 06/08/84 DataF1ex User's 2.0 108 OPEN 109 UNEQUAL End an expression not found. PARENTHESES of expression not found. an ARGUMENT Ill INVALID 112 INVALID ENTRY OR FORM COMMAND Check options for validity Internal compiler conflict. "{}" 122 LINE F-17 ——————————— —————-—— EXPECTED PARENTHESIS Start of ERROR MESSAGES COMPILER Manual ===—=========—————————————— Unresolved and symbol encountered. spelling. TOO LCNG The maximum This error line length allowed is 255 characters. Check for omission is triggered by any line longer than that. feeds from the source of carriage return/line file. ——— ——————————————— —— Copyright (c) 1984 Data Access Corporation ——————————— — 06/08/84 F-18 COMPILER DataF1ex ERROR MESSAGES 2.0 User's Manual ———— THIS Copyright (C) 1984 Data PAGE INTENTIONALLY Access Corporation LEFT BLANK 06/08/84 ———————————————— ————————— TEEEa===-————— RUNTIA ERRORS — ——————~—~~—— F"19 ————— :::::::::: AND DIAGNOSIS —————————— -————- ~ TYPES OF ERRORS errors are those which occur when you are actually running a (as opposed Compiler errors are configuration to compiling it). Runtime discussed in the preceding section of this manual. errors can made be the result the specifications of a fault in a file definition, in the installation of Dataf1e: u configuration of your operating from system, or operator actionsI but most runtime errors result When a this condition which has to be corrected in the configuration. is the case, corrective action usually includes the same steps make edit the configuration, required to correct compiler errors: Other and recompile the configuration. steps (discussed corrections, further at several points below in this section) may be required in addition tOf or instead of, these steps. Runtime ERROR CLASSIFICATIONS: RUNTIME errors are discussed in this section in the following groups. in the numerical dealing with a particular errom find and review to the discussions under the c1assification(s) than under be discussed more is assigned. A given error may where classification the error may be triggered by more than one Runtime it are If youbelow list which one cause. it OP: MH: LID: ERROR # OPERATING OPERATOR ERRORS MEDIA AND HARDWARE DISK LIMITATION, ERRORS MEMORY CONFIGURATION L/M: L/C: CE: LIMITATION, LIMITATION, CONFIGURATION SU: MU: SET UP ERROR ERROR MULTIUSER ERROR CLASSIFICATION DESCRIPTION SYSTEM READING ERRORS: UNWRITTEN l 2 OPERATING 3 CANNOT SYSTEM DATA (SYSTEM) MH NH ERROR 4 5 CURRENT EXTENT EXTENT (SYSTEM) SEEK TO UNWRITTEN FULL) DIRECTORY OVERFLOW (DISK 6 SEEK CLOSE FULL) PAST END OF DISK (DISK 1984 Data Corporation m PH LID LID ==== == Copyright (c) Access 06/08/84' F-20 ERRORS RUNTIME DataF)ex AND DIAGNOSIS DESCRIPTION DATAFLEX II 12 ERRORS: +++ OUT OF MEMORY +++ NUNBER TOO LARGE FOR FIELD OUT OF RANGE WINDOW NUDER 13 14 ON THIS AN ENTRY IS REQUIRED PLEASE ENTER A NUNBER 15 16 INVALID PLEASE 17 18 NUMERIC ENTRY IS OUT OF RANGE OPEN SYSTEM COMMUNICATIONS CAN'T 19 20 MULTIUSER TIME OUT (BUSY READ ERROR ON INDEX FILE, 21 WRITE 22 INDEX Z3 25 INDEX FILE RECORD NOT 26 28 ERROR ON INDEX FILE DAMAGED, WINDOW FULL, FOUND FILE TOO LONG) REINDEX FILE FILE REINDEX SIZE EXCEEDS DEFINED 30 CONFIGURATION 32 CAN'T 41 42 FIND FIND 43 49 CAN'T 51 (OPERAND) BAD FORMAT IN EXPRESSION (OPERATOR) BAD FORMAT OF EXPRESSIÓN NO RECORD IN MEMORY TO DELETE 52 71 IN FILE FILE NOT FOUND OUTPUT FILE OP OP OP CE CE m L/C OP OP, MU CE CE, N OP, CE CE, PH, SU, MU L/D,BUY EXCEEDED CE OP, CE SU, MU CE SU, MU 74 75 76 CAN'T FIELD (.DAT) OPEN DATA FILE NUMBER OUT OF RANGE 77 78 FIELD CAN'T NUMBER 79 80 FIELD CAN'T CAN'T NOT INDEXED, CLOSE DATA FILE 81 82 RECORD NU*ER RECORD EDITED 83 85 TYPE 86 87 RELATED FIELDS ARE NOT THE SAME LENGTH RECORD PATH TO THIS NO SUPERFINO CE OP INVALID OP OP 88 ISAM UPDATE SU, CE FIND CONFIGURATION FILE NOT FOUND CAN'T OPEN C0NFIGURATION!PROGRAM 97 MULTIPLE GOSUB'S OPERATOR ERROR 1984 Data CE WITHOUT NUR'BER CE PS 92 96 (C) OP, CE PLEASE Copyright MU BY THIS AS 90 91 lOó MH, m, MU m, m USED NECX ERROR, ASCII NOT LINKED TO PROGRAM INTEGER MU FILE OUT OF RANGE NOT SAVED RECORD DATAFLEX CE OUT OF RANGE RECORD ZERO OF DATA FILE NAME ENTER A VALID ATTEMPT TO PUT INTO LID CE NOT OPEN FILE FIELD NUKEIER OUT OF RANGE QPEN "FILELIST.CFG" CAN'T 72 73 LID b'H OP OP BEGINNING OF FILE END OF FILE OPEN INDEX FILE LIMITATION DEMO VERSION CE OP OP N, 31 OPEN OP. CE 6'H, FILE CLOSE INDEX FILE CAN'T DUPLICATE RECORDS NOT ALLOWED READ CONFIGURATION FILE CAN'T PAST Manual L/M,CE ALLOCATION ENTRY FOR THIS WINDOW ENTER A VALID DATE (MM/DD/YY) PAST User's CLASSIFICATION ERROR S 10 2.0 ID CCNSTANT RETURN FILE MACRO COkNAND OP, OP, SU, SU, CE CE CE OP Access Corporation 06/08/84 DataFlex 2.0 ERRORS RUNTIME Manual User's AND DIAGNOSIS ERRORS OPERATOR OP: F-21 ————— = DataFlex is a simple mistake by the operator. errors directly and gives you the capacity for Most of these error"s» providing additional checks where required. unlike the other runtime errorsp do not call for any corrections in configurations or systan setup. The most correction that is likely to be needed in those cases where the error is operator instruction The fo11ow1ng the purpose. message sufficient for is not are itself be generated by an operator in a properly written can that errors configuration. The most comnon error handles many operator ERROR Number li: NUMBER TOO LARGE ERROR 13: AN ENIRY is too large for IS ALLOCATION FOR FIELD a data field REQUIRED ON THIS Operator attempted to return past ERROR PLEASE 14: window A NUMBER ENTER Entry of letters WINDOW a "REQUIRED" ("O", lower "L"p case etc.) in a numeric-typed window ERROR INVALID 15: ENTRY FOR THIS WINDOW made in to CHECK or format specification Entry does not conform Some means for determining what is acceptable the configuration. (Help prompt» custom be provided for the operator must screen, error message) ERROR 16: Improper ERROR PLEASE NUMERIC 17: A VALID ENTER DATE (MM/DD/YY) date format or value ENTRY IS OUT OF RANGE Entry does not conform to "RANGE" in entry option made in the Some means for determining what is acceptable must configuration. custom be provided for the operator (Help error screen, promptp message) DUPLICATE RECORDS NOT ALLOWED IN ERROR 28: records An attempt was made to enter two ERROR 41: FIND PAST BEGINNING FILE with the FIND PAST record find ERROR 71: Delete ERROR 87: NO RECORD key pressed END OF FILE attempted at IN of end PATH TO THIS NO SUPERFINO from this window; INVALID FILE 1984 Data file RECORD main file name has does not relate to NAME formatted or too long Copyright (c) file MEMORY TO DELETE with no record found Cánft superfind this field ERROR 88: A badly key OF FILE Previous record find attempted at beginning of ERROR 42: Next same Access file Corporation been entered 06/08/84 RUNTIME F-22 ERRORS PLEASE ENTER ERROR 90: No record is found ERROR FILE CONFIGURATION 92: RECORD a "FINDREQ"; A VALID with 2.0 DataF1ex AND DIAGNOSIS User's ID FIND press NOT FOUND Operator entered a configuration file name that is not the indicated disk (also see Error 96). MEDIA kSi: Manual AND HARDWARE found on ERRORS disk media or operating the filing system. If a program which is usually (but stops working, was A some sort of hardware not absolutely always) or media problem. which problem does not happen consistently under exactly the same problem. always a hardware conditions is almost If you are having all of your system diagnostics you should run this type of prob1«m also test other software which uses similar several times. You should malfunction, the data recovery utiliresources. After any hardware (see be used the section on "Utilities"). ties REINDEX and FREL should If there is system, a problem with your equipment, up in suddenly show will usually itworking properly it r which result in physical refer to problems corruption of the data on your d1Skg not operator or program error. There two primary causes are disk media defects and for these errors: There probability that power failure. is a good statistical is equally true that you eventually you will have a media failure. It DataF1ex keeps Wi17 have all of your data current on power failures. and operating disk in case of power fai1ure9 but different equipment have systems different capacities for coping with this probWn. Some equipment can the power goes destroy an entfre disk poorly designed no effect. out. at the with almost wrong time, while others handle almost Probably the worst case is when a systan makes sma1b Some power undetectable errors on the disk after a power failure. "flickers" or "spikes" can cause data errors which are unnoticed at the time they occur. After a power fai1ureg flicker or spike, or a media use the data recovery utilities FREL and error, you should REINDEX to ascertain the extent of data corruption and re-establish data integrity. It is most important to MAINTAIN RECENT BACKUPS to guard against these data killers. If you rely heavily on your systam supply power to prevent power you should consider an uninterruptible failure problems. Media and hardware errors it DATA RECOVERY TEWNIQUES: WHY WOULD YOU NEED TO if RECOVER DATA? media configuration failure and sometimes to power problems, necessary may become to restore the Integrity of your data. errors. on several levels. This recovery may be necessary If you have a corrupted disk directory9 you will need to recover all of the ffles on there recovery). a disk (primary data If only one file is corrupted, data are specific methods for recovering one file (secondary recovery). Due it consider whether Before you start any kind of data recovery you should backups, made proper may be It is worthwhile. Assumingback you have ups and bring those files up to date by sfmpler to restore your maríua17y re-inputtfng data! it Copyright (c) 1984 Data Access Corporation 06/08/84 DataFlex PRIMARY User's 2.0 DATA RUNTIRE Manual DIRECTORY CORRUPTED RECOVERY: F-23 AND DIAGNOSIS ERRORS and data media If the directory on your disk is corrupted (see errorsk you will need to restore the integrity of the disk before you start on the individual data files. You should first make ANOTHER backup of your entire disk drive and then reformat the disk according Next, verify the disk drive to instructions. to the operating system media make no Fjna1]y» restore the fields from are there errors. sure data examine You should backup. all files for correctness and your ALL proceed on with secondary files. file recovery SECCNDARY DATA CORRUPTED RECOVERY: FILE use both the FREL the integrity of any file is suspect. you should the REINDEX utilities on each file. The FREL utility will restore the internal list of deleted records in the .DAT file and the REINDEX If there are any bad or duplicate utility will recreate the indexes. After this procedure, it's records in the file, they will be removed. idea a good to use QUERY to look at the data in the files. If and If the recovery programs cannot recover the badly damaged data. usually better to restore the backup files than to try further of good back upsl the importance recovery. Let us emphasize Common errors associated with SYSTEM STOPS OR "LOCKS probably available) Most BOOS a UP" power media and hardware at random times flicker or spike! failures (Also check it is are: memory Read/Write Bad Sector; I/O Error; Error not errors are returned directly from the operating syst«n, from system The wording from may vary to system. DataFlex. exact This type of error is caused by an unrecoverable hardware or media do is to reformat and restore your The data thing to error. first from backup. should be frequent1yp your hardware this happens If examined. If you use floppy diskm you should consider another Error: These brand. 3, 4 with the operating errors generally indicate problems Power failure is system's directory structure of the disk drive. had other you have a common cause of directory corruption. If media errorm they can show up later as directory problems. be reformatted and the data Generally the disk should recovery techniques used. (See also Disk Limitations) ERRORS These I, ERRORS 20, 2, 21. 22, 26 corrupted index fi1é» Error 21 of errors as above. The data by a disk condition. mcovery full repeated1yg there utilities should be sufficient. the If this happens may be a subtle problem with operating system or equipment. If you are on a multiuser system, make sure that you fo?1ow the multiuser checklist below. Errors 20. 22 and generally caused can also be caused Copyright (c) 1984 26 by Data caused are the same Access by a types Corporation 06/08/84 DataFlex AND DIAGNOSIS ERRORS RUNTIME F-24 2.0 User's Manual ——————— ——————— RECORD NUPBER OUT OF RANGE record number out of range error ocurrs when saving a recordg You should use FREL and indicates a corrupted data 81: ERROR If it a REINDEX Configuration file (.FRM) or the file is damaged. CAN'T ERROR 32: The disk is ERRORS 78, FILE READ CONFIGURATION CAN'T ERROR 30: file. file. the on OPEN full OUTPUT the or is not compiled a DataF1ex configuration FILE file name is improper. 80 Directory is (above) damaged. LIMITATIONS DISK LID: In partíconfiguration takes up disk space. systam you will probably a floppy-disk-based You may run into this at any time run into disk full conditions. whether creating, editing, or compiling any type of file. The error code for a full disk depends on what type of file you are processing. from (The the same error when you are running DataFlex is different EDITOR.) using you will either when you are any Caseg In the error have to reorganize the files on your disks or get more storage space. Additiona11y? be aware that the last edit or addition you attempted Note that there are TWO ways to properly. was probably not saved up your disk: the storage can be used up; or (2) the directory (l) (number of files) can be filled úPa Both of these conditions are remove you must treated in the same way; files from your disk. fi1eg Each cu1am if and using program you are fill The ERROR DIRECTORY 5: Directory ERROR 6: Disk ERROR SEEK PAST used WRITE full OVERFLOW are (DISK returned for disk full. FULL) files) full. of (number space 21: Disk codes runtime error fo11owing END OF DISK (DISK FULL) up. ERROR ON DISK while trying to FILE expand 32: CAN'T OPEN OUTPUT FILE Disk directory full while trying index file. ERROR to open an output file. compiler needs disk space on the logged-in drive to store the created during the compile process. Typica?1yp needed space is approximately the size of the configuration source for the compiler to write its file, If there is not enough 2 space occur temporary during compilation. files, Errors l or will NOTE: The temporary files —————-—-.-,-— Copyright (C) 1984 Data Access Corporation 06/08/84 . 2.0 DataF1ex User's RUNTIIE Manual ERRORS —————————————————————————— —— F-25 AND DIAGNOSIS —————————— MEMORY LIMITATIONS L/M: capacity to relate many data files and have many pages is possible for a configuration to simply run out of There memory). two RAM (random-access are factors at work here: the (TPA, amount for Transient Program of memory available to a program Area) and the size of the program also or configuration. It isCompile time during the compile phase. possible to run out of mmory from minimum memory runtime minimum mmory. Minimum is different find out how much m«nory compile manory is 1000 bytes. You should AFTER the oPerating system has available system is your to the program loaded. With DataF1exrs of screenm it with a 64-kilobyte Z80 processor can have from 42 typical computer 58K of TPA. a minimum In B-bit systems, of 52k TPA is required to run DataFlex. On a 16-bit system you must have a minimum TPA of 128 kilobytes has lOOk. of hardware This means that If your computer enough 34K» you do NOT have system RAM and consumes operating your Note that operating systans that manory to run DataFlex properly. floppy-based control hard disk drives take more memory than comparable RAM that system example, For systems, a 16-bit with 128K of hardware DataFlex runs successfully with floppies may not be able to run DataFlex a hard disk driva is installed unless more RAM memory is The more also added to handle the larger hard disk driver program. you have, memory the larger the configuration you can hand1ep up to a On a 16-bit system, of a maximum DataFlex will take advantage point. of DataFlex are of about 192K of TPA, so the maximum capabilities RAM. of Further expansion likely to be realized with 256K of hardware RAM would probably yield no benefits to running DataFlex. A to if DataF1ex maintains an internal predefined variable is running0 called MEMAVAIL, which will return the amount of unused memory memory usage available dynamically (the value changes whenever and after DataF1ex changes). This amount is what remains your configuration are loaded. If you run the following test program it free memory as of the time you run will show you your systemG it When it: l* SHOWLN MEMAVAIL SYSTEM number is above displayed should NEVER be below WJ)ÓÓp and maximum 3L1O(L your available memory is greater than DataF1exIs below 10.000 A result indicates that capability to utilize manory. and operating system as configured do riot have your computer TPA available to run DataFlex. sufficient if it The large configuration that may If you are working with a particularly incorporate the procedure available TPA, you should close to exceeding shown above at certain points in the configuration so you can keep IMPORTANT NOTE: DataFlex TPA availability. track of remaining requires some manory to be available while running. The amount of memory required at runtime is AT LEAST 2pÓÓÓ and can be as high as 5,000 if you are using very large data fi1esp so when MEMAVAIL is " ———— ",========= Copyright (C) 1984 — Data Access ~~~~~ Corporation be 06/08/84 ERRORS RUNTIME F-26 AND DIAGNOSIS DataFlex User's 2.0 Manual — ,_===r'm virtual of trouble at run the possibility certainty when MEMAVAIL declines below HOW BIG MUST below MEMAVAIL and time exists, 2.000. 57Ó()Óp is a BE? amount of memory that must be available to run a particular (a) configuration is the greater of: the largest index for the data image in fi1e(s) used by the configuration; or (b) the largest screen the configuration. The image screen is about 2AOO bytem so the largest data file The minimum memory requirwent usually the limiting factor. formula based on the information can be estimated with the following returned when an index is created in FILEDEF or REINDEX: A typical index is (512+KEYSIZE)*(LEVELS+1) Is the size in bytes of the key being the number of ISAM levels required. KEYSIZE Where and LEVELS is indexed ONLY when by the ISAM module be computed the take careful note when these numbers are AUTODEF, of index creation in FILEDEF, or REINDEX. The of levels is based on the key size and the So maximum number of records you define in FILEDEF or AUTODEF. if you only has 1,000 with data in define a file for 30AOO records and them. against This precaution guards you may be wasting memory! running out of memory halfway through entering the data to a file, since the maximum memory is used even when the actual data and index files are still small. that LEVELS index is created, displayed at the Note can so end number it WHAT USES MEMORY? Most of the resources available in DataFlex (or any other language) but consume some memoryp consume there are two areas that typically windows. and screen image Generally your work area: open data you will a data you can do without opening in an application, The following memory. save table should help you significant and therefore where what determine you should look should uses memory files if you have to THE it. conserve file FOLLOWING FIGURES 8-Bit ARE IN BYTES. 16-Bit COMMANDS Indicators Each string Free II II Each Each 10 Free 10 LO 10 Each Each Each Each comnand line variable numeric variable integer variable string constant numeric constant expression Copyright (c) 1984 Data Access commands - included in Actual string length + 2 - pre-allocated Actual string length String Corporation length + l (compacted) 07/18/84 DataFlex 2.0 User's RUNTIME Manual 8-Bit SCREEN IMAGES Overhead li (unbuffered) 0verhead(buffered) window Each subtotal Each range check Each DATA FILES Overhead (PER page window check string Actual string Each BATCH index ON-LINE index buffer size size + ID 20 length li + l FILE) OPEN field Record 11 Actual Actual 10 20 Each Each 16-Bit PAGE) (PER Each F-27 AND DIAGNOSIS ERRORS 120 180 8 128 170 10 (Number (actual) runs a configuration out more configurations but command (see the section on If or of 1eve1s)*512 length (per FILEDEF) Record of still memoryy run as "Controlling it divided up into with the CHAIN Execution Sequence"). can though be two one OF OUT OF MEMORY INDICATIONS 10 (DataFlex out of memory) Recursion stack overflow (PASCAL error) OUT OF MEMORY (compile time) up' systems may 'lock In some cases, or ERROR drop to the operating system Final note: There are no "secrets" so they wouldn't be secret; distributor for one. werep for getting doMt please Designing a configuration necessarily involves specifying limits Examples of these limits are: capacities. the application's Maximum number of records Field lengths Window lengths in there or + LIMITATIONS CONFIGURATION L/C: If more memory. ask your dealer a on file Frequently, configuration limitation errors are triggered by errors on the part of the operator, such as entering a number that is too large by mistake. as an In such Casesg the resultant overflow error serves the capacities are not automatic form of range verification. If which however, specified thoughtfully, they may hamper the purposes to serve. If field sizes must be the configuration was designed changed (or new fields added, making the record larger) after there is data in the file, the file definition may still be changed without the be written to a requirement to rekey the data. First, the data should QUERY then new disk file in READ format using the DataFlex utility, back changed, and then into the the data reread the file definition READ restructured file with a configuration built using the DataFlex utility. Copyright (C) 1984 Data Accc55 Corporation 07/18/84 RUNTIME F-28 following limitations: The ERRORS errors NLM3ER DataFlex AND DIAGNOSIS those are TOO LARGE frequently most FOR FIELD caused 2.0 by User's Manual configuration ALLOCATION II: This is usually caused by the operator entering too large a number field is just not big 0therwise9 a numeric in a data window. enough to hold the required value. You may have to change the number. file definition to allow the field to hold a larger ERROR FULL, INDEX FILE ERROR Z3: In FILEDEF and AUTODEF records that could be EXCEEDS SIZE DEFINED asked for the maximum number of this number is greatly in a file. If To exceedech you will get Error 23. fix this, simply re-enter and change FILEDEF the maximum number of records. You will then have for the file using REINDEX. to rebuild ali indexes CE: you are ERRORS CONFIGURATION which is possible to use comands program or configuration, which make no sense syntactically correct but or cause errors when a the progam is run. These are generally cases where the operation of may be command is not fully understood It or is applied improperly. the necessary to put in special "debugging" statements to determine while is running. Sti16 the most important state of the program step is to read the manual carefully and review the sample configuraprovidecL Due to DataF1ex's great f1exibi1ityp tions and programs configuration errors can appear to be other types of errors. In it any are it DATA CONSISTENCY operation of the consistency errors are those caused by improper necessary applicátíÓn and its failure to do the checks to guarantee An example data of this would be the deletion of a consistency. customer customer in while there are still transactions for that In transactional another data file related to the custcmer file. from deleting such is necessary to prevent the user environments records. One way to do this is to keep a counter of transactions posted to a record and only allow deletion when that counter is zero. Data it related error is allowing the user to change the primary key of an active record. It is best to use record number relationships as well you want as data relationships to allow the user to change key is normal and acceptable to data. Noto that in some applications must check have for this sc) the application "null" relationships, QUERY can be a valuable tool for inspecting files and condition. should uncovered. problem Once a check a is diagnosing data problems. happening from be put into the application again. to prevent A if it it consistency errors incorrect totals or data related. Data Copyright (c) 1984 Data usually at issue when reports have show the "wrong" records entry screens are Access Corporation 06/08/84 User's 2.0 DataFlex ERRORS RUNTII¶Z Manual F-29 AND DIAGNOSIS . The following ERROR IQ: New typically errors on NLNBER ERROR 12: Window WINDOW number TOO LARGE of print ERROR IB: DataF}ex Otherwise, out of SETSCREEn. run does window index redefine field field; 19: a This is usually caused by improper out of range. Recount and/or twporari1y indexing. your windows is running. value to the screen while the program CAN'T OPEN SYSTEM cannot establish FILE COMMUNICATIONS multiuser operating systm Check tions. your instal1at1on notes for information your particular operating system. ERROR for OUT OF RANGE NURER the ALLOCATION FOR FIELD into the allocated fit not larger value. use l6-bitp above. see ERROR Number li: errors: OUT OF MEMORY -F++ +++ installation memoryg configuration from arise TIME MULTIUSER OUT (BUSY communica- relating to TOO LONG) is in a LOCKED state for too long. Multiuser time out. The systan does an Check a LOCK or REREAD without that none of your programs On a UNLOCK. is possible to get this error very busy system occasionally through no fault of the configuration. it 25, 4b 42 FIND errors--FIND ERRORS the To determine what connand was unsuccessful. is. temporarily print the value of the record buffer to Also with error 25p be directly before the FIND. the screen conscious of the record numbem which must be part of the key if included in the index for a FIND EQUAL. problem :Ir ERROR 28: A SAVE DUPLICATE was done already in the RECORDS on a record database. If file. ERROR 31: NOT ALLOWED C(NFIGURATION FILE IN . FILE a that matches try reindexing the key having a unique unexp1ainab1é» key NOT FOUND Configuration file not found. This is caused by an attempt to load This can also be caused a configuration that does not exist. by an improper menu configuration or an error in a "CHAIN" statement. ERROR 32: CAN'T OPEN If the OUTFILE file, you will or a bad file ERROR 51: BAD CUTPUT FILE or DIRECT_0UTPUT get an error 32. connand This cannot can name. FORMAT IN EXPRESSION be create the output by disk full caused (OPERAND) when argument the expression evaluator runs across an improper Most you will get an error 51. is expecting an argument9 expression errors are not reported until runtime. Example: a data you may have consistency error (1+*2). If unexp1ainab1e9 (see above). If it Copyright (C) 1984 Data Access Corporation 06/08/84 ~~ ERROR 52: If -, at — ——————— OF EXPRESSION FORMAT BAD (OPERATOR) the expression evaluator runs across an is expecting a functiom *, or l) when (1=2) runtime. Example: improper it NO RECORD IN a DELETE comand the DBMS WoMt know 71. DELETE must be ERROR 71: If ERRORS 73. Manual User's 2.0 DataF1ex AND DIAGNOSIS ERRORS RUNTIME F-30 76, function Ob get error will 52 MEMORY TO DELETE against is issued what used FIELD 77: you an INACTIVE record bufferp record to delete and will report error with a "FOUND" record. OUT OF RANGE NUmER by improper use of This is generated Field number out of range. Carefully check the index values and make sure field indexing. This can also be caused by using an old they are in range. configuration with a modified file definition. ERROR 79: FIELD NOT Field not Indexed inactive index or ERROR 82: INDEXED, on FIND. FIND BY THIS CAN'T has A FIND comand a non-indexed been issued on an field. RECORD NOT SAVED EDITED This error indicates misuse of the database. If an active record is edited (MOVEd to) and not SAVEdr you will get an error 82 and be so this errcjr should the record wIll be lost from the index9 database but as application, in in only corrected not your your well. After an error 82 has occurrech the file must be reindexed. MOVE to an active record without Never a SAVE! ERROR 83: TYPE Type check CHECK ERROR, ASCII USED AS NUMBER This often arises from use of an old error. whose configuration with a database file definition has Update the configuration to take into account modified. revised file structure. ERROR 86: Related RELATED ERROR 96: CAN'T ARE NOT THE FIELDS fields MUST your file definitions be been the SAME LENGTH exactly the same length for all files involved. OPEN CONFIGURATION/PROGRAM and type. Check FILE Configuration/program file not found. This is usually triggered be by a QIAIN file cannot or RUNPROGRAM cormand whose target and make sure of files concerned found. Review drive assignments they are correct in the comand, This is often occurs in MENU because of incomplete drive designation in action specifications. RETURN ERROR 97: MULTIPLE GOSUB'S WITHOUT For GOSUB every or use of a KEYPROC. there must be a RETURN. Also get Error 97. not, after 20 GOSUBS, you your KEYPROC is called from within a subroutine. you must RETURN to within that will if If subroutine. Copyright (C) 1984 Data Access Corporation 06/08/84 RUNTIKE Manual User's 2.0 DataFlex ERRORS F-31 AND DIAGNOSIS — ————————————— ————————— — SU: UP ERRORS SET of the associated with installation of the required files or the data some files that are required to be on files on your system. the default drive and other files that reside on the drive specified Refer by the configuration. "File Name and Extension to the appendix Types" for more information on the types and locations of files. The in) followfng files are ABSOLUTELY required on the default (logged drive: refer to or the Set up DataFlex errors AT TIMES: FILELIST.CFG AT ALL system placement There are (current terminal configuration location/names of active data RUN TIME: RUN.OVF (B-bit FLEXERRS. DAT and files) file) files) runtime overlay overlay runtime (l6-bit messages) RUN.OO? AT problems (Error TIME: COWILE (B-bit compile overlay file) (Compiler connand file) file--one for (File definition COW.OVF FLEX.CFL *,FD SETSCREEN: WHEN RUNNING TERML IST.CFG DataFiex will not running SETSCREEn. INSTALLATION (List if run you of terminal have and codes not activated each file) data number) your serial FILELIST.CFG by ORDER copies of disks contain mu1t1p1e These set up DataFlex properly to run on depending on the sequence in which the floppy or hard disk systems disks are copied. If you don't copy the disks down in the proper (A. Bp C) sequenca, you wi)l get set up errors. The DataFiex distribution and MENU.DAT. FILELIST.CFG The following errors coímonly arise from improper set up: CAN'T OPEN INDEX FILE ERROR 43: The index information is kept in a The indexes have the "ROOT" separate file from the actual with a ".K?" data. file nameThese extension, where "?" is the index number. files must reside data on the same drive as the file (see Error 75). FILE NOT OPEN has been a DBMS is used before by a be caused 72. can This also error diskp get an in which case you should ERROR 72: it file If OPENed, file 75not error CAN'T ERROR 74: FILELIST.CFG OPEN must ——— ————-—— Copyright (C) Data will on get the first. "FILELIST.CFG" be present on the logged Access in disk drive. ————————— — 1984 you being Corporation 06/08/84 RUNTIME F-32 ERRORS 2.0 DataFlex AND DIAGNOSIS User's Manual ———————————— —————————————— FILE (.DAT) name contained in FILELIST.CFG appended ".DAT" "ROOT NAME" has for to the root name in FILEDEF corresponds CAN'T ERROR 75: The data OPEN DATA can't be found. The Make the OPEN. sure with the actual name and in your operating system's file that drive of the directory. ERRORS 92, it data file as shown 96 Configuration/program a MAIN or found. Review by not filecomand This is usually triggered target file cannot be and make of files concerned sure This can be caused by incorrect found. RUNPROGRAM whose drive assignments they are correct in the ccmnand. order. installation MU: If you before are you MULTIUSER ERRORS should you running DataFlex mu1t1user7 experience any data related problems. this scan check list Option I of SETSCREEn must be I) Is multiuser set in SETSCREEn? For Option 2, "Pre-a11ocate data fi1es'4 set to Multiuser. provided on loose sheets instructions refer to the installation for your particular computer or operating systan. 2) Is the data multiple by 3) Have Each ences 4) updated For a data set to reread? file to be FILEDEF. must be set to re-read, true in users, file it followed each step of the installation different. multiuser version is a taken are in the installation into account instructions? you little These differ- instructions. signs on Is your DataFlex a multiuser version? When DataF1ex wIll show you the after the systan has been booted, multiuser operating system that your copy of DataFlex is to Make sure (or is compatible with) this matches operate on. your operating system. signs on "single user" or with an If incompatible operating syst«n, you will need to order a different version of DataFlex. Contact your dealer. it it 5) Most multiuser Is the operating system configured correctly? operating systws require you to set "sysgen" parameters enabled and the disk volumes to be indicating compatibility understand Make sure shared. you all of these options in your operating systan and have set them correctly. The following systems: are indications I) Corrupted index Operating system 2) 3) 4) files. error: of improperly configured multiuser Copyright (c) 1984 Data Access IN FILE/DRIVE update can a data one user Errors 18, 19. 2b 22, 78, 80. Only file. Corporation USE or RIO (read only) 06/08/84 DataFlex THE utility AUTODEF. REINDEX, singla THE mode. user DATAFLEX F-33 DataFlex except QUERY (FILEDEF, are intended for operation only in off the sure that all other users are logged Make any utilities. FLEX-KEYS DataF1ex function keys in running configurations. The REINDEX, (FILEDEG utilitiesse. AND DIAGNOSIS programs in QUERY, FREL) before using computer ERRORS UTILITIES DATAFLEX All of the RUNTIME Manual User's 2.0 Editor and are active only in the DataFlex These keys are not active in the DataFlex QUERY, FREL) AUTODEF. unless specified otherwl ERROR MESSAGES CUSTOM DataFlex provides the opportunity for the user to create new error to be triggered by conditions defined by the configurati on. are defined using error numbers above IÓÓ? as error messages described in the explanation of the ERROR command in the manual The section on "Controlling Execution Sequence'G facility which (a ljataF1ex having configuration and database provides this capability "FLEXERRS") also provides the capability to reword the the rootname Thi s above. messages given in the standard errors discussed which might of messages capability would permit the substitution the context of the particular appl ication which you are better runningp in rewording the standard but this caution must be observed above: the message substituted will be DataFlex errors discussed shown every time that particular error 'is triggered in any in configuration being run on the same disk as the file FLEXERRS.DAT made. which were This may cause an out-of-context error the change(s) message in a configuration for which the message was not to appear i ntended. messages New fit variable LASTERR and the predefined which to provide "chain" messages will and information (either automatic or operatoroffer above event one of the standard errors is triggered. selected) in the ERR is TRUE when any error is triggered, and (standard or custom) command remai ns TRUE until a CLEARWARNING is executed. If an error at a particular point in a configuration has a predictable origin, a help provided based on the status of the message or execution branch can behand, ERR indicator. on the other the triggering of one or more If, standard errors has consistent impl1cations throughout a particular based IF commands (IF LASTERR on the value of LASTERR configuration, number), EQ some particular prompting can cause the appropriate error recovery from the error. or execution branching to assist in efficient Finally. argument the predefined ERR can both helpful prompting be system used it Copyright (c) 1984 Data Access """""" """""""""==,""=".""==""""""====""""""" 06/08/84 Corporation F-34 RUNTIME ERRORS AND DIAGNOSIS ——————— THIS PAGE DataFlex 2.0 User's Manual ————————————————— INTENTIONALLY LEFT BLANK ———— Copyright (C) 1984 Data Access Corporation 06/08/84 ===—_"_======="""—————— F"35 — _ ———— ' ======== GLOSSARY ===== =====—= ~ ========== ————————————— "__—___——_ ——————— — —— —— APPLICATION task, or set of tasks, to be typically through configurations A such as performed (or Database management DataF1ex. but Accounts Receivable in itse16 described as database one management by a computerp programs) and a language, application properly be app1lcation. is not billing an may AUTODEF.COM The in DataFlex for quick and easy file creation. as well as build set up the file definition data entry configuration file which can either be customed1tedp as-is for execution. or compiled program AUTODEF will B+ or B* TREE and A fast value BATlM a used of searching method efficient by DataFlex. UPDATING The technique of updating files to on-line or real-time operator input. opposed from a updates a data file for transaction file at the time of a key as BIT smallest unit of information used unit of a byte. Eight bits = l byte The RECORD An area BUFFER. a computer. four bits = A subI nibble. that is devoted to the current record. in the file; information is: (first) then (last) on the screen or in the in the buffer; of REMEMBER? (second) by and (RAM) mcmory data or window. BYTE Eight bits (usually unit of information MAIN or representing which can be The a character). handled by a DBMS. smallest álAINING Moving from one program or program module to another without operator intervention. COMMAND ACTION Those comands operator during with the program CONMAND GROUP The sections invoked action. when The or controls used/invoked by the user or The soft keystroke commands data entry. set SETSCREE.COM. enter or report configuration which are a corresponding cotmand operator performs operator key strokes are set with the SETSCREEN of an the program. Copyright (c) 1984 Data Access Corporation 06/08/84 t F-36 2.0 DataF\ex GLOSSARY User's Manual ——————— ——— —————— — COMMAND LINE An expression from typically MENU by these in can (DOS), the operating system are issued Usually these DataF1ex In DataFlex 2.0 applicatfon. from configuration comnand lines. string executable the CP/M prompt a completed be executed by A>. CON: which designation of the output port of the computer comunicates with the systanG console, or screen. Customary CONFIGURATION A logical programs CONFIGURATOR Person and values whicM connands to perform a task (see Configurations are to DataFlex what computer languages. to traditional asssembly executi Application upon are who writes DataF1ex of on, cause above) . DataF1ex conf igurations. DataF1ex DAC Corporati Access Data on, the publi sher of DataFlex. DATA real world information contained in the files of the Usua11y the smallest unit is a field Crf a record in Data formatted a file. is usually stored as one of two typesg word DBMSq$ deal and unf ormatted. in formatted data. whereas example) deal unformatted data. in (for processors The Database. DATA DICTIONARY in a catalog of all data elements defínitiom format, and source. In Definitions co]1ectively. A DATA (OSO) STRUCTURE DIAGRAM The logical structure relationships DATA TYPES In of the DataFlex, four data nUmericp a)phanumeric» of the files database and their giving their the File database DataF1exp the showing design data. types are recognized. fnteger and date. They are DATABASE data that can computerized collection of stored operat1ona7 The app) ications. needs users multiple of the or serve make up an app1icat1on in DataFlex. In collective files that the two forms are referred to with the same term. this manuab between Some authors mean other things and make a distinction A them. DBMS Data Stand Base arid Traditionally Higher level language System. Management alone; (2) classes: sub-set. two "===================.========————————————~———~—————————— Access (C) 1984 Data Corporation Copyright (l) —————— 06/08/84 F-37 GLOSSARY Manual User's 2.0 DataFlex ="======== ~~~—————— EDITOR handles unformatted data which is typically A text program. file handler. A word or processor incorporates a powerful EDITOR. which A program document a source ELEMENT by a data smallest discrete unit of data handled In a mailing 1istp for example, a data systan. Also referred to might be first name? or ZIP code. The management element as "field". ERGONOMICS The for study or human use science of human such as chairs factors and of devices design in the computer moni tors. " EXTENSION part of the directory file to 3 characters)» often used See ROOTNAME and FILE function. extensions are used for specific That .DAT = Data = Index .Kn ,FD file file = File definition program = Compiled ,FLX .FRM .TAG (n=#) file to the right of the dot to classify files by type or below. In DataF1exp name (up meanings: = Source .CFG .RPT = Database = System = Source for data entry field names information fije code for repQrts code FIELD sub-unit of a database called "data element". A record. The information unit. Also FILE basic unit of information stored on a disk drive which can Each by a computer's operating system. file on a ROOTNAME and EXTENSION) name (see disk drive has a unique and by users which in the is found both by the computer The source operating system's directory of files on a drive. code for a configuration is typically contained in a FILEg as Database version is contained in another FILE. its compiled data is contained in another FILEp and index data for that FILE is contained in yet another FILE. The found be INDEX A table containing orderM information on records or and their locations. in a database data elements INDEX FILE a B+ DataF1ex, In data the file data in order ISAM by file a key containing information about a of selected data ehments within file. ISAM Sequential Access Method. data sequential with file whose primary key values. Indexed a Copyright (C) 1984 Data Access Corporation An access contents method are ordered associated by ~~ 06/08/84 DataFlex GLOSSARY F-38 2.0 User's Manual ———————— ——— JULIAN DATE A numeric by DataFlex to conversion of dates used internally rapid9 accurate calculations of dates and calendar time Intervals. It is a form of the number that represents date is the number of days from the year Zero to whatever method The original processed. being was developed in the and contrary to popular Sca1igem by Joseph 16th Century assumptionp its name derives from Scaliger's father? Ju1ius? and not from Julius Caesar or another calendar named after9 facilitate decreed and him. by, KEY field or portions of that records in a database. The LOGGED-IN LOGICAL DEVICE The default and programs used to uniquely identify device that the operating A: (typically logical data record a system load wilt ). from DEVICE A peripheral oUtPutg by or data inputp the convention of one or storage device addressed three letters and a colon. Ccmmon examples: B: The CON: LST: The The "B" floppy or hard or screen RDR: The listing punched PUN: The paper disk drive conso1ep devicep or printer tape or card reader tape or card punch LST: Customary communicates / MENU MENUDEF.FLX MENUDEF in menus, which program an interactive creates prompts query to the operator, and issues MENUDEF is systan and DataFlex comands. DataFlex is issues itself operating entirely menu-driven. DIS SYSTEM) (OPERATING The disk operating ONLINE which designation of the output port of the computer LiST drive, or printer. with the systemG systm UPDATE Updating information operator input. (DOS). in the files/database at the time of QUERY information from function of searching for and retrieving based on criteria according to operator-specified In DataF1exg logical operators such as less than or equal to. which be (QIJERY.COM) can program a user friendly interactive used to generate reports and report configurations. The a database RECORD A Copyright sub-unit of (C) 1984 Data a data Access file, in turn divided into fields. Corporation 06/08/84 DataFlex 2.0 User's GLOSSARY Manual F-39 / A RELATIONSHIPS logical the RELATE records of one data file to the records in one or more pairs of fields contain IDENTICAL data in both files. In DataFlex relations are Refer to the File defined using the FILEDEF program. Definition section of this manual. another by having ROOTNAME That part of the directory file name to the left of the dot (up to 8 charactersL typically entirely under the user's related "families" of files. discretion to use in identifying rootname a common identifies the various data In DataF1exp See files which together constitute a single database. EXTENSION and FILE above. SELECTION retrieving information operators for selectively Used base in combinatiom they can perform file. the function of ranging» (i.e. greater than x & less than y). The from 1oglca1 a data " SETSCREEN insta11atlon procedure required when installing Interactive DataFlex, by means of which DataFlex is provided with the specific sc'reen control codes for the computer or terminal on which DataFlex is to be run. An TPA That area of the computer's memory Transient Program Area. and data which after the DOS or is available to hold programs On B-bit CP/M and running. is loaded disk operating system requires a minimum of 52K of IPA, and LOOK systms, DataFlex for l6-bit systws. USER / OPERATOR The final user or operator of a designed A non-technical entry clerk. systm. computer Typically user. the data The posItion in which information (data) is displayed during ENTER or in a report. WINDOW screen Copyright (C) 1984 Data Access Corporation on the 06/08/84 F-40 GLOSSARY DataFlex 2.0 User's Manual — THIS PAGE Data ———————— Access Corporation ————————— Copyright (c) 1984 INTENTIONALLY LEFT BLANK 06/08184 F—41 _———_———=== ---------—---========== ==== --—-—---- TABLE OF ASCII ===== sÉ!!EéFáé= CODES ========== -----—---------—----—-—-----—CTRL HR - DECIMAL HEX l CHR DECIMAL HEX V 086 56 W 087 57 088 58 NR HEX l 043 2B l 044 2C l 045 2D I X DECIMAL ============= - —- --- r e NUL 000 00 l A SQH 001 Dl l El STX 002 02 l C ETX 003 03 l 046 2E l Y 089 59 D EDT 004 04 } / 047 2F l Z 090 5A E ENQ 005 05 l O 048 30 l 091 SB F ACK 006 06 l I 049 31 ; 092 5C G BEL 007 07 l 2 050 32 : [ \ ] H ElS 008 08 l 3 051 33 l " 094 + , . I HT 009 09 l 4 052 34 l J LF 010 DA l 5 053 35 l K VT OIl OB } 6 054 36 : L FF 012 DC l 7 055 37 l M CR 013 OD l 8 056 38 l N SO 014 DE l 9 057 39 O SI 015 OF l : 058 P OLE 016 10 : 059 Q DCl 017 R DC2 018 II l ; < 12 l S DC3 019 13 : _" 093 . 5D 5E 095 5F 096 60 a b 097 61 098 62 C d 099 63 l lOó 64 3A l e l 102 66 060 3C l f l0l 65 3E3 g 103 67 = 061 3D l h 104 68 > 062 3E : i 105 69 jk 106 6A 107 6B T DC4 020 14 l ? 063 3F l U NAK 021 15 l e 064 40 l V SYN 022 16 l A 065 41 l l 108 6C W ETB 023 17 l B 066 42 : m 109 6D X CAN 024 18 l C 067 43 l n 110 6E Y EM 025 19 l D 068 44 l o Z SUB 026 IA l E 069 45 : P Ill 6F [ ESC 027 IB l F 070 46 : q 113 71 \ FS 028 lC l G 071 47 l r 114 72 ] GS 029 ID l H 072 48 l S 115 73 " RS 030 IE l I 073 49 l t 116 74 _ 112 70 US 031 IF l J 074 4A l u 117 75 SP 032 20 l K 075 4B l V 118 76 ! 033 21 l L 076 4C l W 119 77 " 034 22 l M 077 4D l X 120 78 # 035 23 : N 078 4E l y 121 79 S 036 24 l O 079 4F l 122 7A % 037 25 : P 080 50 l Z { 123 7B & 038 26 l Q 081 51 l l 124 7C ' 039 27 : R 122 52 ; } 125 7D ( 040 28 l S lZ3 53 l " 126 7E ) 041 29 l T 124 54 l DEL 127 7F * 042 2A l U 125 55 Copyright (C) 1984 Data ___,_______________________,________========= Access Corporation ============ 06/08/84 F-42 TABLE OF ASCII THIS DataFlex CODES PAGE — Copyright (C) 1984 Data Access LEFT INTENTIONALLY Corporati 2.0 User's Manual BLANK ——————————— on 06/08/84 F 43 —~———————~—————————————=====~—————=" —— —————— ====== ——————— INDEX ========== _________ ! Exclamation poiñt» # Pound sigm Macro $ Dollar sign ~ —— Macro command argument marker, ==== ========== """"" """""""""""""""""==="""."= marker» E-15 E-14 E-16 time variable identifier, question actuatorg B-55 Print format optiom D-7 Window formatting character7 B-18 Percent sigño Window formatting characterp Compile Menu system % & Ampersand FIELDINDEX WINDOWINDEX f drivem E-ll driver, E-ll Quotation mark delimiter, D-62 Data C-4 () Parentheses,, Expression eva1uatorp * Asterisk, Expression eva]uator9 C-4 C-4 eva1uatot"» + Plus, Expression Dash, Expression evaluatom C-4 -.BAD. Retndex option, B-42 Decimal point, Data window characterg B-16 . Screen terminating ctiaracterj B-2p B-l5» /* Slash / Data window charactem B-16 Expression evaluator, C-4 B-30 Pagename identifierí, C-32 Report section delimiter, O Zero, Window formatting charactem B-18 < Less than, Expression eva1uaton C-4 C-4 > Greater tham Expression eva1uator? e C-38 B-30 " file Window Data name suppressom C-58 formatting character9 B-18 Brackets. Indicatom D-19 [] Underscore, Command name characterg _{} Braces C-19 ENTRY Format option delimiting, Option de1imitingp D-6 l Bar, Symbol replacement identifier. - A D-61 E-20 - ABORT Comman6 Report ACCEPT, Access D-34 while Command, runningg B-18, C-43 D-l controL Systemp B-54 Addition - Expression, C-4 ALL Indicator conjoinem D-22 Ampersand FIELDINDEX driver, E-ll driver, E-ll Indicator conjoiner, D-22 WINDOWINDEX AND ——————— ——————————————— Data (C) 1984 Access Copyright Corporation 07/10/84 DataF1ex INDEX F-44 2.0 User's Manual D-22 ANY Indicator conjoiner, D-16 Command, APPEND, Application B-51 DataF1exg from earlier Creating, A-7g B-l Customizing, B-ll Structure9 C-87 Transporting, C-67 Conversion Argument C-l Filename, C-6 Indicator8 C-7 Types, C-l C1assesg Arguments E-15 commands, Macro F-4 Predefinedg ASCII Codes, F-41 Command, D-13 Data type, B-22 ASCII Data B-3p typep B-16 comparison, - Indicate D-53 ATTAQI, Command, D-22 AS Errors, AUTOFIND, EN7RY AUT0PAGEp Command, C-19 optfom C-2l, D-3 Format B+ ISAM, BACKFIELD, BACK B-24 Command, WINDOW, Symbol Barp BASIC, Data, BLOCKS Body, Body B - E-4 Flex-key, replacement B-LL identifier, A-37, B-37 E-20 D-61 Basic operations in DataF1exp Batch Executing DataF1ex file, D-35 BEGIN END, Command, D-3 BLANKFORM, Blank A-26 B-25 B-L, A-7p B-26 AUT0DEF9 A-l9p options, System Auto-return, A-5 from9 D-57 Command, suppress, Print AND LOOPS, RESIDENT section, format optiom Report REPORT Format option, Macro, C-33 C-32 option delimiting de1imiting» D-6 - Indicator defining, D-19 Brackets, C-34 Breakpoints, Subtotalling, BREAK Subtotal controller, C-34 D-43 Bright screen attribute, D-45 Buffer, Record, Bufferingp Index, D-47 Braces, ENTRY Braces Option D-7 D-35 =========_———— ———————————— Copyright (C) 1984 Data C-19 ——————— Access Corporation 07/10/84 2.0 DataFlex INDEX Manual User's C Cp Window formatting Command, C-14 CALC, CALCULATE Cotamañd» - B-18 character, C-14 B-37 A-23. F1ex-KeyD Capacities DataFlex, System, F-45 F-9 F-9 Capitalization B-30 in configurations. CAPSLOCK option. C-19 option, D-6 lock, Window formatting Upper and lower, B-30 ENTRY Format Caps Case, CHAIN, Format B-31L Command, Changing data. A-38 CX4ARACTER, Command, MECK, D-14 command, Macro B-18 D-32 formatting. Window Characters, option. B-18 E-18 CHECK= ENTRY option, Format C-19 D-6 option, Format CLEAR D-52 C-19 Command, F1ex-Keyp CLEARFORM, Command. D-3 CLEARSCREEN, Command, D-42 CLEARWARNING, Command. D-34 Command, D-41 CLEARXY, CLEAR ALL. F1ex-Keyg A-l9, Clear screen, CLEAR SPace CL0SE_INPUT. CLOSEJJUTPUT, CMDLINE, A-2% A-36, B-ll A-36. D-3 Flex-key. A-24, BACK, Command, Command, Command, D-17. B-36 D-62 D-62 D-32 Codes ASCII, F-41 Lead-in, A-28 Positioning9 Cursor, A-31 Terminal controb A-29, A-33 COM/CMD Comma Data Window files, A-34 D-62 delimiter. formatting character, Copyright (c) 1984 Data Access B-18 Corporation 06/08/84 C)ataF1ex INDEX F-46 Command D-34 ABORT, ACCEPT, B-l8, 2.0 User°s Manual ——— ——— ——————— D-l D-16 APPEND, D-13 ASCII, D-53 ATTACH, D-3 AUT0PAGEg C-21. BACKFIELD, E-4 END, D-35 BEGIN BLANKFORM, D-3 C-14 CALC, CALCULATE, C-14 B-33, D-32 CHAIM. CHARACTER, D-14 D-52 CLEAR, CLEARFORM, D-3 CLEARSCREEN, D-42 CLEARWARNING, D-34 CLEARXY, D-41 D-62 CLOSE INPUT, D-62 CLOSE OUTPUT, CMDLINE, D-17, COPYFILE. D-32 D-56 C-lO DATE, DEBUG, DELETE, D-33 D-52 E-8 mU1ti-user7 Under E-lO DESPOOL, D-56 DIRECTORY, DIRECT_INPUT, D-61 DIRECT_0UTPUT, D-62 D-2 DISPLAY, D-8 ENDGROUP, (WHILE), END D-37' E-4 ENTAGAIN, ENTDISPLAY, C-18 ENTER, ENTEREND, ENTERGROUP, D-8 C-26, C-22 D-8 ENTERMODE, E-4 ENTRY, C-19, D-8 Under ERASEFILL muÍti-userg E-8 D-55 ERROR, D-33 D-56 FILELIST, D-57 FILELIST NEXT. FILELIST PATHNAME, D-57 D-48 FIND, FORMAT, D-6 FORMFEECb C-43 FROM TO LOOP, FOR - GOSUB, GOTO, Copyright D-30 - D-37 D-29 (C) 1984 Data Access Corporation 06/08/84 DataF1ex User's 2.0 INDEX Manual F-47 """"""" = Command (continued) GOTOXY. D-41 HELP, E-5 IFCHANGE, INCREMENT, E-9 INDICATE, INDICATOR, D-22 INKEY, INPUT, INTEGER, C-L4 D-19 C-l2, D-43 D-40 C-ll D-42 KEYCHECK, KEYPROC, E-2 D-ll LEFT. LENGTH. D-15 B-30 Line length. LOCK, LOOP LOOP E-9 FROM TO), (FOR (REPEAT)» D-36 E-14 command, - Macro length. Maximum line MID. D-13 MOVE, D-37 C-21 C-13 C-13 C-13 MOVEINT, MOVENUM, C-13 MOVESTR, D-5 NAME, B-16, NUMBER, C-lO ON GOSUB, D-31 ON GOTO. D-30 OPEN, D-47 OUTCLOSE, OUTFILE, OUTPUT, PAD, D-4 D-4 B-16, PAGE, B-16, PAGEHECK. POS, D-5 D-lS D-l C-43 D-14 PRINT, READ, C-38, B-l8, READLN, D-64 REGISTRATION, D-58 RELATE, D-52 RENAME, REPEAT REPEAT D-55 LOOP, UNTIL, REREAD, E-9 REPORTEND. RUNPROGRAM, SAVE, D-51 C-24, (C) D-31 D-58 mu1tj-user9 SAVERECORD, Copyright D-36 D-35 C-33 RETURN, C-22, RIGHT, D-12 Under D-7 D-62 E-8 D-51 1984 Data Access Corporation 06/08/84 DataFlex INDEX F-48 2.0 User's Manual ——— Command (continued) SCREENMODE, D-43 SETa1ANGEg E-lO SHOW, D-39 SHOWLN, D-40 STRING, C-9 SUBTOTAL, C-38 SYSDATE, SYSTEM. D-58 D-57 D-16 TRIM, UNLOCK, E-9 (REPEAT), UNTIL UPPERCASE. D-17 D-35 WHILE END, D-37 - D-66 WRITE, WRITELN, D-67 ZEROFILE, D-54 Commands Configuratiom B-30 Input/Outputp ControK D-29 Creating new, E-13 Console Databasep D-45 DataF1exp B-19 C-9 Definition, Key, E-l List by groups, Modifying, E-13 E-7 Multl-ljser, Operating system, FLEX, D-39 F-6 A-34 B-33 Sequential Input/0utpUtp String manipulation. D-ll Structured Controb D-35 Syntaxg F-6 System, D-55 Commas, EmbeddecL D-61 B-18 Comparisom Modes D-25 IFJ Indicatorg D-21 DataFlex 2.0 Compatibility, to earlier versions, Compilation Compile time options, B-3ln D-3M E-20 Compile E-16 time variab1és» Condltionals in, E-17 Configuration, A-7, B-8» B-29, B-31 Error list, F-14 Files, F-31 Intermedicate code, E-20 Replacements with, E-14 Compiler, A-8 COMPILER Copyright ERROR MESSAGES, (C) 1984 Data B-51 F-13 Access Corporation 06/08/84 DataFlex User's 2.0 INDEX Manual —— Conditionalm CONDITIONAL Compile EXECUTION. E-17 D-19 D-20 Indicatorp Condition setting, Configuration Commands, time, F-49 B-30 Compilation, A-7, B-8, Creation, A-41. B-29 Errors, F-28 B-29, B-31 A-28 F1ex-KBys, Function keys, Multifile, READ, 8-44, A-28 C-69 B-46 E-14 iño Replacements Running, B-8, B-29,, B-33 Samples, C-69 B-29 file, Source TerminaL A-25 Terminatloñ» D-34 Transporting, C-67 Configurations Creatiom B-35 Editing, B-35 Errorm F-27 Configuration limitation, Conjoiners, Indicatom D-22 Console Input/Output, Commandm D-39 Constant Dateg C-6 Numeric, C-3 C-2 String, Control D-29 Commands, D-39 Screem EXECUTION CONTROLLING Conversiom COPYFILE, Copying. D-29 verslorm A-8ó B-51 D-56 Command, Files, D-56 Corruptiom Data, Creating record ENTER SEQUENCE, earlier DataFlex Sequence, F-23 C-27 Procedure, D-46 Creation, Configurations, B-35 Cursor Manipulatfon, A-37 Positioning, Codes, A-31 Customizing. Application, B-ll Copyright (c) _ 1984 Data ——————————— Access Corporation —— 06/08/84 F-50 DataF1ex INDEX " Dashp Window formatting Data BASIC, D-61 Conversion from earlier D-61 A-46, D-61 MailMerge, B-18 character, DataFlex, B-51 7anguages, B-21 Record9 Recovery9 D-61 B-44, Other F-22 Security9 B-54 Space requirementm Structurep B-18 Types, B-3, B-22 Window, D-l Window formatting, Database Commandsg B-25g B-22g B-18, C-58 D-6 D-45 B-259 D-56 File definition, A-42 File number. DATAFLEX - B-21 Exportingg D-61 Field, B-21 Importing, B-44, Indexing. B-23 Database Manual B-44 Elements,, FILES, User's F-23 Corruptiom DBASEII, D 2.0 files, C-47 Maximum UTILITIES, number of records, C-58 B-35 consistencyg Error59 delimiter ' Quotation mark9 O-62 Data F-28 Data Comma, D-62 Quotation Data DATA mark, D-62 Nameg element,, ENTRY, B-26 C-15 Data type B-22 ASCII, DATE, B-22, C-79 NUMERIC, B-22 Referencing characterp B-2 pointp B-16 . Decimal point, B-16 Diagonal, B-16 Slash, B-16 Data Data windows. B-16 window Decimal DATE Command. C-lO Constant, C-6 Data type9 B-3, Julian, C-79 Variable, Copyright (c) B-16. B-2Z, Data Access C-79 C-5 1984 Corporation 07/18/84 User's 2.0 DataFlex INDEX Manual F-51 Dates C-5 Calcuíat'lona, C~5 Euro-datep Julian, Other DBASEII, B-l6, C-5 centuries. B-l6. Data, B-22 B-44 D-33 DEBUG» Command, Debugging, WIth Decimal places compile time conditionals, option, C-19 option, D-6 pointp Data window character, ENTRY E-17 Format Format Decimal B-16 C-9 DATA ELEMENTS, C-9 Commands. F-35 Termm DECLARING Definitiom Definitiorm Definition of A-16 - operatcm terms DELETE D-52 Command, Under E-8 multi-user, C-64 Index9 Record, D-52 DELete CHARacter, DELete RECord, Flex-key, A-24, B-36 A-2b B-37 F1ex-Keyp Deleting file, C-66. Deleting record, B-43 D-55 C-28 ENTER Sequence, D-46 Procedure, DATABASES, DESIGNING DESPOOL, Chapter, E-lO Commanb Destructive backspace, B-21 A-29 D-61 Devices, Input/Output, Diagonal Data charactem B-16 B-30 identifien C-32 section delimiter. window Pagename Report A-lO System, Diagram, attributep Dim screen DIRECTORY, Command, DIRECT_INPUT, D-43' D-56 Command, DIRECT_0UTPUT, CONTROL DIRECT Command, OF DATA DIRECT CONTROL OF THE DIRECT INPUT D-61 Errors, F-24 Command, DISPLAYONLY, Division ENTRY D-l CONSOLE, AND OUTPUT, A-34 Disk drive, Disk limitation, DISPLAY, D-61 D-62 ENTRY, D-39 D-2 Format C-4 option, C-19 - Expression, ======= Copyright (c) ——————————————-————-—————— — 1984 Data Access Corporation 07/18/84 DataFlex INDEX F-52 2.0 User's Manual ————— Dollar sign E-16 Compile time variable identifiem Floating, B-18 Menu system question actuatorg B-55 Print format option, D-7 Window formatting characterp B-18 Down B-36 F1ex-Keyg Arrow, Duplicate Record, B-27, B-24, C-55 B-42, C-83 Records, ~ E Editingp A-38 Configurations, - B-35 Database, A-38 Menu, B-54 Record, A-38 Editing record ENTER Sequence, D-46 Procedure, C-27 A-7, B-l, Flex-Keyst B-35 Function keys, B-35 EDITOR, B-35 Element Mameg B-21 Datag B-21 Chapter, C-l ELEMENTS OF CONFIGURATIONS, command, E-17 ELSE, Macro Embedded, B-18 Commas, END$0F$REPORT, Predefined Predefined END.OF.REPORT, ENDCONAMD, Macro ENDGROUP, command9 Macro Ending session, command, C-43 E-17 A-38 D-37 Command, END (WHILE), ENT$PERMISSIVE, Predefined ENTAGAINp C-43 procedure? E-14 D-8 Command, ENDIF, procedure, indicator, C-28 E-4 Commarich ENTDISPLAY C-26. Command, Under ENTER Command, Macrog D-8 multi-user, E-8 C-18 C-15 of operation. C-27 Structure, C-17 Under multi-user, E-8 ENTER.CLEAR, User-Defined procedurm Sequence C-24 ENTER.DELETE User-Defined procedure, Under mu1tf-user> C-24 E-8 ENTER.EDIT, User-Oeffned procedure9 C-24 ENTER.EXIT, User-Oefined procedure, C-24 Copyright (C) 1984 Data Access Corporation 06/08/84 2.0 DataF1ex INDEX Manual User's F-53 ENTER.SAVE User-Defined procedureg Under mu1ti-usem E-8 C-22 Command, ENTEREND, ENTERGROUP D-8 Command, Macro, C-24 D-8 ENTERMODE, D-8 Command, ENTRY Command, C-19, Flex-keys. E-4 D-8 E-8 multi-user, Format optfons9 C-19 C-70 B-99 New record. A-38, Entry/Editing Terminatiom A-38 E-8 Under multi-user, Entry screem Image, A-20v B-l. C-19 ENTRY Section, ENTER Macro. Under B-15 EQ modé, Find D-48 D-25 mode, IF Comparison Indicator comparison ERASEFILE. ERR, modep Predefined indicator? Command, ERROR, D-21 D-55 Command, F-33 D-33 Errors B-26 AUTODEF, Compile timep B-31 Configuration, F-28 F-27 Configuration limitatiom Conversion, Earlier versions of Data consistencyg F-28 F-24 Disk limitation, Full disk, F-24 Media and Set uPg F-25 F-31 F-13 Error list Compilation. Runtime. B-52 F-22 Hardware, 1imitatiom Mu]tiuserg F-32 Operator, F-21 Memory Types, DataF1exp F-14 F-19 Error messages Clearing, D-34 Custom, Types, D-33. F-33 F-19 ESCape. Flex-key, A-l9, A-38, B-37 Euro-date optioñ» C-5 Exclamation point, Macro argument D-57 Exiting to operating system, Exporting, Data, D-61 Expressiom C-4 Expression evaluatiom Operators, Copyright (C) 1984 Data Access markem E-15 C-4 Corporation 06/08/84 F-54 DataFlex INDEX ~ Facilities of DataFlex, Diagram FALSE IF Result, D-24 FALSE Indicator conditiom D-19 Field B-27. Index, LengtM F ~ A-13 C-55 A-42b Name, B-26 C-54 C-55 numberp Record Relationships among, C-50 C-53 Specifications, Subtota11ing breakpoint, C-34 FIELDINDEX, Predefined variab1e9 E-ll FIELDINDEX AND WINDOWINDEX, Chapter, E-ll Field name, RECNUM, E-ll FILEDEF, A-9, C-47g D-45 Abort, C-67 earlier versions,, Converting datap DataFlex Create/Edit Fields, C-60 Create/Edft indexes, C-63 .DEF fi1e9 C-67 Create from definition C-66 image, from Create screen definition Erase Set B-51 file.C-56C-66 data Escaping Set Manual B-22 Overlapping, Save User's B-21 Data, Print 2.0 frQm,p C-65 file definition, C-67 deffnition/Exit, file inactive, C-66 parameters/namesp file Command, D-56 FILELIST» FILELIST NEXT, FILELIST PATHNAME, Filename Argumentg Command. C-66 D-57 Commanch D-57 C-6 Conventionsp F-3 C-58 Database. Extensionsg F-3 C-57 Rootnameg FILENUMBER, Predefined variable, D-57 Files *.CMD, B-42, D-58 *.C0M, D-58 *.DAT, A-6 *.DEFg C-67 *.BAD, B-43 *.FD, A-8, B-51 *.FLX, A-6, B-31 *.FRM, *.IC, *.Kx, *.PRN, *.RPTí *.TAG, B-27, B-51 E-20 A-CH A-8 B-39 B-51 A-6, C-61 _______~____~ Copyright (C) 1984 Data Access Corporation = 06/08/84 DataF1ex INDEX Manual User's 2.0 F-55 =========————————————— ——————————————————— =============—_————————————————————— .CÓM/CMD, A-34 AUTODEF.COM, B-l, COMP.COM, A-8, COMP.OVF, A-8 Compilation, Configuration, Copying, D-56 Created B-31 F-31 A-6 READ, by B-49 C-72 CUSTOMER.DAT, CUSTOMER.FRM, CVTFORM.COM, C-73 B-51 CVTFRM.COM, A-8 CVTRPT.COM, Other Datm A-8, B-51 D-61 languages, B-25? Database, B-25 E-21 COMMAND.DEF, D-56 Closing, D-62 C-47, C-72 Definition, Importing, B-44 Maximum number of records, Opening, A-27, C-58 D-61 Relationships among, C-48 DataFlex supplied, A-34, B-35 Names and types, F-3 Deleting, D-55 EDITOR.COM, A-7, B-I, B-35 FILEDEF.COM, A-9 A-5. FILELIST.CFG, FLEX.CFL, A-8, FLEX.COM, A-6 FLEXERRS.DAT, D-33, FLEXERRS.FLX, F-33 FMAC, D-39, D-56 E-13 F-33 E-13 A-9, FREL.COM, A-7, B-39 Intermediate COdeg INVOICE.FRM, INVT.DAT, E-20 C-87 C-83 E-7 Lockingg E-13 PACking, Macro, MENU.DAT, A-7 MENU.FLX, A-7 MENUDEF.FLX, B-53 PACK.COM, PEOPLE, Program, QLJERY.COM, A-41 B-44 READ.FLX, RUN.OVF, A-6 Runtimep Sample, F-31 A-36 SETSCREE.COM. SYSFILE, System, D-39 D-54 D-54 TERMLIST.CFG, VENDOR.DAT, Vendor E-13 A-9, B-2 A-34 A-5 C-78 master, A-36 =====————————————————— Copyright (c) 1984 Data Access Corporation 06/08/84 DataFlex 2.0 User's INDEX F-56 Manual —————————————— FILES AND C0MMANDSy ARGUMENTS Appendix, F-3 File definition F-27 Changing. C-47 Databaseg DEFINITION FILE C-47 (FILEDEFR File manipulatiom D-4(L D-55 A-42 File numbem Database, FILL=7 Print format option, D-7 FIND D-48 Command, A-20, Flex-key, A-37, A-36, B-lO, B-37 D-48 Mode, FINDERR, D-249 Predefined indicator, Finding, Index, D-48 Finding record, B-lO, C-70 D-49 D-46 Procedureg C-55 Speed, ENTRY FINDREQ, Reindex FLEX, option, Format C-19 B-42 option, Flex-key CLEAR, CLEAR BACK, RECord, DELete A-24, B-36 A-24, B-36 B-37 A-22, B-36 A-l9, A-38, Arrow9 ESCape. A-20. FIND, B-37 A-37, A-36, B-l0g B-37 E-I Function definition, A-23 HELP, INSert MARacter, Left arrow. A-24, NEXT B-37 A-jg, a-36. B-ll á4ARacter, DELete ' B-ll. B-37 C-19 all, SPace clear Down A-37, A-23, CALCu1até» A-32 printing, Assignments BACK WINDOW, RECord, A-24, B-36 B-36 A-37, A-22, B-lCh B-38 Predefined 1ndicatorY E-l PREVious RETURN, RECord, A-l9, Right arrow, A-22, A-37, B-35 B-lCh B-38 A-37, B-36 A-24. A-38. A-22. SAVE RECord. SUPERFINO, A-21, B-38 B-37 B-36 Up Arrow. B-37 USER, User-defined, Flex-keys A-24 Assignments printing. Configuration, A-28 Description, A-36 EDITOR, B-35 ENTERGROUP Summary9 When Macro, D-8 A-18 activep Copyright A-33 (C) F-33 1984 Data Access Corporation 06/08/84 2.0 User's FLEXERRS.DAT, D-33, FLEXERRS.FLXo F-33 DataFlex INDEX Manual F-33 Operating system command, Print format option, Floating, Dollar, B-18 B-33 FLEX D-7 FL0AT$, FMAC, A-9 ENTRY FORCEPUT, FORMAT, Command, F-57 optiom Format D-6 C-19 Formatting Image, Window, FORMATTING B-15 B-18 WITH Format options ENTRY, C-l9, B-18. Window, IMAGES, B-15 F-5 F-5 Command, C-43 FORMFEED, commands, Forms D-I TO LOOP, FOR FROM - - - FREL.COM, D-24, D-49 B-43 A-7 Full disk, Errors, F-24 F]ex-KeyD Function definition, Function keys Configuration, A-28 EDITOR. D-37 Command, Predefined indicator, B-39 FRee List program, Indications of need to usep A-7 FREe List uti)1ty, FOUND, E-l B-35 - G - GE Find IF D-48 mode, mode, Comparison Indicator comparison Getting started, A-33 GLOSSARY, mQdep D-21 F-35 GOSUB, Command, GOTO, Command, GOTOXY, D-25 D-30 D-29 D-41 Command, C-4 F-6 Greater tham Expression, Groupm GROUP Command Indicator (list), conjoiner, D-22 GT Find D-48 mode, mode, Comparison Indicator comparison IF D-25 modm = Copyright (C) 1984 Data Access D-21 """"""""" Corporation " """""""" 06/08/84 DataFlex INDEX F-58 H section. REPORT Height, Terminal, A-29 Header Macro. 2.0 User's Manual - C-32 HELP E-5 A-23 Command, Flex-key, E-5 Pagenamep B-19 HELP Option, PAGE, A-29, D-43 High intensity, HOW TO WRITE A CONFIGURATION, Chapter, % I B-29 _ IF D-25 Modes, E-17 Comparisom Macro Test, command, D-24 E-9 IFCHANGE, Command, E-18 IFCLASS, Macro command, E-18 Macro commanch IFDEF, command, E-18 IFSAMG Macro IFTYPE, IF command, Macro E-18 Result FALSE, TRUE» D-24 D-24 Image . Entry screen, From dBASE Formattingp B-I5. Report, B-L Image section Pages, ENTER A-20g II, B-15 B-L B-l5g C-66 B-45 B-30 B-15 C-18 Macrop REPORT Macro, Importing, Data, C-32 B-449 D-61 IN IF Comparison mode, comparison Indicator D-25 mode, D-21 command, E-16 Macro Command, C-14 INCREMENT, INCLUDEp Index BatcM B-39 Bufferlngg D-47 Delete, B-42, C-64 Fiekh B-279 C-55 Finding, D-48 Main, C-56 Multi-segment, Number, C-83 D-48 On-line, B-39 Sequential Indexed Access Metho6 B-24 ——————————— ' Copyright (C) 1984 Data Access Corporation 06/08/84 DataFlex User's 2.0 ' Manual INDEX —————————————————— Non-OataFlex B-39, C-71 Indexesp Index1ngp files, data B-47 F-59 — B-23 Data, A-37, B-24 Key, REPORT Macro, C-39 B-24, C-54 Segments, Space INDICATE7 C-55 requirementsp D-22 Commaríd, Indicator C-7 Argument, Command, D-19 C-12, Modes, D-21 Condition sett1n> Conjoiners, D-22 Predefined D-20 Comparisom FINDERR, D-49 FOUND. D-49 SELECT. C-38 Indlcatorm D-19 Conditions, D-19 Predefined. D-24. INKEY, INPUT. D-26, Command, D-43 Command, D-40 F-4 Input/Output. Devices, D-61 INSert MARacter, Flex-key, Installation DataF1ex, A-25 A-25 DATAFLEX, Command, C-ll INTEGER, Compilatiom Intermedicate codep In stringsg D-18 Julian, Dates, Key Commandm B-l6, E-20 - J - - K - C-5 E-l Indexing. A-37, B-24 Predefined indicatorj KEY.keyname, Command, KEYCHECK. KEYPRESS B-36 F-31 Program A-33 Termindk A-5. INSTALLING A-24g E"l D-42 Predefined indicator. D-24 E-2 KEYPROC, Command, Key procedures, E-2 ——— Copyright (C) 1984 Data Access Corporation 06/08/84 DataFlex INDEX F-60 2.0 User's Manual ——————————— ~ L " D-29 Labeb LASTERR, LASTIF, Predefined variab1ep Predefined ind1cator9 F-33 D-26 LE Find IF mode, D-48 Comparison mode, D-25 modep Indicator comparison Lead-in Codem A-28 LEFT, Command, D-ll F}ex-Key9 Left arrowg LENGTH Command, Field, A-24,, D-15 Record, B-22, C-58 tham Expression. Line 1ength9 Recorch Logged-in C-4 B-30 Command, E-9 Command, LOCK, Locking E-7 Fi1esg E-7 A-34 disk dr1ve9 Looping, Report, C-44 D-35 TO), (FOR FROM (REPEAT), Commancb LOOP LOOP A-29, Low intensity, LT modep D-48 Find IF B-36 B-22 Less Loops, D-21 Comparison modep comparison Indicator D-37 Command, D-36 D-43 D-25 mode, D-21 Macro C-15 ENTER, Sequence of operatiom Structurep C-17 C-27 C-31 C-31 Structure, Vs. - E-8 mU1t1-userp Under ENTERGROUP, D-8 Operations, E-13 REPORT. M E-15 sUbroutinep Macros Adding, Changing? A-9 Copyright (c) A-9 1984 Data Access Corporation 06/08/84 DataFlex 2.0 User's INDEX Manual ——————————— F-61 ————— Macro ccmmand CHECK, E-18 COMMAND, E-14 ELSE, E-17 ENDCOMMAND, E-17 ENDIF, E-14 l 7 IF g IFCLASS, E-18 IFDEF* E-18 IFSAME. E-18 IFTYPE, INCLUDE, E-18 E-16 REPLACE, E-14 SET, Macro E-16 # Pound marker, command A-46, D-61 MallMerge, Data. MANIPULATING DATA ELEMENTS, FILES, Chaptem MANIPULATING RECORDS, MANIPULATING STRINGS) MANIPULATING ManuaL Organization MATCH IF Comparison Indicator Maximumm Maximum Maximum MEMAVAIL, Memory* sigm Chapter, Chapterp E-14 C-13 D-55 D-45 Chapter, D-ll ob A-l D-25 modep comparison D-21 modm F-9 Specificatiorm line length. Commanch C-21 number of records, Database Predefined variable, F-25 Available, Determining, F-25 F-25 Requ1rementsp Memory 1imitat1om Errorm files. A-27o C-58 F-25 Menu A-35 Configuratiom Default, B-56 Masterg Sub-menu, A-34 B-56 MENU.FLX, A-35 Menu system, A-7, A-35. B-33 Menu creation and maintenance, D-13 MID, Command, sign on right, Find, D-48 Minus Mode, Modes9 Print B-53 format option, D-7 Comparison IF, D-25 Indicator, D-21 MODIFYING AND EXTENDING C-13 MOVE. Command, MOVEINT, Commandg DATAFLEX, Chapter. E-13 C-13 MOVENUM, MOVESTR. Command, C-13 Command, C-13 C-83 Multi-segment, Index, Copyright (C) 1984 Data Access Corporation 06/08/84 DataFlex INDEX F-62 2.0 User's Manual ————————— Multi-User E-7 Commandsg ENTER Méthod under, Macro E-8 E-7 of operation, C-59 Reread, E-8 Write privi1egeg MULTI-USER FUNCTI0NSg Chapter, Multi-ljser operation, E-7 Multi-User system option, A-27, Multiplicatiom Expre5sionr C-4 Mu1tiuser9 Errors. F-32 MULTIUSER, Predefined indicatorj E-7 E-7 D-24 " N ~ NAME Command, B-lS, D-5 Data e1ementg B-26 E1ement8 B-2L C-7 A-43. Field, B-26, C-7 D-5 Windows, NE " IF Comparison modep D-25 D-21 modeg Indicator comparison NEWPAGE, Predefined procedure, C-43 NEXT RECord, Flex-key, A-22, A-37g B-lCh NOENTER, ENTRY Format optiom C-19 E-20 NOISY O compile time optiom E-20 NOISY compile optiom time l E-20 NOISY 99 compile time optiom B-47 Non-OataF1ex data fi1es7 Indexes9 NOPUT, ENTRY Format option, C-19 B-38 NOT IF Test reversing, D-26 Indicator reversing9 D-19 Notational conventionsy A-2 NOT Indicator conjoiner, D-22 NUMBER Command, Indexg Record, C-lO D-48 A-38. B-2l. B-24 Numeric Constantp C-3 Data B-22 C-3 type. Variable, NUMERIC Data type, B-3, B-16 < Copyright (c) 1984 Data Access Corporation 06/08/84 DataF1ex User's 2.0 INDEX Manual F-63 ————— O - - D-31 ON GQSUB, Command, D-30 ON GOTO, Command, Command, D-47 OPEN, system A-34 Operating Commands, Exit to» D-57 F-9 Requirements, TUTORIAL, OPERATING A-33 Chapterv A-5 ORIENTATION, Chapter, GUIDE, Chapter, A-15 Operators, Expression evaluatiom Operator abort, REPORT MacroD C-43 Options OPERATIONAL OPERATOR'S tímep Compile C-4 B-31 Formatting. F-5 Window formattjngD B-18, Organization of data, B-21 ENTRY OF THIS ORGANIZATION OR Indicator OUTCLOSIZ, Chapter, A-l MANUAL. D-22 D-4 D-4 Command, Command, F-5 conjoiner, Command, OUTFILE, OUTPUT D-(Jp B-16, D-5 devices. D-4 Output destination, REPORT Output options, QUERY, A-45 Overlapping fields, C-54 To Macro, C-42 — P — Packing PACK PAD, macro utility, Command, files, E-13 A-9 D-15 PAGE B-lCj D-l Command, HELP Option, B-19 RESIDENT Option, B-19 PAGEBREAK, PAGEOECK, PAGEEND, PAGEFEED, C-43, Predefined indicator, Command, D-24 C-43 Predefined variab}eg Predefined variable, B-2, B-l5. B-30 C-41 C-41 PAGENAME, HELP, E-5 Slash. Identifier, 8-15. B-30 controb REPORT Macro, Parentheses, Expressiom C-4 Pagename Pages, Page B-30 Imagep Passwords, C-41 B-54 Configuration fi1eg PEOPLE Entry screen. B-2 Percent sigm Window formatting PEOPLE.FRM El-7 charactem —-——————————————————————————————— ——————— Copyright (C) 1984 Data Access Corporation C-38 06/08/84 F-64 DataFlex INDEX 2.0 User's Manual ——————— P0INTS= ENTRY option, Format C-19 Format option, D-6 D-14 P0S9 Command, A-31 Codesn Positioningp Cursoru C-27 Post-Entry sectiom ENTER Macro, Pound sigm Macro command marker, E-14 Pre-ENTER section, ENTER Macrog C-18 Predefined F-4 Arguments, Indicators, D-24, D-26. Variables, C-41, F-4 Predefined indicator ENT$PERMISSIVE. ERR, F-4 C-28 F-33 Flex-key,, E-l E-l KEY.keyname, D-26 LASTIFg PAGEBREAK. C-43 SEQEOF, SEQEOL. D-65 D-63. STATUS9 D-27 D-65 Predefined procedure END$0F$REPORT, C-43 C-43 END.OF.REPORT, NEWPAGE, C-43 Predefined variable FIELDINDEX, E-ll D-57 FILENUMBER, F-33 LASTERR, F-25 MEMAVAIL, PAGEEND, PAGEFEED, C-41 C-41 RECNUM, C-55 WINDOWINDEX, RECord, PREVious PRINT, Program Command, QUERY, E-ll Flex-key, B-l8. C-32, A-229 A-37, C-38, Chapter, B-l Run time, REPORT Prompting, Operator, - QUERYING THE REPORT Reindex Quotation markp Report Macro9 DATABASE. QLJERY Program, A-8 Questfonsp Operator QUOTED Q C-39 - A-41 Program A-6 Relation to QUIET, B-38 A-6 REINDEX, A-7 PROGRAMMING TUTORIAL, QtjERY9 B-JÁ9 D-7 runtimep optlom Data format, C-31 Chapterp A-41 Menu system B-55 B-42 delimiter, D-62 A-46 —————————————————————————————— ————————————— Copyright (C) 1984 Data Access Corporation ————————— — 06/08/84 DataFlex User's 2.0 INDEX Manual - R F-65 - RANGE= ENTRY D-6 B-43 option, of Re-use @áCéY READ Command, C-19 option. Format Format D-62 B-49 by, Files created Command, D-64 READLN, B-44 READ'Program, READ Report format, A-45 A-8 READ Utility. RECNUM Field nameg E-ll Predefined variab1ep C-55 Record D-45 Buffer, Dátáo B-21 Delete, D-52 Duplicate, Length, Locking. Number, B-24, B-27o B-22» E-7 C-58 A-38. B-2l.' C-55 B-24, C-51 C-55 Selection, Records C-83 Duplicate, Record number Field, C-55 Data9 F-22 Recovery, Command, REGISTRATION, D-58 Reindex Indications of need tOp B-39 In submit procedure, B-41 Program, A-7, B-39 RELATE Command, REPORT D-52 Database files, Subtotal section, Relationships among C-48 C-50 Field, RENAME, Commanch D-55 REPEAT LOOP, Command. D-36 UNTIL, Macro Command, commanch D-35 E-14 REPEAT REPLACE, C-35 - im Configuratiom with, Compilation, Replacements Replacements Copyright (C) 1984 Data Access E-14 E-14 Corporation 06/08/84 OataFlex INDEX F-66 2.0 User's Nlanua1 Repor"L Image, B-L B-15 C-44 LoQp1ngp C-31 Macro,, Reporting withoútv Structure. C-31 Multiple copies, C-44 C-45 A-43 Query9 Running total, C-38 Subtota17ing, C-34 Tota11ing, C-34 C-33 REPORTEND, Command. REPORTING AND OUTPUT, Chapter, REPORT Macro C-31 C-39 Indexíng$ Operator abort, C-43 Output destination, C-42 Page controb C-41 Relation to QUERY, C-31 Selection, C-38 REQUIRED, ENTRY Format Qption, Requiranents Memory, C-L9 F-25 F-9 System, TPA, F-25 REREAD E-9 Commamb C-59 Mujti-User, words, F-l WORDS OF DATAFLEX, Reserved RESERVED RESIDENT PAGE, Appendix, F-l Option B-19 C-33 Report, ENTRY RETAIN, Format ENTRY RETAINALL, optiom C-19 option, C-19 Format RETURN Commancb Flex-key. RIGHT» C-2b C-bC A-l9, A-37, Commañd» D-12 F1ex-Keyg Right arrow, Running, Configuratiom Running totañ REP0RT9 RUNPROGRANb Command, D-31 B-35 A-24, B-8» B-36 B-33 C-38 D-58 Runtime Error Files, list, F-31 RUNTIME ERRORS Runtime system. F-19 AND DIAGNOSIS, A-6. Appendix, F-19 B-33 ——————————————————————————————————————————————————————————— Access 1984 Data 07/18/84 Corporation Copyright (c) DataFlex 2.0 User's INDEX Manual and Sample conffgurations SAVE Command, D-51 REPORT datap C-69 C-35 Subtotal section, E-8 mu1t1-useí> Under SAVERECORD, Command, record. Flex-key, - C-69 Chapter, APPLICATIONS. SAMPLE S F-67 D-51 A-38 Save A-38, A-22, B-37 C-55 Speed, Scanning database, A-37 Screen, Control, D-39 D-43 SCREENMODE, Command, Data, SecUrjtyg B-54 Indexing. B-24, C-54 SELECT, Predefined jndicatorp Selection Segmentm QUERY, Recorch A-44 C-55 REPORT Macro, C-55 Speed, Semi-colon C-38 C-38 command line concatenatom B-30 Predefined indicator, D-24, D-65 SEQEOL, Predefined indicator, D-24, D-63, Sequential Input/0utputg Commands, D-61 SEQEOF, command, SET. Macro SETCHANGE, Command, SETSCREE.COM. A-25, A-25, SETSCREEn, up, Errors, SHOW, Command, Command, SHOWLN, Set " E-16 E-lO A-33. A-33, F-31 D-39 D-39 D-39 A-36, D-40 format option, D-7 Databasep Sizeg Increasing, C-58 SKIPFOUND, ENTRY Format option, Print SIGNRT, Slash Data window C-32 file Source Creation, READ. Space Data, C-19 B-16 character. B-30 Pagename identifier, Report section delimiter, Sort, QUERY, A-44 Spaces D-65 B-29 B-44 im D-18 requirements A-27, B-22» B-25» data, B-43 Indexing, C-55 Space suppression, Window C-58 Deleted formatting option, B-18 — Copyright (c) 1984 Data Access Corporation 06/08/84 2.0 DataF1ex INDEX F-68 User's Manual ——— ——— ———————— F-9 SPECIFICATIONS, F-9 DataFlex, C-53 Fie1ch F-9 Maximumsp Speed Save C-55 recordg Finding C-55 recordg Seiectiorg C-55 Predefined indicatorg STATUS, D-27 STRING C-9 Command, Constantj C-2 Variab]e9 C-2 Strings, D-18 String manipulation, Structure Application, C-87 Data, Commands, D-ll B-18 Commandm Structured Control, D-35 B-56 Sub-menus. Subheader section, REPORT Macrog C-32 from, fi1ep Executing DataF1ex Subroutine. D-29 SUBmit E-15 Vs. macrog Command, SUBTOTAL, D-57 C-38 Subtota11íng Breakpointsó C-34 Report, C-34 Subtotal section, REPORT Macrog C-32 Subtraction, Expressiom C-4 SUPERFINO, Flex-key, A-2l, B-38 SUPPRESS, Print format option, D-7 Symbol-checking characters, E-19 Symbols Classes, Types, Syñtáx> E-20 E-20 Command"~ SYSDATE, SYSFILE, Command, D-54 F-6 D-58 System Access control, Capacities, F-9 Command, B-54 D-57 D-55 Commandsg D-54 Fi1eSg F-9 Requirementm System checkout, A-33 options Auto-return, A-l99 A-26 Multi-User, A-279 E-7 System = ———————— Copyright (c) 1984 Data Access Corporation ' 06/08/84 DataFlex INDEX Manual User's 2.0 F-69 ~ T ~ OF ASCII TABLE CODES, TPA, TRUE C-32 F-25 Requirements, Transporting Application, Configuration, TRIM, TRUE, F-41 Appendix, Terminal Configuratiom A-25 Height, A-29 Insta11atioñ» A-5g A-25 Width, A-29 Terminals, Predefined, A-25 Terminal control COCiéSf A-29 Terminal A-29 in1tializat1on, Termination Configuration, D-34 A-38 Entry/Editíng, F-35 Termm Definitiorm Test, IF, D-24 Tota)1ing, Report, C-34 Totals, QUERY, A-44 Total section, REPORT Macro. Command, C-67 C-67 D-16 IF Result, D-24 Indicator condition, D-19 Types Data. B-22 B-3, - U UnderscoreD Command name UNLOCK, Command, E-9 charactem UNTIL D-35 C-19 (REPEAT), Command, database, A-38, Updating UPPERCASE D-61 0~17 Commancb ENTRY Format option, C-19 option, D-6 Up Arrow, Flex-key, B-36 USER, Flex-key, B-37 A-24 User-defined, F1ex-Keyp User-Defined procedure Format ENTER.CLEAR. C-24 ENTER.DELETE, C-24 E-8 mU1ti-userD Under ENTER.EDIT. C-24 ENTER.EXIT, C-24 ENTER.SAVE, C-24 Under muiti-userj USING FUNCTION KEYS, Utilities, DataF1exg Copyright E-8 Chapter, E-l B-35 F-33 (C) 1984 Data Access Corporation 06/08/84 DataFlex INDEX F-70 2.0 User's Manual ———————————— - y - - W - Validation ENTRY option, Format option, Format C-19 D-6 Variable C-5 Date, C-3 Numericg C-2 String, Variables, Predefined, C-4L END, WHILE Width, Command, Terminal, A-29 Window Datap F-4 D-37 D-l B-18 OPtiOnsg Format WINDOWINDEX, Predefined variab1e9 A-37, Windows, B-l, B-2, B-15 B-16 ASCII type7 DATE Name9 type, E-ll B-16 D-5 NUMERIC. B-16 typeg formatting Characterm B-18 Window B-LB. Data, D-6 B-l8, D-6 Window formatting character % Percent sign, C-38 Percent sigm C-38 Reserved, WorcL~ F-l OPtiOnSg WRITE, Command, WRITELNp D-66 Command, D-67 Multi-User, Write privilege, E-8 ~ Z _ Window Zero7 formatting charactem D-54 ZER0FILE9 Command, Window Zero formatting Qptfong Zero fi1L suppressg Copyright (C) Window 1984 Data formatting Access B-18 B-18 opt1org Corporation B-18 06/08/84 DataFlex 2.0 User's . OPEN MANIPULATING Manual RECORDS D-47 — _ Command OPEN command makes all database files associated with a file "df_fi1ename" (data and key files) available for DataFlex operations. (See for information on df_fi1ename). the FILEDEF documentation SpecÍfica11yg when a file is OPENed, the referenced data fi1e9 and all buffer space is automatica11y associated key index files are openedg allocated in memory» and upon completion of the OPEN operation, all files are available for on-line processing. An OPEN and be executed must by be addressed can be at the beginning of the configuration before the files associated with the df_fi1ename other commands. should command(s) The FORMAT: OPEN f'ile_name_arg {fndex.n} Where OPEN is the command, "fi1e_name_arg" is the "SHORT NAME" of the to be OPENed, and (created in FILEDEF) be represents the number of an index that may optimally file loaded into records in a memory a "buffer" to speed sequential access n to file. EXAMPLE: OPEN inventory OPEN personnel index.2 above, the "index.2" option after the In the second example df_fi1ename "personnel" elects to load the second index for that database file into a memory buffer. when optional index buffering only provides a speed improvement Random the access to records is sequential, as in a report. operations, such as transaction entry to non-sequential records, will not benefit from buffering. The usefulness of the index buffering option is, as with most other The number of the index is established options, subject to tradeoffs. as previously created in the FILEDEF funcin the index definitions record locations required by FIND tion. If the option is se1ectedp and other accessing operations are read directly from the computer's active m«nory (RAM) rather than via a separate (slower) disk access and file-read operation. The tradeoff when using record buffering is the sacrifice of a portion of the computer's RAM that is consumed by this process. The overall number of files openéd» RAM capacity of size of your configuration, determines how much RAM is available and so on, computerp your over and above what basic is required to carry out the application's the index-buffering option is functionm and will dictate whether worthwh11e9 or even possible. The ———— Copyright (c) 1984 Data Access Corporation 05/16/84 PLEASE READ THIS BEFORE BREAKING THE SEAL ON THE DISKETTE ENVELOPE DataFlex Registration: What, Why and How marks which permanently Registration is an easy, simple procedure your copy of also documents company's. that you have rights It DataFlex as exclusively yours or your DataFlex When you start the enclosed software, it will display the to use DataFlex. legend side of this document. shown the reverse on "TEMPORARY REGISTRATION" display is also illustrated on sign-on This the chosen After registration, will name. your the reverse side of this document. First the returned License and Agreement" be signed attached must "Limited Use Software register license We Data Access to cannot without this Corporation. your The Agreement describes and do Agreement. with your DataFlex may not what you may and its documentation. software If the terms the envelope back to your of the agreement containing the dealer and to you, are unacceptable disks. Take the envelope, request a refund. DO NOT BREAK THE SEAL on and these papers documentation, If, sign and date the Agreement. as we hope, all is agreeable, Turn it over and referring to the instructions on the back of this page, carefully out the "Registration Request". After you have done this, you may want to make and keep a copy of the Registration Request and License When everything is complete, Agreement place for your records. Agreement only the Registration Request/License in the provided return envelope and mail it back to us. We will get back to you with your registration code. fill If both out, With for have have they the will Registration be returned Request to you and the License processing without Agreement your are not completely request. filled registration these papers, each single-key is an appliqué There you will also find a sheet of keycap appliqués. command (Fiex-Key) in DataFlex as well as some others. After you handy installed DataFlex, you will find these appliqués for marking the keys you selected (with the SETSCREE program) for each of these functions. Please turn this page over for registration instructions. How to fill out the Registration Request Registration Request on the registered. your copy of DataFlex the license to or individual) of The name tion are up to you. can not be changed If next page is the way you tell us in what name you W31lt The registered be the owner (a company name should DataFlex. Capitalization and punctuation of the use these factors are important to you, be very careful. A registrais done. once it Please be careful to also enter the correct address. We have to mail your registration is used to mail product update code back to you. In addition, your registered address notices, technical bulletins and similar material to you. After you on with a have screen run SETSCREE similar to the install DataFlex to one shown drive=a: default OS: (name of your operating This program licensed to: Number: S«iaí 2.1/ DataFlex Copyright (C) 1984, All rights reserved If your and you sign-on may in acquiring a Data on below. your system, DataFlex will sign system) TEMPORARY REGISTRATXON #### (your seria! number) Corporatioü, Miami Florida Access *DEMO VERSION*, registration procedure. full-function DataFlex license. displays ignore the company Your name dealer registration does will be happy to not apply tíssist you When we receive your filled out Registration Request, we will use the exact name you entered This will enable you to replace on the top line to generate a unique access code. the DataFiex TEMPORARY REGISTRATION sign-on with the name from your Regiscomplete You will receive tration Request. instructions for installing your registration had requested code number. with registration for "ACME Manufacturyou name your and and system operating CP/M was ing" your serial number was 25897, after your installation your sign-on would look like the following. If drive=a: default os: cp/m single user This program licensed to: Number: Serial DataFlex Copyright (C) 1984, All rights reserved. ACME 25897 Manufacturing 2.1/ Data Access Corporation, Miami Florida DataFlex Registration Request THE EXACT "REGISTRATION ENTER j LJÁ_I_LJ_LJ_J-J_J l l I l I l ! ! l ! I I l BELOW: BOXES IN THE NAME" i I I I l l ! i ! ! l i I I ! (letter, space, comma, etc.) in each box. Any character that you only one character is allowed. Do not exceed the number keyboard of boxes provided type on your can be used, but each letter lower and blank). Upper boxes (leave may letters case excess For clarity, please place an "X" beneath any letter must be distinctly one or the other. lower is be to case. that Place diskettes. number The DataFlex serial master can be found on your DataFlex license type is Full Development you have both a Runtime and a Development you have only the Runtime disk. It is Runtime if if Please License NOTE: We your DataFlex enter Type: Demo will enter Full licenses your serial Development do not receive access code System DataFlex Purchased Your Name Your Company disk. here: License your dealer. Runtime License Access Codes - contact here: (leave the following Please complete Computer Manufacturer Model Operating number Your information about your system: Serial # 8-Bit Rev. blank) 16-Bit or From Addressl Address2 City State/Prov Zip/Postai Country Phone is: Single My computer For Floppy Disk what applications do you Multi-user Hard Disk User plan Telex # Terminals to use DataFlex? you using DataFlex in your own business? Developing applications for another business? Do you use an outside consultant/programmer? Are Code (Y/N) (Y/N) (Y/N) PLEASE FORM TO DATA ACCESS RETURN THE COMPLETED CORPORATION. A COPY OF IT, WITH YOUR ACCESS CODE, BE WILL RETURNED TO YOU UPON OF LICENSE. PLEASE BE VERIFICATION YOUR CERTAIN TO COMPLETE THE ON SIDE. REMEMBER, DEMO LICENSES DO NOT AGREEMENT THE OTHER RECEIVE AN ACCESS CODE. Limited Use Software License Agreement a Corporation (DAC), Florida, USA corporation, does hereby grant to license personal, to use the following non-transferable, and non-exclusive computer software programs (singularly or collectively referred to as "software") under the following terms and conditions. Data Access LICENSEE DataFlex DataFlex 2.i Software: Solely a for Serial Number: use on Computer , separate Limited Use Software License Agreement must be executed for each software product licensed.) (A and Serial # DataFlex Registration Request The software is furnished to LICENSEE for use on the single computer specified l. LICENSEE above and may be used only on that computer. and LICENSEE'S employees and agents and will not distribute or will protect the confidentiality of the Software otherwise make available the Software or documentation, or any portion thereof, in any form to any third party. Title to and ownership of the Software and the documentation shall at all times remain in DAC. warranties with respect to the Software are made by DAC. DAC DOES NOT WARRANT THAT THE SOFTWARE WILL MEET SPECIFIC REQUIREMENTS OF LICENSEE. DAC SPECIFICALLY DISCLAIMS ANY WARRANTIES OF MERFOR OR FITNESS A PARTICULAR PURPOSE. CHANTABILITY DAC SPECIFIDENIES FOR OR CALLY ANY LIABILITY INCIDENTAL CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OF THE SOFTWARE. 2. No Éicezse gr: znted h.erezmder, and the SQftw2re, mzy not be LICENSEE the the consent prior without written or transferred of DAC the instaÉIation except location upon notice to DAC and may change that LICENSEE dealer. Nc) right to reproduce in whole or in part, is granted or copy any documentation, LICENSEE. to 3. Thií: (ígIee=.e2t, assigned the by LICENSEE acknowledges that it is receiving only a limited license to use the related and that DAC retains and documentation Software title to ail Software and LICENSEE acknowledges has &cumentation. that DAC a valuable proprietary interest and in the Software and documentation that unauthorized disclosure, transfer, or copying of the Software is a violation of Federal law. 4. LICENSEE Name Authorized Signature Signets typed or printed ' name Date . D . . m m m Back Space Back Window Help! Supe'"nd :": f"2 -q—— Print Screen Cursor 4;; d'Z'h""' Calculate 4i·-l4: Delete Record Cursor Left " 1 f.7 : Cursor Pad Flex-keys"" Function Pad Flex-keys'" f"1 ^ 0 f-8 Cursor Down End Up t¢tU·|"ev'ousReco'd "3 2 l PgDn i Clear Window DataFlex is a Registered f"9 Trademark, f·1o and Flex-key g" Save Record is a Trademark of Data Access Insert Character Corporation. ¿j Cursor Right Next Record Delete Character

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.4
Linearized                      : No
Has XFA                         : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19
Modify Date                     : 2016:06:21 10:21:21-07:00
Create Date                     : 2016:06:21 10:21:21-07:00
Metadata Date                   : 2016:06:21 10:21:21-07:00
Format                          : application/pdf
Document ID                     : uuid:608feca0-0fd2-914a-8211-419c320c3205
Instance ID                     : uuid:9575b216-66bc-2a42-85bb-b5f4aa3695e5
Page Layout                     : SinglePage
Page Count                      : 366
EXIF Metadata provided by EXIF.tools

Navigation menu