Data Flex_V2_Jul1984 Flex V2 Jul1984
DataFlex_V2_Jul1984 DataFlex_V2_Jul1984
User Manual: DataFlex_V2_Jul1984
Open the PDF directly: View PDF
.
Page Count: 366 [warning: Documents this large are best viewed by clicking the View PDF Link!]

DataF I eX
Version 2.0
Appllcatfon Development Software System
Copyright ,c) 1983. 1984 Data Access Corporation
DATA ACCESS CORPORATION
8525 SW 129 1"ermce
Miamb Florida 33156
USA
Manual Revision Date; 07/18/84

COPYRIGHT NOTICE
DataF1ex is copyrighted (C) 1981. l982p and 1983 by Data Access
Corporation. All rights under this copyright are reserved worldwide.
DataF1ex, including this manuañ which is an integral part of
DataFlex, may not be reproduced, transmjttedg stored in any manner in
aretrieval system in any form or through any means, e1ectrica17
mechanica'L opticab manual or otherwise without the express written
permission of Data Access Corporatiom 8525 SW 129 Terraceg MiamL FL
33156, USA.
DISCLAIMER
Data Access Corporation makes no representations or warrantiesn
express or implied, With respect to DataFlex, this manuab or any Data
Access Corporation productg including but not limited to warranties of
merchantability or fitness for aparticular purpose.
Data Access Corporation reserves unto itself the right to make
periodic changes, enhancements, revisions and alteration of any kind
to DataFlex and/or its manual without obligation to notify any person,
institution or organization of such changes, enhancements, revisions
and alterations to the product.
TRADEMARKS
DataFlex and Flex-keys are trademarks of Data Access Corporation.
The trademarks and registered trademarks of other companies are
referred to at various points throughout this manual, annotated with
an asterfsk (*). The owners of the trademarks are listed below:
MBASIC Microsoft
CBASIC Digital Research
CP/M Digital Research
MP/M Digital Research
WordStar MicroPro International
MailMerge MicroPro International
Pasca1/MT+ Digital Research
dBASE II Ashton-Tate, Inc.
PC-DOS International Business Machines
IBM International Business Machines
MS-DOS Microsoft

ACOMPLETE, UPDATED MANUAL WILL BE YOURS . . .
If we use a correction or Improvement to this manual which you submit
to us.
We're continually improving our manual to make the power of DataF1ex
easier to get to for the new user. User feedback is the chief source
of corrections and improvements to the manual. The Disclaimer on the
preceding page says that we aren't obligated to provide you with
updates to DataF1ex or its manual. but if we use a correction or
improvement you send us, we'll send you acopy of the edition of the
manual which contains your update(sL subject to the following: (a)
If we receive the same suggestion from several sources. only the first
person submitting the correction/improvement gets a new manual; and
(b) If we use two or more of your suggestions in one new edition of
our manual, you still only get one manual (multiple suggestions still
increase your chances of being first on at least one of the sugges-
tions). Data Access Corporation's decision in these matters is final.
Anew manual does not include a new binder (the old one is re-usable).
Herds How:
Just fill out the form on the opposite side of this page indicating
what your suggestion is. If you have multiple suggestions. please
make copies of the form. Please make your namep address, and phone
clear so that we can get back to you if you win a new manuaK Send
the suggestion(s) to:
DOCUMENTATION
Data Access Corporation
8525 SW 129 Terrace
Miami, Florida 33156
...and we'll get back to you if yours is awinner! Either wayy thanks
for helping us help others to get more of the power of DataFlex.

SUGGESTION
For Improvement of the Dataf1ex Version 2.0 User's Manual
From: Submitted:
Name Date
Address Phone (A/C)
Address
City State/Prov. Zip
Country Page Height: in. xWidth: inches
Revision Date of Manual: Page Number(s):
TYPE OF SUGGESTION:
_Correction of wrong information
Addition of missing information
C1aFification/Improvement of existing example
Addition of new example
DETAILS:
Isubmit the above suggestion to Data Access Corporation with full
permission to make any use of it may wish tO9 wIth the understanding
that compensation to me for ito if any9 will be completely at the
discretion of Data Acce9s Corporation. Iassume no liability for its
completeness or accuracy.
Signature DataF1ex Serial Number

—
—— ————— "=""""""'""""
~...
==== TABLE OF CONTENTS =,..'===
———-— —
======———"="="—="=====""""""""""" ~ ~ —.
'u'" SECTION A: OPERATION AND ORIENTATION m'*
ORGANIZATION OF THIS MANUAL ... . . . . . . . . . . . . . A-l
Sequence of Presentation. .... . ... . . . . . . . . A-l
Notational Conventions. .. . .. . . . . ..... . . . A-2
OPERATIONAL ORIENTATION .. . . ..... . .. . . . . . . A-5
Installation. .. . . . . . .. . . . . . .. . . . . . . A-5
Runtime System. . . . . . . ......... . . . . . . A-6
Application Development . . .. . . . . . .. . . . . . . A-7
System Diagram. . . . . . . . . . . . . . .. . . . . . .A-lO
Facilities of DataFlex Diagram. ........ . . . . . A-13
OPERATOR'S GUIDE. .. . . . . . . . . . ..... . . . . . A-15
Definition of Terms -Operator. .. . . . ........A-16
How to Begin. ,. . . . . . .. . . . ........ . . A-17
Flex-key Summary. ..... . . . . . . . . . . . . . . . A-18
Keyboard Command Explanations . . . . . . . . . . . . . . A-19
INSTALLING DATAFLEX . . ..... . . . ........ . . A-25
OPERATING TUTORIAL. . . . . . . .. . . . . .. . . . . . .A-33
QUERYING THE DATABASE . . . . .. . . . . . .. . . . . . . A-41
Program Start-ljp. . . . .. . . . . . . . . . . . . ... A-41
Program Operation . . . . . .. . . . . . . . . . . . . . A-43
Making Selections ..... . . . . . . . . .. . . . . . A-44
Choosing an Output Sequence . . . . . . . . . . . . . . . A-44
Using QUERY to Generate aReport Configuration. .. . . . A-45
*** SECTION B: STARTING WITH DATAFLEX 'h'*
PROGRAMMING TUTORÍAL. .. . . . . . . ... . . . . . . . . B-l
FORMATTING WITH IMAGES. . . . . . . . . . . ...... . . B-15
Image "Pages" .. , . . . . ....... . . . ... . . B-15
Images in DataFlex Configuration Files. . . . . . . . ..B-19
DESIGNING DATABASES . . ..... . . . . . . . . . . . . .B-21
Organization of Data. .. . . . . . . . . . . . . . . . . B-21
Data Types. . . ... . . . . . . . . . . . . . . .. . . B-22
Indexing in Applications. ... . . . . . .. . . . . . . B-23
AUTODEF Program . . . . . . . . . . . . . . .. . .. . . B-25
HOW TO WRITE A CONFIGURATION. .... . . . .. . . . . . . B-29
Creating the Source File. .... . . . . . . . . . . . . B-29
How to Compile aConfiguration. .. . . . .. . . . . . . B-31
How to Run aConfiguration. . . . . . . . . . . . .. . . B-33
DATAFLEX UTILITIES. . . . . . . . . . . . . ... . . . . . B-35
Editor. ......... . .... . . . . . . . . ,..B-35
Reindex .... . . . . . . . .. . . . . . . . . . . . .B-39
Free List (FREL). . . . . . . . . . . . . ..... . . .B-43
Read. . . . . . . . . .......... . .. . . . . . B-44
How to Convert dBASE II Files to DataFlex . . . . . . . . B-44
DataFlex 1.6X to 2.0 Conversion . . . . .. . . . ....B-51
Menu Creation and Maintenance (MENUDEF) . . .. . . ... B-53
—
Copyright (C) 1984 Data Access Corporation 05/16/84

ii TABLE OF CONTENTS DataF1ex 2.0 User's Manual
*H SECTION C: PRE-PROGRAMMED FACILITIES ***
ELEMENTS OF CONFIGURATIONS. .... . . . . . . . . . . . . C-l
String Constants. . . . . . . . . . . .. . . . .. . . .C-2
String Variables. . . . . . . . . O . . . . . . . . . . . C-2
Numeric Constants .... Q . . . . . . . . . . .. . . .C"3
Numeric Variables . . . . q . . . $ 0 ...... . . ..C-3
Expressions ........P... . . Q . . e .. « . .C~4
Date Variables. ......O.e ¢ O . . . . . . . . . .C~5
Date Constants. ..... . O .O O Q . ..... . . . . C-6
Filenames ........ P . Q . . . . . . . . .. . . .C~6
Indicators. . 0 . 0 . , * O O . O 0 . . . . . . . . . . . C—7
DECLARING DATA ELEMENTS .. . . . .. . . . . . . . . . . .C-9
STRING Command. .....0J . . Q .. . . . . e . . ..C-9
NUMBER Command. ..... . . . . . . ...... . . . .C-lO
DATE Command, ...,,O . . O . Q e . . . . .. . . . . C-lO
INTEGER Command . . . . . . Q . . . . . . . . . ....,C-ll
INDICATOR Command ...... . . . . . ..... . . . . C-12
MANIPULATING DATA ELEMENTS. . . . . . . . ... . . . . . .C-13
MOVE Command. . . . . . . 3 . . . . . . . . . .. . . . .C-13
INCREMENT Comnand . . , O . . O g . . .. . . . .....C-14
CALCULATE Command ..,..... . . . . . . . . . . . . C-14
DATA ENTRY. . . . . . . . . . . . 0 . . . .........C-15
ENTER Command Macro ... . . a . . . . . . . . . . . . .C-15
Structure of an ENTER Configuration O.. . . . .. . . .C-17
Images in ENTER . . . . . . . . . e , , U . . . . . . . .C-18
ENTRY Command .....Q . 3 D. P . H. . .. . . . . . C-19
ENTRY Format Options. .. . . . ,, . . O . . . . ....0C-19
ENTRY and AUTOPAGE. ..P9 e .g U ... . . . . . . . .C-21
User-Oefined Procedures of ENTER. . . . . . . . . . . . .C-24
ENTDISPLAY Command. ....... . .O . . . . . . . . .C-26
ENTER Sequence of Operation . . . . U . . . . . .....C-27
ENT$PERMISSIVE Indicator. .... . . . . . . . . . . . .C-28
REPORTING AND OUTPUT. .... . Q . 0 . . ..... . . . .C-31
The REPORT Command Macro. .... O O .. . . . . . . . . C-31
Sections of REPORT. ...0... . . . . . . . .. . . .C-31
Subtota11ing and Tota11ing. . . . Q O . . . . . . . . . . C-34
Selective Reporting ... O 0 e 3. . . . . O . . . . . . C"38
Page Control. . , . . . .Q,,O O @ . . . . . . . . . . C"41
Things to Remember About the REPORT Macro .... . . ..C-45
,~
Copyright (c) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual TABLE OF CONTENTS iii
———————————————————— ———
SECTION C (continued)
FILE DEFINITION (FILEDEF) .. . . . . . . . . . . . . . . .C-47
Step One -Plan the Relationships Among the Files . . . . C-48
How to Create Related Fields. . . . . . . . . . . . . . . C-50
Step Two -List the Fields. . . . . . . . . . . . . . . .C-53
Overlapping Fields. . . . . ... . . . . . . . . .. . . C-54
Step Three -Determine the Key Fields ....... . . . C-55
Step Four -Use FILEDEF to Put It Ali Together. . . . . .C-56
Creating/Edlting Fields . . . . . . . . . . . . .. . ..C-60
Creating/Edlting Indexes. .... . . . . . . . . . . . . C-63
Print File Definition ..... . . . . . . . . . .... C-65
Set Fi7e Parameters/Names . . .. . . .. . . . . . . . . C-66
Erase Data File ... . . . ........ . . . . . . . C-66
Set File Inactive ... . . . . . . . . . . . . . . . . . C-66
Create File Definition from Screen Image. . . . . . . . . C-66
Create File Definition from .DEF File ... . . . . . :.C-67
Save Definition/Exit FILEDEF. ... . ..........C-67
Abort FILEDEF . . .. . . . .. . . . . . . . . . . . . . C-67
SAMPLE APPLICATIONS ... . . . . . . . . . . . . . . . . . C-69
P
*** SECTION D: PROGRAMMING DATAFLEX 'H'*
DIRECT CONTROL OF DATA ENTRY. . . . . . .. . . . . . . . . D-l
PAGE Command. ...... . . .. . . . . . . . . . . . .D-l
ACCEPT Command. ... . . . . . . . . . .. . . . . . . .D-l
DISPLAY Command . . . . . .......... . .. . . .D-2
AUTOPAGE Command. . . . . . . . . . . . ...... . . . D-3
CLEARFORM and BLANKFORM Commands. . . . . . . . . . . . .D-3
OUTFILE Command ........ . . . . . . . . . . . . . D-4
OUTCLOSE Command. .. . . . .. . . . . . . . . . .. . . D-4
OUTPUT Command. ... . . . . . . . . ... . . . . . . . D-5
NAME Command. ..... . . . . . . . . . . . . .. . . . D-5
FORMAT Command. . . . . . . .. . . . . . . . . . . . . . D-6
PRINT Command .. . . . . . . . . . . . . . ..... . . D-7
ENTERGROUP. ... . .. . . .. . . . . . . . . . . .. . D-8
MANIPULATING STRINGS. .... . . . . . . . . . . . . . . .D-ll
LEFT Command. ..... . ... . . . . . . . . . .. . . D-ll
RIGHT Command . . . . . . . . .. . . .. . . . . .. . . D-12
MID Command .. . . . . . . . .. . . . . . ....... D-13
ASCII Command .. . . . . . . . . . . . . . . . . . . . .D-13
CHARACTER Command . . . . . . . . . . ... . ..'. . . .D-14
POS Command . . . . . . . . . ...... . ..... . . D-14
LENGTH Command. . . . . . . . . . . . . . . . . . . . . .D-15
PAD Command . . . . . . . . . . . . . . . . . . . .. . . D-15
TRIM Comnand. . . . . . . . .. . . . . . . . . . . . . .D-16
APPEND Command. ... . .. . .. . . .... . . .. . . D-16
UPPERCASE Command . . . . .. . . . . . .. . . . . . . . D-17
CMDLINE Command .... . . .. . . . . . . . . . .. . . D-17
String Operations .. . . . . . . . . . . . . . . . . . .D-18
CONDITIONAL EXEQ/TION . . . . .. . . . . .. . .... . . D-19
Setting Indicator Status. . . . . . . ....... . . .D-20
Predefined Indicators . . . . . . . . ... . . . . . . .D-24
IF Test . . . . .... . . ... . . . . . . . .. . . . D-24
—-————-————
Copyright (C) 1984 Data Access Corporation 05/16/84

iv TABLE OF CONTENTS DataFlex 2.0 User's Manual
SECTION D (continued)
CONTROLLING EXECUTION SEQUENCE. .. . . . . . . . . . . . .D-29
GOTO Command. .... . . . . .0 . ... . . . . . ...D-29
ON GOTO Comand ......OO . .QP.. . .... . .D-30
GOSUB Command ...... . .. . . . .D. . . . .. . eD-30
ON GOSUB Command. .. . . . . U . . . . . . .. . .. . .D-31
RETURN Command. . . . . ..... . ... . .. . . . . .D-31
CHAIN Command .... . . . .. . . . . . . . .. . . . . D-32
CMDLIME Command . . . . .. . . . . . . . . . . . . . . .D-32
DEBUG Command .... . . . . . P . . g . . .. . . . . .D-33
ERROR Command .... . G . .. Q . ..Q . .. . . . . . D-33
CLEARWARNING Command. .. 0 .. . . . . .. . . . . . . .D-34
ABORT Command ...... . . . . . ... . . . . . ...D-34
BLOCKS AND LOOPS. ..... . . . . . ... 0 .. . ....D-35
BEGIN -END Command . . . . .. . . . . . . . . . . . . .D-35
REPEAT -UNTIL Command. . . . .. . .QQ. . .. . . . . D-35
REPEAT -LOOP Command . . Q . .. . . . . . . . . .. . . D-36
WHILE ~END Command 0.. V P .. P ..S. D . O. . . . . D-37
FOR -FROM -TO -LOOP Command. . . . . . . . . . .. . .D-37
DIRECT CONTROL OF THE CONSOLE .. . . . .. . .......D-39
SHOW Command. . . . . ........ . . . . .. . . . . D-39
SHOWLN Command. ... . .... D . ... . .. . . . . .D-40
INPUT Command .........O Q e. . . . . . .. . .D-40
GOTOXY Command. ..... . .9 . . . ..... . . . . .D-41
CLEARXY Command ... . ...0 . . . . . . .. . . ...D-41
CLEARSCREEN CQmmand . . U . 0 D 8 0 . G . D . . 0 .e & .0~42
KEYCHECK Cownand. .. . . . . . . . . . .. . . . . . . .D-42
INKEY Command .....Q..e U . . . . . .......D-43
SCREENMODE Conmand. .. . . 3 . . D . . . . . . . . . . .D-43
MANIPULATING RECORDS. . . . . . . . . . . . O . .. . . . . D-45
Database Commands and FILEDEF .. . ... . . .. . . . ,D-45
Record Buffers. . . ..* . . e P , 03. . . ..,. . .D-45
File Definition . . . . . . . .. . ... . . . . . . . .D-46
OPEN Command. .... . . O . q . . 0 . .... . . . . .D-47
FIND Command. . . . ..,. 0 . . . ..0 . . .. . . . . D-48
SAVE Corrmand. . . . . . . . . . . .... . . . . . ...D-51
SAVERECORD Comand. . . ....e . . . . . . . . . . . .D-51
CLEAR Command . . . . . . . . . . P 0 . . . . .. . . . . D-52
DELETE Comiand. ... . ... . ... . . . . . . . . . . D-52
RELATE Command. . . ...... . .. . .... . . . . . D-52
ATTAM Command. . . . . . . .. . ... . . . . . .. . . D-53
ZEROFILE Command. .. . Y . . . U . . . . ...... . .D-54
System Files. . . . . . . . . aQ . 0. . ... . . . . . 0~54
MANIPULATING FILES. .... . .Q O . . . . ... . .. . . D-55
ERASEFILE Command ....... . . . . . ... . . . . . D-55
RENAME Command. ........ . ... . ... . .. . . D-55
COPYFILE Cormand. ... . . . . . O . . . ... . . . . . D-56
DIRECTORY Command ..... . . . . . . . ... . .. . . D-56
FILELIST Cormand. ... . ... e . . . . . . . . .. . . D-56
SYSTEM Command. . . . . . . . 0G D . . . ... . .D . . 0~57
RUNPROGRAM Command. . . . ... . . . . . .... . . . . D-58
REGISTRATION Command. ..... . . . . . ... . .. . . D-58
SYSDATE Command . . . . . . . . . . . . . . . .... . . D-58
——————-—————————-—
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual TABLE OF CONTENTS v
—————————————————————————————————————
SECTION U(continued)
DIRECT INPUT AND OUTPUT . . . . . . . . . . . . . . . . . . D-61
DIRECT_INPUT Command. . . . . .. . . . . . . . . . ...D-61
DIRECT_0UTPUT Command .. . . . . . . . . ..... . . . D-62
CL0SE_INPUT &CL0SE_OUTPUT Commands ...... . . . . . D-62
READ Command. . . . . . . . . . . . . . . . ... . . . . D-62
READLN Command. . . . . . . . . . . . . . . . . . . . . .D-64
SEQEOF and SEQEOL Predefined Indicators . . . . . . . . . D-65
WRITE Command . . . . . . . . . . . . . . . . . . . . . . D-66
WRITELN Command .. . . . . . . . . . . . . . . . . . . . D-67
Reporting Without Report. . . . . ... . . ... . .. . D-67
*** SECTION E: ADVANCED CONFIGURATION *'H'
USING FUNCTION KEYS . . . . .... . . . . . . . . . . . . E-l
Using the Flex-key Indicators . . . . . . . . . . . . . . E-2
Using Key Procedures. , . . . . . . . . .. . . . . . . . E-2
ENTAGAIN Cand. . . . . . . . . . . . . . . . . . . . . E-4
ENTERMODE Command ... . . . . . . . . . . . .. . ...E-4
BACKFIELD Command . . . . . . . . . . . . . . . . . . . . E-4
HELP Command. . . . . . . ..... . . . . . . . . . . . E-5
MULTI-USER FUNCTIONS. . . . . .. . . . . . . . . . . . . . E-7
Multi-User Operation Under the ENTER Macro. . . . . . . . E-8
LOCK Command. . . . . . . . . . . . . . . . . . . . . . . E-9
UNLOCK Command. . . . . . . . . . . . . . . . . .... . E-9
REREAD Command. . , . , . . . . . . .. . . . . . . . . . E-9
IFMANGE Command. ... . . . . . . . . . . . . . . . ..E-9
SETOANGE Command . . . . . . . . . . . . . . . . . . . . E-lO
DESPOOL Command . . . . . . . . . . . . . . . . . . . . . E-lO
FIELDINDEX AND WINDOWINDEX. . . . . . . . . . . . . . . . .E-ll
MODIFYING AND EXTENDING DATAFLEX. . . . . . . . . . . . . . E-13
Replacement ..., . . . . . . . . . . . . . . . . . . . E-14
Command Definition. .. . . . . . . . . . . . . . . . . . E-14
Include Files . . . . . . . ....... . . . . . . . . E-16
Compile Time Variables. .. . . . . ...........E-16
Conditionals. .. . . . . . . . . . . . . . . . . . . . . E~l7
CHECK Macro Cmmand . . . . . . . . . . . . . . . . . . . E-18
Symbol-Checking Characters. . . . . . . . . . . . . . . . E-19
Internal Typing of Symbols. . . . . . . . . . . . . ...E-20
*** SECTION F: APPENDIX ***
RESERVED WORDS OF DATAFLEX. . . . . . . . . . . . . . . . . F-l
FILES, ARGUMENTS AND COMMANDS . . . . . . . . . . . . . . . F-3
Predefined Arguments. .... . . . . . . . . ..... . F-4
Window Format and Entry Options . . . . . . . . . . . . . F-5
Command Syntax List .. . . . . . . . . . . . . . . . . . F-6
SPECIFICATIONS. . . . . . . . . . . . . . . . . . . . . . . F-9
COMPILER ERROR NESSAGES . . . . . . . . .. . . . . . . . . F-13
RUNTIME ERRORS AND DIAGNOSIS. . . . . . . .. . . . . . . . F-19
GLOSSARY. ...... . . . . . . . . . . . . . . . . . . . F-35
TP'3LE OF ASCII CODES. .. . . . . . . .. . . . . . . . . . F-41
'-lfjEX . . . . . . . . . . . . . . . . . . . . . .. . . . . F-43
==========""
Copyright (c) 1984 Data Access Corporation 06/08/84

vi TABLE OF CONTENTS DataF1ex 2.0 User's Manual
list of sample screens
Sample Screen A-l -Master Menu. . . . .. . . . . . . . . A-34
Sample Screen A-2 -Configuration menu . . . . . . . . . . A-35
Sample Screen A-3 -Vendor Master Record ... . . . . . . A-36
Sample Screen A-4 -Demo Inventory System Menu .... . . A-42
Sample Screen A-5 -File List-Demo Inventory System. . . . A-42
Sample Screen B-6 -Personnel Record, Prompting in AUTODEF B-5
Sample Screen B-7 -Configuration Mentn Select to Run
Configuration. . . . . . ..... . . B-9
Sample Screen B-8 -"PERSON'4 Showing Sample Data. ,... B-17
Sample Screen B-9 -Menu Edit Selection. . . . . . . .. . B-53
Sample Screen B-lO -Menu Configuration. . . . . . . . . . B-54
Sample Screen B-ll -Menu System Question Entry and Editing B-56
Sample Screen C-12 -File Definition Menu. . . . . . . . . C-59
Sample Screen C-13 -File Definition Field Edit Option Menu C-60
Sample Screen C-14 -Inventory Customer Master File. . . . C-70
Sample Screen C-15 -Inventory Item Master File. . . . . . C-81
Sample Screen C-16 -Inventory Invoice Entry ..... . . C-86
Sample Screen D-17 -Report Configuration Not Using REPORT
Macro 0 . C . .. . . . . . . . O e 0 0"68
list of sample configurations
Sample Configuration B-l -Personnel Record, Initial Entry ..B-2
Sample Configuration B-2 -Personnel File, After AUTODEF .. . B-7
Sample Configuration B-3 -Personnel File, After Customization B-13
Sample Configuration B-4 -"PERSON" Entry Screen ....,,.B-15
Sample Configuration B-5 -"PERSON" Plus "JOB" ...O. . . .B-17
Sample Configuration B-6 -Systtm Date Dfsp1ay/Entry O . Q . .B-30
Sample Configuration C-7 -Simple ENTER Configuration. . . O .C-23
Sample Configuration C-8 -ENTER Configuration Using
User-Oefined Procedures .. . 0 . . C-25
Sample Configuration C-9 -ENTER Configuration Using
entdisplay. . . . . . ... . . Q . c-26
Sample Configuration C-id -Simple Report Using REPORT Macro .C-33
Sample Configuration C-ll -Complex Report Using REPORT Macro. C-37
Sample Conflguration C-12 -REPORT With Operator Selections
and Page Control . . . . . . . . .C-42
Sample Configuration C-13 -Screen Image for FILEDEF to
Work From. . . . . . . . .....C-53
Sample Configuration C-14 -Inventory Customer Master File ..C-74
Sample Configuration C-15 -Inventory Customer Report. ....C-77
Sample Configuration C-16 -Inventory Vendor Master File . . .C-80
Samp7e Configuration C-17 -Inventory Master File Data Entry .C-84
Sample Configuration D-18 -Personnel File, Using ENTERGROUP .D-9
Sample Configuration D-19 -Illustration of FIND Command . . .D-50
Sample Configuration E-20 -Update Routine in Multi-User
Environment. .. . . . . .. . . .E-IX)
Sample Configuration E-21 -Use of WINDOWINDEX Predefined
Variable . . . . . . . . . . . ..E-12
__—"— ——
Copyright (c) 1984 Data Access Corporation 05/16/84

_—— ————
—"~——" ===""=="""
=:::::: ORGANIZATION OF THIS MANUAL ====
—————===== ==========
__"_"",
SEQUENCE OF PRESENTATION
The sequence in which material is presented in this manual is the
recommended sequence for the undertaking of tasks in learning DataFlex
and in using it. Your learning experience with DataFlex will rapidly
become aproductive experiencep in that within acouple of hours, you
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
early exercises will yield simp1eg straightforward applications which
despite their simplicity will have more than enough power to
efficiently perform any number of cormon data processing tasks, such
as mailing lists.
But you very likely acquired DataFlex because its power and
flexibility go far beyond mere list management. As you continue
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
of satisfying all of your data management needs. The simpler
fac1l1ties of DataF1ex are so powerful that you may reach this point
well" before you explore the more advanced features of Datañex
described in later sections. If this happens, there is no need to
study further except to generally acquaint yourself with the
capabilities of the more advanced features.
————————
Copyright (C) 1984 Data Access Corporation 05/16/84 r

A-2 ORGANIZATION OF THIS MANUAL DataF7ex 2.0 User's Manual
NOTATIONAL CONVENTIONS IN THIS MANUAL
Certain notational conventions are used throughout this manual with
which you should become acquainted in order to understand the formats
and examples shown. DataFlex configurations are made up of screen
images (always at the beginning) and then comand lines, the two
sections being separated by the distinctive "l*" character combination
by itself on one line. DataF1ex commands are like sentences made up
of averb (the cormand) and (usually) one or more objects (referred to
as argumentsL sometimes followed by one or more options, and
sometimes further followed by acomment. Commands may be preceded by
conditional terms called indicators. Lastly. some command lines begin
with "labels". distinguished by aterminating colon (LABEL: L, whose
purpose it is to "mark" aspot in aconfiguration for purposes of
future references (such as a RETURN or GOTO connand). Here is the
typical format of acommand line:
[indicator] command argument {options} //comment
The brackets [] surrounding the indicator are required to identify
indicators. The braces {} surrounding the options are not to be typed
in most commands, except fbr format options for the ENTRY and FORMAT
commands, where they are required. The braces are used in format
i11ustrationm howeverj to signify an optional command element.
Again. they are not to be typeci in the comand except in the cases
noted. The "//" twin diagonals which precede the comment are, like
the indicator bracketsp part of DataFlexG syntax,p and tell DataFlex
not to compile the material following the dlagonalm which leaves them
free for any materia] you may wish to include in the source version of
your configuration for reading by persons (as distinguished from the
computer). Twin diagonals at the beginning of aline will cause the
entire line to be acomment. Here is atypical command line:
[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 argument, which is a screen image window named (in the
ccmfiguration) MAIL.NAME, followed by aformatting 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
screen image window and accept for ENTRY into the database element
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
no meaning for execution; it would have meaning only for aperson
reading the configuration.
The example above illustrates the use of upper and lower case in
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual ORGANIZATION OF THIS MANUAL A-3
——
—
examples throughout this manual. FOUND, ENTRY, and CAPSLOCK are all
in capital 1etters9 while mail.name is in lower case. This is
intended to signify that FOUND, ENTRY, and CAPSLOCK are iñteral
strings which match» respectíve1y9 an indicator. acommand and an
option which are inherently part of DataFlex. In any configuration
which you wrote using these e1«nents, you would have to 1itera11y use
these strings then. also. Mail.name, on the other hand. is peculiar
to the example or configuration which is being discus5edp and would
typically be some other string in any configuration written by you
(although you could use it if you chose to). You will find this use
of upper and lower case throughout the formats and examples in this
manuab except for the full sample configuratioñs» which follow the
normal configuration convention of being written in solid capital
letters except for textual material in screen prompts and messages
which need upper and lower case.
Throughout DataF1ex, in the systw as well as in this manual, material
enclosed in either single (') or double (") quotation marks is literal
material which passes through configurations as such and is displayed
or outPutg rather than executed.
DataFlex itself has many syntactical conventions in addition to the
ones described above, which are peculiar to presentations in this
manual. DataFlex's own syntactical conventions are described
separately at the appropriate places in this manual.
Copyright (c) 1984 Data Access Corporation 05/16/84

A-4 ORGANIZATION OF THIS MANUAL DataFlex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (C) 1984 Data Access Corporation 05/16/84

_ _ _ _ _ _ _ _ _ ————————————————————————__=========
A—5
~~~ ————
——————
"""==="""" OPERATIONAL ORIENTATION """"""
—————
This section describes the steps involved in developing an application
in DataFlex and the various files and programs that come into play
both in creating and in running it.
DataFlex offers awide range of facilities for applications
development. Because of this, there is frequently more than one way
to achieve aparticular 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
implemented for doing atask is the only, or bésto way. Any method
developed for doing atask should be reviewed against the possibility
that an alternative approach might be easier or more efficient.
Thjs section is divided into two parts: Runtime Systm and Applica-
tion Development. The runtime system is the part of DataF1ex required
to execute (run) the application. The person(s) who run the applica-
tion is(are) referred to as the "operator" (as distinguished from the
configuratom who is the person who develops the application). The
application development section describes the parts of DataF1ex which
support development of applications. Although the configurator and
the operator may in some instances be the same persom the activities
of configuring on the one hand and operating on the other are differ-
ent, so that it is useful to distinguish between these functions.
INSTALLATION
The installation of DataFlex consists mainly of copying the necessary
files from your DataFlex master disks onto your working disks or hard
disk drive and then using the DataFlex SETSCREEn program to initialize
the system for your serial number and terminal type. The SETSCREEn
program reads the file TERMLIST.CFG and writes the terminal informa-
tion input by the user to the file FILELIST.CFG to be used by the
runtime system and the configuration systm. See the installation
instructions and the section on Installing DataFlex for more informa-
tion on insta11ation.
===ma==: _——————————————~—~~~—————~_~_____"____""_
Copyright (C) 1984 Data Access Corporation 05/16/84

A-6 OPERATIONAL ORIENTATION DataFlex 2.0 User's Manual
"==========~ """""
RUNTIkE SYSTEM
The basic operating nucleus of the DataF1ex runtime system is the
program "FLEX.COM" (FLEX.CMD on CP/M-86 systems). FLEX.COM and its
overlay file "RUN.OVF" are functional all the time any DataFlex
configuration is running. The DataFlex configuration contains the
intelligence which enables DataF1ex to make the computer do a
particular task. just as aBASIC program works through the BASIC
interpreter. Without acompiled configuration (.Fl-X) file, the
runtime system can do nothing.
Under control of aconfiguratiom the DataFlex runtime system can
access and manipulate one or more databases9 interact with the
operator, drive the printer, read and write standard ASCII files. and
otherwise activate just about every function found in microcomputer
systems. These activities are controlled by configurations (files
with the ".FLX" extension) created and compiled by the developer.
When FLEX is run from the operating system the name of the
configuration which is to be run must be given with it.
When initialized, the DataFiex runtime system first reads afile
called FILELIST.CFG which contains information about what database
files are available, and information which enables DataFlex to
generate the control codes which will operate your particular
terminal.
Each data base file name appearing in FILELIST.CFG actually refers to
a"family" of related files on your disk. all having a cormon root-
namep but different extensions. The data files (".DAT" extension)
contain the raw data in the sequence in which it was entered, and the
basic information on the structure of the data file. The key files
(".Kx" extension where xis the number of the index) contain index
data which provides access to the data by indexes established by the
configurator during the process of defining the database. The tag
file (".TAG" extension) contains the names of the fields which make up
the database.
Thus the minimum file comp1©ent required to run DataF1ex consists of:
FLEX.COÑL RUN.OVK FILELIST.CFG, at least one .Fl-X (configuration)
file previously created by the configurator, and all database files
(.DAT) .Kx and .TAG) for any database(s) declared in (used by) the
configuration(s). To use the QUERY facility the QUERY.COM and
QUERY.OVF program files must also be present.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual OPERATIONAL ORIENTATION A-7
———————
+ ~ ===""4"""
hThe DataFlex Menu System that greets the user when DataFlex is
initialized is Itself aDataFlex configuration. The name of the menu
configuration is MENU.FLX. The menu facility keeps the menus in a
standard DataF1ex data base file whose name is MENU.DAT. MENU.DAT is
installed as file 49 in the list of active databases in FILELIST.CFG
as supplied. Thus to use the menu facility you must have MENU.FLX and
MENU.DAT on your system.
Other supplied programs may be required occasionally at run time.
REINDEX reads adata file and rebuilds the keys (.Kx files) in case
they are damaged by a power, medía or system failure. Reindex is
also used to maintain BATCH indexes and create "ad hoc" indexes. The
FREÍ- ((Fre)e (L)iSt) program reads through adata file and verifies
(and rebuilds if necessary) the list of deleted records in adata base
file, and also deletes or extracts any records that appear damaged
(typically as a consequence of apower, media or system failure).
Both of these programs may be kept off-line until needed.
APPLICATION DEVELOPMENT
The process of developing specific applications in DataFlex involves
creating configurations (files with the .FLX extension) and database
files to store and manipulate data in the desired fashion. These
files are created by use of agroup of utility programs supplied with
DataFlex. The .Fl-X files are created by running the DataFlex COMPILER
program on "source" files. Source files can be created by any of
several different means, including the EDITOR.COM program supplied
with DataF1ex9 or any text editor or word processor which is capable
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.
You will probably produce your first configuration using the AUTODEF
utility. AUTODEF also creates the definition for a new databaseg and
the data and key files necessary for its data. To use it. the first
step is to "draw" an image of the input and query screen that you will
use on your new database (see the section Qñ "Formatting With
Images"). The DataFlex EDITOR or your favorite text editor will serve
for this purpose. AUTODEF reads this file and produces both afile
definition (.FO) file and aconfiguration SOURCE code file (with a
.FRM extension), ready to be compiled. The configuration produced by
AUTODEF can perform full file maintenance on the database file it
creates.
Copyright (C) 1984 Data Access Corporation 05/16/84

A-8 OPERATIONAL ORIENTATION DataFlex 2.0 User's Manual
=""="===~— —— ————+———————————"""" ""
The function of the EDITOR program is to create, display and mod'ky
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
files produced with EDITOR are standard ASCII files, so most word
processors or editors can be used instead of the DataFlex EDITOR if
you are more comfortable with one of them.
The DataFlex QUERY program provides the user easy access to the
information stored in any database existing on the disk drive. The
QUERY facility can be used as an ad hoc report generator that requires
little trafning to use. QUERY is entirely prompt-drivem making it
quite practical for use by operators9 but once a query has been
successfully perforTned» it permits storing the query criteria in a
file as source code for areport configuration. The source file can
then be compiled to become apermanent report. QLJERY requires all of
the standard runtime database files to be present.
The DataFlex READ conffguration generates a source program to import
standard ASCII data files. READ is primarily intended for those who
are converting to DataFlex from other systems.
The CVTFRM and CVTRPT programs read DataFlex configurations written
under earlier versions of DataFlex (1.6x) and produce DataFlex 2.00
'source configurations. Configurations written in Versions l.6x of
DataFjex are fully convertible to configurations which run under
Version 2.OX by use of these utilities. Natura11y7 configurations
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 the original configuration was producecb but the converted
source file can be edited to do so if desired.
The compiler (COMP.COM or COMP.CMD, and--for B-bit systems--COMP.OVF)
which produces .FLX files from source files requires three files to be
present on the logged-in disk drive in order to do its job: the
configuration source fi1eg afile definition (.FO extension) file for
each database declared by (used in) the configuration, and FLEX.CFG
the DataFlex command macro file. The .FO files and FLEX.CFL must both
reside on the logged-in (defau)t) disk drive. Asuccessful
compilation will produce arunnable DataFlex configuration with the
.FLX extension and the same rootname as the source file. As the
compiler runs, it will display on the screen the original source
commands together with line numbers assigned to them by the compiler
and any error messages which arise during compi7e time. This output
can be directed to any of three devicmm the consolm the printem or
aprintab7e (.PRN) file.
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual OPERATIONAL ORIENTATION A-9
ADataFlex configuration that does not use any database(s) would not
require any .FO files in order to be compl1éd» but the typical Data-
Flex configuration wIll access one or more databases. The .FO files
are used 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.
The FILEDEF utility, like AUTODEF, Is used for creating database files
and configuration source files. FILEDEF is more versatile than
AUTODEF. Multi-file relationships can be created with FILEDEF.
FILEDEF requires more extensive knowledge of DataFlex, but gives more
control over the database. The FILEDEF program can also read and
write database definition (.DEF) files in standard ASCII. Definition
files are useful for reference, database documentation and transfer' of
applications to other environments.
The PACK program is for use by users who want to create their own new
commands and add them to the DataFlex language. The PACK program
reads the file FMAC and creates the file FLEX.CFL which is used by the
compiler. New command macros are added to FMAC with atext editor or
word processor and then made usable by running PACK on the new version
of FMAC, creating anew version of FLEX.CFL (overwriting the old one).
P
Copyright (c) 1984 Data Access Corporation 05/16/84

Y
\¢aMFhgURATjaA/ Srunt/he
iÁum
!
I
l
J
), tI"FLEX" \
\\\'\Iruntihe
query )read Ieditor ICbiFjLEDEF)AU}aDEF I
i
[i 'laA A
atawage
pIPRINTER'
b
source
"" )'Ej 'tj:
ccwpiler Ipa0gaaá( file
-:')'Li q:i'
DATAFLEX
systehdiagrah I1// \
set
screen

Dataflex 2.0 User's Manual OPERATIONAL ORIENTATION A-ll
————
——————————————————————————————————
.
After running SETSCREEn and "informing" DataFlex of the codes which
operate your terminab there are three basic levels of using DataFlex
through which you should proceed in order for the easiest» most
thorough learning experience. The content of this manual is itself
presented in the order which will best facilitate this approach. They
are described below:
QUERYING AND REPORTING Your DataFlex system was supplied with more
than adozen working configurations complete with sample datap all on
diskp compiled and ready to run. They are intended as learning aids
and are not documented in this manual. You will find most of them
listed in the "DataFlex demo files" submenu, which you may choose from
the master menu. From this submenu, you may actually run any of the
configurations, and/or query their databases, by electing the last
choice, "QUERY Data Files." You should tour these samples free1yg
entering additional test data where you choosep and running reports to
the screen and/or your printer from them at will. The Operator's
Guide in this manual should provide all the guidance you will need in
this activity. Eventua]lyp you may even wish to modify the
configurations themselves to make them run differently. (Sane of the
configurations may happen to be already very close to something you
could actually use for your own purposes.) The source "code" (which
is what must be modified and recompiled to change the configuration)
is supplied for every configuration on the C: disk.
PROMPTED DATABASE CREATION AND CONFIGURATION DataFlex provides
numerous "automated" methods for creating and maintaining databases
and for creating the configurations you will need for entering data
to» and reporting data from those databases. While the "shortcut"
methods are promptecb and typically more narrowly structured than the
"programming" methods of writing DataFlex configurations, they should
not be underestimated. In actua1ity7 they are highly flexible and
very powerful in their own right. Roughly two out of four DataFlex
users will have no regular occasion to use any DataFlex facility other
than EDITOR (for writing configurations), MENUDEF (for creating and
editing menus). AUTODEF (for creating databases and entry configura-
tions) and QUERY (for creating reports and doing interactive
inquiries). Of the remaining two out of four typical DataFlex users,
only one will have requirements which cannot be fu1fi17ed by the
aforementioned facilities plus the ENTER macro and the REPORT macro.
The facilities mentioned above should be explored thoroughly. You
should proceed on to the next stage only in the event that you have
unusual requirementm or a driving curiosity as to the virtually
limitless possibí7itíes offered by the most extensiveg flexible
applications development medium available 'in today's market.
—————— ————-—— ——— ————-
Copyright (C) 1984 Data Access Corporation 05/16/84

A-12 OPERATIONAL ORIENTATION DataFlex 2.0 User's Manual
==""""==="""=—"""""""""""""""""""""" " = "' =====
—===""_".==_""===="""""""""""" """" """"""""""""""""
PROGRANING AND EXTENSION OF THE LANGUAGE In line-by-line programming
of app1icatiorm DataFlex offers facilities for the creation of
applications not even yet imagined by its creators. The more
fundamental functions provided in function key commandsg sequential
input/output9 console inputloutput and multi-user functions allow the
construction of virtually any processing structure which could be
desired. Although whole configurations can be made up of such
commandm these commands are more likely to be used intermingled with
structures created by the pre-programmed facilities such as the REPORT
and ENTER macros. While exclusive use of these facilities for writing
configurations is likely to be aless efficient way of creating
configuratiorm occasional use of them to alter the way standard
structures function Is very much encouraged. In the Advanced section
of this manuab you will even find procedures for modifying DataF7ex
commands themselves, as well as procedures for creating entirely new
commands for your individual use.
The schematic on the next page offers agraphic depiction of the
ranges of programming sophistlcatíon to which each of the facilities
of DataF1ex primarily applies. The chart should not be interpreted
too literally. There is no reason whatsoever Whyg for examp1ep the
"basic" facility of QUERY should not be used in an otherwise
"advanced" application to create one or more reports if QUERY can
satisfy the applicatioMs requirvments for that particular function.
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.
P
—— _,,,—,
———————————
="" "" . ——,.,, . ___~___, _===__~—___~
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual OPERATIONAL ORIENTATION A-13
--------------
THE FACILITIES OF DATAFLEX
—------LEVELS OF CONFIGURATION SOPHISTICATION-------
OPERATOR BASIC INTERMEDIATE ADVANCED
llllExISTINGllllll
llCCNFIGURATIONSll
llllllWERYlll|lllllllllll: ll::lllllllll:|llllllllllllll:llllll;ll llllll
;llllMENUlllll|lllll: lllllllllllllllll|:ll:llllll;lllllllllll:lll: llllll
lll|AUT0DEFllllllll;: lllll;lll|lll|l:llllllll|llll:lllllllllllllll llllll
llllEDITORlllllllll|: lll:llllll:ll:l:lllll:l::ll llllll
lllSCREEN IMAGES|llllllllllllllllllll: ll|llllll: llllll
:lllC0MpILERllll;;l}|lllllll:l:lllllllll:lllllll llllll
llllANUDEFl: ll}llll|l::lllllll:llllllllllllllll|lllll
ICONTROL C0MMANDSlll: |lllllll:lllllllll}llllllllllllll
lmost comandsllllllllllllllll llllll
ll:lINDICAT0RS:lllllllllll:lll llllll
lllREPoRT MACROlllllllllllllll llllll
llllENTER MACR0llllllllllllXl llllll
IENTERGROUP MACROllllllll: llllllllll
llll:FILEDEFlllllllllllllllll|l:llll
llKEY pROCEDURESll
llllFIELDINDExllll
MACRO OPERATIONSI
Copyright (C) 1984 Data Access Corporation 05/16/84

A-14 OPERATIONAL ORIENTATION DataFlex 2.0 User's Manual
———————
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (c) 1984 Data Access Corporation 05/16/84

--------- A-15
===""===————————————~——— ——— ~—_""""""
"",
ÉÉÉÉFáááEE OPERATOR'S GUIDE ==========
—~~——— ,",
—————
The objective of this section is to provide aclear, non-technical
summary of use of the system for data entry. The first part of the
chapter will define the procedure to use DataF1ex for data entry and
file maintenance. Second1y7 the features and facilities that may be
used in any given application will be discussed.
DataFlex uses a set of command keys, called "F1ex-Keys% to execute
many of the regularly used functions In an application software
system. Example Flex-keys are FINDo used to locate arecord in the
data base; SAVEJ used to store a new record in the data basep etc.
Furthem since DataFlex is used on such awide variety of systemsg
especially terminals, we will address functions of the program by
their Flex-key name in the course of our discussion, rather than by
the particular key on your terminal which has been established, since
the location of that command key may vary from system to system.
The SETSCREEn Utility is used to assign the DataFlex Flex-key commands
to aset of control or function keys on your keyboard. Part of its
operation is to print alist of the commands and the keys to which
they are currently assigned on your terminal. If you do not have a
copy of that list. go to the SETSCREEn Program ñOWx and print one for
use with this chapter.
FUNCTIONAL OVERVIEW
ADataFlex application that involves data entry has the capacity to
accept data from the keyboard, check to make sure that it is the
proper type of data. and then store it on the computer's floppy or
hard disk storage device. Once data is stored, DataFlex can be made
to retrieve (FIND) the data and display it on the CRT, and allow the
operator to change or delete it.
All of the capabilities of DataFlex may or may not be used in every
application. For examp1é» the option exists within aconfiguration to
lock an operator out of aparticular data window on the screen or to
automatically make calculations that are routine in the process of
certain data entry situations. Our point is that although all of
DataF1ex's capabilities will be discussed hereg you may not see all of
them used in every application which you run on your computer.
Copyright (c) 1984 Data Access Corporation 05/16/84

A-16 OPERATOR'S GUIDE DataF1ex 2.0 User's Manual
+
?
DEFINITION OF TERMS
Control Key: A key board entry that Is made while the "control"
key 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
SETSCREEn.
Data Entry: The process of putting new information into the
computer through the terminal keyboard.
Ffle Maintenance: The examination, changing, or deletion of infor-
mation that is already stored in the computer.
Fill Character: Acharacter displayed in a"window" (see below)
which defines the length of the data field which
can be entered or displayed at that particular
position. Genera1]yg the underline character
()is used for this purpose.
Function Key: Aspecial key on the terminal keyboard that is
outside of the normal typing array. It generates a
coded signal that can be "trapped" by DataFlex to
execute one of the DataFlex Flex-key functions
(e.g.. FIND, DELETEg SAVE, etc.). Terminal
function keys generate characters that do not
display on the screen.
Index: An organized list of keys which is linked to the
records in afile. 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: An element of data in arecord by which the record
can be accessed or "found" in the data base. E.g.8
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.
Key Field: The fie1d(s) in adata record which contains akey.
Key List: Same as Index.
Window: 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 (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual OPERATOR'S GUIDE A-17
—-——————-——————
HOW TO BEGIN
Data entry and file maintenance are begun by selecting the proper
option from the system menu. All that you need to do is select the
number of the menu item for the data entry configuration that you wish
to execute.
DataFlex screens are operated by the Flex-key commands which you (or
the operator) issue(s) from the keyboard. The commands are assigned
to certain keys (e.g. TÁÉJ9 LINE FEED, DELETE, RUB-OUT, etc.). function
keys (FL F2, etc.k and/or control sequences ("Áp "Bp etc.) for your
particular system. This assignment is done with the DataFlex config-
uration utility called SETSCREE. Once the assignment of the commands
is made to the various keys on your terminal, all DataFlex screens
will operate exactly the same regardless of the fi1e(s) being pro-
cessed or the format of the screen.
This feature of DataF7ex promotes operator efficiency and reduces the
opportunity for errors since there is aprocedural continuity through-
out the systan. The execution of the commands soon becomes second
nature so that when a new or altered module is added to the system, no
additional training or familiarization is required.
DataFlex screen displays are "active", which means they can execute
data entry or file maintenance functions at any time that aFlex-key
command is issued.
For example, if aparticular screen contains twenty display
windows, but only the first five elements of data are to be
entered initially, then aSAVE command can be issued after the
fifth data item is entered. This makes it unnecessary to
strfke the RETURN key after each of the blank fields just to
exit the screen. This feature can improve data entry effi-
ciency by substantially reducing the number of keystrokes
required.
Copyright (c) 1984 Data Access Corporation 05/16/84

A-18 OPERATOR'S GUIDE DataF1ex 2.0 User's Manual
——— —————
FLEX-KEY SUMMARY
cnMMANp
ESCAPE Terminate the ENTER Program return to menu.
CLEAR Clear all screen windows
RETURN Terminate entry in the window where the cursor
is currently located and move cursor to the
first position of the next window.
.
BACK FIELD Move the cursor from the current window back
to the previous display window on the screen.
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 asso-
ciated with the current window.
SUPERFINO On ascreen 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
displayed to fill all data windows on the CRT.
SAVE Stores the displayed screen information to the
data base. If the screen contains data from
more than one fi1ep data will be written to
whatever files are part of the configuration.
DELETE Removes the dfsplayed record from the file and
its key from the key list. Arecord must be
found before it can be deleted.
PREVIOUS RECORD Finds the record whose key immediately
precedes the key in the window where the
cursor is currently positioned.
NEXT RECORD Find the record whose key immediately follows
the key in the window where the cursor is
currently positioned.
CALCULATE Performs the calculation indicated by the
expression entered. Calculations can be per~
formed in adata window9 as well as on the
prompt line of the CRT.
HELP Display HELP screen.
Window Edit Move cursor or change data in an image window.
—————————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual OPERATOR'S GUIDE A-19
——————————————
——————— —— ———— — ——— —
KFYF'QFf'P coMMRNn fxf'l ANpTTnN.s
ESCAPE
When the ESCAPE command is issued from the keyboard, DataFlex immedi-
ately begins the process of "shutting down operations". All open data
files are c1osed7 and the control is returned to the menu. It is
important to note that when the ESCAPE connand is madep any data which
is currently displayed is not acted upon in any way unless the program
internally executes aset of commands. Specifica11y9 if anew record
has been entered, but not SAVEd to disk(ettek ESCAPE will not execute
the SAVE command as part of its shut down. This also applies in the
case of achanged or edited record: if arecord is found and edited
but not re-SAVEd, no change will be made in the data base.
CLEAR
The function of the CLEAR command is very simple... to erase any data
from the display windows (only) and place the fill character in all
data window positions. CLEAR has no effect on data stored in the data
base whatsoever; it is solely ascreen operation. CLEAR can be used
as a "bailout" procedure during ed¶ting. If arecord has been called
to the screen (found), and an edit made that is not correctp CLEAR
will erase the screen and preclude the bad edit from being written to
the data base.
RETURN
The RETURN command terminates data entry in one display window and
moves the cursor to the next window. This command is almost always
assigned to the RETURN or ENTER key of your terminal.
If you are entering datag and the RETURN command is issued at the end
of the last window on the screerg the displayed information will be
automatically SAVEd in the data base.
If, during data entryg you wish to skip over awindow and not enter
any datag simply execute the RETURN command prior to entering any
data. If the window accepts alphanumeric data the field will be given
the value of astring of spaces that is the length of the window. If
the window accepts numeric datá» the field will be set to zero.
DataF1ex can be made to do an "auto-return" at the end of adata
field. This means that when entered data completely fills awindowp
the RETURN command will be executed automatically. If "auto-return"
iS "OÑ"p the cursor will jump from the end of the current window to
the beginning of the next window as soon as the current window is
filled with data. The use of this feature is up to the user and
configurator. It is turned "ON" with the SETSCREE Utility program.
Copyright (C) 1984 Data Access Corporation 05/16/84

A-20 0PERATOR°S GUIDE DataFlex 2.0 User's Manual
'*
FIND °
Ascreen image will display aseries of data windows where you can
enter new fnformation or recall existing information for display.
Some of the display windows are "key fields" (as defined above). That
is, they can be used to FIND records in the data base that are asso-
ciated with data entered in the windows of the display. Genera11y7
the first window in an image is defined as a key, however this is not
always the case.
To FIND aparticular record. place the cursor in the window for the
key field (DESCRIPTION in the example below), enter the "value" of the
key for the record you wish to FIND, and execute aFIND command.
DataF1ex will then retrieve the record with the value you entered in
its key field and display it on the screen. If akey with the value
which you entered does not 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 illustrate t.he way FIND operates9 suppose we had adatabase with 5
records in itg each of which has two fields, DESCRIPTION (this is the
key field), and VENDOR (which could also be akey field, but in this
examp1ey it will not be). This is the data:
DESCRIPTION VENDOR
ARMATURE General Electric
DISKETTE 3M Corporation
ESCALATOR Otis Elevator
FRISBEE Wham-O
KEYBOARD Televideo
Here is what the following entries would find if they were entered
into the DESCRIPTION windowg and the FIND command executed:
DataF1ex would FIND
YOUR ENTRY DESCRIPTION VENDOR
AARMATURE General Electric
ARMATURE ARMATURE General Electric
B DISKETTE 3M Corporation
CDISKEIJE 3M Corporation
DISK DISKEIIE 3M Corporation
E ESCALATOR Otis Elevator
FFRISBEE Wham-O
GKEYBOARD Televideo
H KEYBOARD Televideo
J KEYBOARD Televideo
K KEYBOARD Televideo
L-Error -Find Past End of File
———-——..,-,———
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual OPERATOR'S GUIDE A-21
———————
SUPERFINO
On a screen that displays data from only one fi]ep SUPERFINO is func-
tionally identical to the use of the FIND command. However, on a
screen which displays data from multiple files, SUPERFINO is a power-
ful tool to find and display information from multiple, related data
base files.
The action of SUPERFINO is to use DataFlex's data base manager to
retrieve all related data on a given screen. To use SUPERFINO, place
the cursor in the window by which you wish to start the FIND. The
window must be akey field. Enter the key value to find and execute
the SUPERFINO command. If you want to start viewing the records from
the beginning of tt!e file in which the cursor is 1ocatech just execute
SUPERFINO and DataF1ex will automatically FIND the records related to
the first key in the key list. Then, when the record is found, all
related windows from other files will also be found and displayed.
When SUPERFINO is used, the entire screen display is filled with data.
Once the screen display is complete, you can use the NEXT RECORD and
PREVIOUS RECORD commands to sequence through the related data.
Consider the following example:
We have an inventory order entry system... the files are:
PARTS Key =Part #
BUYERS Key =Buyer ID
TRANSACTIONS Key =Transaction #
Data entry configurations are used to enter all data into the
system. PARTS and BUYERS can be added and.maintained and
items can be ordered through the creation of TRANSACTIONS.
TRANSACTIONs contain the Buyer ID, the Part #, the quantity of
the PART sold and atotal sale amount.
The stage is set... if we now load the transaction screem
place the cursor over the Buyer ID wjndow7 enter aBuyer ID
and press SUPERFINO, all fields will be filled. Starting with
the entered Buyerg we can now issue the NEXT RECORD command
and if the displayed buyer has more transactions, the next
transaction will be found and displayed on the CRT. In other
words we are now FINDing transactions by Buyer.
The fun has just begun... If we execute aCLEAR command, place
the cursor in the PART # window and enter aPARTÍ SUPERFINO
will now ¶ND the PART and its related transactions. NEXT (or
PREVIOUS) RECORD will sequence up and down the transaction
list for that PART. When we hit the end of the transactions
for the requested PART, the next PART in the index will be
displayed with its transactions.
""____",
Copyright (C) 1984 Data Access Corporation 05/16/84

A-22 OPERATOR'S GUIDE DataF1ex 2.0 User's Manual
SAVE
The action of the SAVE command is to take the data displayed on the
screen and save it to the correct data files in the data base. This
can occur whether there is one or more files associated with the dis-
play. SAVE is asimple yet powerful command. If aconfiguration is
not carefully conceived, SAVE can allow unwanted changes to the data
base from adisplay containing data from several files.
There is no "edit" command in DataFlex. Editing is accomplished with
the use of the FIND and SAVE commands. First the record to be edited
is brought to the screen with the FIND command. Then the necessary
edits or changes are made on the screen. When the data is correctp a
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.
DELETE
The DELETE comand removes a record from the data base. ProcedUra11yy
DELETE can only operate following the execution of the FIND command
(i.e., you must enter the key of the record to be DELETEd, FIND itg
then execute the DELETE command). The record itself and its key(s)
will be removed from the files.
NEXT RECORD
This command allows you to sequence through afi1e9 displaying records
in key order. When the cursor is placed in akey window2 the NEXT
RECORD command will FIND the record whose key is next in the fndex for
that window's data and display it. If multiple keys are used on the
screen, the cursor can be located in any valid key window for the
operation of the NEXT RECORD command.
PREVIOUS RECORD
Same as the NEXT RECORD command except that it FINDs the record whose
key precedes that of the one currently displayed.
——————————————
Copyrfght (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual OPERATOR'S GUIDE A-23
~
————
CALCULATE
The CALCULATE comnand allows the operator Interactive access to the
arithmetic capab17íties of DataF1ex. It can be used in two locations
on the screen: in awindowp or on the command line at the bottom of
the CRT. The fomat for the calculation is the same regardless of the
location where it takes place on the screen. Four symbols are used
for arithmetic operation:
+=Addition
-=Subtraction
*=Multiplication
/=Division
The arithmetic expression can simply be typed ifb e.g., 2+2, l0-79
3*50, or 24/6. Parentheses are supportedg so any of the following are
valid expressions for use by the CALCULATE Command:
(2+2)*(5/6) (2*(2*(2*(2)))) 100/34+l2*(365/12)
If the cursor is located in awindow which contains numeric datap an
arithmetic expression can be entered directly. When aRETURN command
is executed, the arithmetic will be performed according to the
expression that was entered. No command need be used in this case.
If the CALCULATE command is issued, the cursor will go to the bottom
line of the disp1ay9 where the expression can be entered. When the
expression is comP]eteg execute aRETURN command and the arithmetic
will be performed with the result displayed in the window where the
cursor was located when the CALCULATE command was issued. This
applies whether the cursor was originally located in anumeric or
alphanumeric window.
HELP
The HELP command will cause an application-dependent "help" screen to
be displayed. The screens are created as part of an application and
are covered in the section of this manual on "Formatting with Images".
Syntax for using the HELP command within an application to call the
HELP screen is described in the section on "Using Function Keys".
=========——_—————.,,.-_————.,._—_———.,.,--,,——————_
Copyright (c) 1984 Data Access Corporation Q¿'16/84

A-24 OPERATOR'S GUIDE DataFlex 2.0 User's Manual
—-—-—
USER-DEFINED
An additional key on your termina] may have been assigned some
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
find it in the manua7 for the particular app1ication(s) you are
running.
RIGHT &LEFT Arrow Window Editing Keys
These keys hon-destructively move the CRT cursor within aDataFlex
screen display window during data entry or editing.
BACKSPACE WIndow Editing Key
Moves the cursor one space to the left in a screen window? deleting
the character under the cursoM as well as any characters which may be
in the window to the right of the cursor.
CMRACTER INSERT WIndow Editing Key
Inserts a space at the current cursor position in a screen window.
Characters to the right of the cursor will be moved one space to the
right.
CHARACTER DELETE WIndow Editing Key
Deletes the character under the cursor in aDataFlex screen display
window. Characters to the right of the cursor will be moved one space
to the left.
Copyright (c) 1984 Data Access Corporation 05/16/84

~~~—~———~~———————————— —— —————————
—A"25
::::Z:Z[TZ INSTALLING DATAFLEX =====
—— ——
""""""""_——""""""""_ ~~~~~~~
The DataFlex SETSCREEn utility program allows you to configure Data-
Flex to run on your CRT terminaK and to specifically adapt certain
operations of the software to your specific requirements.
In this chapter of the User's Manual, we will use the word "terminal"
to refer generally to the keyboard and vídeo display of asyst«m
whether the device is separate from the computer itself om as in
cases like the IBM Personal Canputer, the keyboard and video display
are directly connected and integrated with the computer.
SETSCREEn can be entered directly from the operating systan command
level by typing the first eight letters of the program name:
A>SETSCREE <RETURN>
Upon entry to SETSCREEn, alist of pre-defined terminal and system
configurations will be displayed as in the example below. You have
the option of selecting apredefined terminal which is on the }ist»
adding the data for aterminal which is not on the list, or editing
the data for aterminal which is already on the list.
lSUPERBRAIN 2 ADM 31
3V.C. 404 4 TELEVIDEO (950/925)
5HAZELTINE I5XX 6 ADM 3A
7TRS-80 ( P&T CP/M ) 8 MICROTERM ACT 5
9ADDS VIEWPOINT 10 HP 125
II IBM PC Wl PCTERM (dos l.l) 12 DEC VT-52
13 XEROX 820 14 ZENITH lOó
15 NEC A.P.C. 16 ANSI TERMINAL (DEC)
17 HEATH H19/ZENITH Zl9 18 T. I. PEGASUS
19 IBM PC Wl ANSI.SYS
20 MY TERMINAL IS NOT ON THIS LIST
If your terminal appears on the list disp7ayedy simply enter the
number' by the name of your terminal. This will select the proper
screen codes and keys as preconfigured for your terminal and function
keys that DataFlex will act upon. The predefined Flex-key assignments
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:
— —————
Copyright (C) 1984 Data Access Corporation 05/16/84

A-26 INSTALLING DATAFLEX DataF1ex 2.0 User's Manual
————————
EDIT:
(I) SET SYSTEM OPTIONS
(2) ASSIGN FUNCTION KEYS
(3) SET TERMINAL CONTROL CODES
(4) DISPLAY PRESENT CONFIGURATION
(5) PRINT CONFIGURATION
(6) END /SAVE CHANGES
(7) ABORT SETSCREEN -DO NOT WRITE MANGES
You may wish to use Option 4to display the configuration to check it
over and/or print the configuration to paper for future off-line
reference. If it is necessary for any reason to edit terminal control
codes or function key assignments, these may be done by use of options
3 and 2 respectively. Option 6, (END /SAVE (>U\NGES) will write the
configuration to disk for future automatic use by DataFlex.
NOTE: There is a"standard" for terminals that is being used more and
more, called the ANSI terminal standard. If you cannot find terminal
information in your manual, it may be compatible with the ANSI
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
2.0. Choice number 16 above will provide the ANSI configuration.
If your terminal (or aterminal which your terminal emulates) is not
listecb it will be necessary for you to get out your terminal or
"system manual and manually configure DataFlex using the "MY TERMINAL
IS NOT ON THIS LIST" option. If you need to end SETSCREEn at this
point, select any predefined terminal option number, and when the menu
shown above is dfsp1ayed, enter an option 7to abort and return to the
operating system.
If you have selected "MY TERMINAL IS NOT ON THIS LIST". and you have a
terminal manual readyg it is time to proceed. The next prompt will
ask for the name of your terminal. This will identffy the entries
that you make for future reference from the list of terminals
initially displayed when SETSCREEN is loaded.
ENTER YOUR TERMINAL NAME (UP TO 20 CARS) :
From here, SETSCREEn will step through the first three options of the
menu shown above with the following series of questions:
PART ONE: SYSTEM OPTIONS
The first systw option is:
DO YOU WANT AUTO RETURN ON FULL FIELD (Y OR N) N
This question is answered "Y" if, during data entry. you want DataFlex
——————————
——— —————————————————————————————————————————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual INSTALLING DATAFLEX A-27
~————————
~ ~
to move the cursor from one image "window" to the next automatically
when the window has been completely filled with data. For examp1m if
awindow is formatted for date entries (8 characters including the
slashes "_/_/_'i), and you put in l/1/8Zh the cursor would remain in
the window until you pressed <RETURN>; however, if you entered
01/01/83» filling the window comp1ete1yp the cursor would automati-
cally move to the next window in the screen image.
Answer "N" to this question if you want the cursor to remain in a
window until <RETURN> is pressedp at which time DataFlex will then
(and only then) move the cursor to the next window.
The next system option is:
IS THIS AMULTIUSER SYSTEM (Y OR N) N
If your DataFlex license is antl]t1(lser Yersionp you MUST respond with
"Y" to this question to use your system in multiuser mode. On single
user systms always respond with "N".
If you responded "Y" to the multiuser question, the next system option
is (this question will not display for single-user systems):
MUST THE DISK DATA BE PRE-ALLOCATED? (Y OR N)
If you answer this question "Y"es, afile will be created each time
you establish adatabase (see Designing Databases) which is large
enough to contain all the data your database can hold with the full
number of records which you will later specify in establishing your
databases. This question should be answered "N"o unless: (I) your
operating system requires it (some multi-user systems do--if yours
does, the fact is noted on the installation notes for your network);
or (2) you require for some other reason for the maximum disk space
your database could occupy to be pre-reserved. Pre-a11ocation of disk
space can slightly improve performance in large databases with
multiple files and numerous complex indexes.
When these three questions have been answered, you will be prompted:
IS THIS DATA CORRECT (YIN) Y
If you have made amistake in an entryy aresponse of "N" will repeat
the questions. If the entries are correct Éñtér "Y" to proceed.
~~~~~~~
Copyright (C) 1984 Data Access Corporation 05/ 16/84

A-28 INSTALLING DATAFLEX DataFlex 2.0 User's Manual
PART NO: SET FUNCTION KEYS -FLEX-KEYS
In this section you will be asked to press certain keys on your key-
board which will be used throughout DataFlex to execute the Flex-key
functions (FIND arecord, SAVE arecorch etc.). DataFlex will read
your entries from the keyboard as you make them and retain the
internal codes generated as the proper response for the particular
Flex-key function.
The keys selected as Flex-keys must not be ones that are used to gen-
erate characters during normal data entry (numbers, 1etterm periods,
commam etc.). You can use taM line feedg delete, arrows, here-is,
and any control character (formed by pressing the CONTROL key and a
7etter at the same time), or any "function key" (usually an extra row "
of numbered keys on the top row or on the left side of your keyboard).
If you have function keys, they do not have to be used to execute the
Flex-key comands; that is your option. SETSCREEn will figure out
what kind of function keys your terminal has by asking you to press
one (or tWO) of them. The function keys you press as Flex-keys must
all have the same "lead-in" code. Some terminals have "grouped"
function keys with different lead-in COde5y in which case you can only
use one group. You will be prompted:
DOES YOUR TERMINAL HAVE FUNCTION KEYS? (Y OR N) N
If you haveg and want to use7 function keys? answer "Y". Otherwise
press <RETURN> to make adefault entry of "N".
After you have established whether or not your system has function
keysg you wi11 be asked to press a series of keys to assign keys to a
particular Flex-key function.
PRESS KEY CORRESPONDING TO FUNCTION
...will lead off the following list:
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual INSTALLING DATAFLEX A-29
RETURN OR ENTER KEY RETURN (13)
ESC ( EXIT PROGRAM ) ESCAPE (27)
PREVIOUS FIELD (BACK FIELD) LINE FEED (ID)
DATA WINDOW OR (E.G. 'L" )"J' (95) (must be printable char.)
FIND A RECORD TAB (9)
SUPERFINO CTRL F (6)
SAVE A RECORD CTRL S (19)
DELETE A RECORD CTRL D (4)
PREVIOUS RECORD (SEQUENTIAL) CTRL P (16)
NEXT RECORD (SEQUENTIAL) CTRL N (j¿j)
CALCULATE FUNCTION KEY CTRL C (3)
CLEAR DATA WINDOWS ON SCREEN CTRL A (l)
HELP KEY CTRL Q (17)
USER DEFINED FUNCTION CTRL U (21)
BACK SPACE( DESTRUCTIVE ) DEL/RUBOUT (127)
LEFT ARR0W( NON DESTRUCTIVE ) CTRL H(8)
RIGHT ARROW CTRL L(12)
UP ARROW CTRL K (li)
DOWN ARROW CTRL V (22)
INSERT CMRACTER CTRL Z (26)
DELETE mARAcTER CTRL X (24)
IS THIS DATA CORRECT (YIN) Y
This list is the "standard" assignment of Flex-keys that can be
implemented on any system sInce it uses exclusively universal keys for
each function. You may set up the Flex-keys any way you want on your
system. Then all DataFlex programs running on your system will use
your assignments. Refer to the operator documentation for the meaning
of each of these Flex-key functions.
NOTE: You may not have duplicate assignments for aFlex-key. Some
terminals will generate the same code from two keysp typically back
space and back arrow. If this is the case with your computer, you may
NOT use both of these keys. The two forms of backspacing provided by
DataFlex are: destructive (deletes data) and non-destructive (moves
the cursor back without deleting data previously entered). They MUST
be assigned to keys that generate different internal codes.
Except for the data window charactem all of the above must be ASCII
non-printable characters.
PART THREE: SET SPECIAL SCREEN FUNCTIONS
In this section you will configure DataFlex to clear the screen, set
highlighting, and other screen attributes. Ail data in this section
will be entered as decimal numbers with spaces separating entries that
require multiple values (e.g. ESC "=" are two values that might be
———————
Copyright (C) 1984 Data Access Corporation 05/16/84

A-30 INSTALLING DATAFLEX DataF1ex 2.0 User's Manual
entered as 27 61). Up to four (4) values can be entered for each
function. It will be necessary for you to turn to the screen control
section of your terminal manual in order to complete this part of
SETSCREEn.
NOTE: IF AFUNCTION DOES NOT EXIST ON YOUR TERMINAL, ENTER a <RETURN>!
FUNCTION EXPLANATION & EXAMPLE
CLEAR SCREEN Enter the code(s) that clears the screen
(separated by spaces if more than one
number is to be entered).
EXAMPLE: 27 42
REQUIRED FUNCTION
CLEAR TO END OF SCREEN Enter the code that clears from the cursor
to the end of the screen.
EXAMPLE: 27 34 l
OPTIONAL FUNCTION
HIGHLIGHTED SCREEN If your terminal supports highlighting (or
another display attribute that you pre-
ferL enter the value that begins high-
lighted display. Then data in the windows
will appear in high1ighteci mode.
EXAMPLE: 27 40
OPTIONAL FUNCTION
NON-HIGHLIGHTED SCREEN Enter the code(s) to restore your terminal
to the normal (low intensity) mode.
EXAMP,LE: 27 41
OPTIONAL FUNCTION
DESTRUCTIVE BACK SPACE This code will move the cursor one space
to the left, replacing the character with
a space.
EXAMPLE: 8 32 8
REQUIRED FUNCTION
TERMINAL INITIALIZATION This code is provided to set your terminal
to the proper mode (if required) when
DataFlex is loaded.
EXAMPLE: 27 40
HOW MANY (MARACTERS WIDE IS YOUR TERMINAL? (79 is standard)
HOW MANY LINES LONG IS YOUR TERMINAL? (24 is standard)
USE 7 OR 8 BIT ASCII CJIARACTERS? ( 7 is standard)
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual INSTALLING DATAFLEX A-31
"—_—_—"""
PART FOUR: CURSOR 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
as the screen functions above,, as decimal numbers separated by spaces.
The cursor positioning function will generate astring value that will
be sent to the terminal. The following questions will determine how
that string is constructed.
POSITION LINE BEFORE COLUMN (Y OR N) Y
CODES TO PRECEDE LINE COORDINATE: 27 64
If your terminal expects the line co-ordinate to precede the columm
then answer the question with "Y"; otherwise respond with "N". Next,
enter the character string (in decimdb separated by spaces) to
preceed the line and column coordinates. If your terminal does not
require acharacter string before one of these coordfnatés» just enter
<RETURN>.
LINE POSITION CODE OFFSET (BIAS) 32 (line Ois code 32)
CODES TO PRECEDE COLUMN COORDINATE:
COLUMN POSITION CODE OFFSET (BIAS) 32 (column O Is code 32)
CURSOR POSITIONING TERMINATION CODE:
The offset codes will be ADDED to the actual cursor position starting
at zero.
Most terminals require the positioning codes as a one byte binary
number. For these, answer the question below with a"B". Some
terminals (mostly ANSI terminals) require the code as an ASCII number.
SEND CURSOR POSITIONING CODES IN BINARY OR ASCII (B/A): B
NUMBER OF NULLS TO SEND AFTER CLEAR SCREEN AND CURSOR POSITIONING: O
Some (mostly older) terminals require adelay after a screen opera-
tion. For these. enter the number of null fill characters that should
be sent.
IS THIS DATA CORRECT (YIN) Y A "N"o response will allow you to verify
your entries or repeat this section in case of errors.
""""""=============== =====
Copyright (C) 1984 Data Access Corporation 05/16/84

A-32 INSTALLING DATAFLEX DataF1ex 2.0 User's Manual
————————
THE SETSCREEN MENU
This ends the initial setup of DataF1ex screen codes. If you enter an
incorrect code9 or want to change afunction 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
'terminal on the pre-defined list under the identifier you established
for it.
EDIT:
(I) SET SYSTEM OPTIONS
(2) ASSIGN FUNCTION KEYS
(3) SET TERMINAL CCNTROL CODES
(4) DISPLAY PRESENT CCNFIGURATION
(5) PRINT CONFIGURATION
(6) END /SAVE CMNGES
(7) ABORT SETSCREEN -DO NOT WRITE QIANGES
From this menu you may select the function which you want to change.
B
It will generally be useful to select option (5) to print a copy of
the configuration as a reference for the FLEXKEYs.
When your configuration is comp1etey use option (6) to save your
changes and return to the DataFlex Menu.
~
Copyright (C) 1984 Data Access Corporation 05/16/84

——————————
________—_—————_——__~~~~~_——== ==""_" _""_"" A—33
~
__————— m"""""""" """"""" "" "
—— _———
:m:z==== OPERATING TUTORIAL ::::F:E:::
——————————
——
—— —- ———————————————
———
———————
-— —————
This tutorial is designed to familiarize you with DataFlex. Its
objective is to introduce you to several necessary concepts and func-
tions of the systE%n without going into depth about how the processes
are carried out within DataFlex.
It is intended that you use this section of the user's manual in a
learning "session". or series of "sessions"» actively exploring Data-
Flex on your system with the manual as your guide.
The Programming Tutorial in the next section of this manual will guide
you through the steps involved in creating your own database with
DataF1ex
SYSTEM álECKOUT. ..
Before proceeding with the tutoriab certain prerequisites must first
be confirmed to make sure that DataFlex is properly operational on
your system. We dorót want an improper or incomplete installation to
interfere with your introduction to DataFlex.
First» you should have followed the installation instructions packaged
with your DataFlex Master diskettes for your particular version of the
product. Next. you should have executed the SETSCREEn Program to con-
figure DataFlex for your particular system's CRT control codes and
command key setup. Also, you should have printed out alist of your
system's command key set up using option 5on the SETSCREEn Menu to
give you aguide to follow during the familiarization. If you have
not run SETSCREEm or have not printed your Flex-key configuratiom do
those steps before proceeding further here.
With these items accomplished, you should turn on your system and:
FOR FLOPPY DISK BASED COWUTERS, load adiskette containi ng a
copy of the operating system and the DataFlex programs into
drive "A: ", and the sample data diskette into drive "B: "; OR
ON HARD DISK BASED COKPUTERS, "boot" the systa and "log in"
to the drive or work area where DataFlex has been loaded from
the DataFlex master diskettes.
You should then be able to determine that specific DataFlex files are
available on your "logged in device" (see glossary) by having the
system display adirectory.
Copyright (C) 1984 Data Access Corporation 05/ 16/84

A-34 OPERATING TUTORIAL DataFlex 2.0 User's Manual
If we assume that you are logged in to the "A: "drive (and you may not
be -- particularly on a hard disk systemL then you should be able to
enter the DIR command indicated below (shown in boldface) and have a
display containing the listed file names (quite possibly in adif-
ferent 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):
A>DIR *.COM <RETURN> (or DIR *.CMD on CP/M-86)
A: FLEX .COM COMP .COM QUERY .COM
If these file names are displayed, then you have the necessary compo-
nents in 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 in-
structions to make sure that they were completed.
O.K., LET'S GET STARTED. ..
DataFlex can be run in acompletely menu-controlled envirorment. We
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 <RETURN>.
A>FLEX <RETURN>
In afew seconds, the DataFlex Menu should display...
YOUR REGISTERED NAME Serial #:
0"" " """ "
l l ---- DataFlex Ver. 2.0 -—-- ii
li MASTER MENU li
n0
}lDataFlex demo files l
l2 DataFlex Configuration
l3 System Utilities l
l4 Set Systan Date l
5 Run DataF1ex Configuration
}6Enter System Command l
l7Exit To Operation System l
i
I,
"i
lPlease select one of the above o¶¶tions or press l
i<RETURN> to go back one menu >>>>>>>>>>>>>>>> l
—
——————
*** DataFlex Menu Systw ***
————————— ————————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual OPERATING TUTORIAL A-35
The Menu is aDataF1ex configuration (named MENU.FLX) that stores the
menu option "data" in adata base file. You will learn how to modify
the existing menus and put your own configurations on the screen later
on. For now we will use the standard menu to begin our tour through
DataFlex.
SELECTING A MENU OPTION...
To select an option from the meñi-b just press the corresponding number
AND <RETURN>. Let's start by selecting the DataFlex Demo Menu...
press anumber one (I) on your keyboard, and another menu will
display:
YOUR REGISTERED NAME Serial #:
li DataFlex 2.00 li
li Demo Data Files li
Oe
llEnter Vendors "l
l2Enter Inventory Items l
l 3 Enter Customers l
l4Inventory Movement Report l
l 5 Customer Report l
l6Vendor Report I
l7 (N-LINE Invoice l
l8 QUERY Data Files l
l'
"f
l Please select one of the above options or press l
l <RETURN> to go back one menu >>>>>>>>>>>>>>>> _l
*** DataFlex Menu System ***
This menu displays alist of predefined options that you can use to
see how DataFlex applications work. Enter anumber one (l) to select.
the VENDOR File Maintenance option. DataFlex will now load and display
a screen "image" used for the entry, recall and editing of data in the
sample VENDOR data base file.
Copyright (C) 1984 Data Access Corporation 05/16/84

A-36 OPERATING TUTORIAL DataFlex 2.0 User's Manual
======——————————————————
—————————————————————
————————
DATA ACCESS CORPORATION VENDOR MASTER FILE
VENDOR NUMBER: <>
COMPANY: <>
ADDRESS:
CITY: ST: _ZIP:
PHONE :() "
TERMS (DAYS): CREDIT LIMIT: $._
OUTSTANDING CREDIT: $._
REMAINING CREDIT: $._
TOTAL PURMASES: $._
LAST PURMASE: _/_/_
WIndows in < > can be used to FIND vendors
FLEX-KEY OPERATION...
DataFlex uses "Flex-keys" to accomplish various actions on a screen
display. These are in lieu of a menu which would list the options
available to asystem operator at any given point in an application.
The Flex-key concept works well because the same keys are used for the
same function throughout all DataFlex applications on a given system
Foe examp1ep the same key is used on all screens to FIND arecord 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
Flex-keys is in this manual in the chapter on Operator Procedures.
"FINDING" ARECORD IN THE DATA BASE...
Your cursor will wait in the VENDOR NUMBER "window" on the screen.
Enter anumber one (IK and press the FIND Flex-key on your keyboard
(as defined in the Flex-key list printed with SETSCREEn). The screen
should display information for Data Access Corporation. You have just
executed your first DataFlex Commandl
CLEARING INFORMATION FROM THE DISPLAY SCREEN...
To remove this information from the screem press the CLEAR ALL Com-
mand Key. The screen should be restored to the same status as when it
was originally displayed from the menu.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual OPERATING TUTORIAL A-37
——
"FINDING" A RECORD BY AN ALTERNATE "KEY"
This screen is configured to allow VENDORs to be found by either the
VENDOR NUMBER or the VENDOR NAME. Above. you found arecord by VENDOR
NUMBER. Now, we can find the same record by VENDOR NAME. While the
cursor is positioned in the VENDOR NUMBER W1ndOWg press <RETURN>» and
it should move to the VENDOR NAME window. (The zero which appears in
the VENDOR NUMBER wIndow signifies null input, and may be ignored
whenever it appears.) With the cursor in the VENDOR NAME WindOwy type
the word "DATA" (in capital letters), and press the FIND Flex-key.
Again, the information for Data Access Corporation should be
displayed.
MOVING THE CURSOR AROUND THE SCREEN...
Pressing the <RETURN> command key will move the cursor sequentially
through the entry wIndows of the screen image. To move backwards on
the screen (for example from the VENDOR NAME window back to VENDOR
NUMBERL press the BACK WINDOW Flex-key. Each strike of <RETURN> or
BACK WINDOW will move the cursor forward or backward one window. One
caution: aBACK WINDOW from the first window, or a <RETURN> from the
last window will cause all the windows to c1earg and possibly a
"record" to be saved which you didn't intend to. The safe way to
clear all the windows is to strike the CLEAR ALL F1ex-Key» and to
leave the screen altogether, is to strike the ESCape Flex-key.
"SCANNING" THE DATA BASE...
DataFlex provides a means for you to scan the records in the data base
by any pre-deflned key index. You can enter the index at any point
and move forward or in reverse through the records in the data base
file. With aclear screen image (as described above) and the cursor
in the VENDOR NUMBER window, press the NEXT RECORD Flex-key. Vendor
number "l" should be displayed. NOWg press NEXT RECORD again...
vendor number "2" should be displayed. This same process can be used
on any Indexed window on aDataFlex screen image. It will not
function on a window that has un-indexed data.
Ascan of data base information can begin at any place in an index.
For example if you wanted to scan all records with aVENDOR NAME that
started with the letter "G", you would move the cursor to the VENDOR
NAME window and enter a"G". Then press the NEXT RECORD Flex-key and
the first record in the data base which has aVENDOR NAME alpha-
betlcally following the letter "G" wIll be displayed, possibly "GARNER
SYSTEMS" or "GENERAL ELECTRIC". To scan to the record following the
one disp1ayedD press NEXT RECORD agaim and agaim etc. To move in
reverse, use the PREVIOUS RECORD Flex-key.
==",~== ——————
Copyright (c) 1984 Data Access Corporation 05/16/84

A-38 OPERATING TUTORIAL DataF]ex 2.0 User's Manual
ENTERING A NEW RECORD INTO THE DATA BASE...
So far everything that we have done has used data already stored in
the data base. It's time for some of your own information! Clear the
screen using the CLEAR ALL Flex-key. Next. press the <RETURN> Key and
azero (O) will be displayed on the screen temporarily; when your new
data is saved aVENDOR NUMBER will automatically be assigned to your
new entry.
The cursor should now be in the VENDOR NAME window. Type the name
"MICRO MANUFACTURING" and press <RETURN>. Then fill in afictitious
address, city. state, ZIP, area code and phone number, terms and
credit limit. When the credit limit has been entered, your data for
MICRO MANUFACTURING will be saved In the data base automatica11y. The
remaining windows on the screen contain calculated data that is up-
dated by other parts of the system. No operator entry can be made to
those windows.
The new record is now stored in the data base. To FIND itg place the
cursor in the VENDOR NAME window, type MICRO MANUFACTURING and press
the FIND Flex-key. MICRO MANUFACTURING'S record should be displayed
on the screen. You can CLEAR the screen image, or use NEXT or
PREVIOUS RECORD Flex-keys to scan other records in the data base.
MANGING INFORMATION IN THE DATA BASE...
One of the most important functions of any information system is to
provide for the on-going updates to stored data. This would include
such examples as address changes in amailing list. price changes in
an inventory system, etc. The process of making these changes in
DataFlex is easy... you FIND the record to be changed or updatech
enter the necessary changes on the displayed screen imageg and then
SAVE the record back to the data base. Let's try it...
FIND the data base record for MICRO MANUFACTURING. Move the cursor
down to the phone number windows and change the existing data to
something else (e.g. (414)354-6868 to (939)456-9876). Now press the
SAVE Flex-key, and the record will be stored back in the data base
with the changed phone number. FIND MICRO MANUFACTURING again to
verify that your change has been recorded.
The SAVE Command can be executed at any time that arecord is dis-
played on the screen image. The displayed information wIll be SAVEd
regardless of the position of the cursor in the image. This allows
you to save keystrokes by moving the cursor as far Into an image as
necessary to change information, and then execute the SAVE without
moving to the end of the screen.
HOW TO EXIT THE SCREEN & RETURN TO THE MENU...
To leave any DataF1ex screen image and return control to the Menu,,
—————————————————————————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual OPERATING TUTORIAL A-39
___—————_———=———
simply press the ESCAPE Flex-key. The screen image will clear and in
amoment the DataFlex Menu will re-display ready for another
selection.
CHECKPOINT...
SO FAM we have explored:
-- Loading DataFlex from the operating system
-- Making aselection from the DataFlex Menu
-- Displaying a screen "image"
-- FINDing information in the data base
-- CLEARing ascreen "image"
-- Moving the cursor around the screen image
-- Scanning data base information
-- SAVEing new fnformation in the data base
-- Changing existing information in the data base
-- Exiting from adisplay screen to the menu.
If you are comfortable with the operation of the system at this point,
proceed to Phase II to build your own sample application file. If
there are areas of this section which are unclean or if you just want
to develop more of afamiliarity with the various operations, you can
review any of the preceding operations until you feel comfortable
enough to move on to the next phase.
====—===—————~—————————~~~—~~——— ~~~~+ ————
Copyright (C) 1984 Data Access Corporation 05/16/84

A-40 OPERATING TUTORIAL Dataf1ex 2.0 User's Manual
================================"===="====_——~~~———~~——— —
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (C) 1984 Data Access Corporati on 05/]6/84

===== ——_""""_—"~______"_____—————~——====Z=Z==== A~41 -
==========
EE2á2Es QUERYING THE DATABASE ====
="=="===== ""~"~"""""
—————————————
OVERVIEW
The DataFlex QUERY Program enables any level of system user to quickly
and easily extract information from aDataFlex database. QLJERY can
automatica11y format the file data for reportm screen displays, or
disk files. The information can be output by any index, and can be
selectively extracted according to specifications entered at run time.
The operation of QUERY is completely interactive and non-technical.
Additional features of the QUERY Program include optional tota11ing of
numeric fieldm and afull range of logical selections (less tham
less than or equal tOp etc.) can be used. Up to ten selections per
session are allowed.
Output from QUERY is device-independent, meaning that it can be
directed to the screen, printer or adisk file. If QUERY'S output is
directed to adisk file,, the data is stored in ASCII format so that it
can be edited or read by other programs. QUERY also offers the
optiom once asuccessful QUERY has been comp1etedp to save it to disk
as a report configuration source file which can be compiled and run as
aDataFlex program repeating the QUERY as many times thereafter as
may be desired. A1ternat1ve]y, the QUERY-produced file may be further
modified to become any other kind of report that may be desired.
Although QUERY can handle only one DataF1ex database file at atimep
prompted multifile data base inquiries can be created as DataF1ex
configurations by use of the REPORT command macro. described in
another section of this manual.
PROGRAM START-UP
QUERY is generally started from one of two levels of the system: a
menu selection or the operating system command mode.
If the DataFlex MENU system is installed and active on your system
enter the number corresponding to QUERY on the Data Flex Demo File
Cíu-y"ight (C) 1984 Data Access Corporation 05/16/84

A-42 QUERYING THE DATABASE DataFlex 2.0 User's Manual
Menu or other menus on which it may be included on your system. For
examp1e7 choice number 8in the Demo menu below:
DataFlex Demo Files
lEnter Vendors
2Enter Inventory Items
3Enter Customers
4Inventory Movement Report
5 Customer Report
6Vendor Report
7ON-LINE Invoice
--> 8 Query data files
If the menu systw is not in USév QUERY may be invoked from the
operating system by simply typing the program name:
A>QL)ERY
If the file number assigned to the DataFlex data file is knowm QUERY
can be given that number on the operating system command line and the
step of displaying alist of files available for query will be
skipped. E.g.:
A>QUERY 21
If no file number accompanies the entry to QUERY, the program will
display alist of files available on the system and prompt you for a
selection. Enter the number of the file to be queried.
File File
Number Namé
21: VENDOR
22: INVENTORY FILE
25: CUSTOMER FILE
29: LINE ITEMS
ENTER FILE NUMBER. OR RETURN FOR MORE FILES: 21
====""=="""""~~"""~"""""""""""""""""""""""""" "" """""""""
""",————" """"""
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual QUERYING THE DATABASE A-43
——————
—————— —————
PROGRAM OPERATION
When afile has been selected, QLJERY will display the names of all of
the fields in the selected data file. For example:
O: RECORD #I: VENDOR 2: ADDRESS
3: CITY 4: STATE 5: ZIP
6: PH0NE_AC 7: PHONE_EX(MG 8: PHONE_NUMBER
9: TERMS 10: CREDIT_LIMIT II: CREDIT_USED
12: PURMASES 13: LAST_PURQ1ASE
SELECT THE ITEMS THAT YOU WANT TO BE QUERIED FROM
DATA FILE Á'21<VENDOR>
WHEN YOUR FIELD SELECTIONS ARE CONF'LETED, PRESS <RETURN>
TO CONTINUE ON TO THE NEXT SECTION OF QUERY.
TOTAL COLUMNS =10 ENTER FIELD # TO PRINT: 2
ENTER FIELD # TO PRINT: is where you respond with the number of the
field from the displayed list in the order you wish the information to
be displayed or output. Your entries should be: field #, <RETURN>,
field #, <RETURN>, etc. If you output your query in areport format7
the columns and the column headers in your display or printout will be
the field names which you select here.
The COLUMNS ALLOCATED prompt will accumulate the number of horizontal
columns (characters) used as you select fields for formatted output.
The number of columns are calculated by taking the larger of: the
size of the field you entered from the ]ist» or the size of the data
field name as it appeared on the list plus a space separator.
You may enter as many fields to be included in the QUERY as you want.
However, keep the following in mind: the standard video display
screen and some printers can only accomnodate 80 columns (some
actually accomnodate only 79). If the COLUMNS ALLOCATED exceeds 80
(or 79), the screen will "wrap around" which may make the line of
unformatted data unreadable.
Many printers will accommodate 132 columns or more (e.g. printers
capable of printing at 12 characters per inch or more). QUERY can
create up to 255 characters of output per line.
——— ———
Copyright (c) 1984 Data Access Corporation 05/16/84

A-44 QUERYING THE DATABASE DataFlex 2.0 User's Manual
As you respond to the prompt line, QUERY will mark your field selec-
tions by placing an asterisk in front of the field tag name. Should
you change your mind about afield that has been selected for outpUt9
cancel the last selection by using the BACK WINDOW comand key.
When all desired fields have been chosem press the <RETURN> key to
move on to the next section. QUERY will ask if totals are wanted on
the numeric fields.
DO YOU WANT TOTALS PRINTED AT THE END OF THE QUERY? <N>
The next prompt will be:
ENTER ITEM TO SELECT BY OR PRESS <RETURN> TO CONTINUE:
MAKING SELECTIONS IN QJJERY
These are the logical operators available in QUERY (less than, less
than or equal to, etc.)c that are used to define asubset of data from
afile.
<: LESS THAN {: LESS THAN OR EQUAL TO
>: GREATER THAN }; GREATER THAN OR EQUAL TO
if the field selected is numeric you will see:
NUMBER:
=: EQUAL TO X: NOT EQUAL TO
if the field selected is alphanumeric you will see:
STRING:
S: STRING COMPARE @: STRING INCLUDES
As you respond to the prompt line it will change by translating your
responses into the appropriate words. QIJERY will also mark the field
names list on the upper portion of the screen with the selected
symbol. If agreater than and aless than are specified for the same
fielch a range of records between the two values will be selected.
The maximum number of selection criteria allowed fs 10.
QÍOOSING AN OUTPUT SEQJJENCE FOR QJJERY
QUERY will display the available indexes for the file. Select the
index that you want to determine the sequence or order of the QUERY
output. If you press <RETURN> and do not enter an index number, the
output will be ordered according to the record number of the data.
—————
———————.,————-————————-—
Cnpyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual QUERYING THE DATABASE A-45
—— —————————
—
*
l---> <VENDOR ID>
2---> <VEND0R NAME>
OUTPUT OF THIS QUERY SHOULD BE LISTED BY:
QUERY will then ask for the TITLE OF THE REPORT. This information
wiR appear at the top of each page of areport format QUERY.
ENTER THE REPORT HEADER:
Next, QUERY wi71 prompt for the output destination. At this point you
also have the option of using QUERY to create aconfiguration file for
aDataFlex report. The default for this prompt is to output areport
formatted query to the screen.
AT THIS POINT YOU MAY SELECT WHERE THE OUTPUT OF THIS QUERY
SHOULD BE DIRECTED. YOU MAY ALSO SELECT THE FORMAT FOR
AREPORT IMAGE FILE.
OUTPUT QUERY TO:
(S)creen, (P)rinter, (F)i1ey (R)eport imagep or (A)bort:
An entry of "S" will cause the output to go to the CRT screen; "P"
will send the output to the printer; "F" will direct it to adisk fi7e
(you will be prompted for affle name); or "R" will create a"Report
Image" (see next paragraph). A<RETURN>, or default, response will be
executed as though "S" were selected. Both the "F" (file) and "R"
(report configuration) options will trigger the questions below.
USING QUERY TO GENERATE A REPORT CONFIGURATION
By making an "R" response to the output option prompt you will start
the creation of areport configuration file. The next prompt will ask
which of three formats, Report, Reach or Quoted, you want used for the
data output when the report is run:
SELECT THE OUTPUT FORMAT TO BE USED
1)Report, 2)Reád» or 3)Quoted format:
I) REPORT FORMAT: A formatted columnar report consisting of atitle
sectiom column headerm data elements arranged in columns under their
appropriate names, and totals (if selected) at the end.
2) READ FORMAT: A sequential ASCII format consisting of each data
element on a separate line terminated with acarriage return. This is
the format that the DataFlex utility READ uses to "Read" data into a
DataFlex data base file.
__—————__——______=————
Copyright (C) 1984 Data Access Corporation 05/16/84

A-46 QUERYING THE DATABASE DataF1ex 2.0 User's Manual
——————————————
===——
3) QUOTED FORMAT: Asequential ASCII file format compatible with many
versions of BASIC and the "merge" files created and used by many word
processors, in which quotes and commas ("BJ') are used to delimit
fields and each record is terminated by acarriage return. Leading
and trailing blanks are trimmed from the fields of output from QUERY,
but not from output of the generated report configuration (unless you
subsequently edit it to do SO).
Then you will be prompted:
ENTER THE REPORT IMAGE NAME (8 MARACTERS MAX)?
Respond with the fi7ename up to eight (8) characters in length that
you wish the report source configuration file to be stored under by
the operating system. QUERY will add an extension of .RPT to your
entry resulting in afinal 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.
If afile already exists with that name (filename.RPT), QUERY will
issue awarning message to that effect and ask whether or not to
overwrite the file. The default response in this case is <N>.
Next you will see a message:
REPORT IMAGE CREATED!
PRESS <RETURN> TO CONTINUE......
QLJERY will then again display the output option prompt shown above.
which is intended to give you the opportunity to output the actual
data (as opposed to the report configuration file which you have just
created). If your only purpose for running QUERY at this point was to
create the REPORT configuration fí1eg choice "A" to abort would be
your choice.,
In order to use the report configuration file created by QUERY9 you
must compile it into a.FLX file with the comnand:
A>COMP fl1ename.RPT
where filename is the name you gave the file in answer to QUERYG
prompt 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
other DataFlex configuration source file (see the chapter on How to
Write aConfiguration in this manual). The compiled configuration
would then be executed from the operating system with the comand:
A>FLEX filename {output destination}
—————
Copyright (c) 1984 Data Access Corporation 05/16/84

—— ————————-—————— B"l
——
——————————————————
·
========== ==========
EEEEE===== PROGRAMMING TUTORIAL zm: zz="=
======"=== _______"_"
CREATING A DATAFLEX APPLICATION OF YOUR OWN
In this section of the tutorial, you will experience how easy it is to
create an application using DataF1ex without ever having to "program".
Them once you have an application functionfngg you will be introduced
to what can be done by putting just the slightest effort into
"customizing" your application requirements.
To achieve this, we have decided to appoint you as manager in a
company that has just bought their first microcomputer with word pro-
cessing and DataFlex. As the member of the group who "took acomputer
course in co1lege'% you have been selected to be the one to become
familiar with the new system and to undertake the development (and
perfection!) of some new management information systems.
Being acreative and thoughtful gi"wpó you and your associates recog-
nize the value of properly planning the information system. The first
task defined is to develop apersonnel information system for the
company.
DataFlex provides several methods to implement your application
requirements. The easiest and most efficient at this point is the
facility for you to create an "image" of adata base file on your CRT
screen using aword processor or the DataFíex Editor program.
An "image% in DataFlex termino1ogyg is aformat into which data can
be inserted for output. It can be displayed on a CRT screen, or on a
printed report. The image can include prompting or 1abelling for
information which is stored in the data base, and "windows" where the
stored data will be output. DataF1ex images are created with atext
editor (one is included with DataFlex) or any word processor that can
create and edit aplain ASCII file. Creating an image with your
editor allows you to develop avisual approach to designing your
applications that combines how it looks with how it works.
When an "image" is comp1eté» it may be processed by autility program
supplied with DataFlex, called AUTODEF, into adata base file
definition and data entry screen. AUTODEF reads in the "image" file,
asks you some questions about how you want things to workg and then
outputs another file (called a"configuration source" file) onto your
disk that can be compiled and executed as is, or modified to meet a
particular set of requirements, and then compiled. The rest of this
section illustrates this process. There are othéi"» more flexible ways
of accomplishing these functions (such as through FILEDEF) which are
described elsewhere in this manual.
—-——
Copyright (C) 1984 Data Access Corporation 05/16/84

B-2 PROGRAMMING TUTORIAL DataF1ex 2.0 User's Manual
—'— '————
Getting Started...
To speed the familiarization procesSg we have made up an image file
and printed it below to help you get underway with the task defined
above. We will be using it as the basis of the rest of the tutorial.
You can also use it as is or modify it with your word processor or the
DataFlex Editor to suit your own tastes for actual use in your own
business.
Type it in with your word processor or the DataFlex text editor and
save it under the name PEOPLE, with no extension. It should look like
this:
/SCREEN
,...........,...,......... PERSONNEL FILE ..............................
EMPLOYEE LAST NNE :-FIRST: MI: _
ADDRESSI :
ADDRESS2 :
CITY :ST :_ZIP :
SOC. SEC. #:
DATE HIRED :_j'_J_
PAY RATE :$._
PAY TYPE :_(H=Hour1y or S=Sa1aried)
l*
Refer to the PEOPLE "image" file as we learn some basic DataFiex
terminology and concepts.
The "/SCREEN" on the first line above is aPAGENAME by which we can
address the image with DataFlex connands, The "windows" (see below)
are assigned numbers fn aleft to right, top to bottom sequence. A
given window is addressed by the PAGENAME followed by the number of a
window, for example the EMPLOYEE LAST NAME window above is SCREEN.I.
The underline characters ()that you see above (and in the PEOPLE
file on your disk) are called data "windows". They represent the area
on a CRT screen where information can be entered or displayed. The
number of underline characters in awindow determines the length of
the data that is valid for entry or display. Ten underlines define a
window that will accept ten characters of data input or display.
—————————————————————————————————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual PROGRAMMING TUTORIAL B-3
==———————————————————————————————————————
PEOPLE illustrates the three types of data that can be stored by
DataFlex. The three types are called ASCII» NUMERIC and DATE.
ASCII data is any character or group of characters, that can be typed
from the keyboard: the letters Ato Z and ato z; numbers 0...9;
punctuation such as comma (9)9 period (.)p colon (:Letc.; and space.
That's right... a space charactem generated when you press the space
bar on the terminal keyboarch is just as important to the computer as
any other character.
Examples of ASCII data are: the name of acity (MIAMI), aperson's
name (Mike), or a single character symbol ("N" for new or "U" for
used). Numbers can be entered into ASCII windows, but they are
treated only as characters and have no numeric value or character-
istics. An example of numbers that could be carried as ASCII data
would be identification numbers, such as the registration number on
the side of an airplane (N8847J).
ASCII character data Is represented in the image by underline charac-
ters ()such as that following the employee name in PEOPLE.
By placing certain other characters among the data "window" underline
characters, you can specify either of two other types of data for the
window.
NUMERIC data windows are specified by the inclusion of one decimal
point (.) in place of one of the underline characters for awindow.
They are appropriate for data which signifies quantities, such as
amounts of moneµ volumes of fueñ or quantities of parts in
inventory, particularly if calculations are to be done on the data.
NUMERIC data windows will accept entry only of numbers, the minus sign
(-), and the decimal point (.).
If the decimal point is at the rightmost position in anumeric data
window (.), the window will accept entry of whole numbers only (
9999 but not 9.99 ). If the decimal point is placed within the group
of underline characters that make up a numeric window ( ._ )9
then it formats the entered or displayed data according to the
position of the decimal point (the window ._ would display 12.3
as 12.30).
DATE windows are shoyn in the image by underline characters and
slashes (l) in the specific format "_/_J _", The "Date Hired" in
the PEOPLE "image" is an example of adate window.
The placement of data windowm and any descriptive prompting or other
information is not of importance to DataFlex or the AUTODEF Utility.
Only the three different types of data windows are of interest to
DataFíex. Don't overlook the "/*" at the bottom of the image. Ít¢s
very importantp as you will see.
Copyright (c) 1984 Data Access Corporation 07/18/84

B-4 PROGRAMMING TUTORIAL DataFlex 2.0 User's Manual
______— =
Using your Nord processor or the DataFlex Editors you can inspect the
PEOPLE image file at your leisure... change it9 lengthen one of the
ASCII windows (just add some underlinesh translate the prompting to a
foreign language, etc. By doing this you can get afeet for how an
"image" can be manipulated to be just the way you want it.
Enough about how to do all of this. ietfs get it done! Load DataFlex
from the operating system by typing FLEX. The Master Menu will dis-
play. Select the DataFiex Configuration option from the Master Menu.
On that menw select the option for AUTODEF.
The CRT screen will clear and prompt:
ENTER <RETURN> TO EXIT OR
"ROOT NAME" OF FILE DEFINITION TO CREATE:
If you want to return to the menu, press <RETURN>, otherwise type
PEOPLE to let AUTODEF know the name of the file that you want to work
on. If you are working on asystem where the file PEOPLE is not
located on the "logged in drive", then you must type the drive desig-
nation where the file is stored, for examp1ep "B: PEOPLE" would be a
typical entry for afloppy disk based system where the PEOPLE file is
stored on drive El:.
DataFlex will now display alist of the files created as a result of
AUTODEF'S processing of the PEOPLE file:
FILENAME SUMMARY:
IMAGE NAME d: PEOPLE
FILE ROOTNAME d: PEOPLE
DATAFLEX FILE NAME d: PEOPLE
CONFIGURATION FILE d: PEOPLE.FRM
The "d:"in the above list will correspond to any drive designation
that you may include with PEOPLE (e.g. C: PEOPLE).
DataFlex will then prompt:
WHAT IS THE MAXIMUM NUMBER OF RECORDS "PEOPLE" COULD HAVE?
For the purposes of our work here, asmall number of records will be
sufficient... enter avalue of lOó.
Without further interaction, AUTODEF will read the PEOPLE image file
from the disk. When the image has been read, you will be prompted for
the names of the data windows on the image. Any name up to IS charac-
ters which begins with aletter and contains no spaces can be used.
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 2.0 User's Manual pR0gRAj¶qINg TUTORIAL B-5
~~ ——
===================~~~~—~~~—" """
LNAME for Last Name
FNAME for First Name
MI for Middle Initial
ADDRI for the first line of Address
ADDR2 for the second line of Address
CITY for City
ST for State
ZIP for ZIP Code
SSAN for Social Security Account Number
DATE for Date Hired
PAYRATE for the Pay Rate
PAYTYPE for the Pay Type
Each window will be highlighted by asterisks (***** )in place of the
underline character ( ) as you are being asked about it.
The example below indicates the appearance of the screen when it is
prompting for the Last Name:
.... PERSONNEL FILE .............................
EMPLOYEE LAST NAME :*************** FIRST: MI: _
ADDRESSI :
ADDRESS2 :
CITY :ST :_ZIP :
SOC. SEC. # :
DATE HIRED :_l—j_
PAY RATE :$_._
PAY TYPE :_(H=Hour1y or S=Sa1aried)
ENTER FIELD NAME FOR FIELD_I:
As you proceed, if you wish to back up and rename a windowp the BACK
WINDOW Flex-key will move the asterisk "cursor" back to the desired
window. After all windows have been named, you will have the opportu-
nity to redo the process if any mfstakes have been inadvertently
entered. The prompt is:
Press "C" to continUeg or "R" to re-do this page: _
If the above list has been properly entered9 press "C"; if not, press
"R" to re-enter the window names.
—————
=~
Copyright (C) 1984 Data Access Corporation 05/16/84

B-6 PROGRNNING TUTORIAL DataF1ex 2.0 User's Manual
When "C" is presse6 alist of the window names will be displayed for
you to make aselection of the fields which are to be used to FIND the
data fn the data base.
l. LNAME 2. FNAME 3. MI 4. ADDR1
5. ADDR2 6. CITY 7. ST 8. ZIP
9. SSAN LO. DATE II. PAYRATE 12. PAYTYPE
ENTER FIELD NUMBER TO INDEX OR <RETURN> TO END: _
Since we will want to find personnel by Social Security Number, enter
"9" to select that window for indexing.
DataFlex can allow for duplicate entries in adata fi1eg or it can
reject them. The choice is up to you. In tPe case of a name windowp
you would probably want to allow for duplication, whereas in the case
of asocial security number (which is unique for each person) a
duplicate entry (two identical social security numbers constitute an
erroneous entry) shou7d be rejected.
The next prompt establishes whether or not duplication is allowed:
WILL THE DATA IN THIS INDEX BE UNIQUE? <N> _
If you want duplication alíowech press "N"9 if you want to reject
duplicate entriem press "Y".
Multiple data windows can be used to create asingle index to FIND
information in the data base. The three fields containing data on an
employee's name are a good example of applying this feature. By
combining the LÑ/ÑÉ9 FNAME and MI windowsp asingle index will put
employees in proper alphabetical sequence. That is, they will be in
order by Last Name, then First Nameg then Middle Initia1.
To enter multiple data windows in one index, pÜce the numbers of the
windows in asfngle index entry9 separated by spaces. For the example
at hand. that entry would be:
ENTER FIELD NUMBER TO INDEX OR <RETURN> TO END: L 2 3
Make the above entry to create the second index for the file being
created. Them designate that the data in this index will NOT be
unique (allow duplicate names).
After you have entered the index information for PEOPLE, AUTODEF wIll
process the file definition and create the fndex and data files for
the operation of the application.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual PROGRNNING TUTORIAL B-7
—
Acommand file was created by AUTODEF called PEOPLE.FRM. It is
located on the same disk drive where the PEOPLE image file is located.
It contains the image that we have been working witM and DataF1ex
Commands that make the image function with the data file that was
created by AUTODEF. PEOPLE.FRM looks like this:
.
/SCREEN
.,.......... PERSONNEL FILE ...........................
EMPLOYEE LAST NAME :FIRST :MI :_
ADDRESS1 :
ADDRESS2 :
CITY :ST :_ZIP :
SOC. SEC. #:
DATE 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 PEOPLE.ADDR2
ENTRY PEOPLE.CITY
ENTRY PEOPLE.ST
ENTRY PEOPLE.ZIP
ENTRY PEOPLE.SSAN
ENTRY PEOPLE.DATE
ENTRY PEOPLE.PAYRATE
ENTRY PEOPLE.PAYTYPE
ENTEREND
ABORT
PEOPLE.FRM can be loaded with the DataFlex Editor or your word pro-
cessor and inspected.
Copyright (C) 1984 Data Access Corporation 05/16/84

B-8 PROGRAMMING TUTORIAL DataFlex 2.0 User's Manual
===="="=__~——_~__~————~ ——————————~
PEOPLE.FRM must now be "compiled" to be run under DataFlex. The Data-
Flex compiler reads PEOPLE.FRM in the form that we see 'ft here, and
processes it into'a highly compressed file that contains the internal
codes and instructions on which DataFlex operates. Should we wish to
change the way that the personnel application works (and we will),
PEOPLE.FRM can be modified with your editor and re-compiled. After
processing PEOPLE.FRM, the compiler will output afile called
PEOPLE.FLX.
COMPILING A DataFlex CONFIGURATION FILE
To compile PEOPLE.FRM into an executab7e DataF1ex program select the
DataF1ex Configuration option from the Master Menu screen. On the
Configuration Menu. enter the number for the Compile aConfiguration
option. When prompted there for the file name to compi1ep type
PEOPLE.FRM. Make sure to include the .FRM file extension or you will
be instructing the program to compile the file PEOPLE, which does not
contain the necessary command lines to create an application.
Your disk drives will now become activep and some recognizable por-
tions of PEOPLE.FRM will be displayed on the CRT screen. Don't be
a1armedl You may think that what you see is some form of "program-
mer's revenge". In faCtg it iS adisplay of the comand lines as
DataFiex is compiling them and serves some very useful functions to
advanced DataFlex users.
The file creation processy done with AUTODEF in the case of this
examp1ep creates asupport file required for the compiler. The file
has aname of filename.FD where "filename" is derived from the name of
the image file processed by AUTODEF. The image file name was PEOPLE.
Therefore, afile called PEOPLE.FD now exists on the disk.
When compilation is complete, you will be returned to the DataFlex
Menu. You are now ready to test your first DataFlex application!
From the Configuration Menu or Master Mentg select the "Run aDataFlex
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
which PEOPLE is located followed by the word PEOPLE, e.g. B: PEOPLE.
On ahard 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) has been made.
~
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual PROGRARNING TUTORIAL B-9
————
YOUR REGISTERED NAME Serial #:
———————
00
li DataFlex 2.00 li
li Configuration Utilities li
00
llFile Definition l
l 2 Menu Definition l
I3System Editor l
l 4 AUTODEF (quick entry screen)
l 5 Compile AConfiguration l
6 Run aDataFlex Configuration l
l7File recovery (fre1) l
l8Re-index afile l
9 Generate ASCII file READ l
"t
lPlease se1eCt one of the above options or press l
l<RETURN> to go back one menu >>>>>>>>>>>>>>>> Si l
You have selected to run a DataFlex configuration
Please enter the name of the configuration.......... Fi'PfñPlF
*** DataFlex Menu Systan ***
In afew"seconds? your screen should look like the PEOPLE image that
we have been dealing with. But now it is more than just an image; it
is an active data entry screen that is waiting for you to enter data
iñtOo and recall data from the data base.
ENTERING INFORMATION ON A DataF1ex SCREEN IMAGE
Your cursor should be positioned in the leftmost position of the last
name window. To enter information into the system you simply "fill
in the blanks" in the image. Enter alast name, first nameg middle
iriitiab addresm etc. until all of the windows contain data. If
there is not any data to be entered into aWñYiOWY press the RETURN
key and the cursor will jump to the next window.
When data (and a<RETURN>) has been entered to the last window (Pay
Type in the case of the PEOPLE screenL the displayed information will
automatically be stored in the data base on the disk. ÍtfS that
simple. Now, enter another two or three people in the same fashion...
it will be useful to have afew records stored in the data base as we
proceed.
Copyright (c) 1984 Data Access Corporation 05/16/84

B-lO PROGRAMMING TUTORIAL DataF1ex 2.0 User's Manual
——
RECALLING INFORMATION ON ADataFlex SCREEN IMAGE
Having saved arecord in the data base, the screen image should be
clear and your cursor should be located in the 7eftmost position in
the last name window. Press the FINO Ccxnmand Key. The personnel
record for one of the employees that you just entered on the screen
should appear. Which one is it?? If ail is functioning properly at
this point, the displayed name should be the one alphabetically at the
beginning of those that you entered.
Leaving the cursor in the same place in the last name windoic, press
the NEXT RECORD Command Key. The record next in alphabetical sequence
should now fill the screen windows. This process can be repeated to
scan through the list of all personne7 until the end of the file is
reached. Now try the PREVIOUS RECORD Command Key. Catching on??
You can directly FIND any name in the data base just by entering it in
the name window and pressing the FIND Command Key just as with the
VENDOR screen image covered in PHASE I of the tutorial. To locate
George JoneM record (assuming that eme had been entered for him),
type "Jones" into the last name window and "George" into the first
name window. Then press the FIND Command Key. George jones' record
will be found in the data base and displayed on the screen instantly.
If you were looking for aperson named "Jones" but did not know his
first name9 you could enter just the last name and press FIND. Data-
Flex would find the first Jones in the data base and display his
record. The "first jones'% if there were multiple "joneses" would be
aperson named Jemes with the a1phabetica17y lowest first name. After
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 wanted to display the record for a person and could not remem-
ber the exact spelling of his name9 enter something c1ose7 or the
first part of the name. For example, if you wanted to display the
record for McDougab you could enter 'NCO". DataF1ex will then find
the record closest to the data that you have entered and display it.
If the displayed record is not the person that you were looking fom
(there might be aMcOonald In the data base who would be fOund if you
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.
Impressed? You should be. You've done in amatter of minutes what it
could have taken an experienced programmer at least days to complete
with conventional software tools. Good jobll And wefve only begun to
peek at the power of DataFlex!
———— ——— ~~
—~=
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex
2.0
User's
Manual
PROGRAMMING
TUTORIAL
B-ll
Remember
that
in
AUTODEF
you
were
asked
which
of
the
data
base
fields
were
to
be
used
to
find
records
in
the
data
base?
You
selected
the
name
fields
and
the
social
security
field.
To
find
a
record
by
social
security
number,
press
CLEAR
ALL
to
remove
the
currently
displayed
recordg
then
press
RETURN
to
move
the
cursor
down
to
the
social
secur-
ity
number
window.
If
you
should
move
the
cursor
too
farp
press
the
BACK
WINDOW
Comnand
Key
to
move
the
cursor
backwards
in
the
image.
With
the
cursor
in
the
social
security
number
window9
you
can
enter
a
known
number
and
press
FIND
to
display
the
record.
Om
just
press
the
FIND
Command
Key
to
recall
the
record
of
the
individual
with
the
lowest
social
security
number.
The
NEXT
and
PREVIOUS
RECORD
Command
Keys
will
now
cause
a
sequence
of
records
to
be
displayed,
in
orderg
by
social
security
mumber.
OECKPOINT...
So
farp
you
have
never
left
the
displayed
DataFlex
data
entry
screen.
You
stored
records
in
the
data
base
alphabetica11y
by
simply
typing
data
Into
the
windows
on
the
screen,
and
then
recalled
and
displayed
the
information
directly
or
in
two
different
sequences
(name
and
social
security
number)
with
single
key-stroke
commands.
QJSTOMIZING
YOUR
DataFlex
APPLICATION...
As
good
as
this
system
for
personnel
information
is
(given
the
time
that
you've
spent
on
it)>
1etG
get
picky...
how
could
it
be
better?
Where
could
it
be
improved?
Letts
start
with
appearance
of
the
screen
itself.
Is
the
general
lay-
out
of
the
information
easy
to
read?
...is
the
information
in
logical
order?
We
shall
accept
that
it
is.
However,
you
have
designed
and
built
it7
and
have
a
knowledge
of
its
inner
workings.
The
new
person
in
the
office
who
will
be
doing
most
of
the
data
entry
of
the
personnel
information
will
not
have
the
knowledge
that
you
do.
What
might
that
person
need
or
want
to
know?
Some
suggestions:
How
about
a
help
message
about
finding
stored
records?
...or
a
message
explaining
how
to
exit
the
screen
and
return
to
the
menu?
Displaying
information
on
the
screen
with
the
data
will
make
the
operation
of
the
system
more
"frlendly'b
and
reduce
the
num-
ber
of
questions
that
might
have
to
be
answered
as
different
people
use
the
computer
based
personnel
information
files.
Copyright
(c)
1984
DaÉa
Access
Corporation
05/16/84

B-12 PROGRAMKING TUTORIAL DataFlex 2.0 User's Manual
Changes of this type refer only to the appl'lcatiom not to the struc-
ture of the information that is stored in the data base. Therefore.
we need only to modify the PEOPLE.FRM file since it controls the
function of the personnel application. Once our modifications are
made, PEOPLE.FRM can be recompiled and the application will have new
features as a result of the changes.
The modifications are made to PEQPLE.FRM with the text editor. To
help identify which windows can be used to FIND information in the
data base, you can place some kind of symbol around the name and
social security number windows in the screen image. Messages to the
operator about how the image works can be simply typed at the bottcm
of the image for reference. These alterations of the image change the
way that the application LOOKS.
Other modifications can be made in PEOPLE.FRM to the comands them-
selves. New commands can be addecb or existing connands can have
operational characteristics added to them to change the way that the
application WORKS.
To proceed with these modifications, load the PEOPLE.FRM file with
your text editor or word processor and make the additions to ft that
are shown in boldface in the file on the next page.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual pR0gRAmNg TUTORIAL B-13
/SCREEN
,.,,.,.,.................... PERSONNEL FILE .........................
Last First MI
EMPLOYEE NAME :<_'
ADDRESSI :
ADDRESS2 :
CITY :ST :_ZIP :
SOC. SEC. # :<>(NO DASHES!)
DATE HIRED :_j/_J_
PAY RATE :$.._
PAY TYPE :_(H=Hour1y or S=Sa1aried)
Enter aName or Soc. Sec. # and press FIND to display record.
OR press <ESC> to exit and return to the DataF1ex Menu...
l*
OPEN PEOPLE
ENTER PEOPLE
ENTRY PEOPLE.LNAME // double slashes allow
ENTRY PEOPLE.FNRIE // you to put comments
ENTRY PEOPLE.MI // into the corrmand area!
ENTRY PEOPLE.ADDRI
ENTRY PEOPLE.ADDR2
ENTRY PEOPLE.CITY
ENTRY PEOPLE.ST
ENTRY PEOPLE.ZIP
ENTRY PEOPLE.SSAN
ENTRY PEOPLE.DATE
ENTRY PEOPLE.PAYRATE
ENTRY PEOPLE.PAYTYPE {CAPSL0CK.MECK="HS"}//forces entry to
//uppercase and accepts
//on1y letter Hor S
ENTEREND
ABORT
When you have made these changes to the PEOPLE.FRM file, save your
edited file to disk, recompile itp and execute again from the menu to
see the results of the changes.
Several other enhancements could be included here for PEOPLE. For
example, a range check could be applied to the Pay Rate entry to make
sure that it did not exceed acertain value, or State could be set to
accept only the state in which your business resides if you have no
out-of-state employees. The possibilities are almost endless, and
that¶s what DataF1ex is all about--fu1fi11ing the almost endless range
of application requirements that are encountered in information
processing. Good luck!
——-—————
—————————————————————
Copyright (C) 1984 Data Access Corporation 05/16/84

B-14 PROGRNNING TUTORIAL DataFlex 2.0 User's Manual
"""" ""———~~~__ .._, ,,_—,___,,. ,.—————.
—.
..—...—
===
THIS PAGE INTENTIONALLY LEFT BLANK
~ ~ ~
————
Copyright (C) 1984 Data Access Corporation 05/16/84.

—————————
——————————~~
———— —— ——————_—:
:::::::::: 8"15
——
:;:eaEii22É formatting with images ÉI--Z==
OVERVIEW
Throughout DataFlex. formatting can be defined with "IMAGES". This
means that wherever possib1e7 your data record, entry screen or report
format can look exactly like what you create on the CRT screen with
your word processor or text editor. As straightforward aconcept as
this is, very few products employ it. Dataf1ex can use IMAGE
FORMATTING to create afile definition, create aconfiguration for
data entry and provide the basic format for reports.
The image format should look like aform. It should have aheading,
descriptive material for the data to be enteréd» procedural explan-
ations and prompting» and aplace for the data to be entered. The
placing and content of the descriptive part of the screen image is
totally up to you. It should appear familiar to the operator, and
have alogical flow of the data entry fields. The places where the
data fields are to be entered into the form image are called DATA
WINDOWS. The placement, format and length of the data windows is very
important to how DATAFLEX interprets the image.
IMAGE "PAGES"
Asingle screen image is called a"PAGE". A configuration can have
multiple PAGEs, including tiered entry screens, help screens, and any
other display that may be desired. Each PAGE can be manipulated
individua11y by the configuration. Image PAGEs can be displayed on
the screen, used for data entry or output to adevice (printerp
console or file). Each PAGE is identified by a page name. The page
name goes after a"/" in the first space on the first line of the
image, and must begin with aletter and may not contain spaces. A
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
rejected by the compiler. A PAGE continues in an image until the
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).
Image PAGES used for screen input/output should not have more lines
than the height of your terminal as defined in SETSCREEn (often 24
lines). Pages used for print reports should not have more lines than
the paper (labels, cards, etc) that the report is printed on.
The image below defines the last PAGE of aconfiguration (note the
"/*" at the bottom). The pagename is "PERSON" (note the first line).
/PERS0N
MY FIRST SCREEN IMAGE
FIRST NAME: LAST NAME:
AGE: _.WEIGHT: ._ DATE OF BIRTH: _/_/
l*
====
————————— "
Copyright (C) 1984 Data Access Corporation 07/10/84

B-16 FORMATTING WITH IMAGES DataFlex 2.0 User's Manual
The three DataFlex data types (ASCII, NUMERIC, DATE) each have a
specific format that can be used for IMAGE data windows.
l. ASCII windows are composed of underline characters (). The
length of the window (and the data which can be entered there) is
defined by the number of underlines. Any printable character can be
entered in an ASCII window, one for each underline in the image.
2. NUMERIC windows are defined by placing adecimal point in or at
the end of awindow ( _._or _.). If the decimal point is placed at
the end, that place will count as anumeric digit position for input
(i.e. DataFlex will convert it to an underline when the screen is
ready for input). otherwisep the decimal point will display as a
decimal position marker on1yy and NOT count toward the total length of
the number. Only numbers, "." and "-" can be entered into anumeric
window. Entries containing other characters will be rejected.
3. DATE windows are defined by the format: _/_/_ .The date must
be entered in the standard MM/DD/YY format as covered previously under
"DATA TYPES", unless your system was supplied in "Euro-date" format.
Internai1y9 dates are stored as 3-byte numbers representing the number
of days from January Ip Year O to the date entered (referred to as
"Julian dates". For applications involving dates outside the range
l90l-l999, dates can be formatted using a4-digit year (_/_/ ).
If this format is specifiech however. the entire application should
use this format consistent1y9 since 12/24/44 generates adifferent
value from that generated by i2/24/l944. 2-digit year entries (which
the window will still accept as being in the first century A.D.)
should be trapped in the configuration. In 4-diglt year modeg
DataFlex will handle dates from L A.D. through the year 2500. For
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.
Data windows are referenced by number within aPAGE, with the window
numbers assigned sequentially, left to right, top to bottom. This
applies to all image formats: screens, reportsp etc. In the above
example, the window names are PERSON.I, PERSON.2, PERSON.3, PERSONA
and PERSON.5. There is aDataFlex command "NAME" which allows you to
assign other symbolic names to each window.
If the /PERS0N page above were displayed with the "PAGE" command or
printed with the "OUTPUT" command, it would look just the way you see
it above except that the appropriate data would have been MOVED into
the data windows.
DataFlex will interpret PERSON as a page with 6lines and 5 data
windows. The type and length of each data window are as follows:
PERSON.I -lO-character ASCII
PERSON.2 -20-character ASCII
PERSON.3 -3-character integer (no decimal) number
PERSON.4 -4-character number,p lplace after the decimal point
PERSON.5 -Date
__ _
,_ _ ,
Copyright (C) 1984 Data Access Corporation 07/10/84

DataFlex 2.0 User's Manual FORMATTING WITH IMAGES B-17
————————————————————————
===—=======~~~~~~——~—~~~—————————————————
When the data windows are filled In, PERSON might look like this:
MY FIRST SCREEN IMAGE
FIRST NAME: John LAST NAME: Doe
AGE: 25 WEIGHT: 156.5 DATE OF BIRTH: l2/12jl956
Note that the data is moved into the data windows by DataFlex
COMMANDS.
If aconfiguration required two pages to accomodate additional
information, the image format might look like this:
/PERS0N
MY FIRST SCREEN IMAGE"
FIRST NAME: LAST NN4E:
AGE: _.WEIGHT: _._ DATE OF BIRTH: _l_j
/JOB
MY PERSON'S JOB
WORKS FOR:
ADDRESS:
CITY: ST: _ZIP:
JOB TITLE:
l*
This image has TWO pages: PERSON and JOB. Each page can be mani-
pulated and addressed separately by name. .The default window names
for the second screen would be jCB.l, JOB.2 through JOB.6.
—————
Copyright (C) 1984 Data Access Corporation 05/16/84

B-18 FORMATTING WITH IMAGES DataFlex 2.0 User's Manual
~~~~ ———
The IMAGE pages in aconfiguration are more than just aconvenient way
to format your input and output. They are actually part of the data
structures of the configuration. Each data window can be used as a
variable in which data is stored. You can read the data out of adata
window as well as write to it.
When images are used for data entry it is unnecessary to input your
data and MOVE it to atemporary variable. You may use the data window
itself as the variable after you have given the command to accept user
input to it.
For example, if you had previously ACCEPTed data into the window
PERSON.3 (age) you could then use PERSON.3 anywhere that anumeric
argument is acceptable.
EXAMPLE:
MOVE (PERSON.3+1) TO PERSONA
In data entryp any data that exists in adata window will become the
default value for the record (existing or new) and can be edited or
cleared with the DataFlex field edit keys defined In SETSCREEn.
WINDOW FORMATTING CHNUCTERS
There are other window formatting characters that do not affect the
data TYPE (ASCII, numeric. date) of the window but do affect the
FORMAT of the data in the window. These formatting characters are
used by placing them directly in the data window in the screen image.
For examp1e+ a"P" in awindow specifies that numbers IAQO and over
should have comas inserted. These formatting characters only apply
to output using the PRINT command. (For example, comas in numbers
are not allowed in data entry.) The exception to this rule is
CAPSLOCK, which works in both data entry and in print. If placed at
the beginning of awindow these characters will not be interpreted;
they will simply be displayed as though part of aprompt. They same
is true if they are placed at the end of awindow, with the exception
of the decimal point, which in that position signifies anumber with
zero decimal places. The formatting characters must be mbedded in
(surrounded by) the data window character in order to function
properly.
MAR- FORMAT OUTPUT
ACTER DESCRIPTION EXAMPLE EXAMPLE
,Embed commas in numbers _» ._ 23456.99 =23p456.99
CUpper case only (caps lock) C_ abc =ABC
OFill field to left with zero O.124 =000000124
ZDisplay zero as blank Z_. _0.00 =(spaces)
@Trim leading &trailing blanks @_ ENTRYBBBB =ENTRY
$Floating $on left $_._ 567.17 =$567.17
Calculations and string manipulations on data in formatted windows
should be avoidedb since formatting can change the apparent "value" of
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF7ex 2.0 User's Manua7 FORMATTING WITH IMAGES B-19
the contents for purposes of the ca1culat1on or manipulation. Calcu-
lations and manipulations should be done on the source data (database
element, literal string, in-memory variab1eg etc.) from which the
window was filled to begin with, with replacement of the results to
the window. if desired for output purposes.
IMAGES IN DATAFLEX CONFIGURATION FILES
DataFlex configuration source files can contain IMAGEs and configura-
tion commands. The configuration commands are action VERBS that
interact with the operatorp the IMAGE, and the data base manager. The
data base manager handles the duties of storing, findingg and relating
data stored on the system.
The configuration file has two parts: the IMAGE format section, and
the commands section. The IMAGE section defines the interface to
DataFlex. The commands specify what action will be taken by the
configuration.
The first part of the configuration file is the IMAGE. The image
section MUST start with a"/" in the first column of the first 1ine.
If there are no images for the configuration the first line will
simply be "l*", which signals the end of the image section. If there
are image PAGES for the configuratiom the name of the first page will
be on the first line and ALL of the images follow directly. The end
of the IMAGE section is indicated by a"l*" on the last line of the
image section.
The option "RESIDENT" can be placed on the same line as the page name.
The RESIDENT option tells DataFlex to hold that page in memory at all
times during execution of the configuration. This improves throughput
speed when a page is used repetitively for output. Since RESIDENT does
use up m«nory it should be used sparingly. Where the RESIDENT option
is not used the image format will be called off of disk when it is
needed. It takes less than asecond to read an image from disk.
The "HELP" option can also be included on the page name line, marking
the page as a help screen callable by pressing the HELP Flex-key. See
the section of "Using Function Keys" for further information on
providing and accessing HELP screens.
After the "l*", the image section of the configuration ends and the
command section starts. The cownand section consists of the convnands
and options listed in the comiand section of the manua7. Commands
exist for Data Entry, reporting, data base manipulation, PAGE
manipulatiom data movement, reading and writing sequential filem
conditional processing and almost any other function you may require.
~———————-————-———————-—— ——————-————
Copyright (c) 1984 Data Access Corporation 05/16/84

B-20 FORMATTING WITH IMAGES DataF1ex 2.0 User's Manual
—
THIS PAGE INTENTIONALLY LEFT BLANK
_"===
Copyright (C) 1984 Data Access Corporation 05/16/84

——————————————— ———————————————
—8"21
——————— ~
———————
:=:=="" DESIGNING DATABASES _ _ _ _ _ _ _ _ __
—
——————————
—————
ORGANIZATION OF DATA
Informatiom or DATA, can be organized in two ways: structured and
unstructured. Unstructured data has no particular size or length or
position. Examples of this would be: letters, books and the "pile of
papers" on top of your desk. In acomputer, word processors are
usually used for processing unstructured data. When data is struc-
turecb groups of data are predefined and identified by what they
contain. Structuring data allows for more consistent and efficient
storageD retrieval and evaluation of the data. Business forms, such
as an mp1oyment form, are an example of structured data that you may
already use in amanual system. Accounting procedures are amethod of
structuring the financial data of abusiness. DataFlex is atool for
structuring ANY type of data in acomputer system.
All of the data which makes up a particular information systan is
referred to as the "data base".
Groups of structured information about like things make up DATA FILES.
Data files are analogous to afile cabinet drawer full of aparticular
business form. For example: afile cabinet drawer full of employee
applications could become adata file of employee applications on a
computer. DataF1ex can have from one to 125 data files of structured
information. Each is immediately accessible or "ON LINE" to the
system. Each file is assigned aDataFiex FILE NAME and aFILE NUMBER
to identify it uniquely.
Data files are made up of individual RECORDS. Each record would be
analogous to ONE employee application in our example. A file is a
group of like records. DataFlex can have from one to 64AOO records
in each file. Each DataFlex record is automatically assigned aunique
RECORD NUMBER when it is created. This number can be utilized as a
system-assigned account number and is also useful when relating
records from different data files together (as we shall see later).
Each record is composed of data "FIELDS". A field is one discrete
piece of data that is of adefined type and size which is stored in a
record. There are usually many fields in each record. Each field in
DataFlex is given aname that is unique for that record. Arecords
number (see preceding paragraph) is automatically assigned in each
DataFlex record. It can be used and displayed as if it were an
ordinary numeric field. You cannotp howevem change the record number
or assign arecord number yourself.
Data fields are sometimes referred to as ELENENTS in the record.
Examples of data fields in our émployee record would be: Last Name*
Dateg Agep Job Sought, etc. DataFlex can have from one to 255 fields
in each record. Each field is identified by an ELEMENT NAME.
In summaryp agroup of FIELDS is contained in aRECORD and multiple
records of like kind make up aFILE.
Copyright (C) 1984 Data Access Corporation 05/16/84

B-22 DESIGNING DA7ABASES DataFlex 2.0 User's Manual
——.-————————————
—
__==""===
DATA TYPES
In DataFlex, each data field can be assigned as one of three types.
Each type uses the computer's storage differently. The basic storage
unit of acomputer is ca71ed aBYTE. You should know how many BYTES
of storage your computer disk system has available. The three
DataFlex data types are:
ASCII -This refers to the full set of printable characters that
your computer can generate. It includes all letters, numbers and
special characters. Examples of fields which would be "typed" as
ASCII data include; namem descriptions, and notes. Each ASCII field
is assigned amaximum length (number of characters) that the data in
the field can occupy. Each ASCII character requires ONE byte of
storage. Numbers (0...9) entered in fields that are of the ASCII type
will be treated·on1y as characters without numeric properties.
NUMERIC -The only characters that can be put into anumeric field are
the numbers (0...9), aminus sign "-"g and the decimal point ".".
Numeric fields are used to store numbers. Examples are: "prices,
amounts; and quantities. Numeric fields can be used in ca1cuiations.
In DataFlex, each TWO numeric characters defined in anumeric data
field require ONE byte of storage9 so numeric fields take up half the
amount of space as ASCII fields. Numeric fields must be assigned a
number of characters before and after the decimal point. This storage
CANNOT be split over the decimal point, thus 1.2 and 10.2 and 10.12
would all require TWO bytes of stcirage.
DATE -Although dates can be represented as ASCII or NUMERIC fields it
is more convenient to have aspecial data type for them. In DataF1ex»
adate can be entered in adate screen window in the following
formats: MMDDYY, MM/DD/YY, or using any punctuation mark as a
delimiter (e.g.g MM.DD.YY or MM,DD,YY). Once the date data is entered
it will be displayed formatted as MM/DD/YY. For applications involv-
ing dates outside the range 1901-1999. afour-digit year may be speci-
fied (MM/DD/YYYY) in the screen image. If this election is made, the
format must be used consistently for dates throughout the app7icatiom
and 2-digit year entries should be trapped out in the configuration,
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
can handle dates from the year IA. D. to the year 2500. The date is
stored internally as asix-digit number representing the number of
days since day one of year zero (0l/0l/00). These are called julian
dates. Julian dates can be used in calculations Just like numbers.
Thus you can add 31 to 12/05/81 and get 01/05/82. Date fields always
require three bytes of storage.
It is important that each data field is assigned the correct type and
is of sufficient length to hold the largest or longest possible value
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
record. or the RECORD LENGTFb can be computed by adding up the length
in bytes for each field in the data record. Space consumption is
determined by afield's defined lengtM not the length of data
actually entered into it from one record to the next.
————
-—————— ——————————————————————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DESIGNING DATABASES B-23
Indexing in Applications
DataF1ex has the capacity to store up to 64 thousand records in each
data file. Therefore9 it is important to be able to locate records of
interest quickly and easily. For example, in afile drawer of
employee file folders, you would probably have each employee's file
filed in order by his name. That way you can "pull" the record from
the file quickly, so long as you have the name.
Placing the records themselves in alphabetical sequence in afile is
one way of organizing the data so that it can be found when needed.
The method works whether the file is stored in acabinet or on a
computer system's disk. "Finding" something in an organized scheme is
easy and efficient.
Consider however. that you wanted to find an employee who was
interviewed amonth ago (you know... what's-his-name). You know when
he was interviewed, but not his name. To go directly to his recor"d»
you would have to previously have cross-indexed the file by date. Or,
you could search the whole file until the desired record was found.
A computer has exactly the same options to find information in its
files. It can search themg or maintain some kind of organized listing
(index) of one or more elements of each record separate from the data
file itself. For examp1ep afile of employment applications could be
indexed both by applicants' NAMEs, and by DATE RECEIVED. That way.
the desired element can be searched for efficiently even if its order
or sequence is different from that of the records themselves.
Even though acomputer can scan its files MUá-l faster than you could
look through acard f11ep that process takes far too long to be
practical each time that you want to review or change arecord.
Atelephone directory is aperfect example of how an indexing system
works. The phone book is an alphabetical listing (an index) of the
names of people with phones in acertain geographical area. Listed
with the name is anumber which can be used to "find" aperson. The
phone number in the telephone system compares functionally with the
record number on a computer. To find a persom you "look him up" in
the list. Then you "access" the person by his number.
DATAFLEX stores each new record at the end of the data file; figur-
ative1yg at the bottom of the existing list. It ham by virtue of its
relative position in the file, arecord number: first, second, third,
etc. But that does you no good! To provide for rapid access to the
records in afile. DATAFLEX keeps "indexes" of data that can be used
to find aparticular record. Each index is an organized list made up
of like data elements from each record, and each recordG number.
A computer index works the same as the phone book. It is an organized
listing of selected data from each record in afile which includes the
record number (like the phone number) of the record. Each record in a
DataF1ex system can be accessed or "found" by up to four different
Copyrjght (c) 1984 Data Access Corporation 05/16/84

B-24 DESIGNING DATABASES DataF1ex 2.0 User's Manual
fndexes(in B-bit computers--W-bit computers support nine indexes).
The designer of aDataFlex database can define which elements of each
record are to be used to create the index(es). and thereafter. find
the records.
DataFlex uses aB+ ISAM (ISAM stands for Indexed Sequential Access
Method). B+ ISAM is the best method for computer indexing management
available. DataFlex keeps index data files up to four ways simultane-
ous1y on B-bit computers (nine ways on l6-bit). That means our
employee file could be indexed by NAME and DATE and two other things
(perhaps job classification and social security numberL, all at once.
For speed, the DataFlex B+ ISAM keeps all indexes current after each
record entry, without along "SORT" process every time you enter data
into afile. These features are referred to as MULTI-KEY, (N-LINE
ISAM.
The creation and automatic on-line maintenance of multiple indexes is
an important feature of DataFlex. This cross-indexing allows super-
flexible access to any record in your data base in minimum time.
Records can be located by entire or partial key. The database can be
searched randomly or sequentially, by any iñdéxo without time-
consuming reorganization or" other clumsy procedures.
In addition to the KEJL EIELDS discussed above, records can also be
found by their RECORD numbers just as rapid7y as by an index. The
system automatically assigns the RECORD NUMBER to each record when it
is created. The record number of any record is always field number
zero in the ffje definition.
Each of the indexes for afile can be made up of as many as 4
SEGMENTS. Think of afile of purchase orders. Each drawer is
dedicated to one vendor, so VENDOR ID would be the primary indexing
field. Within each vendor (drawerb there would be file folders--one
for each part supplied by the vendor. The folders would be arranged
in order by PART NUMBER. PART NUMBER would be the secondary indexing
field. Within the folder for each part would be the orders for the
partp filed by ORDER NUMBER. which would be the third (and final)
indexing field. These successive levels of detail serve to identify
each record (order) ljn¶que1yy and is an example of athree-segment
¶ndexp consuming one of the 4indexes available for each file in B-bit
environments. With the file drawerm the orders can be arranged only
the one way, but with DataF]exg there remain three additional
orderings (indexes) available (eight in 16-bit environments). An
additional index could be another multi-segment indexp say PART
NUMBER/VENDOR ID/0RDER9 for those situations where you would want
vendors and orders grouped by part number. And there could be yet
further indexes, multi-segment or single.
DataFlex will NOT allow two records In the same file to have exactly
the same key value. Howeverp it can appear to the operator that
duplicate values have been accepted. To allow for duplicate recordsp
the record number (designated as field zero in the file definition) is
assigned as the last field segment in the index. Since record numbers
are NEVER the same, the full index entry can never be duplicated
(DOE,J/200 differs from DOE.J/75).
——- ————-,——————————————.-.,,—————.,.,—,. —-.—
Copyright (c) 1984 Data Access Corporation 05116/84

DataFlex 2.0 User's Manual DESIGNING DATABASES B-25
AUTODEF PROGRAM
The DataFlex utility program AUTODEF is the easy way to produce an
ENTRY configuration from, and for9 afreshly-drawn entry screen image.
It is reconnended for use even if your ultimate goal is beyond the
actual capabilities of AUTODEF (in which case, after running AUTODEF»
you would edit the resultant configuration source file with EDITOR or
your word processor, and also edit the file def1n1t1on with FILEDEF if
necessary). It is also recommended for use in multi-entry-screen
configurations to produce ENTRY configurations which can be appended
together lnto'the command section of the eventual ENTRY configuration.
with the related screen images also appended together in the same
order at the beginning of the same file.
AUTODEF's job is to read an image file (see Formatting With Images)
which you have previously created either with the DataFlex Edjtorg or
with any word processor of your choosing which is capable of producing
ASCII files (most can). The image represents the input "form" that
you intend the operator to see when entering to. or searching irg the
database. With it. AUTODEF creates the data, index, and definition
files, and the fields with their names and the type of data each field
wIll contain.
rootname.FD File definition for the macro processor
rootname.TAG Ff)e/fie1d names
rootname.DAT The data file
rootname.kn The index f11em n=lndex number
rootname.FRM The source file
To run AUTODEF, type AUTODEF at the command level and press the return
key. Or, you may select the AUTODEF option from the DataFlex
Configuration Menu. If AUTODEF is invoked with no argument (rootname
of the database you wish to define) it will prompt you for a
"ROOT NFME" as follows:
ENTER <RETURN> TO EXIT OR
"ROOT NAME" OF FILE DEFINITION TO CREATE:
The ROOT NAME is the name and drive specification of the file to be
input to AUTODEF. For examp1e9 the following could be entered as ROOT
NAMES: B: MYIMAGE or C: CLIENT or, where the input file resides on the
logged drivep AN IMAGE. You may enter acommand line of: AUTODEF
ROOTNAME at the operating system leveñ in which case AUTODEF will
skip the prompt for rootname.
After the rootname has been enterech (or if AUTODEF was invoked with
an argument), it will ask the following question:
ENTER THE MAXII¶JM N%ER OF RECORDS "rootname" COULD HAVE?
You should respond with your best reasonable estimaté» realizing two
things: .
a. If you elect too few recordm it is always possible to go
back to FILEDEF and increase the number of records in this
databaseñs capacity (after doing whicM it will be necessary
———
Copyright (C) 1984 Data Access Corporation 05/16/84

B-26 DESIGNING DATABASES DataFlex 2.0 User's Manual
to run REINDEX on the database).
b. If your system option in SETSCREEn was set YES for pre-
allocation of disk space required for databases. then AUTODEF
will next go to your disk drive and "fill up" all the files
necessary for this new database (indexes. datay and so on)
with spaces to pre-empt enough space to contain the database
when it is entirely full of data. Some multi-user syst«ns
require this, and it is advisable under other conditionm but
you should ensure that you have sufficient free disk space
available before entering alarge number in response to this
question when the system option is set to YES.
Naming the Fields
AUTODEF reads in your image and prompts for the assignment of a name
for each image window. These names are assigned to identify the
fields in the database file that has been created. When referring to
these named fields in configurationsg the correct format to use is
fi1ename.fie1dnameg where fieldname is the name you assign in this
process, and filename is the name of the database file. You will bÉ
prompted for the names from top left to bottom right of the image. As
AUTODEF proceeds through the fieldm the underscores for the field to
be named will be replaced with asterisks in the displayed image to
show you which window you are currently being asked to name. Type the
name you wish to assign to the field in the indicated window. You may
use the BACK WINDOW Flex-key to change a name assignment.
The names created here will be used throughout DataFlex to identify
the elements of the database in the fi1ename.fie1dname format estab-
lished above. The use of the element names MUST be consistent, and
conform to the symbol name conventions established for all DataF1ex
data element references. They must start with a1etterp contain only
letters, numbers, 'L"p or "#". Fieldnames may not be longer than 15
characters.
NOTE: Your screen Image must begin with the page name (up to ten
characters. of which the first must be aletter, no spaces or
punctuation, preceded by adiagonal (l). If this Is omitted, AUTODEF
will abort, displaying the message "ERROR, SCREEN IMAGE MUST BE NAMED.
AUTODEF ABORTING!"
After all the fields are named, the bottom line prompt will ask:
Press "C" to continue or "R" to re-do this page _
At this pointp you may re-do the page if you find that it has any
errors by responding with an "R". 0therwise9 answer with a"C" and
continue to the next step.
Copyright (c) 1984 Data Access Corporation 07/18/84

DataFlex 2.0 User's Manual DESIGNING DATABASES B-27
=
————————-—
..———
The screen will now display the field names you have declared in the
previous step, and prompt for which fields are to be used for
indexing.
ENTER FIELD NUPBER TO INDEX OR <RETURN> TO END:
You should enter the number of the fie1d(s) by which you want to FIND
data in the file being created. Entering afield number» and then
pressing <RETURN> will create an index containing data from the field
whose number was entered. Multiple field numbers can be entered (up
to 4on 8bit systemm up to 6on 16 bit systems) to create indexes
composed of multiple data fields. See the first part of this chapter
for further information on indexing.
As field numbers are selected for indexing, the bottom prompt line
will display:
WILL THE DATA IN THIS INDEX BE UNIQUE? <N>_
The default is N, which if selected will cause the record number to be
combined with the data in the field itself to establish the index.
This prompting wIll repeat until you have reached the maximum of ID
indexes for l6-bit systems, 4indexes for B-bit systems, or you key
<RETURN> to end. As you select each field to index, the display will
change to include an "*" between the number and the field name. If
you wish to revise an index after creating ito pressing the BACK
WINDOW Flex-key will move execution back one field so you can re-
define the index. Press <RETURN> without afield number entry when
you have made all index designations you desire.
Upon the completion of assigning indexem AUTODEF will create the
files required for the configuration. AUTODEF will display
momentarily on the screen several systan messages and automatically
retün to the menu. The configuration file output of AUTODEF is
called rootname.FRM. The rootname.FRM configuration source file may
be modified using the EDITOR or your own word processor prior to
compilation, or compiled "as is" when output from AUTODEF.
Rootname.FRM must be compiled to produce an executable DataFlex
program. To execute acompile at the operating system command leveb
type COMP rootname.FRM. If you are operating from the DataFlex Merm
select the Configuration Menu and enter the option for "Compile a
Configuration". See the chapter on the DataFlex Compiler for more
information.
Copyright (c) 1984 Data Access Corporation 06/08/84

B-28 DESIGNING DATABASES DataFlex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (c) 1984 Data Access Corporation 05/16/84

======----------- _ _ _ _ _ _ _ _ B-29
—————————
======="== ========"=
""""""""" HOW TO WRITE A CONFIGURATION """:""::":
—————————— —————————
===========.==============~———~~———~————~~—~~——~~——~—~— —— ~~—————
DataFlex configurations are semi-compiled. This means that the
"source" file which you create must be translated by aseparate step
into aform which the computer can 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
refers only to the physical process of creating the application.
Other parts of the manual will instruct you on what commands and
functions can be used within the configurations.
Aconfiguration file is aset of compiled DataFlex commands which are
ready to be used. Aconfiguration is different from aprogram in two
respects:
I. It can only be executed by the DataFlex runtime system.
2. Information from other systansp such as file definitions
in the DBMS9 affect the operation of the configuration.
The configuration determines the ACTION of your application in
relation to the DEFINED file definitions and forms IMAGE definitions.
Before aconfiguration can be used it must be:
l. Created In source form with the DataFlex EDITOR utility or
any other text editor that produces ASCII files.
2. Compiled from the "source" file form into afile that is
executable by the DataFlex runtime Systan (a .FLX file).
3. Run with the DataFíex runtime systan in the presence of
the other files required for execution (FILELIST.CFG and
appropriate data and key files).
CREATING THE SOURCE FILE:
There are five ways to create the original source file for aconfigur-
ation, of which four are "automatic" and the fiftM which is "manualj'
may also be used for editing configurations created by any of the
other means. First, there are the AUTODEF and FILEDEF utilities with
the "read screen image" option to create both the file definition and
configuration source code for adata entry screen. Second1yp there is
the QUERY utility to generate aREPORT configuration source code file.
Finally. there is the READ ut1]ity9 which creates configurations to
convert ASCII data files to DataFlex data files. Last1yy there is the
DataFlex EDITOR or any other text editor which is used to create the
file from scratch. Modifications to any source code have no éfféctó
of coursep until the modified source code file is recompiled.
———— ~
Copyright (c) 1984 Data Access Corporation 05/16/84

B-30 HOW TO WRITE A CONFIGURATION DataFiex 2.0 User's Manual
The configuration source files are standard ASCII files, so they can
be listed and modified by means custcmarily employed for such files.
The format of aconfiguration file is quite sImple: the IMAGE page(s)
is (are) at the top of the configuratiom each identified with aslash
"/" in the first column of the first line followed by the name of the
IMAGE page. The image format itself starts on the next line. An
image is terminated with the next occurrence of a"/" in the first
space of aline. "lpagename" marks the next image pagep or a"l*"
signals the end of the last image in the configuration. The first
line of the configuration file must contain either a"lpagename" or a
"l*", the latter indicating that there is no image in the file.
After the "l*" in the source file, the configuration commands start.
These can be any of the commands listed in the comnand sections of
this manual, or any commands you may have created with the macro
system. Commands and filenames can be in upper or lower case--
DataFlex does not disti nguish between the two except in screen images
and literal (quote-enclosed) material. Command lines can be up to 255
characters long. If acommand line reaches the end of aline on your
terminal's screem you can continue the coímand line on the next
terminal line either by typing asemi-colon (;) followed by acarriage
returm or merely let the line "wrap" on your screen.
The following is asample of asimple configuration to disp1ay9 and
then allow the operator to modify9 the systtim date:
/DATEX
TODAY'S DATE IS: _J_l_
Please enter today's date in MMIDD/YY format and press RETURN.
/ *
OPEN SYSFILE // Open the system file
DISPLAY SYSFILE.DATE TO DATEX.1 // Show the date that 'is set
ACCEPT DATEX.I TO SYSFILE.DATE // Accept the updated date
SAVE SYSFILE // Save the systw file
ABORT // Stop and end configuration
—
————————
—————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual HOW TO WRITE A CONFIGURATION B-31
— —
HOW TO COMPILE A CONFIGURATION:
Once aconfiguration source file has been createch there is one more
step which must be executed before it can be used. A compiled
configuration must be created which the DataFjex runtime system can
execute. This done by a program called "COMP.COM" (compi1é)» or
COM.CMD in CP/M-86 versions. COMPile reads the source file you
previously created and produces anevg additional file with the
special extension ".Fl-X" after its filename. The ".Fl-X" file can be
executed directly by the DataFlex runtime system (see the section on
"Operational Orientation" for further information).
This process is started by typing the word "COMP" followed by the full
name of the source file to be compiled. Alisting of the file as it
compiles will be shown on the screen.
EXAMPL E:
COMP datex. src
This will read and compile the source file DATEX.SRC and produce the
configuration fil e"DATEX.FLX". The ".FLX" file is ready to run.
This step must be done to produce aconfiguration that will run. The
".SRC" extension on the source file name is not required by the
compi1erp nor by DataFlex. but is recommended practice where
extensions are not purposely being used for some other end.
On the screen listing of the configuration during compilation you will
note some numbers and a">" before each line. This is the line number
of the command line actually output to the runtime system. If an
error occurs during runtime this number will be shown with the error
message to help .you find the error. Acommand line in the source file
can generate zet"cb one or several lines in compilatiom so the line
numbers output by the compiler may seem to skip over some line numbers
"as they would be expected to appear based on the source version. Th is
lets you know how many lines aparticular source command takes up.
Most commands generate one output i ine.
Following is acomplete list of the compiler (COMP.COM) command line
options that can be used individually or in combination as below:
f1INCTPN
EStop/Pause on Error
SDo not delete temporary files
FSave output listing in file (.PRN)
LEcho output listing on printer (LST: )
Dx Save .Fl-X file on Drive x:
M# Expand/contract memory for macro expansions
Ccmpile Option E: Stop/Pause on Error Use of this option will cause
compilation to stop if an error is encountered in compilation. The
screen display will freeze» displaying the code which triggered the
errom and some of the code above it, and the message to press any key
to continue compiling. Once akey has been pressed, the option to
abort the compñation (Yes or No) is offered.
——
————————
Copyright (C) 1984 Data Access Corporation 05/ 16/84

B-32 HOW TO WRITE A CONFIGURATION DataFlex 2.0 User's Manual
Compile Option S: Do Not Delete Temporary Files Compilation produces
two files every time it is run, which are automatically deleted when
compilation finishes or is aborted. One file has the literal name of
FORMTAG.TMP, and contains the names of the windows used by the
configuration begin compi1ed* and the other has the variable name of
filename.lC, and contains the Intermediate Code of the configuration
(further explained in the section on "Modifying and Extending
DataFlex). These files are not of interest to the general usen but
if there is a reason why you wish them not to be deleted, this option
will retain them.
Compile Option F: Save Output Listing 'In File The compilation
process invo7ves expansion of some comands into groups of sub-
commandsg and generation of line numbers for each line of this code.
The numbered lines with sub-connands can be output to afile of the
name filename.PRN by use of the Foption. This option would be of use
primarily to auser who has created custom macros and wishes to see
their expansions in the context of the configuration they work it.
Compile Option L: Echo Output Listing on Printer The output
described above under Option Fcan alternatively be printed on the
printer during compilation. This Is helpful for locating errors
reporting during compi1ation9 and is recommended for compiling more
complex configurations,
Compile Option D: Place .Fl-X File on Drive x: If you wish the
compiled configuration to be saved to alogical drive other than the
one on which the compiler and source code are9 the DOptiort, followed
by the letter of the desired drive will cause the file filename.FLX to
be written to the specified drive.
Compile Option M: Expand/Contract Memory for Macro Expansions When
compilation begins, 4kilobytes of your computer's memory is allocated
for expansion of macro commands into subcomands for the compiled
configuration (6K on 16-bit systems)» and the rmainder is available
for the storage of symbols, which include pagenames, window names,
database elements, in-memory variables and labels. Some configura-
tions need more space for symbols than is available for them produc-
ing the error message OUT OF MEMORY. When this happens. compilation
can be reattempted with the option ML where #represents the number
of kilobytes of RAM to be made available for macro expansion from lto
9. In such cases, #less than 4would be appropriate for B-bit
systems, and less than 6 for 16-bit systems. Conversely. in those
cases where macro expansion space is inadequate (compiler error MACRO
BUFFER SIZE EXCEEDED), the Moption can be used to expand the
available space as high as 9kilobytes.
EXAMPLE:
COMP myfi1e.frm ;ESFDB
Pause on error, save temporary fi1es? create a.PRN listing
file, and output MYFILE.FLX to drive B:
The semi-colon is part of the option syntax, and must be typed when
options are used.
——— ————————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual HOW TO WRITE A CONFIGURATION B-33
———— ———————
HOW TO RUN ACX)NFIGURATION:
Once the configuration has been created and compiled it is ready to
execute with any installed DataF1ex runtime system. At the operating
system command level you simply type the word "FLEX" followed by a
space and the name of the configuration. If "FLEX" is entered without
afollowing 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.
EXAMPLE:
FLEX DATEX
Executes the DATEX configuration shown above.
Once execution is under control of the DataFlex runtime, you never
have to come back to the operating systang since one configuration can
RUN another using the (MAIN command to completely automate your
application as is done in the MENU system.
Copyright (c·) 1984 Data Access Corporation 05/16/84

B-34 HOW TO WRITE A CONFIGURATION DataF1ex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
———————
————————
Copyright (c) 1984 Data Access Corporation 05/16/84

_""___"_____"""__""_"__"""""""_"""""""": "_""""""" 8"35
"==~"""""", ————"—
~~ ~~~
E:EEEE==== DATAFLEX UTILITIES =====
—————
—=__====.=.======,_——~~~~~~_ ~~——4w——~—— ————
=================———~~~——————~———————
EDITOR
The DataFlex EDITOR program is astand-alone text editor for the
creation and manipulation of DataFlex configuration files and images.
It is invoked by keying:
EDITOR <f11ename.oxt>
from the operating system where <fl1ename.ext> is the name of the
file which it is desired to edit or create. If the filename is
omittecb EDITOR will initialize with adefault filename of WORK, which
may be changed upon saving to disk or, if it is expected to re-edit
the file many times in succession, it may be saved under this name and
re-edited by default each time EDITOR is invoked (with no filename).
While the primary purpose of EDITOR is to create the source files for
Datañex, it is also useful for general sequential file maintenance
and limited word processing. EDITOR features full screen cursor
movementp vertical and horizontal (up to 158 columns) scrolling, and
insertion and deletion of characters and lines. There is also a
search feature to search for patterns in text. ASCII text files can
either be created or edited (changed) using EDITOR.
EDITOR uses the cursor to show where the editing process is taking
place. The cursor's movement is controlled by the "FLEX-KEYs"
assigned in the DataFlex SETSCREEN program. Some of the FLEX-KEYs
keys perform the same functions in EDITOR as they do in normal
DataFlex operation, while other FLEX-KEYS perform different functions
from the ones they perform in DataFlex. This is because there are
certain functions in EDITOR which are purely text-editing"functíonsp
and which are not supported in DataFlex operations. Ffna11y9 anumber
of the FLEX-KEYS are not used at all in EDITOR.
EDITOR FUNCTIONS ARE EXECUTED BY "FLEX-KEYS"
This section lists the functions of the DataFlex EDITOR followed by
the FLEX-KEY which executes the EDITOR command.
RETURN: (RETURN KEY)
The RETURN key will enter text on aline and advance the cursor to the
next line of the display. If the cursor is on the last line of the
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 ablank line at the
point where the cursor was.
'+
Copyright (C) 1984 Data Access Corporation 05/16/84

B-36 DATAFLEX UTILITIES DataF1ex 2.0 User's Manual
————
UP ARROW: (UP ARROW KEY)
The UP ARROW key will move the cursor up Qne line on the screen. If
the cursor is on the first line of the display then the text will
scroll up one line.
DOWN ARROW: (DOWN ARROW KEY)
The DOWN ARROW key will move the cursor down one line on the screen.
The screen will scroll down one line if necessary.
RIGHT ARROW: (RIGHT ARROW KEY)
The RIGHT ARROW key will move the cursor one character to the right
"without erasing any existing characters.
If the cursor is at the right boundary of the screen the display will
scroll horizontally to the right. The maximum length of atext line
is 158 characters. The cursor will not move into unwritten space.
LEFT ARRQÑ: (LEFT ARROW KEY)
The LEFT ARROW key will move the cursor one space to the left without
erasing any existing characters. The cursor will not move past the
left boundary of the screen unless the screen has HORIZONTAL SCROLLED
to the right by aprevious RIGHT ARROW command.
DELETE END OF LINE: (DESTRUCTIVE BACKSPACE KEY)
The DESTRUCTIVE BACKSPACE key will move the cursor one space to the
1eftg deleting all the text from the cursor to the end of the line.
INSERT QÍARACTER: (INSERT QU\RACTER KEY)
The INSERT á-lARACTER key will move the text line to the right by one
space opening up the text for the insertion of acharacter at the
cursor position. If the line contains the maximum number of char-
acters (158) then the last character will be lost. The key must be
pressed one time for each character to be inserted.
DELETE a1ARAcTER: (DELETE MARACTER KEY)
The DELETE CMRACTER key will delete the character under the cursor
and move all text to the right of the cursor one space to the left.
—
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 UserIs Manual DATAFLEX UTILITIES B-37
—————————
— — ——————
INSERT LINE: (SAVE RECORD KEY)
The SAVE RECORD key will insert aline above the line on which the
cursor appears. After this key is presséd» the screen will scroll all
text below the cursor, and leave ablank line to edit.
DELETE LINE: (DELETE RECORD KEY)
The DELETE RECORD key will delete the line on which the cursor
appears.
LOAD FILE: (BACK FIELD KEY)
The 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.
SAVE FILE: (USER-DEFINED FUNCTION KEY)
The USER-DEFINED FUNCTION key will save the text file in the buffer to
the disk. If you change your mind after invoking this cowñáñdo answer
its query by pressing the ESCape key. The prompt will offer the
opportunity to save the file under its original filename (WORK if
EDITOR was invoked with no filename specification) by merely pressing
the RETURN key. If adifferent filename is desired after an edit
sessiom a new filename (with drive specification if necessary) may be
entered in response to the prompt.
ESCAPE: (ESC KEY)
The ESCape key will exit the document editing portion of EDITOR and
allow the naming of the output file to the disk. The output file
should conform to your standard operating system file name conventions
(generally atwo character drive specificatiom eight characters for
the file name plus athree character file type extension).
TAB: (FIND KEY)
The FIND key will tab eight spaces to the right or to the left
depending on the last direction that the cursor was moved.
BEGINNING OF LINE or HOME: (cALájLATE KEY)
The CALCULATE key will move the cursor to the beginning of the line
being edited. If the cursor is on the first character then the cursor
will be placed at the top of the text.
————————— ——————————————————————
Capyright (C) 1984 Data Access Corporation 05/16/84 ·

B-38 DATAFLEX UTILITIES DataF1ex 2.0 User's Manual
——————
BACK PAGE: (PREVIOUS RECORD KEY)
The PREVIOUS RECORD key will page the cursor backward 24 lines.
FORWARD PAGE: (NEXT RECORD KEY)
The NEXT RECORD key wi11 page the cursor forward 24 lines.
FIND TEXT: (SUPERFINO KEY)
The SUPERFINO key will display the prompt "Find string: "at the bottom
of the screen, to which the operator should respond by keying in the
string which it is desired to find in the file. Once the string has
been found, it may-be editedp deletech or whatever is desired. If the
SUPERFINO key is pressed again. the prompt will reappear. If the key
is pressed again, in response to the promptg the string entered
previously will be searched for again in the fi1e9 and will be
searched for every time the SUPERFINO key is pressed twice, until a
different string is entered in response to the prompt.
topyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATAFLEX UTILITIES B-39
—————— ———
REINDEX UTILITY
The DataFlex index files are maintained dynamically during normal
system operation. No reorganization is generally necessary. However.
due to changes made in the file structure after the entry of datm
adding new Indexes or system failure, it may be necessary to rebuild
or create new index files. The REINDEX utility provides this
function. Each index is an independent file with a.Kx extensiom
where xis anumber which distinguishes the index from other indexes
of the database. REINDEX can rebuild all indexes, batch indexes on1yg
(see next paragraph) or just one particular one.
There are TWO types of index files in DataFlex; ON-LINE indexes which
are maintained dynamically during file creation and maintenance and
BATO indexes which are usually used for infrequently-used report
sequencing. The batch indexes are NOT updated when arecord is
created or deleted as the on-line indexes are.
There is a5th index (on 8bit systans--lOth index on 16 bit systems)
that is reserved for "ad hoc" sorting of existing files. REINDEX can
redefine the specifications for this index and create a new index
interactively. Any other BATOI index can also be redefined from the
command line.
WHEN TO USE REINDEX:
The following are indications that your index files may be damaged and
you must run REINDEX: I) ADataF1ex error 2Óp 2L 22 or 26; 2)
Records seeming to be "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
it is recommended that the FREL program be used on the suspect data
file before REINDEX in case the data file itself is damaged.
USING REINDEX:
REINDEX can be used in two ways: instructions can be given on the
command line that calls REINDEX, or its operation can be controlled
interactively. First we will deal with the interactive mode.
When REINDEX is ca17ed with no arguments on the command line. you will
be greeted with afiles menu. The active DataFlex files will be dis-
played with their file numbers. You should select the file you wish
to REINDEX. If you have more than 32 active files you may press
<RETURN> to get more files listed. At any time within REINDEX you may
hit <ESCAPE> to return to the menu. (Note: the file selection
process is the same as that in QUERY).
———————————=———
—~~=~~~~~K————————~~~ ——
Conyright (C) 1984 Data Access Corporation 05/16/84

B-40 DATAFLEX UTILITIES DataFlex 2.0 User's Manual
—— ———
Once you have selected afile, the following menu will be displayed.
You must select an operation according to your needs:
DATAFLEX
REINDEX UTILITY
<FILE NAME>
I..... RE-CREATE ALL INDEXES
2..... RE-CREATE ALL BATN INDEXES
3..... RE-CREATE ONE INDEX
4..... DEFINE &CREATE "AD HOC" INDEX
5..... DELETE "AD HOC" INDEX
PLEASE ENTER OPTION REQUIRED:
OPTION ONE -RE-CREATE ALL INDEXES
Re-create all indexes will read the data file selected and rebuild all
defined indexes. This fs generally used when asystem or power
failure makes the validity of the index file questionable.
Note that if the validity of your data file is in questicm the FREL
program should be used before the REINDEX program.
OPTION TWO -RE-CREATE ALL BAT(M INDEXES
Re-create BATCXI indexes will create all indexes marked as "batch" for
the selected data file. This is generally used before generating
reports that require the batch indexes, Le., before end-of-month
reporting.
OPTION THREE -RE-CREATE ONE INDEX
Re-create one 1ndexD allows you to remake indexesg one at atime.
This may be required if you made a new index with the FILEDEF program
or you had adisk error on an existing Index. Option three will list
the ava11ab1e indexes and allow you to select the index you wish to
re-create.
—=
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual DATAFLEX UTILITIES B-41
————— ——————————
—
OPTION FOUR -DEFINE & CREATE "AD HOC" INDEX
Option four allows you to create an "AD HOC" batch index. This index
can then be used in any DataF1ex output. This option will ALWAYS
create index 5(or index 10 on 16 bit systems). When selected,
REINDEX will display afield list. You may then select up to four (4)
fields to be included in the index (6 on 16 bit systems). If there
are more fields in the selected file than will fit on the screerg you
may use the <NEXT RECORD> key to get more fields or the <BACK-REC0RD>
key to start at field one again. Once you have selected the fie7ds to
index by field number, press <RETURN> and REINDEX will proceed to
create the new index. (Note: this field selection process is the same
as that used in QUERY).
OPTION FIVE -DELETE "AD HOC" INDEX
Delete ad hoc irÑej<j will remove an index file created in option four
from the disk and the file definition. This will reclaim the disk
space used by the index.
REINDEX -COMMAND LINE FORMAT
The use of REINDEX with the arguments on the connand line is primarily
intended for use by configurators within "submit" procedures. If you
are happy with using REINDEX interactively you may skip this section.
All of the above options and more can be invoked in configurations
with command lines:
REINDEX <FILE-NUMBER>
will re-create all indexes for (FILE). This is equivalent to Option
One on the RE-INDEX Menu.
EXAMPLE:
REINDEX 22 -Recreate all indexes for file 22.
REINDEX <FILE-NUMBER> MENU
Will select the file number and proceed to the REINDEX menu for user
interaction.
EXAMPLE:
REINDEX 22 MENU -Select file 22 and display REINDEX menu.
REINDEX <FILE-NUNER> BATa{
Will recreate all batch indexes for <FILE>. This is the same as
Option Two on the RE-INDEX Menu.
EXAMPLE:
REINDEX 22 BAT(J1
Recreate all batch indexes for file 22
Copyright (C) 1984 Data Access Corporation 05/16/84

B-42 DATAFLEX UTILITIES DataFlex 2.0 User's Manual
——————————
====———— ———————————— ~ — —————
.
REINDEX <FILE-NUMBER> <INDEX-N%ER>
Will re-create the specified index for the specified file.
EXAMPLE:
REINDEX 22"1
Recreate index one of file 22.
REINDEX <FILE-NUMBER> <INDEX-NUMBER> <FIELD1> ... <FIELD4>
will redefine <INDEX-NUMBER> tQ the field numbers that follow. This
is like Option Four, but any index can be re-defined. The index will
be aBATCH type unless it was on-line before REINDEX was run.
EXAMPLE:
REINDEX 22 5 45 O
REINDEX file 2L index 5 by fields: 4, 5 and O.
REINDEX <FILE-NUMBER> <INDEX-NUMBER> DELETE
Will delete the ad hoc index <INDEX-NUMBER>. This command works only
on ad hoc indexes.
REINDEX <other opt1ons> QUIET
QUIET put at the end of the command line will cause REINDEX to display
only a"*" on the screen for each record instead of the index data.
Shortening the display increases throughput speed.
REINDEX <other opt1ons> .BAD
Will create afile by the name rootname.BAD with alist of any
duplicate records found during reindex.
REINDEX <other options> FLEX <config-name>
Will MAIN back to the Flex configuration <config-name> after the
reindex is done. This gives you the capability to run a configuration
(like areport) after areindex operation.
EXAMPLE:
REINDEX 22 BATM FLEX MYREPQRT
DUPLICATE RECORDS IN REINDEX:
If REINDEX encounters duplicate records fn any non-ad hoc indem it
must delete one of the records to maintain the requirement that all
index entries be unique. You will be given the option to: I) NOT
DELETE BAD RECORDS and leave the file in an improper state; or 2)
List the bad records to afile or printer. The file of bad records
will have the name rootname.BAD
——-—————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATAFLEX UTILITIES B-43
~
FREE LIST UTILITY
The list of available (deleted) records in afile is referred to as
the "FREE LIST". It is dynamically maintained during normal system
operation (unless "REUSE DELETED SPACE" is set "Y"es in SETSCREEn).
But due to system failure (disk errors or power fail) it may be
necessary to rebuild the free list. This is done with the FREÍ-
utility. FREL will also check the file for type consistency (bad
data) and delete any bad records.
WHEN TO USE FREÍ-:
Conditions that would Indicate the need for FREL and REINDEX are:
Power failure with data files open. Disk errors. Errors 78» 81 or
1..6.
USING FREL:
FORMAT:
FREL
(to display alist of existing data files before executing
FREL» or
FREL <FILE NLNBER>
(to execute FREL on a file whose number is already known.)
EXAMPLE:
FREL lO
Check file 10 for consistency and rebuild its free list
If running FREÍ- indicates any bad records, you should rebuild the
indexes for that file wIth REINDEX after running FREL.
FREL AND BAD RECORDS:
If any bad records are encountered during FREÍ-, the record(s) will be
deleted and the data from them can be sent to afile or to the
pri nter. If the option ".BAD" is p"ut on the cownand Iirm the bad
records will always be listed to the file "rootname.BAD". When the
first bad record is encounteredp you will be given the option to: l)
Not delete the record and leave the file in an improper state; 2)
List the bad records to the printer; or 3) list the bad records to
the .BAD file. NOTE: Although there are many ways "bad" records can
be created, aconsistent attribute of bad records is the presence of
control (non-ASCII) characters in data fields. FREL lists as "bad"
any record having such characters in it.
——————
Copyright (c) 1984 Data Access Corporation 05/16/84

B-44 DATAFLEX UTILITIES DataFlex 2.0 User's Manual
————— +~
THE READ UTILITY
DataFlex's READ program has the function of automatically writing
configurations which "read" standard ASCII format data files and
produce DataFlex data fi1em complete with record numbers and any
indexes of the data which might be desired. It does this by querying
the user as to the characteristics of the source file, and certain
desired attributes of the DataFlex file to be created.
There are two main uses for READ-produced configurations: (a) to
"import" data from non-OataFlex software environments such as MBASIC*,
VisiCalc* DIF, dBASEII* SDF,, SuperCalc* SDI, MailMerge*, and the like;
and (b) to re-READ ASCII data from apredecessor DataFlex database
into anewly-created DataFlex database having more or fewer fields
than the original (or changes in their length or data type).
In order to provide arealistic context for the explanation of READ.
the following instructions cover how to convert adata file from
dBASEII* format to DataFlex. If your particular purposes do not
involve dBASEIL merely skip those sections whose headings indicate
that they pertain to dl3ASE, and substitute the appropriate
instructions for your source environment. The overall process
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 FILES TO DATAFLEX
Since this procedure Involves producing two complete copies of the
files to be transferred (the intermediate one may be erased after the
process is completeb the transfer of large files may require some
planning of disk space, and even of processing time for very large
files. For this reasom it is recommended that the preparatory work
be done with asubset of any large file whfch it is desired to
convertp and that the results of that work then be applied to the
entire file after its efficacy has been confirmed.
This procedure can be executed on small data files using ademo
version of DataFlex. If you should encounter the error "DEMO
LIMITATION EXCEEDED", it will be necessary to re-lnltialize DataFlex
before you can continue your work from the last disk access prior to
the occurrence of the error. Natura11yy make sure your data file is
backed up before you proceed. From dBASEp print out the databaseG
structure for reference in the following steps.
MAKING THE MAIN ENTRY SCREEN
The first step is defining your database in DataF1ex,, a process which
can be amazingly easy if you happened to develop the main entry screen
for your dBASE database under dBASE's ZIP screen and report formatter
(and retained at least your .ZIP files from the effort). What you
need is aplain ASCII file showing the fields of your data elments,
and their types.
—
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATAFLEX UTILITIES B-45
If You Don't Have .ZIP Screen Files
If' all you have is your origina) entry command file (.MD) full of
"e 1.c SAY caption GET variable" statements, then modify the .CMD file
by SETting FORMAT TO PRINT right before the first "Él" and run the
program with your printer on. That will print out your screerg which
you will then have to "draw" on the screen in ASCII, for which purpose
your favorite word processor or DataF1exvs EDITOR will do fim. Now
you can go on to the final screen preparation steps below which are
common to both manually and ZIP-created entry screens.
If You Kept .ZIP Ff1es
ZIP in use puts out its own file with a.ZIP extensiom a.CMD or .FMT
file for dBASE which you won't need anymore, and a.ZPR file intended
for use in printing out acopy of the screen. This .ZPR file is what
you can use to create the screen image for DataFlex. If you erased
your .ZPR file but saved the .ZIP fi1ep you can recreate the .ZPR file
just by loading the .ZIP file Into ZIP and resaving. (Caution: if
you use a.CMD or .FMT file produced by ZIP and then edited under its
original name. resaving from ZIP will overwrite the file with its
earlier ZIP-generated version. You can avoid this by renaming your
output file when ZIP gives you the chance. But none of this really
matters, because you're working on abacked-up disk, right? Right!)
Load the .ZPR file into your favorite word processor, or the DataFlex
EDITOR, and erase the first Iirm which reads
01***** File filename *****". Then delete all embedded commands (those
in [brackets]) and all #variable GET commands and évariable SAY
comands» together with the variable names.
Final Preparation of the Screen
What you should now have, whether you got 'it from a.ZPR file or
"drew" it manua11y» is ascreen with its tit1eg if anyg and aprompt
for each data item to be input in alogical position on the screen
followed by enough space on the line for the data item to be entered
into. Nowo with this file loaded into either your word processor or
DataF1ex's EDIT0R» you should draw ablank 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
(this is how DataFlex will figure out the field length). For numeric
fieldm there is one further step. Replace one underscore with a
period wherever the decimal place should go in the ffelch remembering
that that decimal point will actually provide space for the l's
position in your number (first place left of the decimal point). The
blank for afive-digit integer (no decima1sk for examp1eg would look
like: " .", without the quotes, of course. That's right: four
underscores and the decimal point. If any of the fields is adatep
make it look like this: "_/_/_"d remembering that DataFlex
actually supports dates as aseparate formatg unlike dBASE. Lastp
open up a new line at the top of the screen (don't worry if the bottan
line of your image scrolls off the bottom--this new line won't be part
of the displayed image). At the leftmost positiom give the screen a
name for DataFlex to use, preceded by adiagona7 (/ENTRY_SCREENg for
^opyright (C) 1984 Data Access Corporation 05/16/84

B-46 DATAFLEX UTILITIES DataFlex 2.0 User's Manual
example). Save the file under aname which wi17 be meaningful to you.
Now your screen is ready for DataFlex to read it and create your new
DataFlex database structureg all from the screen.
.
CREATING THE DATABASE STRUCTURE WITH AUTODEF
Now ft¶6 time to "feed" the screen image to AUTQDEF. AUTODEF will
define fields only if they're in the image. If you need fields that
aren't in the imagey you'll either need to add them to the image (they
can be rwoved later), or edit them into the database using FILEDEFt
but that's another story.
From the operating system, or the DataF1ex méñtb run AUTODEF (it's a
.COM file). Answer the first prompt with the filename of the screen
image file and tell it yoWre creating anew database9 rather than
editing an old one. Then tell it how many records you're going to
need the database to hold (maximum 64,000). AUTODEF wIll then display
your screen image and walk you through each of the blanks you provided
(they¥re called "windows" in DataFlex), asking you what you want to
name the variables. You can use your old dBASE names if you 1ike9 but
DataF1ex allows 12 characters in fieldnames, so you may wish to expand
them somewhat to improve inte1ligibi1ity.
Then AUTODEF will ask you which fie1d(s) are indexed. Give it the
same fields you used in dBASE. Be sure to give it at least Qneg so
DataFlex will be able to find recordsp unless you are displaying the
record numberg in which case you don't have to have any indexed
fields.
After this, AUTODEF will create affle (called aconfiguration file in
DataFlex) identified as "filename.FRM" which will contain not only
your screen image and a means of displaying it, but also acomplete
facility for searching the database by its indexem editing, de1etingg
and adding records, with no additional comnands. anbedded or
otherwise. Of course9 if you do later wish to add bells and whistles
to your entry configuratiom you can edit the .FRM file with your word
processor or the DataFiex EDITOR to provide them.
To use this configuratiom you must compile it with the DataFlex
compiler, selectable from the menu or executable from the operating
systm as "COMP fi1ename.FRM". It will create the file
"fi1ename.FLX'4 which can be executed either from the DataFlex menu or
from the operating system with the command, "FLEX filename". No point
in running it yet. though. We haverñt brought the data over for it
yet. This is agood time to compile it, however. so from the
operating systan, issue the command "COMP fi1enagte'4 and DataFlex will
do the rest over the next two minutes or so. Compilation is astep
which must be taken with every DataF1ex configuration you createg by
whatever means, and aconfiguration must be re-compiled each time you
want to make achange in the way it runs. This step isn't present in
dBASEy so don't forget to do it in DataFlex when it's called for.
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATAFLEX UTILITIES B-47
BRINGING HOME THE DATA
The last step Is bringing the data over, something you should do first
with asmall test data file and then later with the whole file after
you've made sure everything works right.
The dBASE Part:
Start dBASE and bring your database into USE. Do not invoke any dBASE
indexes if you want DataFlex to end up with the same record numbers as
dBASE was using (which wouldn't be of concern unless you use record
numbers as account numbers or some such scheme). If you have deleted
records in your databasm you will have to manually re-delete them in
DataF}exg unless you PACK your database first to eliminate the
records .This, of course, will readjust your record numbers in dBASE.
If you're converting alarge database wIth one or more indexem the
conversion will run faster if you do use the largest index maintained
indBASE. This assumes that you will want the same index in your
DataFlex version. The largest index is the one whose index file
(.NDX) is larger than any of the other .NDX files. Your record
numbers wIll changep of course.
Now COPY the database to an ASCII delimited file with the coimand:
.COPY TO fi1ename SDF DELIMITED
If some of your records have apostrophes (JerryG Pool Hail) in th€m»
you will want to make the command look like this to use double
quotation marks instead of the apostrophes otherwise provided by
dBASE:
.COPY TO filename SDF DELIMITED WITH "
Make sure "filename" is the same filename as AUTODEF created from your
image file. dBASE won't write directly into the DataF1ex file, but it
will create the file "fi1ename.TXT% an intermediate version of your
data. Also make sure your disk has space on It for a copy of your
data file that is as big as the original. If your data file is large
(over lOOk) this process will take some time--hours for really large
data files over a megabyte.
If yoWre running on acrowded hard disk or otherwise have less free
disk space than your data file. there are options you can use in the
COPY command which will enable you to COPY the file in pieces. Agai n,
if yotdre utilizing an index, COPY the file out in the index sequence.
For examp1eg if your index is on last name, COPY can be run to fí rst
output all last names beginning with Athrough Cp then Dthrough Fp
and so on. This process can easily be put into dBASE and DataFlex
command fi1es/configurations that call each other until all records
have been brought over. and run as a batch. After completion, check
the number of records in the DataFlex file to make certain that no
records were missed.
Copyright (C) 1984 Data Access Corporation 05/ 16/84

B-48 DATAFLEX UTILITIES DataF1ex 2.0 User's Manual
——————,
———
The DataF1ex Part
The last step is done by DataFlex's READ Uti1ityg which is itself a
DataFlex configuratiom and whose operation creates aconfiguration
which causes DataFlex to read your filename.TXT file and put data into
your filename.DAT (DataF1ex) fi1e9 complete with all indexes as
specified in AUTODEF. Like any good DataFlex configuration, READ has
lots of help in it, accessed by pressing the HELP key, so use it
whenever questions come up. READ is invoked either from the DataFlex
menu or from the operating systm with the command "FLEX READ".
READ starts up with ascreen that lists the DataFlex files already on
your' disk. You should see the one you created when running AUTODE©
with aselection number to its left. Respond with that number. Then
anew screen will display the name of this target file, and ask you
the name of the file to read from. TÍÁsy of coursep will be the file
you created (filename.TXT) from dBASEG COPY command in the step
above. Enter this name. Then READ will ask you the name you want to
give to the configuration source file. What configuration source
file? READ will convert your source data file using aDataFlex
configuration which will actually be written by READ when you're done
telling it all it needs to know about the desired conversion. So give
ft a name (I used DBASREADL but do not give it the same name as you
gave your image file (and resultant data entry configuration) in
AUTODEF above? or your old file will be overwritten by the READ
configuratiom and that wouldn't be good.
After you've given it the name for the configuration fi1é» the screen
will c1earp and READ will ask you whether your source file is line- or
comma-delimited. If you did everything as recomended abovep your
file is coma-delimited, and you can tell READ this by entering the
entire word "COMMA" in the window. The READ will ask you how many
fields are in each record of your source file. Refer to your dBASE
structure printout and count the fields for the answer to this
question.
Next comes the part that could be tricky if you have made any change
in the sequence of fields as they were fn the dBASE structure on the
one hancb and in the DataF1ex windows in the screen image on the other
hand. For each field of your source fi1ep READ will ask you which
field number (sequentially) of the DataF1ex database it goes to. If
your dBASE file structure and your DataF1ex ffeld sequence step along
together exactly the same9 this step is easy. One goes into I, two
into 29 three into 3, and so on. But if the first field of your dBASE
structure is LASTNN4E9 and the second is FIRSTNN'4E, while your
DataFlex screen image 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
transferred intoh you can do that here by skipping source file fields
with the <RETURN> key or skipping target file fields merely by not
using their sequential numbers.
After thiSg READ knows all it needs to know, and will ask you if you
want to compile the configuration immediately. Since you have to
———-——- -——. ———..,..——-.——
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATAFLEX UTILITIES B-49
compile the configuration before you can use itp the usual response
here would be "Y"es. The question is asked to give you the
opportunity to edit the conversion configuration before compiling it.
if you want to. Normally. you wouldMt want to.
READ will then write the conversion configuration and compile it. But
READ 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 aConfiguration" choice on the menw or
give the comiand "FLEX fi1ename'4 where filename is the name you gave
the conversion configuration in READ. If you first run the
configuration on asmall test database and everything works all right,
running it on the large, real database is as simple as doing the dBASE
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.
WHAT REALLY HAPPENED HERE?
In the foregoingg we did one conversion step in dBASE9 creating one
processed copy of your original data file with a.TXT extension.
Either manually or from a.ZIP dBASE fi1ep we created ascreen image
for DataF1ex with any extenslom which you might have named FLEXFILE.
We then ran AUTODEF on that image file, producing anumber of files.
some of them empty data and index W1éSo as listed below. Then we ran
READ, generating aDataFlex configuration specifically to read your
dBASE-generated file. convert its contentm and put them into the
files created under AUTODEF. This is alist of the files in the
sequence in which they would have been created:
FLEXFILE.DBF Your original dBASE data file
FLEXFILE.TXT COPYed version of the dBASE data file
FLEXFILE.ZIP File from ZIP for the dBASE entry screen
FLEXFILE.ZPR Printable version of the ZIP file
FLEXFILE. DataFlex screen image (possibly from .ZPR file)
FLEXFILE.FRM AUTODEF-created entry configuration source code
*FLEXFILE.FLX Compiled (executable) entry configuration
* FLEXFILE.DAT DataFlex data file created by AUTODEF
*FLEXFILE.KI DataFlex index Áfí» if any, created by AUTODEF
*FLEXFILE.Kn Additional DataFlex indexes, if any
*FLEXFILE.TAG Names of DataFlex fields. created by AUTQDEF
*FLEXFILE.FD Definition of DataFlex database
DBASREAD.FRM READ-created source code for conversion config.
DBASREAD.FLX Compiled (executable) conversion configuration
The *asterisk indicates the minimum files which you must retain in
order to use your new DataFlex database. Additional database and/or
configuration files mayp of coursep be created. All the others may be
retained for future reference or modification if desired (and space
allows).
———————
Copyright (c) 1984 Data Access Corporation 05/16/84

B-50 DATAFLEX UTILITIES DataFlex 2.0 User's Manual
===——_==————————————
———————————————————————————————— —————~__
WHAT DO WE HAVE HERE?
The product of these efforts is much more than just adata file that
DataFlex can use. In addition, we have created complete indexes for
the fi1ey tO facilitate rapid finding of records in the database7
including any we may have had in the dBASE version. Furthem in
AUTODEF, we have created acomplete display and entry facility for the
database recorcM through which we can querµ ed1tg or add to, the new
DataFlex database.
All further processing of the data and related configuration files to
take advantage of DataFlex's many capabilities not present in dBASE
(multiple command files open simu]taneous1y9 true multi-user
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 2.0 User's Manual DATAFLEX UTILITIES B-51
DATAFLEX 1.6X TO 2.00 CONVERSION
The DataFlex conversion programs provide for the transfer of exi sting
DataFlex 1.6X applications to the new 2.00 syntactical representation.
The input to the conversion process is DataFlex l.6X ENTER and REPORT
configuration files. The files must be working l.6X DataFlex configu-
ratl ons. The output of the conversion process is DataFlex 2.00 source
files. Before they can be run, the source files must be compiled into
executable configuration flies using the DataFlex compiler.
The DataFlex 2.0 compiler requires the creation of a new support fije
(FILENAME.FD) for each existing data (.DAT extension) file in your
l.6x application. This .FO file wIll be created by the 2.00 FILEDEF
utility when afile definition is saved. The DataF1ex FILENAME which
is given to adata file will be used as the base name of the new file
that will be createch and an extension of ".FO" will be appended to
it. This file will be used by the conversion program and the compiler
to assign symbolic names to the individual fields in the data file.
These symbolic names will be composed of the DataFlex FILENAME and the
FIELD NAME that each field has been assigned. Valid characters that
can be used as part of aFIELD NAME are [A..Z» 0..9» #9 @p _g $]. If
other characters are used in FIELD NAME they will be automatically
converted to an underline character by FILEDEF.
To create the .FO file. run the 2.00 FILEDEF program and select the
data file that is to be converted. Once the file has been loaded, use
option three (3) in FILEDEF to inspect the data file's DataFlex FILE
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.
Once the modifications are comp1eteg use option nine (9) in FILEDEF to
save the data file definition (.DAT files) to disk. The 2.0 version
of FILEDEF will at this point automatica11y create and write the
needed .FO file. This process must be performed on all data files
used by configurations which are to be converted to DataF1ex 2.00.
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.
CVTFRM is used to convert the ENTER CCNFIGURATIONS ( .FRM) from
DataFlex 1.6X to DataFlex 2.00 and CVTRPT is used to convert the
REPORT CONFIGURATIONS ( .RFT) .
The conversion program requires only two file names to perform the
conversion: the name of the version í.6X configuration fi1eg and a
name for the Version 2.00 source 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,
———————— ————————— .,,,,, ,.., .,, ..————
Copyright (c) 1984 Data Access Corporation 05/ 16/84

B-52 DATAFLEX UTILITIES DataFlex 2.0 User's Manual
——————— ——————-—
EXAMPLE: Asample input filename is VENDOR.FRM. and the output
filename will be VEN.FRM. Once the conversion is comp1etep 'It is
necessary to compile the configuration into an executable file.
A>CVTFRM
ENTER SOURCE FILE NAME: VENDOR.FRM
OUTPUT FILE NAME: VEN.FRM
(conversion is done here)
CONVERSION DONE.
A>COMP VEN.FRM
ERRORS that may be encountered:
a) CANNOT FIND INPUT FILE
The conversion program can not locate the input file. Check the input
name for spelling on disk directory to be sure it is there.
b) INPUT AND OUTFUT FILENAI'ES MUST BE DIFFERENT
The conversion program requires that input and output name be
different. If an ouput file of the same name exists7 it will be
overwritten.
C) CANNOT FIND .FO FILE
Adata file has been declared by the configuration program which is
not found on the default drive.
d) FILE <<#>> IS NOT OPEN
Adata file which has not been opened has been referenced by the
configuration.
e) FILE <<f>>, FIELD <<1'>> IS OUT OF RANGE
Afield number has been referenced by the 1.6X definition
configuration which does not appear fn the data file.
f) WINDOW # <WNLM3ER> OUT OF RANGE
g) UNSUPPORTED OPTION #ON LINE #
The original I.6X configuration has an option number in it which is
invalid (under both versions). The message shows the line number on
which the invalid option number appears. The original configuration
must be corrected before conversion is re-attempted.
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
sections. This condition is impossible for the conversion program to
hand]ep and must be corrected in the 1.6X configuration by actual
duplication of the common 1inesg and changing of the section line
declarations so as not to include any of the same line numbers.
All of the errors above are fatab and will abort the conversfon
process.
~_~==~=~~———~
"_—————————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual DATAFLEX UTILITIES B-53
MENU CREATION AND MAINTENANCE
DataFlex is supplied with apowerfuH versati1ep and easy-to-use
system for creating and maintaining menus which supports the execution
of DataFlex configurations, other executable (.COM and .CMD) fi1em
and prompting for the entry of necessary operator input at run time.
The menu system can be made to execute upon cold bootp providing a
"shell" which positively insulates the operator from the computer^s
operating system at all times.
This utility is itself aDataFlex configuration (filename
MENUDEF.FLX), and it uses and creates data files for the menus under
the df_filename "MENU". Like any good "Flex" applicatiom MENUDEF is
fully promptech and menus can easily and rapidly be created or
modified simply by following the prompts and answering them. MENUDEF
also has extensive HELP screens, which can be called at any time
during execution by pressing the HELP Flex-key.
CREATING AND SELECTING NENUS
Upon selecting "Menu Definition" from the DataFlex Configuration menu,
or invoking MENUDEF from the operating system íiith the command FLEX
MENUDEF, alist of the numbers and headers of the menus currently on
the disk will appear as shown below. The "headers" are the legends
appearing at the top center above the menus, identifying what each one
iS:
DATAFLEX MENU SYSTEM MENU SELECTION
NUMBER HEADER
ENTER NUNBER OF THE MENU YOU WISH TO EDIT: _
You may use the NEXT or PREVIOUS RECORD Command Key for more menus
or press <RETURN> to start anew menu. (HELP screen
available)
=
Copyright (C) 1984 Data Access Corporation 05/16/84

B-54 DATAFLEX UTILITIES DataFlex 2.0 User's Manual
This screen will display all menus now existing in numerical order.
If there are more than five menus on the drive. pressing the NEXT
RECord Flex-key will display the next five menus. Pressing the
PREVious RECord Flex-key will display the previous five. Each menu is
actually arecord in the MENU database, and the menu number displayed
Is the record number for the menu. According1µ the number of agiven
menu may not be changed. If a new menu is desirech entering aRETURN
will begin creation of anew menu. To delete alTléñLb the menu should
be selected for editing and the DELete RECord 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 MENUS
This is the menu configuration screen:
DATAFLEX MENU SYSTEM MENU CONFIGURATION
MENU NUMBER: _. HEADERI:
HEADER2:
DEFAULT MENU: _.(on return)
PROMPT ACTION PASSWORD
l.
2.
3.
4.
5.
6.
7.
8.
9.
(N)ew Menu (H)eader (Q)uestions (P)rint (S)ave {HEI-P IS
(I)nsert (D)e1ete (C)hange (A)ppend e(X)it _AVAILABLE}
— —
The first column of windows displays whatever prompts are in the
record for existing menu choices. The column displayed under the word
"PROMPTS" are the actual on-screen prompts displayed to the operator
describing what the menu choices are.
The second column displays the comands which are passed to the
operating system upon selection of the choice. As "ACTIONS" in the
second column afjovEb the menu system will execute any of the systm
ccmmands described in the section of this manual on Manipulating Files
except RUNPROGRAM. It will also execute another menu by entry of the
word "MENU" followed by the number of the desired menu. Sub-menus are
executed by use of this comand. Entry of the OAIN comnand followed
by arootname in this window will cause the menu system to execute any
existing DataF7ex configuration having that name.
~~
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATAFLEX UTILITIES B-55
The third column displays apassword (if any) to protect the menu
choices from unauthorized access. Since passwords are displayed by
MENUDER MENUDEF must itself be password protected if passwords are
used. Whoever has access to MENUDEF has access to all the passwords
in the system.
The cursor initializes in the single-character blank at the lower
right corner of the screen. If "N" is enterecb the screen will clear
and then redisplay the previous screen (list of menus) for selection
of an unused number under which to create a new menu.
The "I" choice will query as to the choice number before which you
would like to insert amenu choice.
The "H" choice will place the cursor into the blanks at the top of the
screen, where the menu header may be modified. The header includes
definition of the "Default Menu'b which is the number of the menu
which should be executed in the event that anull response (RETURN) is
given to the choice query. Typically, the default menu will be the
menu from which the menu being defined was called, but it need not
necessarily bep especially for the master méñlb which typically
defaults to itself.
The "D" choice will ask which menu choice number you would like to
de1eteg and do so upon entry of the number.
The "Q" choice will exit the screen temporarily and display the
questions for the menu on another screen, which will be shown and
discussed below. Questions are operator prompts which el icit further
input from the operator relevant to the choice which was made, such as
"Press RETURN when the printer is turned on and loaded".
The "C" choice will query which line of the menu you would like to
change, and place the cursor in the blanks for that choice so that
changes may be made.
The "P" choice will permit printing of the menu definition, which is
very handy for occasional off-line reference to the structure of a
menu.
The "A" choice places the cursor on the next blank choice line for the
entry of an additional choice at the bottom of the menu.
The "S" choice causes an exit of the screen and writing of the edited
menu to disk (making the entered changes permanent).
The "X" choice causes the question to appear: "BEFORE YOU EXIT, SAVE
YOUR áiANGES? YIN" to appear. Once this question is answered, the
Menu Definition system will be left, and the menu from which it was
called will appear.
OPERATOR QUESTIONS
Questions can be asked of the operatoi"» and the responses included in
the action of the menu, by the inclusion of the characters $L where
Copyright (c) 1984 Data Access Corporation 05/ 16/84

B-56 DATAFLEX UTILITIES DataF1ex 2.0 User's Manual
===—~——— =——————
the first character is explicitly the dollar sigm and the seconcb
represented by the #sign, is adigit lthrough 6p identifying the
question number matching the question defined for the menu on the
question screen shown below:
DATAFLEX MENU SYSTEM QUESTIONS
————————
EXPLANATION:
QUESTION l:
EXPLANATION:
QUESTION 2:
EXPLANATION:
QUESTION 3 :
EXPLANATION:
QUESTION 4 :
EXPLANATION:
QUESTION 5 :
EXPLANATION:
QUESTION 6 :
Enter the screen prompt for each question referenced in the ACTION
section of the other screen, or ESCAPE to return.
Each menu will support only six questioñs» but each defined question
may be asked as many times as desired throughout the menu. Each
defined question will display up to two lines to the operator, if
neede& for an introductory explanation and the 'Following actual
question. The cursor initializes in the sIngle-character blank in the
lower right of the screen. Entry of anumber for which aquestion
already exists will place the cursor in the blanks for that question
for editing of the data in the blanks. Entry of anumber for which
there is no question will place the cursor in the blanks for that
number for entry of new data. Data for aquestion may be deleted with
the field delete keyg but there is no reason to delete such data until
the number is needed for another question. Actual de7etion of a
question consists of removing references to its number from the action
windows of the Menu Configuration Menu.
Each menu supports only nfne choices, so that selection may be made by
the entry of asIngle character, and to keep each screen display easy
for the operator to scan. Extensive menu systems may nonetheless be
constructed by thoughtful arrangement of sub-menus of related groups
of functions called from amain menu.
~~~~~ ~~ ~~ ~ ~~ _—— —
———————————————————————————
Copyright (C) 1984 Data Access Corporation 05/16/84

"~~~ ~ ~~— ~~~~~~~~———~~~— _______ ___~~ ~ ~ C~l
~———— ~—~~~———~——————————————————=."———~—~—=———————
~
========== ==========
==""=__=====: =:= ELEMENTS OF CONFIGURATIONS ZZZZZ±FZZZ
—————————
========== ======.===—
=~
There are several types of arguments (see Definitions) which can be
acted upon by aDataFlex command. These serve the purpose of enabling
the manipulation of various types of information both 1itera1iy and
symbo): ica1ly. Arguments are established by DataFlex connands, file
structure definitions or various forms of delimiterm and are
identified by symbols.
The DataFlex commands which establish arguments are declarative in
nature? i.e. they provide no action other than establishing the
variable. These cormands are treated separately in the chapter on
"Definition Commands". There is aDefinition command for each of the
argument typem which are listed below:
ARGUMENT TYPES
STRING
NUMERIC
DATE
INTEGER
INDICATOR
Most arguments have both atype and one of the classes listed below:
ARGUMENT CLASSES
CONSTANT
VARIABLE
DATA BASE ELEMENT
WINDOW
CONSTANTS are explicit data values that do not change. For examp1ep 3
is anumeric constant; 12/12/83 is adate constant.
VARIABLES represent data values that can change in the course of a
configuration's execution. It is maintained in the computer's memoryp
and Is of afixed length. Avariable is "typed" as listed aboveg and
can contain only information consistent with its type. If data is not
of the proper type for avariab1ep DataFlex will convert it to the
proper type when it is MOVEd. (see MOVE comand) Variables in
DataF1ex are global in aconÉigurat1on.
DATABASE ELEMENTS are the smallest discrete addressable components of
the database. In DataFlex they are addressed with the syntax
"FILENN4E.FIELDNAME" where FILENAME is the DF_FILENAME established for
the data file in the DataFlex FILEDEF Uti1itµ and FIELDNAME is the
TAG_NAME established for the data field in the DataFlex FILEDEF
~~~ ——————————————————————-
—————————
Copyright (c) 1984 Data Access Corporation 05/16/84

C-2 ELEMENTS OF CONFIGURATIONS DataFlex 2.0 User's Manual
utility. Any database element e>isting on any addressable disk drive
can be addressed from any configuration.
EXAMPLES:
DF_FILENAME.TAG_NAME
INVENTORY.QTY_IN_ST0CK
WINDOWS are typed and formatted positions in DataFlex screen images.
They are addressed by reference to the name of the PAGE of which they
are acomponent. and their sequential position in that page. The
sequence is established by numbering the windows from left to rightp
top to bottom in the PAGE; 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 "r is the sequential number of the window in
the page. Symbolic names can be created for windows with the NAME
command.
STRING CONSTANTS
Atext string constant is aliteral representation of a group of
printable characters that is handled "as is" by the command processor.
The string is defined to the DataFlex command processor by enclosing
the group of characters in single ('stringñ or double ("string")
quotation marks as delimiters. The form 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 astring.
EXAMPLES:
'text string' "computer" 'Press <ESC> to exit... '
"Tom's file" 'In case of fire, yell "HELP"!'
Care must be taken to use the correct combination of beginning and
ending quotation marks with strings that contain the alternate form.
For example, the string 'I can't gol' would be interpreted by DataFlex
as fÍ card. "I cáñ¶t go!", however, would be interpreted correctly.
STRING VARIABLES
Astring variable is a name which you designate to represent astring
of characters which will have aconsistent meaning (but with contents
that vary) throughout your application (for examp1e9 "CUST0MER_NAME").
The variable name must be declared (using the STRING commandL and its
length efther specified in the command or not specified, in which case
it defaults to 80 characters. The string variable must be declared
before it is used. After declaration, the string variable can be
referenced or accessed by name throughout aconfiguration. Variable
names may be up to 80 characters in 1engtM must begin with a1etter9
and may not contain a space.
If you don't specify your variable's length. but the contents are only
four characters ("Bill"k DataFlex will still handle it as 80
characters long (with 76 spaces, in this case!). So for variables
——————
Copyright (c) 1984 Data Access Corporation 07/18/84

DataFlex 2.0 User's Manual ELEMENTS OF CONFIGURATIONS C-3
———————— —————————————
with short contents, you can save agreat deal of memory space by
defining your variables as short ones (see examples below). String
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.
But remember, variables defined as large will always be 1argeg even
when their contents are short. "Bill" would be 255 characters if it
were the contents of astring variable defined as having length 255.
The command format for declaring astring variable Is:
STRING var1ab1e_name {string lengtM
EXAMPLES:
STRING flag l
STRING response
STRING an_input IQ
STRING my_entry lOó
The strings "FLAG'4 "RESPONSE", "AN INPUT" and "MY ENTRY" are
declared for aDataFlex configuration by the above commands.
"FLAG" is defined as having alength of one (I) character,
"RESPONSE" is defined to eighty (BO) characters by default,
since length isn't specified in its command, "AN INPUT" is
defined to alength of ten (IQ) characters, and "MY_ENTRY" is
defined to alength of one hundred (lOó) characters.
NUMERIC CONSTANTS
Numeric constants are sing1eg specific numeric values that are used in
expressions or' other forms of numeric arguments.
EXAMPLES:
l234 lOó 100000 -50 10.52
(diameter*3.l4) (FICA_WAGES*13.7)
On the first example 1ine» the six numbers are simply that: numbers
that can be used wherever and however useful or necessary. On the
second example 1inep the values 3.14 and 13.7 are numeric constants
used in expressions.
NUMERIC VARIABLES
A numeric variable is anamed symbolic representation of anumber that
can be used as the subject of aDataFlex commandG execution or
expression evaluation. The numeric variable must be declared before
it is used. After declaration, it can be referenced or accessed by
name throughout aconfiguration. Only numbers may be stored in a
numeric variable.
Mu1tlp1e numeric variable arguments can be defined on a single
definition line. The variable names must be separated by spaces.
Copyright (c) 1984 Data Access Corporation 07/18/84

C-4 ELEMENTS OF CONFIGURATIONS DataFlex 2.0 User's Manual
______=~ =~~ ————————————
FORMAT:
NLNBER varfab1e_namel varlab1e_name2 ... variab1e_namen
EXAMPLES:
N%ER quantity
NUMBER amount_due credtt
NUIE)ER area_code phone_exchange phone_number
The a11owab1e range of values for numeric variables in DataFlex is:
+or -99,999,999,999,999.9999
EXPRESSIONS
Arithmetic expressions are numeric type arguments that are evaluated
as they are acted upon by DataFjex comnands. Expressions ÁQjjQt have
to be evaluated first and then placed into avariable. They are
autcmatical1y evaluated by the DataFlex comand processor when
encountered during the execution of aconfiguration. The result of
the expression is then processed by the cormand.
Any valid numeric representation may be acomponent of an expression
including: numeric constant5p numeric varfab1esg numeric ehments in
the data base (addressed as filename.fieldnameb date variables or
data Input from the keyboard by an operator and stored in adata
window.
The following symbols are used to fnstruct the comand processor how
to perform the expression evaluation:
ADDITION "
SUBTRACTION -
MULTIPLICATION *
DIVISION /
RETURN GREATER THAN >
RETURN LESS THAN <
PARENTHESES' (... )
The first four operators above are se7f-exp1anatory. However, the
last two expressfon operators require some explanation. Two numeric
arguments are supplied to these operators* and depending upon the
symbol selected, the greater or lesser of the arguments will be
returned. For example: In 3>59 5 will be returned; in 3<5, 3 will be
returned. No modification is made to the data. These evaluations only
make selections,
Expressions are formatted by enclosing the numeric arguments which
make up the expressiom with operatorm in parentheses. The DataFlex
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual ELEMENTS OF CONFIGURATIONS C-5
—————— ————————————— ——
command processor recognizes the parentheses and evaluates the
expressiom making the result available for command processing just as
if aconstant had been used in place of the expression.
EXAMPLES:
(argl +arg2) (balance +sale)
(argl -arg2) (balance -payment)
(argl * arg2) (quantity " value)
(argl / arg2) (principal / months)
Multiple levels of parentheses are supported to control the sequence
of the arithmetic evaluation of the expression. In an expression that
contains multiple parenthesesg the portion of the expression contained
in the innermost pair of parentheses will be evaluated first.
EXAMPLE:
(un1t_cost)*(reorder_qty -qty_on_hand))
In this example, UNIT_C0ST would be multiplied by the
difference between RE0RDER_QTY and QTY_0N_HAND because the
difference is enclosed in parentheses. WIthout the
parentheses, UNIT_C0ST would first be multiplied by
RE0RDER_QTY, and QTY_CN_HAND subtracted from the product, a
mean'ingless result.
Without parentheses In an expression, evaluation Is left to rfght.
DATE VARIABLES
NOTE: DataF1ex supports two date formats in different versions of the
product. The two supported formats are MM/DD/YY and DD/MM/YY.
We refer to the latter as the "Euro-date" format. For the.
purposes of this documentation we will refer to formatted dates
as MM/DD/YY, even though Euro-date versions of DataFlex accept
and return dates in the format of DD/MM/YY.
Dates are stored in DataFlex in Julian form as numbers. The displayed
and printed date format MM/DD/YY which appears in screens and reports
is ade-coded representation of the numeric storage format. Adate
variable can be defined to manipulate date information within a
configuration by using the DATE definition command. Multiple date
variables can be defined on a single argument definition line.
The data stored in the date variable is aJulian numeric value.
Therefore, any operation requiring calculations on dates can be
executed directly by reference to the variable without the necessity
for type conversion. When dates are output to screens and reportm
internal DataF1ex routines which are flagged by the data type of the
variable decode it automatically into the MM/DD/YY format.
..——
Copyright (C) 1984 Data Access Corporation 07/18/84

C-6 ELEMENTS OF CONFIGURATIONS DataFlex 2.0 User's Manual
FORMAT:
DATE date_variab1el .. .date_variable9
EXAMPLES :
DATE due
DATE today tomorrow yesterday invo1ce_due
DATE CONSTANTS
Date constants (expressed as MM/DD/YY) can be used as the subject of
DataF1ex comands, but they cannot be used within expressions. They
can be placed in date variables using the DataF1ex "MOVE" comand for
use in date variab7es.
EXAMPL ES :
LEGAL -- DATE BIRTHDAY
MOVE 01/16146 TO BIRTHDAY
LEGAL -- DATE BIRTHDAY
MOVE 01/16/46 TO BIRTHDAY
CALCULATE (BIRTHDAY +365) TO NEXTJ3IRTHDAY
TI I FGM -- CAL(JJLATE (01/01/83 +IQ) TO INVOICE.DUE
LEGAL —DATE DATE_S0LD
MOVE 01/01183 TO DATE-SOLD
cALájLATE (DATE-SOLD +IQ) TO INVOICE.DUE
FILENAMES
The "df_ filenames" of DataF1ex data base files can be used as connand
arguments. Valid "df_ filenames" that can be used as arguments must be
established with the DataFlex FILEDEF utility (see the section of this
manual on File Definition for adiscussion of the df_ filename
conventi ons) .
FORMAT:
OPEN df_ filename
"df_ filename" in the format example is an argument for the
OPEN coman d.
———————
Copyright (c) 1984 Data Access Corporaticm 05/16/84

DataF1ex 2.0 User's Manual ELEMENTS OF CONFIGURATIONS C-7
EXAMPLE:
OPEN Inventory
CLOSE customer
The symbolic names of individual elements in adatabase can be used as
arguments for avariety of DataFlex commands. Aspécif'ko formatted
syntax is provided to represent these arguments. which are composed of
the filename and fieldname of the data base element:
FORMAT:
FILENAME.FIELDNAME
EXAMPLES:
fnventory.description
custcimer.current_ba1ance
custcmer.credlt_11m1t
INDICATORS
An indicator is established by issuing an INDICATOR comand with the
indicator name as the argument of the comnand. It takes on the
characteristics of a"flag" which is tested by the configuration to
determine whether aconnand line or group is to be executed. The
INDICATOR comand only establishes an indicator; it does not "set" it
to astatus.
FORMAT:
INDICATOR 1ndfcator_argl ... ind1cator_arg9
EXAMPLES:
INDICATOR pass fall new old change
See the chapter on INDICATORs for more information.
————————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

C-8 ELEMENTS OF CONFIGURATIONS DataFlex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
—— —————————
Copyright (c) 1984 Data Access Corporation 05/16/84

=============="""""":"""""""":"""""""""""""::"::7""" "C"9
=~"~==~===,~
="="""""""""""""""""""""" """"""
=""======= """"
======="== ==========
DEa-ARINg DATA ELEMENTS ::::Z --
——— ~ ~~
========== ———————
——————
There are five DataFlex Definition Commands:
STRING
NUI¶3ER
DATE
INTEGER
INDICATOR
They serve to provide the configurator with a means of identifying
typed variables to the DataFlex compiler. Once identified, the
variable argument can be used at will throughout the configuration.
The definition comnand which establishes avariable must precede the
first use of the variable in agiven configuration.
FORMAT:
COMMAND var1ab1e_arg
EXAMPLE:
STRING keyboard_1nput
The first three definition comands support the three data types which
can be defined in aDataFlex file structure: ASCII strings, numbers
(stored as packed BCD), and dates (Julian -stored as packed BCD
numbers). In the case of the NUMERIC and DATE connands9 up to nine
(9) variables can be defined on a single comand line.
STRING Command
If the maximum string length is not spéc1f"fédo adefault maximum
length of 80 characters is assigned by DataFlex. Use of defined
string space is not dynamically allocated in memory; therefore,
length specification can significantly conserve memory utilization.
Strings consume their defined length plus 2bytes in memory. The
allowable range for string length specification is from Ito 255
characters.
FORMAT:
STRING variab1e_name {string length}
Copyright (C) 1984 Data Access Corporation 05/16/84

C-lO DECLARING DATA ELEMENTS DataFlex 2.0 User's Manual
EXAMPLES:
STRING flag I
STRING response
STRING my_entry lOó
The string variables HÁG$ RESPONSE, and MY_EN1RY are declared
for aDataFlex configuration by the above commands. FLAG is
defined to one (I) character. RESPONSE is defined to eighty
(BO) characters by default, and MY_ENTRY is defined to a
length of one hundred (LOO) characters.
If entry is subsequently made to astring variable which exceeds the
declared length of the variable, excess input will be discardecb such
as:
STRING code 3
MOVE "ABCDE" TO code
CODE will not contain ABCDE. It will contain only the first 3
characters, ABC. No error will be declared unless one is
provided for the condition in the configuration.
NUMBER Command
Multiple numeric variable arguments can be defined on asingle
definition line. The variable names must be separated by spaces.
FORMAT:
NUMBER variab1e_namel variab7e_name2 ... variab1e_namen
EXAMPLES:
NUMBER quantity
NUMBER amount_due credit
NIM3ER area_code phone_exchange phone_number
A NUMBER variable consumes 10 bytes of memoryp and has avalue of zero
automatically when it is declared. If there is sufficient m«nory for
storing them DataF1ex can manage up to 32g767 active NUMBER variables
at one time. The range of numbers in DataFlex is:
+or -99,999.999.99%999.9999 "
DATE Command
Mu1tip1e date variable arguments can be defined on a single comand
line.
FORMAT:
DATE date_argl ... date_argn
EXAMPLES:
DATE invo1ce_date
DATE due_date ffrst_reminder second_reminder
=,=~~———~~————~—"" = """""
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DECLARING DATA ELEMENTS C-ll
_—— ————— ————.
INTEGER Command
The INTEGER command allows the creation of amemory variable to
contain an integer value. It differs from the NUMERIC variable in
that the INTEGER variable consimes less mmory for storagep anch of
course, does not support fractional accuracy in calculations.
However, the greatest value of integers in corifigurations is when they
are used 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 range available for Integers is plus or minus 327767. There is no
INTEGER storage type in the data base; all numbers are stored on disk
as binary.coded decimals (BCD). In memoryg however, aNUMBER data
element constnes ID bytesp while an INTEGER data element occupies only
2bytes.
FORMAT:
INTEGER argumentl ... argumentN
EXAMPLES:
INTEGER my_age
INTEGER qty_so1d qty_returned qty_shipped
Integer variables are stored in an internal array in the order in
which they are declared. When the DataF1ex CHAIN connand is execute6
the integer array is jiQt reinitialized. This provides the facility to
pass integer values from one configuration to another without writing
the values to afile.
The internal integer array is sequentially allocated as the variables
are declared. Thereforeg if it is desired to pass integer values in
QiAINed configurations, we suggest that the same integer names be
declared at the beginning of each configuration to provide for a
consistency in variable referencing. When integer values are not
passed between configurations, they should be initialized before use.
EXAMPLE:
MOVE O TO sheep_counter // inlt1alize sheep_counter
————————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

C-12 DECLARING DATA ELEMENTS DataF7ex 2.0 User's Manual
—— ————
INDICATOR Command
The INDICATOR definition command defines aspecial type of DataFlex
argument which is used for conditional processing and program control.
The INDICATOR comíand creates an "Indicator".
The named indicator established as the argument of the INDICATOR
command takes on the characteristics of a"flag" which is tested by
the configuration to determine whether acormand line or group is to
be executed. Indicators are discussed fully in the section on
"Conditional Execution".
FORMAT:
INDICATOR ind1cator_arg
Copyright (c) 1984 Data Access Corporation 05/16/84

==—————~—————~ """"""""""===————— C"l3
—— —
—————
~~~~
——————————
——————————
========== MANIFULATING DATA ELEKNTS ==========
=========~~~—————————————————————————
———————————— =
———————————
MOVE Command
MOVE provides the facility to "transport" data throughout aDataFlex
application without regard for the type or location of the source or
destination arguments. Data can be MOVEd from window to window»
window to data base "e1ment"» element to windowp element to e1%entp
expression to window or e1emeñt» etc.p etc. Where expressions are
part of the MOVE connandp they will be automatica1ly evaluated with
the result being MOVEd to the destination argument. Further. any
required type conversions will also be executed automatically.
FORMAT:
MOVE source_var TO dest1nat1on_var
EXAMPLES:
MOVE "DataFlex" TO str1ng_arg
MOVE 06/01/83 TO date_arg
MOVE (invt.qty -qty_ordered) TO invt.qty
MOVE screen.date TO lnvo1ce_date // then...
MOVE (invoice_date +30) TO invoice.due
The MOVE command decodes the type of the destination variable and
internally generates one of the fOllowing types of move commands for
the comnand processor:
MOVENUM for numbers
MOVEINT for integers
MOVESTR for strings
Neither variable may be alabel or indicator. While the source may be
aliteral string or numbem the destination variable may not be. The
MOVE command will not update accumulators in the SUBTOTAL section of
the REPORT macro. See the PRINT command for this purpose.
Copyright (C) 1984 Data Access Corporation 05/16/84

C-14 MANIPULATING DATA ELEMENTS DataFlex 2.0 User's Manual
INCREMENT Command
The INCREMENT comand operates on an integer variable, and is used as
acounter for loops and repetitive operations. Literals, 1abelm and
indicators may not be used in this command. It incrwents only by the
integer I.
FORMAT:
INCREMENT fnteger_var
This comnand is equivalent to:
MOVE ('lnteger_var +I) TO integer_var
...but is faster in operation.
——————
CALCULATE Command
The CALCULATE comnand is used to evaluate an expression and move the
result to adestination variable of the numeric type. When using the
CALCULATE comand you must determine if the destination argument is of
the numeric type. If you are not sure, use the MOVE connand instead.
MOVE can also evaluate expressions.
An abbreviation of the CALCULATE commanch "CALC" can be used inter-
changeably with the full comnand word.
FORMAT:
CALC{ULATE} expressfon_arg TO destinat1on_var
EXAMPLES:
CALWLATE (12+6) TO g_tota1
CALC (date_ord+cust.tems) TO invo1ce.date_due
CALC (3.14*66.4) TO area
The destination variable may not be alabel. indicatorp constantg or
ASCII variable. It may be an integer9 numer1cg or date variable. The
CALCULATE comnand will not update accumulators in the SUBTOTAL section
of the REPORT macro. See the PRINT command for this purpose.
—————-.————
Copyright (C) 1984 Data Access Corporation 05/16/84

~~—~~—_~———~—__~======"="="===== CR 5
==-==::: DATA ENTRY =-EFE=-==-
"=""====== ——~— —~ —~ ———— ——~~———~——~~———~=======
————————————
——————
———
—————
Application requirements for data entryp file maintenance and file
inquiry, are efficiently met by the DataFlex ENTER command macro.
ENTER provides acomplete program skeleton for data entry using IMAGE
formats and Flex-keys. The ENTER macro can handle multi pIe rel a'ted
f11esp file update proceduresp transaction creation and online
editing. There are user-defined procedures for specific operations so
the user can set up whatever auxiliary update procedures and error
trapping may be required.
Since connand macros are stand-alone program skeletons, they can only
be used once in aconfiguration. Specl fic connand statements are used
within and around the command macros to provide functions to
accommodate avariety of requi rements.
The ENTER comand invokes the ENTER macro, which is in fact an entire
group of processing routines that perform the following functions:
l. ENTER data via CRT screen images, with validation,
type checking, range checking and error trapping.
2. CREATE records in the data base with data entered through
the screen imagep and in the process» update related data
base records, key iMéxésó etc.» all without having to
create routines and procedures for such activities.
3. FIND data in the data base by key field and display it on
the formatted CRT "image". Single records or multiple
related records can be "found" with asingle key stroke.
Data can then be inspected, scannéd» "edited, deleted.
4. EDIT existing records in the data base and in the process,
properly update related data base records, key indexesD
etc. without custom routines and procedures.
5.DELETE records from the data base while processing all
requi red updates on-line.
6. CLEAR displayed data from the screen image.
~~
————
Copyright (c) 1984 Data Access Corporation 05/ 16/84

C-16 DATA ENTRY DataFlex 2.0 User's Manual
=="·="'="'=
The operation of the ENTER command macro assumes that the database
fijes dealt with have previously been defined with the DataFlex
FILEDEF or AUTODEF utilities.
Mu1tipie records from different database files can be displayed with
ease and f1exibi11ty by the ENTER macro. However. the structure of
the ENTER comnand does impose the limitation that only one record from
agiven data Íile may be displayed on the screen at one time. It will
not, for example, support amulti-item format like an invoice. Con-
figurations requiring mu1ti-1ine formats should be "programmed" with-
out the use of the ENTER macro. The ENTERGROUP comand is useful In
applications requiring multi-line formatting. See the INVOICE.FRM
demo file for an example of aprogrammed mu1ti-1ine (non-ENTER)
configuration.
Aspecific command structure is used with the ENTER macrog and there
are a series of optional comnands designed to control the formatting
and actions which occur within the data windows of the screen image.
Configuration examples at the end of this chapter can serve as a
useful guide during the discussion of these coimands.
————————————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATA ENTRY C-17
ENTER CONFIGURATION STRUCTURE:
// IMAGE SECTION -----------
lpagenamel // start image section
---- first page of image ---
/pagename2 // can have multiple images
---- following pages of image ---
l* // end of image section
// PRE- ENTER COMMAND SECTION ""--
OPEN f11el // open all files and
OPEN f1le2 // initialize any variables used and
// give window formatting commands
// """___"____ INVOKE ENTER MACRO USING ENTER COMMAND ---- ="="
ENTER filel fi1e2 // start ENTER mini program
// declare related files In order:
// "senior" to "junior"
// =ENTRY SECTION _______"___
AUTOPAGE page // AUTOPAGE required only for
// second and following screens
EN7RY field {windjw} {options}
ENTRY ... .... ..... //one ENTRY for each window
ENTRY field {window} {options}
RETURN // required at end of ENTRY section
// OPTIONAL USER-DEFINED PROCEDURES -------
ENTER.SAVE: // save procedure
--- cormands -- // save procedure comnands
RETURN // end of save procedure
ENTER.EXIT: // exit procedure
--- commands --- // exit procedure comands
RETURN // end of exit procedure
ENTEREND // End of ENTER mini program
// OPTIONAL POST-ENTRY PROCESSING ====- -
The above sections: Image Section. Pre-Enter Commands. Enter Command
Line, Entry Sectiom User-Oefined Procedures and Post-Entry Processing
are discussed below. The section markers shown above are for instruc-
tive purposes only. They are not required in actual configurations.
Copyright (C) 1984 Data Access Corporation 05/16/84

C-18 DATA ENTRY DataF1ex 2.0 User's Manual
ENTER IMAGE SECTION:
The IMAGE SECTION in aconfiguration using ENTER should start with one
or more "fill in the blanks" forms for the operator. These images
will be awindow into the database for the fi1e(s) used in the
configuration. The same images can be used for all file maintenance
functions and will use the Flex-keys. The image form should contain
prompting to inform the operator on the contents of the windows that
are displayed. Each page of the image must be preceded with a
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*".
ENTER PRE-ENTER SECTION:
In the PRE-ENTER section, all of the files that will be used by the
ENTER macro must be OPENed. The OPEN command is further described in
the section on "Manipulating Records". Any other DataFlex comands
required to ready the system for adata entry session should be
included here.
ENTER COMMAND LINE:
The ENTER COMMAND LINE must specify all of the database files that the
ENTER macro will access during execution. The files listed on this
line will be automat1ca11y SAVEd and CLEARed (when the operator
presses the SAVE Flex-key or presses <RETURN> in the last window of an
image) .Other files that are open may still be used within the ENTER
macro but if it is required to SAVE and CLEAR any such file, those
actions must be written into the configuration expiicltiy. FINIh
RELATE and DISPLAY operations on records from such non-ENTER files
will still be performed automatically.
The SEQUENCE in which the files on the ENTER command line are declared
is significant. The "main" fi1ep the one on which the primary file
maintenance is being done, MUST be the first file in the list in a
left to right sequence. Any file which fs related TO by the main file
must be declared to the right of the main file, and any file TO which
that file relates should be listed next. This will put the files in
order with relationships pointing to the right and is required to
ensure that when arecord is SAVEd it is properly attached to the
fi1e(s) to which it relates. This also ensures that DELETIONS will
properly delete the relationships to the record(s) which are DELETEd.
The chapter on "File Definition" explains relationships among database
.files. Following the example given in that chapter. an ENTER comand
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 ndatabase file
(including new PARTS, new ajsToMERs? and changes in both).
Copyright (c) 1984 Data Access Corporation 05/16184

DataFlex 2.0 User's Manual DATA ENTRY C-19
ENTER ENTRY SECTION:
The ENTRY SECTION is the primary interface with the data entry oper-
ator. The object of the entry section is to logically connect the
data base elements with the data windows in the image. This is done
with the ENTRY command. The ENTRY command handles the display of
data, finding records, moving data into the record buffer and clearing
the windows. When each of the above operations is executed. the
entire entry section is scanned for ENTRY comands. One or more
options can be placed on each ENTRY cormand line to provide formatting
for the data controlled by the command.
The ENTRY command differs from any other DataF1ex command in that it
has several different functions and that they can be executed in any
sequence. EXAMPLE: If the FIND Flex-key is used in awindow
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
window.
Other commands (INDICATORs, GOTOs, etc.) can be included in the ENTRY
section to control the sequence of operation or set conditional
entries. SAVE commands should be avoided in the ENTRY section. When
data is put into adata window with the ENTRY command, the data is
JUST in the data window; it isn't moved into the record buffer until
aSAVE is done. The CLEAR Flex-key will clear windows controlled by
ENTRY commands, but not those controlled by DISPLAY commands (see
section on Di rect Control of Data Entry for DISPLAY command).
The format of the ENTRY cormand is as follows:
ENTRY fl1ename.f1e1dname wIndow {options}
where "fi1ename.fie1dname" Is any database element in an open
file or an expression (for calculated fields).
In this instance, the brackets {} are to be actually typed in the
configuratiom contrary to the notation elsewhere in this manual where
brackets are used only to signify optional cormand e1«nents to the
reader of the manual.
Format options for the ENTRY command are as follows:
F|INcTTnN SJLNIU
DECIMAL POINTS {P0INTS=n} where "n" is the number of places to the
right of the decimal point in the window. This can
reformat awindow or can be used to configure an
integer-only numeric field by setting avalue of zero
(O) for "n".
————————— — ————
Copyright (c) 1984 Data Access Corporation 05/16/84

C-20 DATA ENTRY DataFlex 2.0 User's Manual
~——— =~——~——————
AUTOFIND* {AUTOFINCñ Executes aFIND EQuals on the main index of
which the data elment on the EN7RY command line is a
part. If the desired FIND is on amulti-segment
index, the AUTOFIND should be on the last entry
command for the segments that make up the index, so
that all data necessary for FINDing has been entered
prior to execution of the AUTOFIND. Record number may
not be part of the index of which the AUTOFINDing data
element is apart. Windows for data from related
files will also be fi11e& provided there are ENTRY
connands for those windows.
SKIP IF FOUND* {SKIPFOUNCñ Display data in the window if arecord is
FOUND with key data matching 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.
FIND REQUIRED* {FINDRECÜ Requires that an active record be in the
buffer before the operator can pass this window in the
image. The cursor will rémaln in this window until a
successful FIND Is completed. The BACKFIELD Flex-key
can move the cursor in reverse to execute the FIND on
another window. Pressing the CLEAR Flex-key will
return the cursor to the first wfndow on the image.
UPPER CASE {CAPSLOCK) Converts all lower case alpha characters
entered in the window to upper case.
REQUIRE ENTRY {RE(JLJJIRED} The cursor cannnot be moved to the next
data entry window until data has been entered into the
current window.
RANGE CHECK {RANGE =#L iC2} {RANGE.= nn/ddlyy. m/dd/yy} Provides
an automatic check of entered data and declares an
error and returns the cursor to the window if the date
or numeric value entered does not fall within the
specifications in the comand. The first value is the
low end of the rangep and the second is the high end.
The upper and lower values in the comand are included
within the valid range. Literal numbers and dates can
be used. Variables may not be used.
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 speci-
fied as spaces (shown below as 16). The vertical bars
(I) shown below are recomended optional delimiters.
De1imitersp if úSéd,r should be characters unlikely to
be input erroneously by operators. The connand may
alternatively reference apreviously-defined in-memory
string variable (not awindow or database element):
{MEa(="YEslNoBlYBBlNBB"}
"————————————————————
"Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATA ENTRY C-21
FORCE PUT {FORCEPUT} Puts data in the windows to the record
buffer regardless of whether any data has been changed
from that originally displayed. Norma11yg aput will
not occur unless some data has been changed.
DO NOT PUT DATA {NOPUT} Do not put data from the window into the
record buffer. This protects data from being changed
by the operator.
NO DATA ENTRY {NOENTER} Data from the found record is displayech but
the cursor skips the wiñdowo preventing entry.
NOENTER skips the window even if no record is found,
unlike SKIPFOUND (see above).
DISPLAY ONLY {DISPLAY0NLY} Combination of NOFUT and NOENTER above.
Data is not moved from the window into the record
buffer, and the cursor skips the window.
RETAIN DISPLAY {RETAIN} Maintain the data in window even if aCLEAR
command is execute6 but clear the window if two
successive CLEARs are keyed.
RETAIN ALWAYS {RETAINALL} Maintain data in window at all times;
never clear.
*The cotmands with asterisks are all FINDing comandm and may be
used only on windows relating to indexed database elements (see the
chapter on "Designing Databases" for more information on indexing).
The command options, and the formatting options above can all be used
cumulatively on an ENTRY command line:
EN1RY file.field page.5 {AUTOFIND,SKIPFOUND,CAPSL0CK}
The maximum length of any DataFlex comnand line is 255 characters.
Multiple options on an ENTRY command line are all enclosed within the
brace characters {braces}, separated by comas (,)¿
Aspecial form of the ENTRY command is used where expressions are to
be displayed. The default mode of the window becomes display only
when this format is used.
FORMAT:
ENTRY (expression) w1ndow_arg
EXAMPLE:
ENTRY (date_today+30) screen.5
ENTRY AND AUTOPAGE
The ENTRY command can be used without specific reference to image
windows by using the-AUTOPAGE command. (AUTOPAGE functions automati-
cally in the ENTER macro for the first screen imagep and needs to be
explicitly written only if there are two or more screens.) AUTOPAGE
————————————
——————— ____=~_=~~~~>=————
Copyright (C) 1984 Data Access Corporation 05/16/84

C-22 DATA ENTRY DataF1ex 2.0 User°s Manual
sequentially (left to right9 starting witht the top line and working
down) accesses the windows of the screen image named as the argument
of the command (see the section of this manual on Direct Control of
Data Entry), and permits the window references to be left off.
NOTE: The ENTRY command can ONLY by used within the ENTRY section of
the ENTER macro or within the ENTERGROUP command.
Since ENTER is internally composed of aset of subroutines, aRETURN
command is required to terminate the ENTRY section of the configura-
tion.
If you don't need any of the user-defined procedures or post-entry
processing, you may simply end the ENTER configuration with an
ENTEREND.
The next page illustrates atotally straightforward, unimaginativeg
yet efficient ENTER configuratiom It makes use of the AUTOPAGE
function, so page window references are not necessary. It has all of
the components of an ENTER configuration:
1. A labeled image
2. An OPEN command with filename argument
3. An ENTER command with filename argument
4. ENTRY commands with data element arguments
5. ENTRY commands terminated by aRETURN
6. An ENTEREND command to end the configuration
~
Copyright (c) 1984 Data Access Corporation 07/18/84

DataFlex 2.0 User's Manual DATA ENTRY C-23
="=———___—~— ———————
EXAMPLE FORMAT FOR ENTER
/LIST
My Mailin' List
Name:
Address:
City:
State: _ZIP:
l*
// -- pre-enter --
OPEN MAIL // open data file
ENTER MAIL '// start enter macro
// -- begfning of entry section --
AUTOPAGE LIST // sequentially assign windows
// not actually required in this
// single-screen configuration
ENTRY MAIL.NAME {AUTOFIND}
ENTRY MAIL.ADDRESS
EN1RY MAIL.CITY
EN1RY MAIL.STATE {CAPSLOCK}
ENTRY MAIL.ZIP
RETURN // end of entry section
// not actually required since next
// command is enterend
ENTEREND // end of enter macro
———————
Copyright (C) 1984 Data Access Corporation 05/16/84

C-24 DATA ENTRY DataFlex 2.0 User's Manual
——————
THE USER-DEFINED PROCEDURES
Many ENTER configurations will need to perform updates in related
files, have error checking or delete protection built im etc. These
operations are accommodated by five user-defined procedures which are
automatically executed when the corresponding DataFlex Flex-key is
pressed during the execution of the ENTER configuration. The User-
Defined procedures are:
ENTER.SAVE: executed on a SAVE command
ENTER.DELETE: executed on aDELETE command
ENTER.EDIT: executed on an EDIT and on a DELETE command
ENTER.CLEAR: executed on aCLEAR command
ENTER.EXIT: executed on an EXIT command
These ljser-Oefined procedures are automatically called by the ENTER
command macrog but they are functiona11y no different from any other
labeled DataFlex sub-routine called by your own GOSUB comands. The
inclusion of the colon ":"at the end of the procedure name is
required to identify them as labels; om!tting the colon will cause an
error.
If an ERROR is declared within any of the procedures the associated
function will be disabled.
The ENTER.SAVE procedure is executed whenever a new record is created
or an existing reccmi is edited.
The ENTER.DELETE procedure is executed whenever an existing record is
deleted.
The ENTER.EDIT procedure is executed whenever an existing record is
deleted OR an existing record is edited. This works well with the
save procedure to keep the consistency of counters and totals in a
related file.
The ENTER.CLEAR procedure is executed whenever the CLEAR Flex-key is
pressed.
The ENTER.EXIT procedure is executed whenever the escape key is hit
and is primarily intended to allow conditional disabling of the escape
key by declaration of an error.
Each of the User-Defined procedures must be ind1vidua1ly terminated
with the use of aRETURN command (see the example on the next page).
Copyright (c) 1984 Data Access Corporation '05/16/84

DataFlex 2.0 User's Manual DATA ENTRY C-25
The configuration below illustrates the use of the ENTER.SAVE and
ENTER.EDIT procedurem which are executed every time arecord is saved
and edited/deleteck respectively. An application requirement for a
mailing list uses only one file for the list information. However, it
is desired to maintain an on-line counter of how many records are in
the file. To do this we will establish afield in the system file
(SYSFILE.COUNTER) that contains the number of records in this file.
To maintain the count correct1y? the counter must be incremented when
arecord is created; when arecord is dejete6 the counter must be
decrementéd» and when an edit is donep the counter must be left
unchanged.
/LIST
My Mai1in' List
Name:
Address:
City:
ST: _ZIP:
l*
// only those parts of this example that are changed have comments
OPEN MAIL
OPEN SYSFILE // open other file.
ENTER MAIL
AUTOPAGE LIST
ENTRY MAIL.NAME {AUTOFIND)
ENTRY MAIL.ADDRESS
ENTRY MAIL.CITY
ENTRY MAIL.ST {CAPSLOCXJ
ENTRY MAIL.ZIP
RETURN
// The ENTER.SAVE procedure will execute whenever arecord is saved.
// When arecord is createcb only this procedure is executed,
// incrementing the counter.
ENTER.SAVE: CALC (SYSFILE.COUNTER+1) TO SYSFILE.COUNTER
SAVE SYSFILE
RETURN // return from save procedure
// The ENTER.EDIT procedure is executed whenever arecord is deleted
// or edited. For adelet1om it decrements the counter. It also
// decrements the counter in an edit, but true edits are followed by
// SAVEm which execute ENTER.SAVE, offsetting the decrement to zero.
ENTER.EDIT: CALC (SYSFILE.COUNTER-I) TO SYSFILE.COUNTER
SAVE SYSFILE
RETURN // return from delete procedure
ENTEREND
Copyright (c) 1984 Data Access Corporation 05/16/84

C-26 DATA ENTRY DataFlex 2.0 User's Manual
ENTDISPLAY Command
The ENTDISPLAY comand causes all ENTRY data elments for the data
file named in the argument to display on the screen, along with all
those in other related files. Its apparent effect is exactly as
though the SUPERFINO Flex-key had been pressed by the operator. It
may be used in the ENTRY section of an ENTER or ENTERGROUP configura-
tion and/or in aKEYPROC (for the FIND key, for example).
FORMAT:
ENTDISPLAY <df_ff1ename>
Where <df ff1ename> is the name of the data file from in which
the displayed record is to be found.
EXAMPLE:
FIND GE mail BY INDEX.I
ENTDISPLAY mail
ENTDISPLAY would be used, for examp1eg in an alphabetic FIND such as
the one in the configuration above which is done with the AUTOFIND
option on the ENTRY MAIL.NAME line. If it is desired, however, to do
aFIND greater than or equal to (frequently desirable when the FIND
target's spelling is not exactly known), the AUTOFIND option wIll not
allow this9 since it only does exact FIND equals. For that, the
following configuration would be appropriate (note the differences):
/LIST
My Mai1in' List
Name:
Address:
City:
ST: ZIP:
l*
// only those parts of this example that are changed have connents
// this configuration will always find arecord
OPEN MAIL
ENTER MAIL
AUTOPAGE LIST
ENTRY MAIL.NAME // AUTOFIND removed here
FIND GE MAIL.NAME // FIND greater than or equal to added here
ENTDISPLAY MAIL // ENTDISPLAY comand
ENTRY MAIL.ADDRESS
ENTRY MAIL.CITY
ENTRY MAIL.ST {CAPSLOCK}
ENTRY MAIL.ZIP
RETURN
ENTEREND
Another use of ENTDISPLAY im in amultiuser environment9 after a
REREAD command, to display the REREAD record for inspection.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATA ENTRY C-27
=========——————————————————————
POST-ENTRY PROCESSING:
After the end of the User-Defined procedures, the comand ENTEREND
must be used to terminate the ENTER macro. When the escape key is
pressed, the ENTEREND command will close out the ENTER macro. At this
point you may ABORT configuration, (MAIN to another configuration, or
proceed with any other sequence of DataFlex commands.
ENTER —SEQUENCE OF OPERATION:
An understanding of the order in which the ENTER macro executes
specific functions will aid in the development of more complex
configurations. Steps that involve specific multiuser operations are
Identified. DataFlex systems in which single-user mode was selected
(see SETSCREEn procedures) will not perform these multi-user
functions.
CREATING ANEW RECORD:
a) Clear screen and clear record buffers.
b) Operator fills in the data windows.
c) Operator hits the SAVE key or exits the last image window.
d) Record is autcxnatica11y locked and related records are re-
read from the database (multi-user systans only).
e) Data in data windows is moved to record buffer(s)
accwding tQ the ENTRY cQnnands.
f) ENTER.SAVE procedure is executed (including any parts
defined by the user).
g) Records are ATTANed and SAVEd to disk.
h) All records are unlocked (multi-user systems only).
i) Screen and record buffers are cleared for new entry.
EDITING AN EXISTING RECORD:
a) Clear screen and clear record buffers.
b) Operator FINDS arecord in the main file by any available
key.
C) Related record(sb if any, are found and displayed.
d) Operator changes data in window(s).
e) Operator SAVES record.
f) Records are locked and ali active records are re-read from
disk (multi-user systans only).
g) ENTER.EDIT procedure is executed (including any parts
defined by the user).
h) Data is moved from CHANGED data windows to record buffer.
i) ENTER.SAVE procedure is executed (including any parts
defined by the user).
j) Records are ATTAMed and SAVEd to the data base.
k) All records are unlocked (multi-user systans only).
I) Screen and record buffers are CLEARed for new entry.
Copyright (C) 1984 Data Access Corporation 05/16/84

C-28 DATA ENTRY DataFlex 2.0 User's Manual
DELETING A RECORD:
a) Clear screen and clear record buffers.
b) Operator FINDS arecord in the main file by any key.
c) Related record(sL if any, are found and displayed.
d) Operator presses the DELete RECord key.
e) Records are locked and all RELATED records are re-read from
the data base (multi-user systems only).
f) ENTER.DELETE procedure is executed (including any parts
defined by the user).
g) ENTER.EDIT procedure is executed (including any parts
defined by the user).
h) Record in main file is deleted.
i) Related records are saved.
j) All records are unlocked (multi-user systans only).
k) Screen and record buffers are cleared for new entry.
ENT$PERMISSIVE INDICATOR
The ENTER macro is designed to prevent errors of the sort which could
arise from operator sequences such as the following:
a. Operator finds arecord and one or more related records by
use of SUPERFINO (the display of data from records in multiple
files related to each other is not necessarily apparent to the
operator);
b. Places cursor in akey field in arelated-to record;
c. Presses FIND and FINDS another record in the related-to
file, bringing it into the record buffer with the earlier-
found relating record; and
d. SAVES this combination of possibly-unrelated records as
though they were related to each other.
What actually happens in this instance is that the ENTER.EDIT
procedure is executed on the NEW record Instead of the OLD one. This
makes the totals and counters in both the old and new related-to files
incorrect.
This possibility is eliminated by the internal resetting of the FIND
key to function as aSUPERFINO (i.é.v it will find only combinations
of records actually related to each other) after aSUPERFINO has been
donep just as the NEXT RECord and PREVious RECord keys do. Similarly,
after aSUPERFINO, the AUTOFIND option is switched off on all but the
main fi1ep so that those fields may be edited without interference
from undesired AUTOFIND'lng. If the option of editing the AUTOFINDing
fields is not desired9 editing can be prevented by addition of the
NOFUT option to such fields.
The ENT$P£RMISSIVE indicator will allow operational sequences like the
one described above, which is normally an errom by not resetting the
functioning of the FIND key and the AUTOFIND option. For those
situations in which it Is apermissible sequenceg the statement
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DATA ENTRY C-29
—
"INDICATE ENTSPERMISSIVE TRUE" should be given prior to the beginning
of the ENTER or ENTERGROUP macro. This option should not be used in
transaction-oriented applications in which counters are provided
and/or transaction totals are maintained.
Copyright (c) 1984 Data Access Corporation 05/16/84

C-30 DATA ENTRY DataFlex 2.0 User's Manual
—————————————————
————————————————————————
THIS PAGE INTENTIONALLY LEFT BLANK
—
Copyright (c) 1984 Data Access Corporation 05/16/84

_ __ _ _ _ _ _ _ _ _ _ ~, ————————~——————~___————___========== C~31
_ _ _ _ = ~=~~~~——~~~~µ"~ —~~~————~
—
==== REPORTING AND OUTPUT ==========
""—
~~ ——————————
—— ———— ——
——————
~==========~~———————~———————~—————~— —
Two areas of activity consume a great portion of the development time
for application software: (a) data entry and file maintenance; and
(b) file output for reports. 1abe1sp preprinted forms and files. The
DataFlex ENTER command macro provides apredefined facility for
dealing with the requirements in the first area efficiently; the
REPORT command macro takes care of the second.
The REPORT command macro consists of an integrated set of selectable
predefined output routines that can be chosen as needed. You can use
the selected routines with DataFlex commands and arguments relating to
the requirement at hand to "fill in" an output "image" and then send
the image to the output device. The REPORT macro may be used only
once in aconfiguration. The REPORT macro is aconvenience, usable
for most normal reporting needs. It is not anecessity. The chapter
on "Direct Reporting and Output" includes asimple report that does
not use the REPORT macro.
Likewise, the DataFlex utility QUERY generates REPORT configurations,
and one of the best ways to learn how REPORT works (if, indeed, there
is need for you to do SO), is to "build" your report in QUERY and then
study the source file generated by your work. Unless you need to
report from multiple related files, it is likely CUJERY can satisfy all
your reporting needs, and even if it cánft, QUERY is an excellent way
to begin aREPORT configuratiom by producing asource file which you
may then edit to contain all you need.
AREPORT configuration is divided into two major areas: image lines
and command lines. The image lines specify the headings, window
prompting, window formattingy etc. The command lines contain conmands
that instruct the REPORT command macro how to "fill in" data in the
image area(s) for output.
In this manuaL we refer to a"report" as ageneralized formatted
output operation which may variously encompass formatted reports (in
fact). formatting for pre-printed forms, labels, file output, etc.
Sections of REPORT
The image and connand areas of aREPORT configuration contain corres-
ponding labeled "sections" which address different functional
requirements of areport. For examp1eg one of the "sections" is the
"HEADER". The HEADER section of the image defines how the top of each
page of the report is to look; perhaps your company's name. the name
————
Copyright (C) 1984 Data Access Corporation 05/16/84

C-32 REPORTING AND OUTPUT DataF1ex 2.0 User's Manual
of the report, its dátév page numbering, reporting sequence of the
data9 and so on. Commands in the HEADER command section provide any
needed processing for data which is positioned and formatted in the
HEADER image section of the report. If there are data windows that
are filled in from variables in the configuration, such as for run
date or page number, the HEADER command lines "ff11 in" the necessary
data in the windows. When data has been filled into asection, it is
OUTPUT.
The labeled "sections" of aREPORT command macro are:
/HEADER
/SUBHEADER#
/B0DY
/SUBT0TAL#
/TOTAL
The diagonal character (l) is part of the label syntax. The "r after
SUE3HEADER and SUBTOTAL indicates adigit. Ithrough 99 by means of
which levels (subtotal breakpoints) can be established. The use of
the sections and the names for both the image and command sections is
critical.
DO NOT attempt to use them in adifferent order or change the names.
Within the BODY sectiom note the PRINT commands. These commands have
tWQ functions: (a) they move data elements from the database into
their respective positions in the section image(s) for subsequent
OUTPUTting; and (b) they update any subtotal1ing or tota11ing
registers which may be assigned to the windows to which the data
elements are PRINTed. This command is the REPORT equivalent of MOVE
or DISPLAY, and should always be used in REPORT instead of the other
two commands, since MOVE and DISPLAY do not update subtotal and total
registers.
The following simple report sends five data fields to the default
output device (the printer) on asingle line using only the HEADER and
BODY REPORT sections.
——————_"""""——
———————
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual REPORTING AND OUTPUT C-33
~~
/HEADER
CUSTORER REPORT
CUSTOMER DISC PUR(JUMO PURM/YR PROFIT
/BODY RESIDENT
l*
OUTFILE
OPEN CUST l // opens customer file, specifies index l
REPORT CUST BY INDEX.I // invokes REPORT for "cust" file, INDEX l
SECTION HEADER // defines HEADER section
OUTPUT HEADER // sends HEADER section to printer
SECTION BODY // defines BODY section
PRINT WST.CUSTOMER // moves data to window
PRINT (JJST.DISCOUNT // moves data to window
PRINT CUST.PUR MONTH // moves data to window
PRINT CUST.PUR YEAR // moves data to window
PRINT (JJST.PROFIT // moves data to window
OUTPUT BODY // sends BODY section to printer
REPORTEND // ends REPORT macro
ABORT // ends configuratiom return to op. system
Several necessary components of all REPORT configurations are shown
here:
l. Ascreen image (this one has 2 pagesb followed by the
"/*" marker. The BODY page has the RESIDENT option elected.
2. The OUTFILE command, required to initialize the output
device (the default device in this case) for the configuration.
3. The OPEN command, which opens the main data file for
access by its index I. The definition for that file (CUST) created in
FILEDEF are now available to the configuration.
4. The REPORT command, which invokes the REPORT macro for the
execution of the commands that follow. The filename referenced on the
REPORT command line places the specified file under control of the
macro. The index referenced is the index that will be used to
determine the sequence of the output of the data.
5. SECTION HEADER and SECTION BODY label the appropriate
command sections. Since there is no variable or data base information
PRINTed into the HEADER section, only the OUTPUT command is required
to execute the HEADER. PRINT commands are used to move data into the
image in the BODY section, from which ft is OUTPUT. Only the PRINT
command Wi11 properly update subtotal accumulators (MOVE will not).
6. REPORTEND is the required terminator for the REPORT
command; ABORT then terminates the configuration.
Copyright (c) 1984 Data Access Corporation 05/16/84

C-34 REPORTING AND OUTPUT DataF1ex 2.0 User's Manual
———————
DataF1ex "invisibly" provides an AUTOPAGE command at the beginning of
each sectiom and aRETURN command at the end.
The BODY of the report is the main section for general purpose output.
For examp1eg in that only the necessary "sections" of the REPORT
command macro are used in aconfiguratiom areport comprised of one
line of data with no totaling or subtotaling might use only the
HEADING and BODY Sections. Any of the sections may have multiple
1ines9 'including the BODY section, which would mean that each record
reported would be reported on several 1ines9 often avery desirable
feature (as in the case of mailing addresses). The maximum line
length which can be reported is 255 characters, but in all likelihood.
your practical limit will be the line length of your output device
(printer or screen).
Subtota11'fng and Totalling
The DataFlex REPORT command macro supports up to nine levels of
subtotaling. The SUBHEADER# and SUBT0TAL# are linked in the processing
of subtotal breaks. For examp1e? SUBHEADER3 is the subheading column
headers and labels that would appear at the top of information
subtotaled in the third level of subtota11ing. Totalling and
subtotal1ing are discussed further later in this chapter.
The TOTALS section accumulates running cumulative totals for the
entire output and, if total printing is provided for in your
configuration, prints them at the bottom of the report.
It is not necessary to use ali of the REPORT macro "sections" in a
configuration. Only those sections needed for the desired report need
be used. Every image section usech howeverg must have amatching
command section, even if all that command section does is OUTPUT the
image itself (use the OUTPUT command).
SUBTOTAL BREAKPOINTS
Subtotals are defined by declaring subtotal BREAKPOINT fields on the
REPORT comand line. The declared fields must be among those which
make up the index named on the command lfne (which will determine the
sequence of the report). NOTE: If the INDEX does not include the
same fields as those on which the breakpoints are basedg in the same
order. subtotal groupings will be incomplete, and breaks will occur
randomly in the report.
FORMAT:
REPORT filename BY INDEXA BREAK f11.f1dl f11.fld2
"FIL.FLD#" is used in the format above to save space in signifying a
fllename.fie'ldname element. The "FIL.FLD#" declarations following the
BREAK command set the breakpoints for the REPORT configuration. Each
"fi1.f1d#" is assigned anumber sequentially as it is declared. This
number then becomes the breakpoint number correspond'fng to the
SUBHEADER# and SUBT0TAL# command section labels in the configuration.
In this example fil.f1dl becomes breakpoint l. The rightmost (higher
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual REPORTING AND OUTPUT C-35
—————————
——————————————————
numbered) breakpoints represent the subtotals that change the most.
Breakpoint Ichanges the least. The maximum number of breakpoints
allowed in subtota11ing in the REPORT macro is 9.
When achange occurs in afield defined as a breakpointg the
SUBHEADER# and SUBT0TAL# command groups corresponding to the number of
the breakpoint where the change occurred, and all higher-numbered
subheaders and subtotals will be executed. The subtota11ing registers
(and thus the total register) are updated only with PRINT commands in
the BODY section of the report. The MOVE and CALC commands will not
accomplish this function.
EXAMPLE:
Suppose we had adata fi1eg "SALES'4 containing sales transactions on
various dates with custaners in different states. Field lis Datep
Field 2is Customer Name, and Field 3is State (there would probably
be other fields also). The correct command to yield areport of
transactions by date with subtotals by Custcmer, and subtotals by
Statep would be:
REPORT sales BY INDEX.2 BREAK sa1es.3 sales.2
For this to work. INDEX.2 would have to be made up of State plus
Custaner plus Date (3 segments). Date is in the index for output
sequence only--it is not abreakpoint. For more information on
indexingg review the section of this manual on "Designing Databases".
When REPORT selections and breakpoints are processed, only the record
from the file named in the command has been loaded into the buffer.
If selections or breakpoints are based on fields in files to which the
main file relates, a"RELATE fi1e_name" command should be included in
the selection section (see below under "Selections") of the configura-
tion to bring the records from the related files into the buffer.
As aside effect to placing aRELATE command in the selection section,
the correct records in related files will no longer be available in
the subtotal sections. Thum no file elements should be accessed or
saved in the SUBTOTAL command section when there is aRELATE in the
selection section. To overcome this situation, data can be PRINTed to
windows in the SUBTOTAL image section while in the SUBHEADER command
sectiom where the correct records will be active.
The example format below displays all of the possible sections of a
REPORT macro configuration. They can all be usedp or only those
needed for agiven requirement can be used. It should be kept in mind
that this sample format represents only aportion of acomplete
configuratiom and that portions of the configuration before and after
the REPORT macro may query the operator for input (such as the dateD
or which report is to be runL and that other commands after the
REPORTEND may involve an ABORT, the selection of another report, or
anything else normally provided by aconfiguration (except another
REPORT macro within the same configuration).
Copyright (C) 1984 Data Access Corporation 05/16/84

C-36 REPORTING AND OUTPUT DataFlex 2.0 User's Manual
/HEADER report title image
/SUBHEADERI
subheaderl image
/SUBHEADER2
subheader2 image
/B0DY
body image
/SUBTOTAL2
subtota12 image
/SUBT0TALI
subtotall image
ITOTAL
total image
l*
OUTFILE
OPEN filenamel #
OPEN fi1ename2
MOVE A' TO PAGEEND
REPORT filenamel BY INDEXA BREAK. fi1enamel.fie1d fi1ename2.fie1d
INDICATE SELECT AS fi1e.fie1d mode data element
SECTION HEADER
commands
SECTION SUBHEADERI
commands
SECTION SUBHEADER2
commands
SECTION BODY
commands
SECTION SUBTOTAL2
commands
SECTION SUBTOTALI
commands
SECTION TOTAL
commands
RETURN
RPT.KEYPRESS: subroutine commands
RETURN
REPORTEND
The next page contains aREPORT configuration from areal application,
and is shown as an examp7e of REPORT functions in actual use. It
demonstrates subtotals and I level of breakpoints.
=
Copyright (C) 1984 Data Access Corporation 07/18/84

DataFlex 2.0 User's Manual REPORTING AND OUTPUT C-37
/HEADER INVENTORY MOVEMENT REPORT
=""""
/SUBHEADER1
VEN: _0. ITEM: DES:
STORE ID: QTY: .PRICE $._
QTY-SOLD INVOICE PRICE AMOUNT COST PROFIT
/B0DY RESIDENT
/SUBT0TALI
.TOTALS THIS PART ID P._ g._ P._
/TOTAL
AMOUNT COST PROFIT
GRAND TOTALS: _$ ,._ _$9 .._ _$ P._
l*
OPEN INVT
OPEN ITEMS 2
OUTFILE
REPORT ITEMS BY INDEX.2 BREAK ITEMS.PART_ID // This is REPORT line.
SECTION HEADER // No selections. This
OUTPUT HEADER // report is global.
SECTION SUBHEADERI
PRINT INVT.VENDOR // illustrates the use of
PRINT INVT.VENDOR PART_ID // default formatting.
PRINT INVT.DESCRIPTION
PRINT INVT.PART_ID
PRINT INVT.QJJANTITY
PRINT INVT.LIST_PRICE
OUTPUT SUBHEADERI
SECTION BODY
PRINT ITEMS.CUJANTITY TO BODY.I // i11ustrat1on of the
PRINT ITEMS.INVOICE TO BODY.2 // use of PRINT TO
PRINT ITEMS.PRICE TO BODY.3
PRINT ITEMS.AMOUNT TO BODY.4
PRINT ITEMS.COST TO BODY.5
PRINT (ITEMS.AMOUNT-ITEMS.COST) TO BODY.6
OUTPUT BODY
SECTION SUBTOTALI // The first line of this
SUBTOTAL BODY.I // section in the image
SUBTOTAL BODY.4 // above is dashes to
SUBTOTAL BODY.5 // print at the bottom of
SUBTOTAL BODY.6 // the columns, not under-
OUTPUT SUBTOTALI // scoring for windows.
SECTION 1OTAL
SUBTOTAL SUBTOTALI.2
SUBTOTAL SUBTOTAL1.3
SUBTOTAL SUBTOTAL1.4
OUTPUT TOTAL
REPORTEND
ABORT
——-——————————————————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

C-38 REPORTING AND OUTPUT DataFlex 2.0 User's Manual
— —
PRINTING TOTALS AND SUBTOTALS
Accumulators are maintained for every REPORT image NUMERIC window. A
cumulative (running) total can be printed for any window at any time
in aREPORT or, ff awindow is used for subtota7ingp its value can be
printed, after which it is automatically cleared for the next subtotal
sequence.
The running total is constantly available as a variable by appending a
per cent sign (%) to the end of any window_arg. For examp1ey to put
the accumulated value of BODY.3 in awindow:
PRINT BODY.3% // prints running total to next window
For subtotaling, the command SUBTOTAL is used with window_arg:
SUBTOTAL subheader.2
The action of SUBTOTAL is to print the total currently in the accumu-
1ator9 and then MOVE O into the accumulator to fnltialize it.
Subtotal accumulators may not be addressed by use of the WINDOWINDEX
or FIELDINDEX commands.
Calculations and string manipulations on data in formatted windows
should be avoidech since the formatting can change the apparent
"value" of the contents for purposes of the ca1cu1at1on or
manipulation. Calculations and manipulations should be done on the
source data (database e1ementp literal string, in-memory variab1eg
etc.) from which the window was ff11ed to begin Withg with replacement
of the msults to the Windowy if desired for output purposes. In
REPORT, however, if B0DY.48 for example, happens to be aformatted
window, the running total accumulator BODY.4% need not be considered
formatted, as It is not updated through the window, but rather from
the same source as the window.
SELECTIONS
Selection is areport specification calling for areport of only a
subset of all the records in the database to be listed. For examp1ey
in accounts receivab1ep you may wish statements to be printed only for
those accounts having balances over 30 days old.
The REPORT macro provides for se1ectfon of records to be printed
through the use of apre-defined indicatcm SELECT. Selections are
accomplished by INDICATE commands which set REPORT'S predefined
indicator, SELECT. TRUE or FALSE according to the report's selection
criteria. The selection section is not mandatory if no selections are
desired (all records in the database are to be reported). Indicators
are more thoroughly explained in the manual section on "Conditional
Executionñ'
The selection comands, if used. should be placed immediately after
the REPORT command line. Any DataFlex command(s) can be used within
the selectfon sectiom but the most common is one or more INDICATE
statements to set SELECT. If values in the current record set SELECT
——
Cmyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual REPORTING AND OUTPUT C-39
TRUEp the current record will be prfnted. If values set SELECT FALSE,
the current record will be bypassed.
It is frequently desirable to prompt input from the operator at run
time to establish some or all of the selection criteria. These
questions should be asked before the REPORT command. The responses to
these questions are then used in the selection section in the INDICATE
statements.
EXAMPLE:
/B0DY
---- body image ----
l*
NUMBER VENDNUM
INPUT "ENTER VENDOR NUMBER: " VENDNUM
REPORT INVT BY INDEX.1
INDICATE SELECT AS INVT.VENDOR EQ VENDNUM
SECTION BODY
---- body commands ----
REPORTEND
This would do areport for the single vendor number entered by the
operator at the beginning of the report run.
You may use indexes to speed up a report by "jumping" into the report
when the value Qf the selecting field satisfies the selection criteria
and back out again when it no longer does. This can be done only if
the selection field is the primary segment of the index by which you
are reporting. To jump into the index at aspecific pointp MOVE the
LOWEST value of the selection into"the record buffer BEFORE the
report. This will start the report at the next record In the sequence
of the index by which you are reporting.
To jump out of areport wheR you are past any records that could be
selected, place a"RETURN END.OF.REPORT" command in the selection
section. This will abort the report and print the totals. If totals
are not desired where the report is aborted, the proper command is
END$OF$REPORT.
EXAMPLE:
In the Inventory Movement Report above9 the vendor number is the first
field segment of INDEX.I so we can jump into and out of the report
index. In the following examp1eg the report would cover only the
vendor entered in response to the prompt, and would take much less
time to run than the selection routine illustrated above, since
instead of actually checking each record for amatch with the desired
vendor number, the routine uses the index to FIND the right vendor
~~~
Copyright (c) 1984 Data Access Corporation 05/16/84

C-40 REPORTING AND OUTPUT DataFlex 2.0 User's Manual
record with that vendor number.
/B0DY
---- body image ----
l*
NUMBER VENDNUM
INPUT "ENTER VENDOR NUMBER: " VENDNUM
MOVE VENDNUM TO INVT.VENDOR //Jump in here
REPORT INVT BY INDEX.I
INDICATE SELECT AS INVT.VENDOR EQ VENDNUM
ENOT SELECTI RETURN END.OF.REPORT //jump out here
SECTION BODY
---- body commands ----
REPORTEND
Since the selection section is executed for every record, it should be
kept as small and fast as possible. Any calculation or string
manipulation which can be accomplished outside the selection section
will improve speed. Expressions should be evaluated outside the
selection section, if possibÍe9 and the results represented in the
selection section as numeric variables. Numeric variables are faster
than numeric WindOWSg and string manipulation commands in the
selection section have the greatest potential of all types of
operations to slow down execution. Calculations and string
manipulations can be done in the HEADER command sectiom any of the
SUBHEADER command sections, or entirely outside (prior tO) the report
macrop as necessary.
It is possible to make compound selections in reports, with various
AND and OR relationships among the criteria. Refer to the section of
this manual on "Conditional Execution" for the full range of possi-
bilities. The following AND example shows how all customers with
balances over $1AOO AND amounts over 90 days due would be selected
(NINETY_0AYS_AGO is adate variable calculated by subtracting ninety
from the run date before the selection section):
INDICATE SELECT AS INVOICE.DATE LT NINETY_DAYS_AG0
[SELECT] INDICATE SELECT AS CUST.BAL GT 1000
OR combinations can be established by inverting the SELECT indicator
with aNOT, as in the following example, which would report all
customers with EITHER balances over $1AOO OR balances over 90 days
old:
INDICATE SELECT AS INVOICE.DATE LT NINETY_DAYS_AG0
[NOT SELECTJ INDICATE SELECT AS CUST.BAL GT 1000
The GROUP ANY/ALL AND/OR ANY/ALL facilities can also be utilized in
setting the SELECT indicator for your particular requirements, as
described in the section of this manual on indicators.
_———————"____"___ "___"""""
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual REPORTING AND OUTPUT C-41
PAGE CONTROL
Page control is handled with three predefined variables:
PAGEFEED offers three way control of how the page eject will be
determined: -1 "single sheet; O=hardware formfeed; or ## =
linecounter where ## is the total number of lines per page (physical
page height from perforation to perforation). The command with no
argument is interpreted as though its argument were O(FomFeed).
PAGEEND contains the number of printable lines per page. The default
is 55. A value of zero (O) in this variable will cause continuous
output with no page breaks. This is useful, for examp1e3 for output
to adata file from which it is not intended to print directly.
LINECOUNT contains the number of lines output as of any given moment.
There Is not normally occasion to manipulate or reset the value of
this variab1ep since it is used by the two others listed above.
These variables are global to Dataflex. They may be used with any
kind of outputting, not exclusively under the REPORT macro. Use MOVE
commands to put the desired values Into these variables for page
control immediately before the REPORT command.
This example illustrates operator-entered selections and page control:
Copyright (c) 1984 Data Access Corporation 05/16/84

C-42 REPORTING AND OUTPUT DataF1ex 2.0 User's Manual
/PROMPT
List NAMES from which STATE: _
/HEADER
NAMES FROM STATE OF: _
.............NAME .. .....CITY......
/B0DY
l*
FORMAT PROMFT.I {CAPSL0CK}
STRING TEMP I
ACCEPT PROMFT.I // get operator input
CLEARSCREEN
QUTFILE 'CON: '// output to the screen
OPEN LIST I
MOVE 22 TO PAGEEND // page length is #of lines on screen
MOVE -I TO PAGEFEED // stop at the bottan of each screen
REPORT LIST BY INDEX.I II REPORT command
INDICATE SELECT AS LIST.STATE EQ PROMPT.I
SECTION HEADER
PRINT PRQMF'T.I // print state selection to heading
OUTPUT HEADER
SECTION BODY
PRINT LIST.NANE // print data
PRINT LIST.CITY
OUTPUT BODY
REPORTEND
INPUT "PRESS RETURN TO CONTINUE" TEMP
ABORT
OUTPUT DESTINATION
Unless directed elsewhere, the default output device for the REPORT
macro is the system I-ST: device (printer). Output can be redirected
to any valid sequential system device or file by placing an argument
on the operating system command line wheA the configuration is
executed (FLEX report destination). This form of command can. of
courseg be included in menus for operator selection, with or without
querying for filename or device input. A1ternat1ve1yp the output
device or file can be "hard coded" in the configuration on the QUTFILE
command line fmmediate?y above the REPORT command line. Used in this
way9 literal destinations ("CON: ", 'NERGFILE", etc) must be embedded
in quotation marks. Arguments without quotes will be considered
string variables, which can be used to pass operator input in response
to query prompts at the beginning of the configuration. Legal
devices on most systtms include CON: (CRT screen), PUN: (often used
for modemsL (-ST: (the printer). and any legal filename.
""""""""""""====="==========="—~———————
""=======——————————————————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual REPORTING AND OUTPUT C-43
————————————
=—==———————~
OPERATOR ABORT
The REPORT macroG default mode of operation causes a report to abort
if any key is hit by the operator while the report is executing. This
mode may be disabled entirely or modified to ask the operator a
confirming question when akey Is thus hit. To do this» provide a
substitute for the predefined subroutine called "RPT.KEYPRESS'4
optimally just before the REPORTEND command. The i1lustrat1ve
subroutine below would give the prompt "PRESS <ESC> TO ABORT, ANY
OTHER KEY TO CONTINUE", and then, depending on which key was pressed,
either resume execution at the predefined procedure "RPT.LOOP" or
abort via the predefined procedure "END.OF.REPORT". (Pressing any key
other than ESCape actually would cause execution to resume.)
EXAMPLE:
RETURN // Must be added after end of section commands
RPT.KEYPRESS:
STRING PAUSEKEY l
INPUT "PRESS <ESC> TO ABORT, ANY OTHER KEY TO CONTINUE" PAUSEKEY
[KEY.ESCAPE] RETURN END.OF.REPORT
RETURN RPT.LOOP
This procedure should be located before the REPORTEND command, and
immediately after the end of the last group of section commands, The
RETURN command shown above on the first line must be added explicitly
in the configuration in order to insert this procedure.
If the predefined procedure END$0F$REPORT is used instead of
END.0F.REP0RTg tota11ing and other terminating procedures would be
skipped. Use of this procedure would be appropriate to use in case of
printer misfeed, ribbon breakage, or asimilar mishap.
PAGE BREAKS
The REPORT macro automat1ca11y maintains the number of lines remaining
on the current page in manory at all times while outputting. It will
handle things like number of lines required by aSUBTOTAL or BODY
image automatically, and if allowed to operate in its default mode, it
will reprint headings and subheadings as required at the top of each
new page. If you are doing "fancy" pagfng that requires direct
controb howevem you will have to provide commands within the
appl1cab1e section(s) (typically the BODY). The PAGECHECK command
checks whether the number of lines given in the command argument
remains on the current page. The FORMFEED command sends a"raw"
formfeed (that is, it does not print headings at the top of the new
page). The sequence [PAGEBREAK] GOSUB NEWPAGE utilizes the PAGEBREAK
predefined indicator and the NEWPAGE predefined procedure to print
headings at the top of the new page. The following commancb for
examp1eg would eject the current page and print headings at the top of
Copyright (c) 1984 Data Access Corporation 05/16/84

C-44 REPORTING AND OUTPUT DataF1ex 2.0 User's Manual
the next page if there were less than 6lines left on the current
page:
PAGEQIECK 6
Cpagebreak] GOSUB NEWPAGE
The following command would do the same thing unconditiona11y:
FORMFEED
GOSUB NEWPAGE
REPETITIVE REPORTS
Areport can be put in aloop to execute multiple times for different
selection criteria. Put alabel at the beginning of the report and
then, at the end of the reportp CLEAR the report data file and GOTO
the label at the beginíng of the report. Remember to provide some
means for the operator to exit the loop.
MULTIPLE COPIES:
To make multiple copies of areport you must: (I) set your OUTFILE to
adisk file; and (2) print that file multiple times.
OUTFILE "TEMP.$$$" // Output to temporary file
REPORT XBY INDEX.I // Do report
---- report ---
REPORTEND
// The following lines print the disk file multiple times
DIRECT_OUTPUT "LST: "// Output to printer
INTEGER COUNT
SIRING STRVAR 132
// You must have set up NUMBER 0F_COPIES previously.
FOR COUNT FROM lTO NUMBER OF_C0PIES
DIRECT_INPUT "TEMP.$$$"
[NOT SEQEOF] REPEAT
READLN STRVAR // Reads aline from TEMP.$$$
WRITELN STRVAR // Writes aline to the printer
[NOT SEQEOF] LOOP // End of REPEAT loop
FORMFEED
LOOP li End of FOR loop
CLOSE_INPUT // Close before delete
ERASEFILE "TEMP.$$$" // File no longer needed
Copyright (c) 1984 Data Access Corporation 07/18/84

DataFlex 2.0 User's Manual REPORTING AND OUTPUT C-45
"",_
~
THINGS TO REMEhdER ABOUT THE REPORT MACRO
l. The REPORT macro may be used only once within aconfiguration.
e
2. The maximum line length which can be output is 255 characters.
3. Fields used as subtotal breakpoints must be indexed. They can be
in the main file or in any other RELATEd file.
4. Subtotal and total registers are updated only by PRINT commands;
MOVE, CALCULATE and DISPLAY do not update the registers.
5. Data should be processed only from database elements or in-memory
variables. The contents of formatted windows cannot re?lab1y be used
for calculations or other processing.
6. An invisible AUTOPAGE command is executed at the beginning of each
command section. and an invisible RETURN command at the end.
7. The BODY section of the report is executed once for every record
which satisfies the selection criteria.
REPORTING WITHOUT REPORT
The usual way of configuring reports is by use of the Report macrcn
often starting with the QUERY program to generate the configuration.
The Report macro, howevem is by no means the only way of configuring
reports--it is merely apre-programmed convenience suitable to awide
range of purposes. The following configuration outputs adata file
(called SAMPLE in this example) to the printer in record number
sequence, using aformat image with a pagename of IMAGE. Note that it
lacks headings, totals and subtotals commonly found in reports
produced by the Report macro.
/IMAGE
l*
OUTFILE °'LST: "//Direct output to the printer
OPEN SAMPLE //Open the data file to output
CLEAR SAMPLE //Clear the record buffer
CLEARSCREEN //Clear the screen
REPEAT
FIND GT SAMPLE BY RECNUM //Find the next record by number
IF0UNDI BEGIN
PRINT SAMPLE.NAME TO IMAGE.I //Must state TO
PRINT SAMPLE.CITY TO IMAGE.2' //Window.# since
PRINT SAMPLE.STATE TO IMAGE.3 //AUTOPAGE command
PRINT SAMPLE.ZIP TO IMAGE.4 //not used
OUTPUT IMAGE
END
[NOT SEQEOF] LOOP //Stop at end of file
ABORT
Copyright (C) 1984 Data Access Corporation 07/18/84

C-46 REPORTING AND OUTPUT DataF1ex 2.0 User's Manual
———
.
THIS PAGE INTENTIONALLY LEFT BLANK
—————————
Copyright (C) 1984 Data Access Corporation 07/18/84

ZZZ±ZTZZZZ±ZFF2: ZZZ::2:::7:::::::7:::7:::::::----- -C-47
========== =========
ZZZZZZTZZZ FILE DEFINITION (FILEDEF) =Z======
========== == —=_—___—
———————
OVERVIEW
The FILEDEF utility enables you to create acomplete file definition
for data base files used in aDataFlex application. The file definí-
tiom once created, contains information about the file namep indexed
fieldm and field information. Each DataFlex file must have certain
information about the structure of the data? file name, indexes etc.,
established before it can be used. Once donm this information is
avai1ab1ep through the data base managéí"» to any DATAFLEX program.
During execution, the programs can adjust thei roperation to the type
and length of the files and fields in use. This gives DataF1ex its
unique APPLICATION INDEPENDENCE.
APPLICATION INDEPENDENCE means that the same data file can be used in
multiple applications without the duplication of effort and storage
found In most conventional application programs.
EXAMPLE:
We may want to implement accounts receivable, accounts payable and a
mailing list. Instead of having three files with name and address
informatioñ» we could have one name/address file which is referenced
by all three applications. Only this one file need be defined, stored
and updated for names and addresses, thus saving both time and
storage... areal bargain!
Because these data base files potent1a1ly are so integrated with the
total application picture, thought and care should be put into the
contents and eventual relationships of the files. Awell-designed
file structure will almost automatically mean an effective and
successful app1 ication.
~ ~ ——
——————
——————
———————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

C-48 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
"=============——————————————————— —
STEP ONE -PLAN THE RELATIONSHIPS AMONG 7HE DATA FILES
If your DataF1ex applications uses only one independent file, there
are no inter-file relationships. To gain the benefits of the inter-
file relational DBMS structureg read the following section carefully
to see how to build amulti-file structure. A thorough understanding
of DataFlex configuration at the single file level will be extremely
helpful in rapidly gaining an understanding of the more comp1exg
multi-file structures. The following section treats data theory
genera11yg not just as it pertains to DataFiex (although it definitely
is irrelevant to less-capable software products). There are anumber
of good books available on this subject, and your mastery of this area
may be enhanced by referring to some of them.
WHAT FILE RELATIONSHIPS ARE FOR
File relationships are an advanced concept in database managemeñt» but
its benefits probably apply to most serious database applications.
Although some software products offer the capabi11typ none provides it
with the ease and power of DataFiex. File relationships are typica71y"
invisible to an operator running aDataFlex application, which is the
best way for it to be. Most existing microcomputer applications are
designed to use only one data file, but many of those would benefit
greatly from amulti-file design approach. Compared with single-file
design approaches, file relationships offer the following advantages:
a. More efficient utilization of disk space.
b. Equal data support wIth asmaller number of records.
c. Greater consistency of data in groups of records having
data elements in comon.
d. Improved efficiency in changing data applying to groups of
records having the data in comon.
To illustrate the conceptg let us use a simple mailing list of
indivuals at their business addresses. Each record in the list would
have the individuaVs name, name of the company where they worG
address of the company7 and aphone number. Sq far, this would se«n
to be atypical sing1«fi1e application. But suppose that groups of
fifteen or twenty of these people all worked at the same company. You
would still want an individual record on each persom but if one of
the companies movecb you would have to find each record for someone
who worked at that company and change the address in each one. Ifb on
the other hand, arelat1onal approach were takem company names and
addresses would be kept in aseparate file, and each person's file
would have in it his company's namey but no address. The company name
(to support the relationship) and address would be in the company file
to which each person's file related. There would be many fewer
company flies than person fiiesj and each persoMs record would be
smaller (having no address or phone number in it). Moreover, when the
ABC company moved, the addresses of all 27 people on your list who
work there would be changed (consistently in every record) by changing
only the company record for the ABC company. And there would be
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-49
—————————
nothing apparently missing from each person's recorvh either.
DataFlex can be configured to show each personG full company name and
address as though it were part of the person's actual record. Th is
process is fnvisible to the operatom unless explicit provisions are
made to render it visible (which wouldn't normally be desirable). And
when john Doe moved from the ABC Company to the XYZ company, changing
his whole address would be as easy as changing his company's name from
ABC to XYZ (provided there was already arecord 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) .
But It goes even further, DataFlex can relate ten files to each other
online simultaneously (In l6-bit computers--capacity in 8bits is
five) .If we were selling to these individuals, we could keep all our
sales in afile related to our persons file by the person's name.
Then, when looking at asa1ep we could view the customer's complete
name and address (now looking through two fi1esp all the way to the
related company record) with each sale, even though only the
customerG name (or account number) is part of the sale record.
These, then, are the hallmarks of the need for related files: groups
of records having data elements which must be the same at all times
(like customer for groups of sales transactions), or, looking in the
opposite directiom series of identically-structured data groups in a
record. Dataflex provides ahe1rarchica1, or one-to-many type of file
relationship which can improve the speed and efficiency of your
application greatly.
GENERAL LAYOUT OF FILES
Drawing aschematic of your file relationships as a "tree" structure
is the first step in configuring the application. This exercise gives
you a chance to establish not only the files involved in the applica-
tion but also gives the ability to see how data can be grouped
together effectively and specifically to each of the files.
EXAMPLE:
DATA FILE RELATIONSHIPS "TREE"
CUST(MER VENDOR
FILE FILE
^ ^
Il
—---> PARTS
IIFILE
I I "
iII
I I
I l
SALES-----' PURMASE
TRANSACTIONS TRANSACTIONS
FILE FILE
Copyright (C) 1984 Data Access Corporation 05/16/84

C-50 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
———
DataFlex utilizes "Data Relationships" to maintain the inter-file
relationships you have defined. The lines connecting the files show
the relationships among the files. In the actual file definition
these relationships are established through the use of related fields.
Arepresentation like this one will make the RELATIONSHIPS among the
files readily apparent. The fields through which different files are
related must be of the same type (ASCIL, numeric or date) and the same
length.
The relationships in this representation point UP the tree. There are
four file relationships in the illustrated structure:
l) SALES TRANSACTIONS IQ PARTS
2) PURCMSE TRANSACTIONS IQ_PARTS
3) SALES TRANSACTIONS IQ CUSTOMER
4) PARTS IQ-VENDOR
When visualizing files as a tree structurm remember that the topmost
files or "leaves" of the tree are those that do not draw on other
files for information (e.g.g the VENDOR file above has no PARTs in it,
but every record In the PARTS file has"a vendor in it). Lower down on
the tree there are files (like PARTS) which depend on the VENDOR file
for information. The bottom of the tree is the TRANSACTION files
where data from all of the other files contributes to existing and new
records (TRANSACTIONS).
In DataFlex, the lower files on the tree are RELATED TO higher files.
This means that art inventory PARTS record which is related to aVENDOR
record can automatically access (display or print) information in that
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
in dffferent files are logically "related" together by DataFlex. In
this manuah and in the prompting you will encounter in the
configuration utilities, the term "relates" or "relationship" wi71 be
used frequently. It is used to refer to this logical linking of
fields in different files which is controlled by DataFlex's Data Base
Manager.
The relationships point UP the tree; the PART ID in the TRANSACTION
file relates TO the PART ID in the PARTS file and the VENDOR ID in the
PARTS file relates TO the VENDOR ID in the VENDOR file. ThereforeD
transactions can autcmatica11y include not only PARTS data. but PARTS
AND VENDOR data. DataFlex can automatically find records up and down
the tree from these relationships.
HOW TO CREATE RELATED FIELDS
There are two criteria by which to choose the fie1d(s) through which
to relate two files: (l) for the Data Base Manager to find arecord
in one file from arecord in another file (i.e.9 find the VENDOR
record from aPARTS record); and (2) to have the system automatically
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-51
___________ _______—~—=======
carry the value in afield forward to another file for indexing or
report selection.
THE RELATED FIELDS IN DIFFERENT FILES MUST
BE OF THE SAME TYPE AND LENGTH!
When afield relationship Is created for FINDING purposes, the field
being related TO must uniquely identify the record. If the relating
field isn't the higher recordts record number, then there should be an
index made up of that field alone. (Record numbers are inherently
indexed, and inherently uniqueg which is why they are the prime choice
for relating fields.) The lowest-numbered relating field in the file
definition is the one which provides the primary relationship. Thi s
is referred to as the PRIMARY re1at1onsh1p. (Again. the record number
is always the lowest-numbered field in any file definition.
When arecord that has relationships to other records is FOUND, th8
records it relates TO will be found automatically. This makes the
records related TO appear as though they were part of the original
record. The use of mujtipje files is typically invisible to the
operator) .
The related-to fl1eG record number is normally the best choice of
field on which to base aprimary relationship. Relating by record
number has three advantages: it is fast (since no index access is
requiredL the record number is ALWAYS unique, and it cannot be
changed.
Afield in one file that relates to arecord number in another should
be anumeric field of Ip 2 or 3bytes' length. The length is
determined by the maximum potential number of records in the file
rel ated TO. Remember, DataF1ex stores two digits per byte of field
length, so a one byte numeric field will store related record numbers
up to 99g 2 bytes up to 9999. etc. Three bytes is always asafe
length. This field, and any other related field in a new record, will
be updated by the field it relates TO when the record is saved.
When you are using arecord 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 that these secondary relationships must be based on
field numbers that are higher than the numbers of the fields on which
the primary relationship is based.
In the typical case,, there would be many records in the file being
rel ated FROM re1atl ng TO each record in the file related TO (each
VENDOR would supply many PARTS) .W1htout this relationship, the field
being related FROM would NOT uniquely identify arecord (you can't
find an individual PART ijtSt by knowing the VENDOR). Thereforeg the
PARTS file would be indexed by VENDOR for tasks like listing all the
parts for avendor AND something else, like part Ilb to facilitate the
finding of an individual part irrespective of who its vendor might be.
Decide at this point which fields (Record Numberg Name, Part Numberp
etc.) will be used for RELATIONSHIPS in your application. Below are
four of the five files in the schanatic shown two pages ago. Thi s
Copyright (C) 1984 Data Access Corporation 05/ 16/84

C-52 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
rendition, however, displays the actual fields in each f|1e9 and the
arrows show which fields the relationships are based upon. Hint: one
of the relationships shown is asecondary relationship. Can you find
it?
EXAMPLE OF FILE STRUCTURES AND RELATIONSHIPS:
SALES
VENDOR FILE PARTS FILE TRANSACTIONS FILE
,ORECORD NUMBER O RECORD NUMBER
ORECORD NUMBER <-------1 VENDOR RECORD S IDATE
l* VENDOR ID <-----------2* VENDOR ID 2 QUANTITY
2ADDRESSI 3* PART ID <—-------3* PART ID
3ADDRESS2 "4QTY IN STK :
5PRICE :
6DESCRIPTION :
P
0
Q
0
CUSTOMER FILE :
:
ORECORD NUMBER <4* CUSTOMER RECORD #
l* CUSTOMER NAME 5AMOUNT
2ADDRESSI
3ADDRESS2
4 CREDIT LIMIT
5TOTAL SALES
The arrows (<-—) represent arelationship and the mH' represents a
field which is indexed. Note that other relationships could exist
among these fi1eSg and/or to other files, and other fields might be
indexed for finding and reporting purposes.
VENDOR RECORD # in the PARTS file is used for the PRIMARY relationship
with the VENDOR file to speed up the RELATE process since no indexing
is needed with Field 09 the record number. The VENDOR ID is also
provided as a secondary relationship to allow reporting and FINDing by
VENDOR ID in the PARTS file.
The VENDOR ID field must be of the same length and type in both the
VENDOR and PARTS files.
The PART ID in the PARTS file and in the SALES TRANSACTIONS file must
be of the same type and length in both files. PART ID in the PARTS
file must be indexed as the only segment in an index since it 'is used
as the primary relates-to field from the SALES TRANSACTION file.
The PART ID in the SALES TRANSACTIONS file is listed as indexed, but
if we did not want part ID to be included in the SALES TRANSACTION
fi1ep we could have made its Field 4the smaller and faster PART
RECORD S, and based the relationship on that field instead.
Reports of transactions could be printed either by PART ID or CUSTOMER
record number, since both indexes are present in the SALES TRANSAC-
TIONS FILE.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-53
STEP TWO -LIST THE FIELDS
Determine the specifications of the data fields that will be required
in each file. including their typeg length and. for numeric fields,
the number of places to the right of the decimal point. Aconvenient
way to do this Is to create the screen IMAGE of the data entry form
for each file. (Refer to the section of this manual on 'rFormatting
With Images".) Then let FILEDEF'S Option 7read this IMAGE and create
apreliminary file definition automatically! Option 7will prompt you
through the process, as described below in Step 4. If this file will
relate to other files, remember to be sure that the fields used for
the relationships have the same length and type in each of the related
files.
EXAMPLE:
/VEND
P
P0
0
:VENDOR RECORD :
0
0b
0
:VENDOR ID: :
0O
04
:CONF'ANY NINE: :
:ADDRESS: :
:CITY: ST: _ZIP: :
VO
a
:CREDIT LIMIT: S._ TOTAL CREDIT: $._ :
00
b0
:ENTRY DATE: _J_J_ :
0e
l*
This image could later be used directly by FILEDEF to create a
definition. Note that the image is terminated by a"l*" character
combination. This Is an "end of image" marker and is necessary for
DataFlex to distinguish the image from the configuration commands.
After Option 7 has rum FILEDEF'S Option 3would produce achart like
this:
FIELD FIELD FIELD FIELD DEC MAIN RELATES--TO
NMBR OFFSET LEN TYPE PTS INDEX FILE FIELD
lI8 ASCII O O O VENDOR ID
2 9 30 ASCII O O O C0MPANY_NAME
3 39 30 ASCII O O O ADDRESS LINEA
4 69 30 ASCII O O O CITY
5 99 2 ASCII O O O STATE
6 101 5 ASCII O O OZIP CODE
7 lOó 5NUMERIC 2 O O O CREDIT_LIMIT
8Ill 5NUMERIC 2OO O T0TAL_CR£DIT
9116 3DATE O O O ENTRY_DATE
~~~ ~~ —
Copyright (C) 1984 Data Access Corporation 05/16/84

C-54 FILE DEFINITION (FILEDEF) DataFiex 2.0 Úserfs Manual
OVERLAPPING FIELDS (FOR EXPERTS CNLY)
There may be times when you need to have more than four field segments
in an index (four is the segment limit for an index fn 8bits; six is
the limit in 16 bits). See the section of this manual on "Designing
Databases" for afull dSscussion of single- and multi-segment indexes
and indexing. For these special cases, DataFlex has another field
type called the overlapping field. This field type enables the user
to address agroup of fields as though they were one large field. The
overlap field spans other fields already existing in the file
definition. The fields spanned by the overlap must occur
consecutively in the file definition.
To use this featurep first append afield to the file of the type
OVERLAP. 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 to include in the index. Them ,of coUrseg specify the index
number for the index based on the overlapping field (rather than on
the fields it Is composed of).
This is what the chart on the preceding page would look like if an
overlap field comprised on the first two fields were added:
FIELD FIELD FIELD FIELD DEC MAIN RELATES--TO
NMBR OFFSET LEN TYPE PTS INDEX FILE FIELD
—
Il8ASCII OOOVENDOR_ID
2 g 30 ASCII O O OCOMPANY_NAME
339 30 ASCII O O OADDRESS_LINE_1
4 69 30 ASCII O O OCITY
5 99 2 ASCII O O O STATE
6101 5 ASCII O O OZIP CODE
7106 5 NUMERIC 2 O O OCREDIT_LIMIT
8Ill 5NUMERIC 2 O O OT0TAL_CREDIT
9116 3DATE OOO ENTRY_DATE
IQ l38 OVERLAP O OO
————— ~ = —~——_
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-55
===——~~—— ~~~~~———~
STEP THREE -DETERMINE THE KEY FIELDS
DataF1ex's indexes allow you to FIND records by fields which are
defined as indexed. The fields you wIsh to index should be determined
at this point in the FILEDEF operation. Each DataFlex index can be
composed of up to 4fields on 8bit systemm 6fields on 16 bit
systems. There can be up to 4 indexes for each file (9 on 16 bit
systems). Each index defined will be stored in an index file that has
the same rootname as the data file. It will be opened automatically
when the data file is opened.
Keep in mind that each index requires disk storage and asmall amount
of update time when saving or deleting records. System size and
performance may become aconsideration in the design of your key file
structure. Arule of thumb is that an index will take about 2times
the amount of disk space as the number of bytes in the data fie1d(s)
that it is indexing. For example, if an index is made up of 1000 ten
byte part numbers, the index file size will be about 20K. All indexes
for adatabase are kept up-to-date on-line automatically.
Afield does NOT have to be indexed for it to be used to SELECT
records from the database during output operations. For examp1e9 if a
STATE field in amailing list record was not indexed, you could still
make areport of all records matching aparticular STATE value. If
you dich DataF1ex would have to evaluate the STATE field of every
record. For this reason, indexing often does speed up the selection
process.
If afield in one file is being related to by records in anotherg it
must be the only field in the index. This is required for the relate
process to uniquely identify arel ated record. Overlapping fields can
be used here to create asingle-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.
DUPLICATE RECORDS
If you wish to allow multiple records in afile to have the same key
va}ueg include field zero (the record number) as the last segment of
the index. Since l"8corcj numbers are always uniqúé» their inclusion
with other index elements can make otherwise duplicate key values
unique. Note that afield CAN NOT be indexed with record number AND
be the target of arelationship.
The record numberp which is addressed as field zero in DataFlex, can
also be considered INDEX ZERO. Thi screates an often useful access
method (e.g. transactions which need to be accessed by order of entry)
which has no disk storage overhead. There is actually no INDEX ZERO
(no file called FILENAME.KO); this is Dataflex's method of defining
that access is to be made by record number. You may always FIND or
report by record number. Afile may exist with no other indexes. The
record number for the record currently in the buffer is maintained
under as filename.RECNUM.
Copyright (C) 1984 Data Access Corporation 05/ 16/84

C-56 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
========~—————— —~~~~~+—~—~~~
Where afield participates in more than one index (perfectly
acceptablek one of the indexes must be designated during the
definition as the MAIN index for the fi?1d for FINDing operations.
The MAIN Index will be the one automatically used by DataFlex to FIND
records from the file when agiven field is selected as the source of
akey value for record retrieval.
"EXAMPLE:
In the example file structure above we might have three indexes:
I) VENDOR ID (unique).
2) COMPANY NAME plus RECORD NUMBER (duplicate company names OK).
3) CREDIT LIMIT plus VENDOR ID (duplicate credit limits OK).
Number l, VENDOR ID, would generally be used to support relationships,
while the others would be useful for FINDing records for maintenance
and reporting.
Notice that VENDOR ID participates in two indexes. This is fine, but
one must be selected as the MAIN index for that field. In this case,,
Index One, where VENDOR Ilj is the first segmentg is deslgríated.
To allow for duplicate company names in Index T\Ñqp Field Zero (the
record number) is included in the index to create unique combinations.
STEP FOUR -USE FILEDEF TO PUT IT ALL TOGETHER
This section takes aprocedural step-by-step look at how DataFlex's
FILEDEF utility can be used to create and maintain the data files of
an application.
To execute the program type "FILEDEF" at the operating system "A>"
prompt or select it from the CONFIGURATION NENU. The program will
sign on and present aserles of prompts in order to obtain the data
needed to define the data file, Each of the prompts from FILEDEF is
presented here with the how to's on their use and their relationship
to the rest of the DataFlex system.
IF YOU MAKE AN INCORRECT ENTRY:
Some FILEDEF menu choices proceed through aseries of prompts, which
must be answered in order to continue. If at any pofntp you are not
sure of the answer9 or you key a wrong response9 it is still necessary
to answer all of the questions, at 1east'w1th something that satisfies
the program, in order to proceed and get back to the FILEDEF
operations menu. Once all the questions have been answerech however,
the menu (see below) gives you the opportunity to modify your earlier
answers or to abandon them altogether (choice 10)» and leave your
original file (if any) unchanged.
—
="=~=__"=="=="""— ———~———
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-57
=
ENTER FILE NUMBER:
When run, the FILEDEF Program prompts the configurator with alist of
currently defined files. You may modify one of theseg enter an unused
file number to start a new file or reactivate one not currently on the
1ist.
As ashortcutg you may enter FILEDEF <FILENUMBER> at the operating
system command level to pass afile number directly to the program
without going through the files menu.
NEW FILE (YIN)
If you have selected afile number that does not appear in the file
list then you must tell FILEDEF if this is a new file or an inactive
one .
If you are creating this file for the first time answer the question
with a"Y".
If afile definition for this fi1e already exists, answer the question
with the "N" response (you can just press enter to default to the "N"
responseL which will give you the chance to reactivate the file. The
system will then ask for the ROOT name, USER DISPLAY nameg and Data-
Flex filename of the file.
DataFlex appl ication configurations purchased separately which are
installed on an existing DataFlex system must have their file numbers
re-activated as described above.
If you are modifying or re-activating an existing file definitiong the
FILEDEF menu will be displayed. Otherwise, for a new file, some
preliminary information will be required:
ROOTNAME
The ROOTNAME refers to the base name of any DataFlex data or config-
uration file created by FILEDEF. The ROOTNAME must conform to
operating system filename conventions of up to eight letters and
numbers. DataFlex will append the appropriate extension based on the
use of aparticular physical file (see the appendix). Make up an 8
character or smaller rootname for your file WITHOUT AN EXTENSION!
If you wish to specify the drive on which DataFlex is to place the
data filem prefix the file name with the drive specification in the
standard format: drive letter (A..P) followed by ":"followed by
filename.
EXAMPLE ROOTNAME W/DRIVE SPEC.: B: MYFILE
This would be afile called "MYFILE" located on disk drive "B".
Copyright (c) 1984 Data Access Corporation 05/16/84

C-58 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
———
USER DISPLAY Nm:
The User display name is the one which will be displayed in the FILE
SELECTION menus by DataF1ex programs. Enter the name you would like to
see displayed to the operator for this file. If the file name is
preceded with a"@" it will not display on the runtime file display
menus. The maximum length of the user display name is 30 characters.
DataFlex FILENAME
The DataF1ex filename can be up to ten characters long and must start
with aletter. The DataFlex filename is used to reference adata file
from configurations. In that it does not contain drive specifications
it is a"soft" reference to afile that makes an application indepen-
dent of aparticular hardware configuration. It is also usedg along
with afield's Tagname, to define DATA BASE ELEMENT names within a
file.
RECORD LENGTH
This is the physical size (in bytes) of the record you will be
creating. DataFlex will automatically block sma?1 records into 512
byte blocks. Larger records can be any multiple of 128 bytes. You
can assign the record length by selecting option 4from the FILEDEF
operations menu. If there is aconflict between what you assign as
the record length and what the syst«n needs to correctly block the
recorcb the necessary record length will be blocked autwat1ca11y by
FILEDEF when you enter the record length.
If you know the record length at this point, you may enter it. If you
are creating adefinition from an IMAGE and don't know the record
size, you may initialize it to zero. The READ SCREEN option will then
set the record length for you. DataF1ex will block records in all
sizes from lto 26 bytes, 28 bytes, 3Ó9 32p 35» 39, 42p 46p 5L 5&
649 73,t 85» l029 128, l7Ch 256, and upward in multiples of 128 bytes,
to amaximum to 4kilobytes.
MAX #OF RECORDS
The value entered here is the maximum number of records to be stored
in the database for this file. The figure entered here is non-
critical unless you elected the system option (see Installing
DataFlex) which provides for pre-a11ocation of disk space for the
maxium possible size of your database. Otherwisep you may feel free
to make some growing room available for the number of records in a
particular file.
The absolute maximum number of records in aDataFlex file is 64AOO.
NOTE: If the need arises to expand the maximum number of records after
afile contains datag re-enter FILEDEF and enter alarger value for
this field. Then, run the REINDEX utility to rebuild the index(s)
under the new parameter.
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-59
—————— ———————— -—————-
REUSE DELETED SPACE (YIN)
For most applications you will want DataFlex to reassign the disk
space released when arecord is deleted from afile, howevem in
applications where you want to use the record number as an audit trail
or as a transaction number, this would not be desirable. To allow the
re-use of deleted spacep enter <Y>es; otherwiseg enter <N>o.
mLTI-UsER RE-READ (YIN):
If you are running on amulti-user systan (and you have amulti-user
version of DataFlex) and you wish for this file to utilize the feature
of allowing multiple users to write to the same record at the same
time then enter a'Y', otherwise, enter 'N'. NOTE: MULTIUSER option
of SETSCREEN must be set to (Y) to utilize RE-READ.
THE FILE DEFINITION MENU
After completing the entries just covered about R00TNAMEp etc., the
FILEDEF operations menu will be displayed. It looks like this:
l: CREATE/EDIT FIELD SPECIFICATIONS
2: CREATE/EDIT INDEXES
3: DISPLAY/PRINT FILE DEFINITION
4: SET FILE PARAMETERS AND NAMES
5: ERASE DATA FILE
6: SET FILE INACTIVE
7: CREATE FILE DEFINITION FROM SCREEN IMAGE
8: CREATE FILE DEFINITION FROM .DEF IMAGE
9: SAVE DEFINITION AND EXIT FILEDEF
IQ: ABORT FILEDEF, DO NOT UPDATE DEFINITION FILE
You may enter one of the option numbers (l -10) to select your next
action. For new files you MUST either execute Options land 2, or
Option 7. The results of using Option I or Option 7 are the same:
creation of aDataFlex file definition. The methods used to reach
that end are different: option one takes you field by field through
the record definition where you make the specification entries
manually. Option 7 functions just like the DataFlex AUTODEF Utility
and determines the record structure autanatical1y from the screen
image.
Copyright (C) 1984 Data Access Corporation 05/16/84

C-60 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
OPTION I-CREATE/EDIT FIELDS
This option allows you to create new field attributes or change
existing ones in arecord definition.
If the file which is currently active in FILEDEF is not a new fi1e9
then all entries under this option will contain adefault to the
existing value fbr each field that is prompted (except for 'any new
fields you may be adding).
The prompt will be displayed with the existing value in darts:
<DEFAULT>. If the value in the darts is to be maintained as the
current response, then hit <RETURN> to skip the question and maintain
the val ue; if the default is not correct then enter the new
informatiom followed by <RETURN>.
Each field in the record will be presented sequentially for modifica-
tion unless you enter afield number to jump to or "E" (exit) on the
verification step (SEE BELOW).
When you select Option lfor the FILEDEF operations menu. you will be
positioned at Field l. The current field specification will display
with the field edit menu. The field edit menu looks like this:
OPTIONS:
G-Go to field number
I-Insert before this field
D-Delete this field
A-Append afield to end.
C-Change this field
R-Reposition field offsets
+-Display next field
-display previous field
E-Exit to master menu
ENTER á-K)ICE:
FIELD EDIT OPTIONS:
G-Go to field number -Repositions you at the field number entered
and displays the current definition of that field. You will be
prompted for the field number to go to after entering the <G> option.
I-Insert before this f'kjd -Creates rcjcm for a new field by
incrementing all the higher field numbers by one. Them the field
specifications for anew field may be entered under the newly-
available field number.
D-Delete this field -Deletes the current field and reduces all the
higher field numbers by one to adjust for the deletion.
A-Append afield to end -Anew field will be created as the last
field in the File Definition. You must enter the new field's
speci ficati ens (see below) .
Copyright (c) 1984 Data Access Corporation 05/16/84

Dataf1ex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-61
C-Change or edit this field -Allows you to re-enter the specifica-
tions for the current field.
R-Reposftion field offsets -Required to reset field positions after
the file definition has been modified. The positions of the fields in
the record buffer (field offset) must be recalculated whenever any
field is added,, deletecb or changed in length.
+-Moves you forward one field.
- - Moves you back one fie?d.
E-Exit to master menu -Returns you to the FILEDEF menu.
<RETURN> -Always moves editing to the next field. For examp1ep if you
are on Field 2 and press <RETURN>, Field 3will be displayed.
<RETURN> will create anew field if you are currently on the last
field in afile definition.
You will be asked the following questions for each field:
****** FIELD # ******
#is the number of the field you are currently editing.
FIELD NAME: (tagname)
The tagname you enter here will be utilized by FILEDEF and QUERY for
pranpting and documentatSom and will be displayed in the file definl-
ti on. It will be used, along w¶th the DataFlex filename as part of
the Data Base Element name, in the DataFlex Command Language. The
tagnames are stored for each file in aseparate ASCII file called
rootname.TAG. The maximum tagname length is 15 characters. Valid
characters in tagnames are:
['A...Z', '0...9'. 'e'. C'. '#' ]
The first character must be alpha (A...Z). Spaces and slashes are
invalid. and will be replaced with an underscore (_).
FIELD TYPE: ( A=ASCII, N=NUMERIC, D=DATE, 0=OVERLAP )
This will set the field to either:
ASCII (numbers and letters)
NUMERIC -(numbers only)
DATE -Stored Jul ian; output format: MM/DD/YY
OVERLAP -Afield which re-defines areas of the
record.
The next prompt depends on the field type entered above.
For ASCII fields:
NUMBER OF QURACTERS
This is the maximum number of characters to be assigned for this
fiel d.
———————
Copyright (C) 1984 Data Access Corporation 05/16/84

C-62 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
======= ————
For NUMERIC fields:
NUMBER OF MARACTERS TO THE LEFT OF THE DECIMAL POINT
Each number is broken into two parts: left and right of the decimal
point. Enter the number of characters to the left of the decimal
point. (Minimum of 19 maximum of 14.)
NUMBER OF CltARACTERS TO THE RIGHT OF THE DECIMAL POINT
Enter the number of characters to the right of the decimal point (O to
4). The characters to the left and right of the decimal point are
added together by FILEDEF to compute the total field length. For DATE'
fields, no questions are asked, Dates are ALWAYS stored as three-byte
numbers. (
For OVERLAP fields:
FIELD 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
first overlapped field. If there are
previous overlap fie1dSg their combined
length must not be counted in developing
this number.
FIELD LENGTH: LENGTH OF FIELD IN BYTES
This is the number of bytes the overlap
field will span in the record. It should
be the total length of the overlapped
fields.
For ALL field types:
RELATIONSHIP TO FILE: FILE NUMBER·0F RELATED FIELD
If this field relates TO afield in another
fi1e9 enter the number of that file here.
Aprintout of the file definition of the
related-to file would be helpful for
answering this and the next questiom if
there is arelation. If there is no
relationship FROM this field, enter azero.
RELATIONSHIP TO FIELD: (FIELD NUNEIER OF RELATED FIELD)
If the question above was answered in the
affirmative (with anumberL then enter the
number of the field which is being related
TO. Otherwise, enter azero.
The creation or editing of the selected field is now complete. The
information for this field will be re-displayed for inspection
purposes. If you wish to make further changesg enter a'C', If all
is correct, enter a"+" to move on to the next fie16 or enter an 'El
to return to the activities menu.
~~~~~
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-63
OPTION 2 -CREATE/EDIT INDEXES
Option 2allows you to create or change the index(s) for afile. The
following "dialog" with FILEDEF allows you to easily define how you
want to your file indexed:
FILEDEF PROMPT YOUR RESPONSE
HOW MANY INDEXES FOR THIS FILE:
A NUMBER IN THE RANGE FROM lTO 4 (One
to nine in 16-bit computers) This will
correspond to the number of unique
indexes you wish to have automatically
maintained for this file.
-- THE FOLLOWING WILL REPEAT FOR EA(>I INDEX --
****** INDEX if ****** -- NONE --
The number of the index you are entering
will be displayed.
HOW MANY FIELD SEGMENTS IN INDEX:
#OF FIELDS USED IN INDEX» RANGE: l-4
(6 on 16 bit) Each index may have up to
six segments in 16-bit computers. For
examp1é» you might want to find on a
field named LASTNAME7 but also include
the FIRSTNAME and MIDLINIT fields in the
index (for atotal of 3) in order to
have records with the same last names
(Smith, Robert; Smith, Samuel) properly
sequenced by 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 OR N) If you answer Y(esL the index will be
maintained on line and updated every
time achange is made to the database.
If you answer N(Ó)9 the index will
function normally only passively as part
of the file definition, and will be
updated only when specifically processed
through REINDEX as an "ad hoc" index.
Reasons for answering N(o) include: (a)
your systetds capacity for maintaining
on line indexes is already consumed by
more important indexes; (b) this index
is needed only at infrequent intervals
for aperiodic report, and not for
routine FINDing; (c) this index is
large and complex. and on line updating
in alarge database would slow
processing time down more than is
justified.
—— ~ ~~
Copyright (c) 1984 Data Access Corporation 05/16/84

C-64 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
===========———~~~~~—~ —— """""""""""""
-- THE FOLLOWING WILL REPEAT FOR EACH SEGMENT --
SEG X FIELD NUMBER: FIELD NUNBER OF INDEX SEGMENT.
Enter the field number you want for this
index Segment. The order in which you
enter each field number will determine
its indexing precedence.
-- THE FOLLOWING APPEARS ONLY FOR FIELDS ALREADY IN ANOTHER INDEX --
\NHIW INDEX, (X OR Y), SHOULD BE USED WHEN FINDING BY THIS FIELD?
If the field specified above is used in
another index a1ready9 either this (the
current--X) index or the earlier one
should be designated for FINDing from a
screen with the cursor in the window for
this field. Generally, the index In
which this field is first, or nearest
the flrStg should be chosen. Your
choice will be designated the "main"
index for the current field in the File
Definition (see printout below).
INITIALIZE INDEX (Y OR N): If any of the above information was
changed from previous (default) data for
an existing index9 then the index will
automatically be initialized. However
if ñQ changes have been madeg you will
have the option to initialize or not.
If an index is initialized and there is
data present fn the data file amessage
wIll appear telling you to "REINDEX" the
index. (See UTILITIES section,
REINDEX).
DELETING AN INDEX
If at any time you wish to delete an jndexp select Option 2from the
FILEDEF operations menu. Then enter the OLD number of indexes in
responding to the prompt for number of indexes and press <RETURN>. If
you want to delete Index Ip enter zero for its number of segments.
For ahigher-numbered indexg press <RETURN> repeatedly to default
through the questions until you have reached the prompt for the index
you wish to delete. Then enter aOfor that index's number of
segments. The index numbers for indexes fo11owfng the deleted one
will ranain the same ... i.e. if index 2 was deleted from a3index
file, 'Indexes land 3 would remafn. When you delete an index, its
file will be deleted from the disk.
~"""==""========,———————————————————————— ——————
Copyright (c) 1984 Data Access Corporation "05/16/84

Dataflex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-65
OPTION 3-PRINT FILE DEFINITION
The third option on the menu, PRINT FILE DEFINITION, will allow you to
inspect the file that has been defined.
You have the choice of sending the output to either the screen
(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 alockup.
If you are sending the output to afi1eg the filename will be the
ROOTNAME that you have supplied for the file that you are editing. and
it will have an extension ".DEF" (or rootname.DEF). Sending the
output to afile can help you document the application. After sending
the output to the fi1ep you can edit it with your text editor and/or
include it in other documentation. Refer to Option 8be1Owg "CREATE
FILE DEFINITION FROM .DEF FILE" for more information.
A completed file definition, when printed out, looks like this:
FILE DEFINITION LISTING FOR FILE #21
***************************************************
FILE ROOT NAME =VENDOR
USER DISPLAY NAME =VENDOR
DATAFLEX FILENAME =VENDOR
***************************************************
RECORD LENGTH =128 (USED =112)
MAX NUMBER OF RECORDS =400 (USED =5)
DELETED SPACE IS REUSED
MULTI-USER RE-READ INACTIVE
***************************************************
FIELD FIELD FIELD FIELD DEC MAIN RELATES--TO
Nt4BR OFFSET LEN TYPE PTS INDEX FILE FIELD
lI30 ASCII 1 O O VENDOR_NAME
2 31 30 ASCII OO O ADDRESS
3 61 14 ASCII O O O CITY
475 2 ASCII OOOSTATE
577 9 ASCII O O O ZIP
6 86 3 ASCII O O O PH0NE_AC
7 89 3 ASCII OO O PHONE EXCHG
8 92 4 ASCII OO O PH0NE_NUMBER
996 2 NUMERIC O O O O TERMS
10 98 4 NUMERIC IOO O CREDIT_LIMIT
li 102 4 NUMERIC lO O O CREDIT_USED
12 106 4 NUMERIC lO O O PURMASES
13 110 3 DATE O O O LAST_PURCHASE
INDEX I: FIELD SEGMENTS: <1> <0>
-—————————————————————— —-—————
Copyright (c) 1984 Data Access Corporation 05/16/84

C-66 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
OPTION 4 -SET FILE FWUMETERS/NAMES
Option 4on the menu, SET FILE PARAMETERS/NAMES9 will allow you to
change the file namesg record 1engthp maximum number of records in a
data file, and the REUSE DELETED SPACE OPTION. Defaults are supported
here for ease of operation. Refer to the NEW FILE section for
information on these questi ons.
OPTION 5 -ERASE DATA FILE
This optfon is used when ALL data in afile is to be deleted. Thi s
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
adata fije is necessary. This is aPOWERFUL command. You will be
asked to confirm that you actually do want to zero the file before it
executes. This prompt will only respond to acapital "Y" (we want you
to be abso1utdly sure) .After the data file has been erased, the
remaining file definition, without data, may be saved with Option 9.
If this is not done, the file definition will also be erased.
OPTION 6-SET FILE INACTIVE
This option will allow you to delete aname from the list of files
that appears at the start of FILEDEF without actually deleting the
file definition or data files from the disk. You will need to confirm
that you actually want to perform this action. (Again, with acapital
"Y" only) .N0TEp to reactivate afi1e9 upon entry into FILEDEFp
select the file number of the file that you want to reactivateg and
respond to the question "NEW FILE" with "N". The procedure for
removing all trace of afile from the system is to first set the file
inactive through FILEDEF, then use the ERASE eommand in the MENU or
your operati ng system.
OPTION 7-CREATE FILE DEFINITION FROM SCREEN IMAGE
This option reads in an IMAGE (created with atext editor) from afile
which you specify in response to its prompt, and all the window
information in the image file is used to create abasic file
definition and optionally an ENTER configuration. Refer to the
section on "Formatting With Images" for more on how to create IMAGEs.
You will be prompted for the file name of the screen IMAGE to read in.
If the file is located on a drive other than the default driveg
precede the file name with the proper drive speciffcation. If you
want an ENTER configuration created for this fi1e9 answer "Y" to the
next questi on. The configuration created will have the ROOTNAME of
the IMAGE used, with an .FRM extensi on added. If you want only to
create the file definition and not aconfiguration fi1eg respond with
"N" to this prompt.
=" ".== ~—
~ ——
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual FILE DEFINITION (FILEDEF) C-67
——
————
———————————
—————————————
The screen image will be evaluated from top to bottom. left to right»
to extract the types and lengths of the fields in the image. Thi s
process will replace any field definition that may already exist under
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.
After using Option 79 define the indexes with Option 2.
OPTION 8-CREATE FILE DEFINITION FROM .DEF FILE
The ASCII file with filename extension .DEF which can be created with
Option 3 (see above) can be used to recreate the structure of the file
definition. This option has other uses. Sayg for example, that you
had afile definition on an B-bit computer that you wanted to move to
al6-bit model. We wIll asstme that DataFlex is installed on both
machi nes. You can use Option 3to create an ASCII text file for the
file definition. This ASCII file can be transported to the 16-bit
machine by adata communications program. Once on the l6-bit machine,
this .DEF file can be read by FILEDEF Option 8to recreate the file
definition there. Anew file definition created in this manner will
be empty of data. Of course this process serves to transport file
definitions in the other direction also.
OPTION 9 -SAVE DEFINITION/EXIT FILEDEF
This option saves the file definition just created or edited to the
di sk. After this option is executed, you will be asked if another
file definition is to be loaded for file definition. Respond "Y" if
you desire to edit mol"é» or "N" to exit FILEDEF.
If you elected pre-a11ocat1on of required disk space for the maximum
possible size of database files in installing DataFlex (see Installing
DataFlexñ the files will be created at this time (If you are
establishing a new database) In their maximum sIze when completely
full of data. You should make certain enough space is available for
the new files. Your screen will display asequence of dots during the
time it is creating the new filem which may consume an hour or more
if the new files are sizable.
If another file is to be 1oadeL you may also respond to the prompt
with the next file number to load if it is known. This reduces the
time required to load the menu and begin editing on the next file.
OPTION 10 -ABORT FILEDEF
Option lO will exit FILEDEF without making any changes to the file
definition. NOTE: If you used Option Five to erase datag and you
then abort with this optioñ» the selected erasure will not occur. The
same is true if you deleted an index or took any other action.
—-———
Copyright (c) 1984 Data Access Corporation 05/16/84

C-68 FILE DEFINITION (FILEDEF) DataFlex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
————
Copyright (C) 1984 Data Access Corporation 05/16/84

ÉTTZT: :::::::áF::;::F:F:::::F:::Z7IZ:II]I:I:ZZ:Z--- C-69
——————————
——————————
=======""" SAMPLE APPLICATIONS __"__
========== ==========
========== ==========
Asample multi-file configuration is provided with DataFlex. It is an
inventory /order entry system which you may find quite useful. How-
ever, that is not its purpose. The order entry sample is, rather.
intended as a teaching tool and as a starting place should you wish to
construct such asystem.
The order entry configuration as suppl led is fully operational includ-
ing sample data files on your master disks. It is recormended that
you become thoroughly familiar with how and why it works BEFORE
attempting to create your own multi-file configurations.
The first step In understanding DataFlex is to run the demo configu-
rati on. From the Master Menu. you may select "DATAFLEX DEMO" to run
the order entry system.
ASINGLE FILE SCREEN...
First we will deal with DataFlex using only ONE file at atime. To
demonstrate operation at this level we will use the CUSTOMER file.
Although the WSTOMER file is related TO by other files. It relates to
no others, and thus can be used by itself.
———— ~~~
——————
Copyright (c) 1984 Data Access Corporation 05/ 16/84

C-70 SAMPLE APPLICATIONS DataFlex 2.0 User's Manual
THE ájSTOMER SCREEN:
There is only one screen used to access and update the CUSTOMER file.
Select "CUSTOMER FILE MAINTENANCE" from the menu. The screen should
look like this:
DATA ACCESS CORPORATION CUSTOkiER MASTER FILE
CUSTOMER NUMBER: .
NAME:
ADDRESS:
CITY: ST: _ZIP:
.DISCOUNT: _.%
PURCMSES/MONTH $._PURMASES/YEAR $._
AMOUNT DUE $._
This is asimp1ep single file screen configuration to do file
maintenance and 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 screen displays all of the data in the CUSTCNER file. The first
field <CUST0MER NUMBER> is actually the record number assfgned auto-
matically by DataFlex. Note that the use of record number this way Is
optional. User assigned CUSTOMER numbers or ID'S could also be con-
figured with only asmall 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 <RETURN> key is pressed:
EXAMPLE:
Enter a<2> and <RETURN> in window one. and the data for
ájSTOMER two will display.
————————
————————————————
Copyright (c) 1984 Data Access Corporati on 05/16/84

DataF1ex 2.0 User's Manual SAMPLE APPLICATIONS C-71
The CJJSTOMER file is also INDEXED by the COMPANY NAME data field.
This allows us to FIND custaner records by placing the cursor either
over the CONPANY NAME window9 entering all or part of acompany name
and pressing FIND, or using the above procedure on the <CUST0AR
NUMBER> window.
EXAMPLE:
l) Clear the data windows with the CLEAR Flex-key
2) Hit <RETURN> to move the cursor to the COMPANY NAME window
3) Type in "DATA" and execute a<FIND> command
4) The CUSTOMER data for "DATA ACCESS" will display.
up to four fields on this screen could be indexed in this way on 8bit
systems (9 fields on 16 bit systems). Screens which have multiple
files displayed can have up to thismany indexes per file.
To ENTER new customers into the CUSTOMER database with this screen:
l) Clear the screen.
2) Strike <RETURN> to bypass the CUSTOMER number window. The
number will be assigned automatlcally.
3) Type data into each window and press <RETURN>.
4) When all the required windows are fillech the record will
be saved in the database
After reading the OPERATOR'S GUIDE, experiment with this screen until
you feel comfortable with what the program does as yctú use the various
keyboard comnands. You should be able to:
I) FIND ANY RECORD BY EITHER KEY.
2) CREATE NEW RECORDS.
3) EDIT EXISTING RECORDS.
4) DELETE RECORDS.
——————————————
——
————-——— —-—————
Copyright (c) 1984 Data Access Corporation 05/16/84

C-72 SAMPLE APPLICATIONS DataF1ex 2.0 User's Manual
CUSTOMER FILE DESCRIPTION:
The specifications (sizep content and indexing) of the CUSTOMER data
base file can be displayed or printed out with the FILEDEF program.
The display/printout looks like this:
FILE DEFINITION LISTING FOR FILE #25
***************************************************
FILE ROOT NAME =CUSTOMER
USER DISPLAY NAME =CUSTOMER FILE
SHORT NAME =CUSTONER
***************************************************
RECORD LENGTH =128 (USED =103)
MAX NUMBER OF RECORDS =lOó (USED =4)
DELETED SPACE IS REUSED
MULTI-USER RE-READ INACTIVE
***************************************************
FIELD FIELD FIELD FIELD DEC MAIM RELATES--TO
NMBR OFFSET LEN TYPE PTS INDEX FILE FIELD
1 1 30 ASCII O O O O CUSTOMER
231 30 ASCII OO O OADDRESS
361 14 ASCII O O O OCITY
4 75 2ASCII O O O O STATE
5 77 10 ASCII O O O OZIP
687 lNUMERIC O O O O DISCOUNT
7 88 4 NUMERIC 2O O OPUR MONTH
892 4 NUMERIC 2O O O PUR YEAR
9 96 4NUMERIC 2O O OPROFIT
10 lOó 4 NUMERIC 2O O ODUE
INDEX l: FIELD SEGMENTS: <1> <0>
This display tells us the following things about the ájSTOMER file:
The CUSTOMER file is DataFlex file number 25
The ROOT FILE NAME (the one that will show on a disk directory) is
"CUSTOMER"
When afile list is displayed to the operator it will show as
"CUSTOMER FILE"
Each CUSTOMER record will take up 128 bytes in the data file (record
length) and that of the l28g 103 bytes have been used.
The file can contain up to lOó customers (provided there is sufficient
disk storage) but that only four records currently exist.
====."=====".======"==="=====—_———————————__— —————————————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual SAMPLE APPLICATIONS C-73
If acustaner is deleted. the next customer to be added will be
assigned the deleted custanerts disk and record number automatically
by DataFlex (deleted space is REUSED).
The CUSTOMER file is not expected to be used in amultiuser environ-
ment. (Multi-user Re-read is set INACTIVE).
There are 10 data fields in each custaner record. Their lengths, data
types, and names are also shown.
One index is active for the CJJSTOMER file, composed of field <1> (the
customer name), and field <0> (the system record number).
Note that the 4-byte NUMERIC fields will each hold 8digits. 2after
the decimal point.
Notice that in this file the record number is used as asystem assign-
ed account number. This provides for maximum operator and systan
speed when finding acustcmer record (particularly since the operator
would remember frequently used customer numbers). Where this doesn't
work welb you could create an additional indexeci field for user-
assigned account IVS or not use any codes at all by always using the
CUSTOMER NNE. The operator can easily FIND the record by QJSTOMER
NN4E since that field is also indexed. Although access by record
number is fastest, the INDEXING in DataFlex is so fast that indexing
should not be avoided for reasons of performance.
The record number <0> is made part of the index with CUSTOMER NAME to
create unique index entries to allow two customers with same name.
THE <CUSTOMER> CONFIGURATION FILE
The file name of the ájSTOMER file configuration on your demo disk is
"CUSTOMER.FRM". The configuratfon file looks like this:
—
Copyright (C) 1984 Data Access Corporation 05/16/84

C-74 SAMPLE APPLICATIONS DataFlex 2.0 User's Manual
/F0RM
DATA ACCESS CORPORATION CUSTOMER MASTER FILE
CUSTOMER NUMBER: <_.>
NAME: <'
ADDRESS:
CITY: ST: _ZIP:
DISCOUNT: _.%
PURMASES/MONTH $._PURMASES/YEAR $._
PROFIT/YEAR $._
Windows with <>can be used to FIND customers
l*
// This is asimple ENTER configuration for customer file maintenance.
// Since the windows are processed sequentia11y9 the AUTOPAGE function can
// be used and the windows do not have to be explicitly named.
OPEN CUSTOMER // All files must be opened
ENTER CUSTOMER
AUTOPAGE FORM
// Each ENTRY connand is followed by the database element it references.
// The window is assigned by autopage. After the command the
// options surrounded by {}.
ENTRY CUSTOMER.RECNUM {AUTOFIND,N0PUT}
// Translation: Do data entry on the record number of the customer
// file. Automaticaily FIND by this field when data in input, but
// do not put data back into the record buffer since record number
// caMt be changed.
ENTRY CUSTOMER.CUSTOMER
// Translation: Do data entry on the customer name of the customer file
ENTRY CUSTOMER.ADDRESS
ENTRY CUSTOMER.CITY
ENTRY CUSTOMER.STATE
ENTRY CUSTOMER.ZIP
ENTRY CUSTOMER.DISCOUNT
ENTRY CUST0MER.PUR_MONTH {DISPLAYONLY}
// Translation: When the customer file is founcb display purchases
// for the month in this window
ENTRY CUST0MER.PUR_YEAR {DISPLAY0NLY}
ENTRY CUSTOMER.PROFIT {DISPLAYONI-Y}
RETURN // return from entry section
ENTEREND // end of enter configuration
ABORT // abort after escape key.
KEYPROC KEY.USER// Define action of user defined key
OUTPUT FORM // Output the page
ENTAGAIN // Return to same window
RETURN // End definition of user defined key
————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual SAMPLE APPLICATIONS C-75
The HELP screens in the actual configuration have been eliminated in
the above listing to save space» as have certain spacing lines in the
screen image .
The top of the configuration file is the IMAGE format of the screen.
DataFlex will display the form exactly as it appears in the first part
of the configuration. First the page is named with the "/F0RM",
designating "FORM" as the name of the page. The DATA WINDOWS are
numbered from left to right, top to bottom. Notice that the last four
windows are numeric and that the last three contain exactly two places
to the right of the decimal point. There are ten windows in this
image format.
In this image, there is aone-to-one correspondence between the fields
in the data file and the display windows on the CRT screen. Images do
not need to display all fields from afile; asingle data field from
afile might be all that was needed to be displayed.
The line following the end of the screen contains a"l*". This mark
indicates the end of the image format. It is arequired e1«nent of
the configuraton. It tells the DataF1ex compiler where the end of the
image is, and where the command part of the configuration begins.
The first command line opens the CUSTOMER file. All files that are to
be used in aconfiguration must be OPENed. OPENS should be at the
beginlng of the configuration.
The next line in the configuration "ENTER CUSTOMER" begins the ENTER
Command Group. The ENTER command is aDataFlex macro that is really
more like acomplete program than just acomnand since it controls the
whole operation of this configuration.
The next line, "AUTOPAGE FORM", tells the DataFlex compil er that we
will be using the page named "FORM". By using AUTOPAGE, we don't have
to specify each window on the page. They are assigned automatically
in sequence by the connand.
The next 10 lines are ENTRY commands. ENTRY comands work with the
ENTER ccmnand and specify each data element and window. The window
numbers can be emitted because of the use of the AUTOPAGE Command.
See the section of this manual on the ENTER Command Macro for a
complete discussion of the functions and uses of ENTRY.
The first ENTRY connand line uses two options:
AUTOFIND: Executes aFIND using data in the window when the
<RETURN> key is pressed.
NOPUT: Do not put data BACK INTO the record buffer since
the record number (the window data in this case) can
riot be changed.
Copyright (C) 1984 Data Access Corporation 05/ 16/84

C-76 SAMPLE APPLICATIONS DataF1ex 2.0 User's Manual
———————
Refer to the ENTER Ccmmand Macro section for afull list of options.
At this time, review each of the command lines to see how the file and
field element names correspond to the windows in the screen image and
the data file definition. Note that in line one, record number is
connected to window one (account number). This is typical in files
where the record number is used as a system-assigned account number.
The last line of the ENTER configuration for CUSTCNER FILE is an
ABORT. When afile maintenance session is complete. pressing the
ESCAPE key will cause the configuration to abort.
WSTOMER FILE REPORT EXAMPLE:
You need asimple report to list our customers, their discount and
total purchases. The following is the output of the REPORT program:
ájsToMER FILE
CUSTOMER DISCOUNT PUR/YEAR
4DATA ACCESS CORPORATION 15% 100.00
3DYSAN CORPORATION 5% 49,713.50
2MAXELL 20% 12,056.00
lMT MICROSYSTEMS» INC. 30% 57,000.00
118,869.50
~
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual SAMPLE APPLICATIONS C-77
——
This report is produced wIth the following report configuration:
/HEADER
QJSTOMER FILE
CUSTOMER DISCOUNT PUR/YEAR
/BODY RESIDENT
0_O% »D_
/TOTAL
l*
OUTFILE //direct the output
OPEN CUSTOMER INDEX.I //open the custaner file
REPORT CUSTOMER BY INDEX.I
//Print the customers in custcmer name order.
SECTION HEADER
OUTPUT HEADER //slmply output the page headings
SECTION BODY
PRINT QjST0t·ER.RECNUM //customer id number is system assigned
PRINT ájSTOMER.CUSTOMER //custcmer name
PRINT ájsToMER.DIscoUNT
PRINT ájsT0MER.pUR_YEAR
OUTPUT BODY
SECTION TOTAL
SUBTOTAL BODY.4 //subtotal will take the accumulator
//for any numeric window and print
//it in another window.
//print the total purchases for all
OUTPUT TOTAL //custcmers in the database
REPORTEND
ABORT
~
—————— —
Copyright (C) 1984 Data Access Corporation 05/16/84

C-78 SAMPLE APPLICATIONS DataF1ex 2.0 User's Manual
THE VENDOR FILE:
The vendor file, like the CUSTOMER file, is asingle file configura-
tion. We will relate other files to it at alater time. The first
step is to run the VENDOR configuration from the DEMO menu. Then
examine the file definition for VENDOR and compare it with that of the
CUSTOMER file.
FILE DEFINITION LISTING FOR FILE #21
***************************************************
FILE ROOT NAME =VENDOR
USER DISPLAY NAME =VENDOR
SHORT NAME =VENDOR
***************************************************
RECORD LENGTH =128 (USED =112)
MAX NUMBER OF RECORDS =400 (USED =15)
DELETED SPACE IS REUSED
.MULTI-USER RE-READ INACTIVE
***************************************************
FIELD FIELD FIELD FIELD DEC MAIN RELATES--TO
NMBR OFFSET LEN TYPE PTS INDEX FILE FIELD
ll30 ASCII lO O VENDOR
231 30 ASCII O O O ADDRESS
361 14 ASCII OO O CITY
475 2 ASCII OO O STATE
577 9 ASCII OO O ZIP
686 3 ASCII OOOPHONE-AC
789 3 ASCII OO O FH0NE_Exá-g
892 4 ASCII O O O FH0ME_NUMBER
996 2NUMERIC O O O O TERMS
10 98 4 NUMERIC 2 O O O CREDIT_LIMIT
li 102 4 NUMERIC 2OO O CREDIT_USED
12 106 4 NUMERIC 2 O O O PURCHASES
13 110 3 DATE O OOLAST_PURCHASE
INDEX l: FIELD SEGMENTS: <1> <0>
Note that the use of record number as an account number is used here
as well. The indexing is also very much the same as in the CUSTOMER
data base file. The only real difference is the content of the
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual SAMPLE APPLICATIONS C-79
fields. This is an important DataF1ex concept: that the way infor-
mation is dealt with remains constant even though the application may
change.
The VENDOR file introduces us to the DATE data type and field format.
Dates in DataF1ex 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
are stored as numbers, they are always displayed in aDATE format
window (_J_J_) automatically converted to the conventional MM/DD/YY
format.
File maintenance on the VENDOR file uses the following configuration:
——————————————————-———————————— —-——
————
Copyright (c) 1984 Data Access Corporation 05/16/84

C-80 SAMPLE APPLICATIONS DataFlex 2.0 User's Manual
/F0RM
DATA ACCESS CORPORATION VENDOR MASTER FILE
VENDOR NUMBER: <_.>
CCN'ANY: <'
ADDRESS:
CITY: ST: _ZIP:
PHONE: ( ) -
TERMS (DAYS) :_. CREDIT LIMIT: $._
OUTSTANDING CREDIT: $._
REMAINING CREDIT: $._
TOTAL PURMASES: $._
LAST PURQUiSE: _J_J_
Data in <>can be used to FIND vendors
l* OPEN VENDOR // all files must be opened.
ENTER VENDOR // inltalize enter macro.
AUTOPAGE FORM // automatically assign windows
ENTRY VENDOR.RECNUM {NOPUT,AUT0FIND}
// Translatiom Do data entry with the record number of the vendor file
// automat1ca11y find record, do not update the record buffer since
// record number can't be changed.
ENTRY VENDOR. VENDOR
// Translation, Do standard data entry on the vendor name of the vendor file.
ENTRY VENDOR.ADDRESS
ENTRY VENDOR.CITY
ENTRY VENDOR.STATE
ENTRY VENDOR.ZIP
ENTRY VEND0R.NONE_AC
ENTRY VENDOR. PHONE _EXOlG
ENTRY VENDOR.FHONE _NUMBER
ENTRY VENDOR.TERMS
ENTRY VENDOR.CREDIT_ LIMIT
ENTRY VENDOR.CREDIT _USED {DISPLAYONLY}
// Translation, When the vendor file is FOUND, display credit used in this
// window.
ENTRY (FORM.II-FORM.12) {DISPLAY0NLY}
// Translation, When arecord is founch display the result of the calculation
// of credit limit (FORM.II) minus credit used (FORM.12) fn this window.
ENTRY VENDOR.PURMASES {DISPLAY0NLY}
ENTRY VENDOR.LAST_PURMASE {DISPLAYONLY}
RETURN // return from entry section
ENTEREND // end of enter cormand
ABORT // stop after escape key.
// note: the entry command can only be used inside an enter or entergroup
KEYPROC KEY.USER // Define action of user defined key
OUTPUT FORM // Output the page
ENTAGAIN // Return to same window
RETURN
———————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual SAMPLE APPLICATIONS C-81
————— —
Notice the similarity between this file and the one for CUSTOMERS.
Each ENTRY connand line links adata base field with aWINDOW.
Close to the bottom. we see something new: ENTRY (F0RM.I1-F0RM.12).
This is acalculated field that translates to:
WHEN DISPLAYING FILE 21, SUBTRACT THE VALUE OF WINDOW 12
(FORM.12) FROM THE VALUE OF WINDOW li (FORM.ll) AND PUT THE
RESULT IN WINDOW 13.
There is not areport for the vendor file supplied with the sample
configurations; this one is up to you. Create areport format for
VENDOR and use the CUSTOMER report as a model. After making the
report, add it to the MENU using the MENUDEF program.
After.making your reportg try your hand at asimple file definition
and configuration using the AUTODEF Program. AUTODEF takes ascreen
IMAGE format created with atext editor and makes both the file
definition and compilable configuration file from it. After making
thesep look at the file definition with the FILEDEF program and type
out the configuration with the operating system TYPE command. Then
compile the configuration.
THE INVENTORY FILE:
With the inventory file we start to see the true power of DataF]ex.
Each inventory part is supplied by aVENDOR, 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.
DATA ACCESS CORPORATION INVENTORY MASTER FILE
——————
VENDOR NUNBER: _.NAME:
VENDOR PART ID:
YOUR PART ID:
DESCRIPTION:
STOCK QUANTITY: .MINIMUM QUANTITY: .
REORDER QUANTITY: .QTY ON ORDER: .
SALES/MONTH: $._SALES/YEAR: $._
PROFIT/YEAR: $._
LIST PRICE: $._ WHOLESALE PRICE: $._
AVERAGE COST: $._STOCK VALUE: $._
———————
—
Copyright (C) 1984 Data Access Corporation 05/16/84

C-82 SAMPLE APPLICATIONS DataFlex 2.0 User's Manual
——————
—————————————
When running the inventory data entry screen, the first two fields are
actually out of the VENDOR file. You can find the vendor of interest
on this screen by either keyp just like you could in the VENDOR
screen. You can then move the cursor down to VENDOR PART ID: to find
the first (or any) part for that vendor. The vendor number and then
vendorG part number make up a "two segment key", that is, you must
find the vendor, then, put in all or part of the vendors part number
to find arecord by that index. To find the first part for any
vendor, enter the VENDOR NUMBER or NAME and hit the "SUPERFINO" key.
The INVENTORY file is also indexed (able to find records by) "YOUR
PART ID" and "DESCRIPTION". You can put the cursor in any of these
windows and find aparticular partt
When you are creating a new partg find the vendor firstp then fill In
the other windows like you did in the other screens. This configura-
tion will also allow you to create new vendors from this inventory
screen. Just enter a new vendor name with no vendor number, and when
you SAVE the partg a new vendor will be created. Later we will see
how to disable this feature if you want.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual SAKPLE APPLICATIONS C-83
INVENTORY FILE DEFINITION:
FILE DEFINITION LISTING FOR FILE #22
***************************************************
FILE ROOT NAME =INVT
USER DISPLAY NAME =INVENTORY FILE
SHORT NAME =INVT
***************************************************
RECORD LENGTH -128 (USED =104)
MAX NUMBER OF RECORDS =lOó (USED =33)
DELETED SPACE IS REUSED
MULTI-USER RE-READ ACTIVE
***************************************************
FIELD FIELD FIELD FIELD DEC MAIN RELATES--TO
NMBR OFFSET LEN TYPE PTS INDEX FILE FIELD
----- ————-— -—--- -—-—- --- -——-- -—-— -—---
Il2NUMERIC Ol21 OVENDOR
2315 ASCII lO O VENDOR PART_ID
318 15 ASCII 2 O O PART_ID
433 35 ASCII 3 O O DESCRIPTION
568 3NUMERIC OO O O QUANTITY
671 2 NUMERIC O O O O MINIMUM
773 3NUMERIC O O O O REORDER
876 3NUMERIC O O O O ON_0RDER
979 5NUMERIC 2O O O SALES_M0NTH
10 84 5NUMERIC 2O O O SALES YEAR
II 89 4 NUMERIC 2 O O OPR0FIT_YEAR
12 93 4 NUMERIC 2 O O OLIST_PRICE
13 97 4 NUMERIC 2 O O OWH0LESALE_PRICE
14 101 4 NUMERIC 2O O O AVG_C0ST
INDEX l: FIELD SEGMENTS: <1> <2>
INDEX 2: FIELD SEGMENTS: .<3>
INDEX 3: FIELD SEGMENTS: <4> <0>
The first field "VENDOR NUMBER" RELATES to the record number (field
zero) of the vendor file (#21). This is all that's required to RELATE
the inventory file to the vendor file and it essentlaily makes the
vendor file alogical extension of the inventory file.
The INVENTORY file has THREE indexes. The first index is by vendor
number (field one) AND vendor part id (field two). This combining of
fields to make one index is called amulti-segment index. Since
record number is NOT appended to this index, two parts Cáñft have the
same vendor AND part number, which would be aduplicate record.
Index TWO is on field 39 or YOUR PART ID, a1lowing the same part to be
known by two different part numbers, yours and the vendoMs. Could
two parts have the same part number? If notp how could you allow that
if you wanted? Answer: No, two parts could not have the same
number, but if they coulcb the circumstance could still be dealt with
effectively by appending field ZERO (the record number) to the indem
rendering the composite index entry unique despite the duplication.
Index THREE allows access by DESCRIPTION. Notice the "MAIN INDEX"
column of the file definition. The main index is the number of the
Copyright (c) 1984 Data Access Corporation 05/L6/84

C-84 SAMPLE APPLICATIONS DataFlex 2.0 User's Manual
index that will be used when you FIND by that field. In this file
there are no fields that are used in more than one index, but where
there are9 the main index becomes important.
THE INVENTORY ENTER CONFIGURATION: (some lines are deleted from the
image area to conserve space)
IFORM
DATA ACCESS CORPORATION INVENTORY MASTER FILE
VENDOR NUMBER: < _.> NAME: < >
VENDOR PART ID: <'
YOUR PART ID: < >
DESCRIPTI0N: < '
STOCK QUANTITY: .MINIMUM QUANTITY: _.
REORDER QUANTITY: .QTY ON ORDER:
SALES/MONTH: $._ SALES/YEAR: $._
PROFIT/YEAR: $._
LIST PRICE: $._ WHOLESALE PRICE: S._
AVERAGE COST: $._ STOCK VALUE: $._
l*
// This enter configuration is alittle more sophisticated since it deals
// with two files. The inventory file RELATES to the vendor file.
OPEN INVT // All files must be OPENED before use.
OPEN VENDOR // The order of opening the file Is
// not important.
ENTER INVT VENDOR // ENTER will maintain both INVT and VENDOR.
// Since INVT relates TO VENDOR it MUST be
// first on the ENTER line.
// INVT is the main file.
AUTOPAGE FORM // Set up to automatically assign windows.
// These fields use the AUTOPAGE option--the windows are automatically
// assigned to the FORM page.
ENTRY VENDOR.RECNUM {AUTOFIND}
// Translation, do data entry on the record number of the vendor file.
// Automatically try to find the vendor by number.
// Note that the element of the related TO file is used here
// and automatically PUT to the VENDOR field of the INVT ff1e.
// The related TO element should always be used in a case like this.
(This configuration is continued on the next page.)
Copyright (c) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual SAMPLE APPLICATIONS C-85
—————
ENTRY VENDOR.VENDOR {SKIPF0UND,FINDRECL}
// Translation, Do data entry on the vendor name of the vendor file
// Skip this entry If arecord has already been found and REQUIRE
// that avendor be found to continue.
ENTRY INVT.VEND0R_PART_ID {SKIPF0UND,RETAIN}
// Translation, Do data entry on the vendor part id of the inventory
// file. Skip this if arecord has been found (preventing changes)
// and retain the entry after aclear window command.
ENTRY INVT.PART_ID {RETAINALL,REQUIRED}
ENTRY INVT.DESCRIPTION {CAPSLOCK}
ENTRY INVT.QJJANTITY
ENTRY INVT.MINIMUM
ENTRY INVT.REORDER
ENTRY INVT.ON ORDER
// These fields do not use autopage--they name each window.
// Either form is acceptable.
ENTRY INVT.SALES MONTH FORM.IO OISPLAYONLY}
ENTRY INVT.SALES YEAR FORM.ll UJISPLAYONLY}
ENTRY INVT.PR0FIT_YEAR FORM.12
ENTRY INVT.LIST_PRICE FORM.13
ENTRY INVT.WH0LESALE_PRICE FORM.14
ENTRY INVT.AVG_C0ST FORM.15
ENTRY (INVT.QUANTITY*INVT.LIST_PRICE) FORM.16
// The line above displays acalculated field.
RETURN // return Is required at the end of the entry section.
ENTEREND // as is ENTEREND.
ABORT // After the ESCAPE key is hit, abort.
KEYPROC KEY.USER // Define action of user defined key
OUTPUT FORM // Output form to list
ENTAGAIN // Return to same window
RETURN
Notice that there are now two files OPENED on the first two lines of
the configuration section. INVT and VENDOR, This tells ENTER to use
both the VENDOR and INVENTORY files in this screen. The ORDER in
which these files are listed on the ENTER line is important. The
files which are RELATED TO by the others go to the right of the files
which relate TO them. The first file is called the MAIN file. The
MAIN file is the one that relates (directly or indirectly) to all the
others. INVT is the main file in this configuration. (there can bt
files that areMt related to at all).
The first two fields are from the VENDOR file while all the others are
from the inventory file. When the same (related) field is present in
both files, such as; RECORD NUMBER in the VENDOR file and VENDOR
NUMBER in the INVENTORY file, ALWAYS use the field that is related TO
by the other(s) in the ENTER configuration. That's why VENDOR.RECNUM
is used in the first window instead of INVT.VENDOR. VENDOR NUMBER in
the INVENTORY file will be automatically updated when arecord is
saved.
Copyright (c) 1984 Data Access Corporation 05/16/84

C-86 SAMPLE APPLICATIONS DataFlex 2.0 User's Manual
This ends the sample section of the demo for your initial familiari-
zation. The rest of the demo should be studied after you master basic
operations with some application work of your own.
APPLICATION STRUCTURE:
So fam we have been considering only one or two files at atimep but
to really understand what is happening in our order entry application.
LetG look at the whole picture:
Select "INVOICE ENTRY" from the demo menu. The invoice screen will
look like this:
DATA ACCESS CORPORATION INVOICE
INVOICE NUMBER: .ájST0NER# .
BILL TO:
DISC TERMS DATE VIA SLSMN OJSTONER ORDER
_. —. —J—l—
PART ID DESCRIPTION PRICE QTY AMOUNT
~~~~~~
——————————
TOTAL $._
To create a new invoiCeg enter the invoice number. You may then ENTER
the ájSTOMER NUMBER in window two or the CUSTOAR NAME in window three
and do aFIND. Once you have found acustomer. the CUSTONER data will
display. This will become the default for the ship-to address; you
may change these fields if you wish. The cursor will then move to
invoice header area and take the default values (these are coming from
the ájSTOMER file). In the LINE ITEM section the object is to find an
inventory item by either of the two keym and then ENTER the QTY sold.
Adefault for the unit price will come from the inventory file less
the discount in the ájSTOMER file. The other affected windows will be
updated and you can save the line itan. You may use the arrow keys to
move up and down through the items. The delete record key deletes an
entered line item. Press the ESCAPE key to print the Invoice.
Copyright (c) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual SAMPLE APPLICATIONS C-87
There are five files open in the Invoice screen; Customerp Vendorp
Inventoryp Invoice header9 Line itans (inventory transactions). The
structure of the files looks like this:
VENDOR CUSTOMER
tI I
lI
INVENTORY l
lI
l l
LINE ITEMS-----r
The configuration that produces amulti-line multi-file report like
this is advanced "Flex-gramming". It is included on your disks as the
file "INVOICE.FRM". You should understand basic operations with ENTER
and REPORT before trying aconfiguration like INV0ICEp which uses
comand descrfbed in the next section.
The f11esg screens and reports that make up the demo are:
FILE FILE REPORT ENTER
NUMBER NAME CONFIGURATION CONFIGURATION
lSYSFILE (SYSTEM FILE) NONE DATE.FRM
21 VENDOR VENRPT.RPT VENDOR.FRM
22 INVT (INVENTORY) INVT.RPT INVT.FRM
25 CUSTOMER ájsTRFT.RFT CUSTONER.FRM
29 INTRAN (LINE ITEMS) MOVEMENT.RFT INVOICE.FRM
~
Copyright (C) 1984 Data Access CorporatiotÍ 05/16/84

C-88 SAMPLE APPLICATIONS DataFlex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (c) 1984 Data Access Corporation 05/16/84

=""""_""""__—"____———""~~""""""~~"_ "==D~l
"===~"====="""""""""~""""""""" __~~~—~— "====
——
======= DIRECT CONTROL OF DATA ENTRY ==========
===
~~—
—~——————— ==========
======="""""_"""""""_ "" "============
___ =""""""""===,==============,=============———_
The DataFlex Forms command group controls screen image PAGESp
including display of the PAGE Image, filling the windows with datm
moving the data from windows to the record buffem formatting display
of data, and clearing both data and images from the screen.
PAGE Command
The 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" as discussed in the chapter on "Elements of Configura-
tions". The prerequisite for the PAGE command is that at least one
defined and labeled image page be present as part of the configuration
being processed. See the section on "Formatting With Images" for
details of the page configuration.
FORMAT:
PAGE pagename
EXAMPLES:
PAGE ffrstscreen
PAGE secondscreen
PAGE pageheadfng
PAGE subNadlng
PAGE reportbody
Any MOVE or DISPLAY to apage will be immediately displayed in the
appropriate window when aPAGE command is executed for that page. 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 awindow without the necessity of displaying the
PAGE image.
———————————
ACCEPT CXmmand
ACCEPT places the cursor in an image "window" and waits for keyboard
input. Further. the QIÜjL valid argument for the ACCEPT command is a
window, referenced either as the format PAGENAMEÁ where "r is the
number of the window in the pagep or as anamed window with the window
name established by the NAME definition command.
On executiom ACCEPT displays the operator's keyboard input into a
window (as specified above). It can, optfonaljy, pass the input data
to any legal argument in the DataFlex configuration using the optional
"TO argument" extension as part of the execution of the same command.
The DataFlex field edit keys are active during an ACCEPT command.
——-———-————-——————-——-——————
Copyright (C) 1984 Data Access Corporation 05/16/84

D-2 DIRECT CONTROL, OF DATA ENTRY DataF1ex 2.0 User's Manual
When using ACCEPT, remember that the window reference itself is a
valid variable that can be used throughout aconfiguration. Data does
not need to be moved to another variable for processing in calcula-
tions, data base operations etc. Useful amounts of memory can be
conserved by using the window as a variable to contain data; if a
variable is defined only to hold the data input from awindorg adual
overhead is created to store the same information.
FORMAT:
ACCEPT window {TO argument}
EXAMPLES:
ACCEPT screen.3
ACCEPT screen.3 TO ¶nventory.descript1on
ACCEPT window7 TO inventory.qty (w1ndow7 previously
defined by NAME command
ACCEPT screen.3 TO screen.lO
P
Where the optional {T0 argument} is omitted from the ACCEPT command
line, the data in "window" can be processed in any normal manner.
Where the {TO argument} is used, an automatic MOVE command is executed
when the input is received, placing the data from "window" into
"argument". The "ACCEPT window TO argument" election itself has no
effect on the contents of the wlndcm which will hold the same data as
the argument after the comiand is executed. The window argument may
be left out of the ACCEPT command line by using the AUTOPAGE command.
(see AUTOPAGE)
If data already exists in awindow from aprevious ACCEPT. MOVE or
DISPLAY9 it will be the default entry for the next ACCEPT. If the
appropriate PAGE is not displayed at the time that an ACCEPT is
executed, the PAGE will be displayed by the ACCEPT.
=—
DISPLAY Command
DISPLAY explicitly outputs data to awindow in the same manner as
ACCEPT allows input. Accordingly, the QñiY valid output destination
for DISPLAY is awindow in mimage addressed either as PAGENAME.#
where "iV is the sequential number of the window in a page image9 or
as a name established with the NAME command. DISPLAYed data will not
clear when the CLEAR ALL Flex-key is pressed; only data displayed by
the ENTRY comand wf71 respond to the CLEAR ALL Flex-key.
FORMAT:
DISPLAY argument TO window
EXAMPLES:
DISPLAY 1nvt.descrfpt'lon TO screen.3
DISPLAY member.name TO mem_name
Where "mem name" was previously created with the NAME command
~~+~
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DIRECT CONTROL OF DATA ENTRY D-3
The window reference may be left out of the DISPLAY command by using
AUTOPAGE. (see AUTOPAGE)
AUTOPAGE Command
AUTOPAGE performs mautomatic sequential numbering of windows on a
PAGE for the ACCEPT, DISPLAY and PRINT commands. ACCEPT and DISPLAY
commands which follow an AUTOPAGE command will reference windows in
sequence from left to r1ghtg top to bottom. The argument for the
AUTOPAGE command is any pagename valid for the current configuration.
If AUTOPAGE is only to be used on a portion of aPAGE, the number of
the starting window may optionally be added to the command. The {}
braces shown below should not be typed--only the number of the
starting window. It is not necessary to process every window in the
PAGE after an AUTOPAGE commandg but the list of windows to process
must be continuous (no gaps) after each AUTOPAGE command.
AUTOPAGE allows the use of the ACCEPT) DISPLAY and PRINT commands
without the necessity of specifying the window where the command
action is to take place.
FORMAT:
AUTOPAGE pagename uu
EXAMPLES:
AUTOPAGE emp1oyee_record //D'lsplay the screen
DISPLAY emp.name //Dlsplay the 1st window
DISPLAY emp.address //D1sp1ay the 2nd
DISPLAY emp.city //D1spiay the 3rd
DISPLAY emp.phone //D1sp1ay the 4th
ACCEPT TO data.ver1fied //Accept input to the 5th
AUTOPAGE emp1oy8e_tax_status 8//Dlsplay the screen
DISPLAY emp.marftal //Dlsplay the 8th window
DISPLAY emp.exemptions //Disp1ay the 9th window
CLEARFORM and BLANKFORM Commands
These commands remove data from image windows. They can address an
entire image (by pagename), an individual window or arange of
windows.
For example, after data has been entered to ascreen image and saved
to the diskó one of these commands can be executed to clear the input
data from the windows and ready the image for the input of more data.
The commands differ as follows: CLEARFORM removes all data from the
image and displays the "fill character" in the window as defined in
the SETSCREE Utility; BLANKFORM removes all data in the image and
displays ASCII space characters in the windows. The two different
forms of operation are provided to allow as much flexibility as
possible in application design. Most configurations will probably use
CLEARFORM. The DataFlex READ configuration uses BLANKFORM when
displaying the field tag names for reference.
Copyright (C) 1984 Data Access Corporation 05/16/84

D-4 DIRECT CONTROL OF DATA ENTRY DataF1ex 2.0 User's Manual
FORMAT:
CLEARFORM pagename (clear entire page)
BLANKFORM pagename
CLEARFORM window (clear awindow)
BLANKFORM window
CLEARFORM window.nl THRU window.n2
BLANKFORM window.nl THRU window.n2
(clear a range of windows
starting at window.nl and
stopping at window.n2)
OUTFILE Command
OUTFILE is used to identify the sequential device (printer, screen, a
disk file) which is to receive data controlled by the OUTPUT command.
The argument for the OUTFILE command is any valid file or device name
addressable by the operating system. If no OUTFILE command exists in
aconfiguration, and the OUTPUT command is usecb output will be
directed to the printer port. If the OUTFILE comand is provideb but
with no argUment7 this means that an argument provided with the
operating or menu command which runs the configuration will designate
the device (the operating system command FLEX DAILYREPORT CCN: would
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: (the printer in most systms). Finally, the OUTFILE command may
itself have an argument in the configuration as shown below.
Quotation marks are required for literal arguments.
FORMAT:
OUTFILE btr1ng_arg}
Where "string_arg" is aliteral text string in quotation marks
or astring variable containing the name of alegal output
device or file.
EXAMPLES:
OUTFILE "LST: "(output to printer (list device))
OUTFILE "abc.dat" (output to file ABC.DAT)
OUTFILE destdev (output to device or file indicated by
the contents of string variable DESTDEV
OUTFILE (looks for argument from command line)
The OUTFILE command permits output in the same configuration with
other operations. For exampieg after data for an invoice has been
inputg it can be sent to aprinter for demand printing.
OUTCLOSE Command
After afile or device is established with OUTFILE, OUTCLOSE is used
to "close" the file/device when the configuration is being terminated.
———— ——————
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual DIRECT CONTROL OF DATA ENTRY D-5
======="====— —————~——~~~——=========="=
"——— == = == —~——————~—————~m———~~
This command uses no argumentp since it operates on any device or file
which is open.
FORMAT:
OUTCLOSE
———~ ===================W====== =
OUTPUT Command
OUTPUT addresses a"pagename" argument and transfers the entire page
referenced by "pagename" to OUTFILE. All data in the page--format-
tin> prompts. and data. are sent to OUTFILE. See OUTFILE command.
FORMAT:
OUTPUT pagename_arg
EXAMPLE:
OUTPUT invoice
& =====~~ ———~———~
NAME Command
NAME is used to identify windows in a page with aspecific identifier
rather than PAGENAME.#. There are two forms of the command. A window
can be explicitly NAMEd:
FORMAT:
NAME page_name.# window_name
Or a group of windows in a page can be NAMEd:
NAME page_name window_namet window_name2 ... window_name8
Using the second form of the command, multiple windows can be NAMEd on
asingle comnand line; multiple NAME command lines can be used to
NAME all of the windows in a page, if the names of all the windows do
not fit conveniently on a single line. Care should be taken to avoid
using any command or opticm word of DataF1ex (such as NAME, PAGE,
datep number, etc.) as awindow NAME. The names are applied to
windows in order froru t® left to rightp and then down by line.
EXAMPLES:
NAME invt.6 quantity
NAME lnvt part_id descr vndr cost price quantity
Use of an AUTOPAGE with astarting window i¥ enables the NAMEing of a
group of windows starting with that window number. In this instancep
the pagename should not be repeated after the AUTOPAGE command. Agaim
multiple NAME lines may be used if necessary to NAME all the windows.
EXAMPLE:
AUTOPAGE invt 7
NAME quantity stock pmfit total
Copyright (C) 1984 Data Access Corporation 05/16/84

D-6 DIRECT CONTROL OF DATA ENTRY DataFlex 2.0 User's Manual
————————————
FORMAT Command
Each DataF1ex window may have one or more format and data verification
options. The options are applied by use of aFORMAT comand
specifying the window. the desired options, and any applicable
parameters. NOTE: In this instance, the brackets {} used to delimit
the options are literal, and are to be typed. ·
FORMAT:
FORMAT w1ndow_arg {optionl. opt1on2 ... optionN}
"Window_arg" can be in the form "pagename.#" or anamed reference
established with the NNE Command. The following options are
available for window formatting:
FUNcTTñN .SYNTHX
DECIMAL FORMAT {P0INTS=n} where "n" is the number of places to the
right of the decimal point in the window. This can
reformat awindow or can be used to comfigure an
integer-only numeric field by setting avalue of zero
(O) for "n".
UPPER CASE {CAPSL0CK} This option accepts upper case entry and
converts lower case entry to upper case.
RANGE CHECK {RANGE =#1, í¥2} {RANGE =m/dd/yy, nn/dd/yy} Provides
an automatic check of entered data and declares an
error and returns the cursor to the window if the date
or numeric value entered does not fall within the
values specified in the RANGE coímand, where the first
value is the low end of the rangep and the second is
the high end. The upper and lower values in the
command are included within the valid range.
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
if the entry does not match any substring in the eEcK
command. Where an eligible entry has fewer characters
than the wIndow, the excess characters must be speci-
fied as spaces (shown below as B). The vertical bars
(I) shown below are recommended optional delimiters.
Delimiters, if used, should be characters unlikely to
be input erroneously by operators. The comand may
alternatively reference apreviously-defined in-memory
string variable (not awindow or database element):
{WECX="YESlNOBlYl6BlNBB"}
{OECK=password}
Calculations and string manipulations on data in formatted windows
should be avoidéd» since the formatting can change the apparent
"value" of the contents for purposes of the calculation or
manipulation. Calculations and manipulations should be done on the
source data (database e}ementg literal string, in-memory variable,
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DIRECT CONTROL OF DATA ENTRY D-7
——————
——————————— ——-————-————
etc.) from which the window was filled to begin with, with replacement
of the results to the windoic, if desired for output purposes.
The following additional options are valid for formatting output for
the DataFlex PRINT command only. Like the other format options, they
are set using the FORMAT comand.
BLANK SUPPRESS {SUPPRESS)
Strips spaces from output (leading spaces in numeric
data and trailing spaces in a7phanumeric).
QIARACTER FILL {FILL="X"}
Fills In spaces remaining after data is put in window
with the character specified in "x".
SIGN ON RIGHT {SIGNRT}
Places aminus sign on the right side of numeric
va7ues less than O.
FLOATING DOLLAR {FLOATA
Places afloating dollar sign ($) on the left of a
numeric value.
Multiple formatting options on a comand line are enclosed within a
single pair of braces and separated by comas:
EXAMPLE:
{CÁPSLO,MEÉ="YESINO "}.
=====—
PRINT Command
The PRINT command moves data to awindow and uses special formatting
options where they are Included 'In the configuration. In particular,
the PRINT command is the only comnand which can update SUBTOTAL
accumulators in the REPORT macro.
FORMAT:
PRINT arg {TO window}
EXAMPLES:
PRINT lnvt.descr
PRINT fnvt.descr TO BODY.2
PRINT payrol1_amt TO BODY.3
Note in the first example above that an AUTOPAGE connand must be in
forcep since the connand contains no window reference.
—————————————————
————
Copyright (C) 1984 Data Access Corporation 05/16/84

D-8 DIRECT CONTROL OF DATA ENTRY DataFlex 2.0 User's Manual
=======—~——~———~—————————"——
ENTERGROUP
The ENTER macro provides acomplete data entry environment. The
ENTERGROUP command is intended for inclusion in more custom-programmed
configurations in whicht for one reason or anothem it may have been
elected not to use the ENTER macro. The first use of ENTERGROUP will
load aset of predefined key procedures that define the operation of
the function keys: NEXT RECORD, PREVIOUS RECORD, BACK WINDOW, CLEARp
and SAVE. SAVE, howeverg will not save the record under ENTERGROUP,
as it will under ENTER. Rather, it will simply go to the end of the
ENTERGROUP and resume execution from there. Likewisep CLEAR will
clear only the screen under ENTERGR0UPg rather than clearing both the
screen and the record buffer, as it does under ENTER. SAVE and CLEAR
can, of course? be redefined to provide whatever action is appropriate
to the application, as can all the other Flex-keys, using KEYPROC
procedures (see the section on "Using Function Keys".
Multiple ENTERGROUPs can be included in the same configuration. Each
group must be ended with an ENDGROUP command. The use of multiple key
access to records is fully supported by ENTERGROUP.
FORMAT:
ENTERGROUP
ENTRY commands
ENDGROUP
Any changes in the ENTRY windows will be moved to the record buffer at
the end of the enter group unless NOPUT was used on the windows.
EXAMPLE:
ENTERGROUP
ENTRY INVT.ID {AUToFINcñ
ENTRY INVT.DESCRIPTION {FINDREQ,SKIPFOUND}
ENTRY INVT.VENDOR {DISPLAYC)NLY}
ENTRY INVT.PRICE
ENDGROUP
This would allow FINDS in the INVT file by either ID or DESCRIPTION
and allow the PRICE to be changed. The record buffer would be edited
with PRICE but the record would NOT be saved.
All ENTRY formatting options are available in an ENTERGROUP, as is the
ENTDISPLAY command, described in the section on "Data Entry". The
SUPERFINO and DELETE Flex-Keym howeverp are not defined, as they are
in ENTERg because the more flexible possible applications of
ENTERGROUP require application-specific programming of these
functioim as they do not in ENTER. These Flex-keys can be programmed
with KEYPROC comandm as described in the section of this manual on
"Using Function Keys". If it is desired for some reason to alter the
pre-programming of other Flex-keys as provided in ENTERGROUP for a
specific application, those other Flex-keys also can be re-programmed
with KEYPROC comnands.
———
Copyright (c) 1984 Data Access Corporation 07/10/84

DataFlex 2.0 User's Manual DIRECT CONTROL OF DATA ENTRY D-9
Below is asample configuration using one ENTERGRQUP. It is the same
ENTER configuration as is shown in the "Programming Tutorial" section
of this manuab except that that example used the ENTER macr"o» and the
one on the next page uses an ENTERGROUP. The di fferences between the
two versions of the configuration are instructive.
/SCREEN
.. ..... ..... ,., ..,... .... ... PERSONNEL FILE .. ...... ... ...... ... .....
Last Fi rst MI
EMPLOYEE NAME :<_'
ADDRESS1 :
ADDRESS2 :
CITY :ST :_ZIP :
SOC. SEC. # :<>
DATE HIRED :_J_J—
PAY RATE :$._
PAY TYPE :_(H=Hour1y or S"Sa1aried)
Enter aName or Soc. Sec. S and press FIND to display record,
OR press <ESC> to exit and return to the DataFlex Menu...
/*
OPEN PEOPL E
START: //begin loop
ENTERGROUP //enter·grou p
AUTOPAGE SCREEN
ENTRY PEOPLE.LNAME
ENTRY PEOPLE.FNAME
ENTRY PEOPLE.MI
ENTRY PEOPLE.ADDRI
ENTRY PEOPLE.ADDR2
ENTRY PEOPLE.CITY
ENTRY PEOPLE.ST
ENTRY PEOPLE.ZIP
ENTRY PEOPLE.SSAN
ENTRY PEOPLE.DATE
ENTRY PEOPLE.PAYRATE
ENTRY PEOPLE.PAYTYPE {CAPSL0(X,8IEá(="HS"}
ENDGROUP //endgroup
SAVE PEOPL E//save record
CLEAR PEOPLE //clear buffer
CL EARFORM //cIear screen
GOTO START //begin loop
KEYPROC KEY.ESCAPE //define esc key
ABORT //to abort
Copyright (C) 1984 Data Access Corporati on 05/16/84

D-lO DIRECT CONTROL OF DATA ENTRY DataFlex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (c) 1984 Data Access Corporation '05/16/84

__ ___———————_~———~ ==== D"ll
————————
É: ::É:EE:E MANIPULATING STRINGS ::::::====
—————————
—~—+ —~———
The C)ataF1ex String commands allow manipu1atton of various forms of
text string data. They can be used on literal string arguments,
windows, string variab]esp or data base elements. If anon-string
variable is used in the argument for astring comanch it will be
converted to astring before the string operation. String variables
are declared using the STRING command, which is described. in the
chapter on Elements of Configurations. That section should be
reviewed and understood prior to attempting the use of commands
described in this chapter.
In most cases9 the string comiands act upon an existing string.
specified by its variable name, or entered as aJiterab and move the
result of the action to adestination variable. The word "TO" is the
designator preceding the destination variable which is to receive the
output of the command. Certain string commands return the results of
their processes back to the source variable name. These "replacing"
string comands should be used with due regard for the fact that the
original contents of the source string will not be available after
execution of the connand.
The general format of DataFlex string comands is:
COMMAND src_strtng_var TO dest_string_var length position
Not all comands require the length and position specifiers, which are
integers. DataFlex string commands can use the same variable name as
both source and destination for the comand action.
EXAMPLE:
LEFT a_str1ng TO a_string 10
will take the leftmost ten characters of a_string and place
the result back ínto a_str1ng.
——————
LEFT Command
The LEFT command extracts aspecified number of characters from a
string starting with the leftmost character and places the result of
the extraction into avariable.
—————————————————————————————————————— — ———————
Copyright (c) 1984 Data Access Corporation 05/16/84

D-12 MANIPULATING STRINGS DataF1ex 2.0 User's Manual
—————
FORMAT:
LEFT source_string TO dest_str1ng §#
Where LEFT is the conYnand9 source_string is the string argu-
ment 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
source_string. If #í¥<L the command will output anull string
(no characters). If ## is greater than the length of the
source string, the cormand will output the entire source
string.
EXAMPLES:
Where "o1d_string" has avalue of "ABCDEFGHI"
LEFT o1d_strlng TO new_string 5
would return avalue of "ABCDE" in new_string
LEFT string TO first_char l
would return the first character of "string" in the variable
"first char"
RIGHT Command
The RIGHT command extracts aspecified number of characters from a
string starting with the rightmost character and places the result of
the extraction into avariable.
FORMAT:
RIGHT source_string TO dest_string ##
Where RIGHT is the coímand, source_string is the string
argument being acted upon, TO designates dest_string, and ##
is an integer literal or variable which specifies the length
of the sub-string to be extracted starting from the right end
of source_string. If ##<L, the comnand will output anull
string (no characters). If ## is greater than the length of
the source stringp the command will output the entire source
string.
EXAMPLES:
Where "old string" has avalue of "ABCDEFGHI"
—
RIGHT old_string TO new_string 5
would return avalue of "EFGHI" in new_string
RIGHT string TO 1ast_char l
would return the last character of "string" in the variable
"1ast_char"
=== —~———————"——
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual MANIPULATING STRINGS D-13
~
———————————————
======———————————————————————————————
——————————
MID Command
The MID string command provides the same sub-string extraction
capability as found in the LEFT comand, but MID's extraction takes
place from aspecified point within the string? not just from the end.
MID adds astarting position argument to the syntax used for LEFT and
right.
FORMAT:
MID source_string TO dest1nation_str1ng mm
Where MID is the comand, source string is the string being
acted upon, TO designates the destination_string variable. m
is the length of the sub-string to extract and ##2 is the
starting position in source_string where the extraction is to
begin. Both mand ##2 may be literal integers or variables.
EXAMPLE:
Where 0LD_STRING has avalue of "ABCDEFGHI"
MID o1d_str1ng TO new_str1ng 5 2
would return avalue of "BCDEF" in NEW_STRING
If mis less than Id the comand will output anull string (no
characters). If mis greater than the length of the source stringg
the comand will output the entire source string to the right of, and
inc1uding,p position ##2. provided ##2 is >0 and less than or equal to
the source string length. If ##2<1 while mis greater than the
length of the source string, the entire source string will be outputp
while if ##2 is greater than the length of the source string, the
rightmost character only of the source string will be output.
==""""
ASCII Command
The ASCII comnand takes the ASCII value of the first character of a
source string and places the result in anumeric variable.
FORMAT:
ASCII string TO numerfc_variab1e
EXAMPLE:
Where INITIAL has avalue of "Abernathy"
ASCII 1n1t1a1 TO fn1t_val
will return avalue of 65 in "INIT_VAL".
"————
Copyright (c) 1984 Data Access Corporation 05/16/84

D-14 MANIPULATING STRINGS DataFiex 2.0 User's Manua7
——————————
MARACTER Canmand
The CHARACTER corrmand takes an integer (O to 127) and converts it to
its equivalent ASCII character, then places the result into astring
variable. This is particularly useful for creating strings needed for
printer or other device control where the string values cannot be
conveniently created from the keyboard.
FORMAT:
MARACTER integer TO stríng_var
EXAMPLES:
Where LEAD_IN has been declared as a string variable
CFIARACTER 27 TO 1ead_1n
will place avalue of 27 (the ESC character) in LEAD_IN
Where EIGHTLPI has been declared as astring variable
MARACTER 65 TO arg
will place an "A" (ASCII code 65) in EIGHTLPI
.
POS Command
The POSition comand scans a source string for the occurrence of a
designated "target" substring9 and returns an integer numeric result
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 azero in the specified
variable.
FORMAT:
POS stringl IN string2 TO num_var
Where POS is the colmlandp STRINGI is the string to be scanned
for, IN designates STRING2p STRING2 is the string to be
scanned for an occurrence of STRINGln TO designates the
destination numeric variable NUM VAR which will contain the
—
result.
EXAMPLE:
Where S7RINGI ="DEF% and STRING2 ="ABCDEFGHI"
POS strlngl IN str'lng2 TO posit
will return avalue of 4in POSIT.
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual MANIPULATING STRINGS D-15
=====~~~———~——— =
LENGTH Command
LENGTH returns the length of adesignated string as an integer number
in anumeric variable. LENGTH counts the number of printable
characters and spaces in the argument. LENGTH will give adifferent
result for what may seem like the "same" data according to whether the
argument is adatabase e1«nenG awindowg or avariable. See the
discussion at the end of this chapter on "String Operations".
FORMAT:
LENGTH string TO num_var
Where LENGTH is the comand, STRING is the string whose length
is to be determined. TO designates the numeric variable to
contain the result of the commandG action.
EXAMPLE:
Where STRIN="ABC"
LENGTH string TO how_1ong
will return avalue of 3to HOW_L0NG
—————
PAD Command
The PAD comand is used to make strings of specified length. The
first argument identifies the variable which is the source of the data
to be PAOded, and the second identifies the destination string in
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
original string is shorter than 1engthp spaces w,i11 be added to string
to extend it to length. If the string is longer than 1ength»
characters in excess of length will be eliminated
FORMAT:
PAD source_string TO dest_string #if
Where PAD is the comand, S0URCE_STRING contains the string to
be PADdedp DEST_STRING contains the PAOded result of the
comnand, and ## is the integer value or variable which
specifies the number of characters (including spácés> if
required) that will be contained in the resultant string.
EXAMPLE:
Where ALPHA_ STRING ""ABC"» and spaces are represented as "kS"
PAD a1pha_str1ng TO beta_string 5
will store "ABCBB" in variable BETA_STRING
Where BEFORE ="ABCDEFG"
PAD before TO aftor 3
will store "ABC" in variable AFTER
——————-———————————————-———
Copyright (C) 1984 Data Access Corporation 05/16/84

D-16 MANIPULATING STRINGS DataFlex 2.0 User's Manual
TRIM Comand
The TRIM comnand strips both leading and trailing blanks, if presentf
from the contents of astring variable. Embedded blanks are not
affected.
FORMAT:
TRIM source_string TO dest_string
Where S0URCE_STRING contains the string to be operated on, and
DEST_STRING will contain the TRIMmed string. SOURCE_STRING
and DEST_STRING may be the same if replacement is desired.
EXAMPLE:
Where spaces are represented as "B"9 and LQNGSTRING =
"C2BifBbybseaBBB"
TRIM longstring TO shortstrtng
will place "2Mif8byl6sea" in SHORTSTRING
APPEND Command
APPEND provides the facility to join two or more strings together.
The strings APPENDed together can be 1itera1sg variables. and/or
strings created through the use of other DataF1ex string cormands
(such as CHARACTER). Stringl in the FORMAT below must always be a
variable. This variable will contain the APPENDED string after the
command has been executed. Strings cannot be APPENDed to alitera]
string constant.
FORMAT:
APPEND strlngl str1ng2 ...stringN
Where APPEND is the command, STRINGI is astring variable
name, and STRING2 through STRINGN are literals or variables
joined to STRINGI. STRINGI remains after the connand is
executed as the variable name of the expanded string.
EXAMPLE:
Where SIZE ="big"
Where COLOR ="blue"
APPEND size color " balloon"
will result in the value of "big blue balloon" in SIZE
NOTE: If you wish to "collect" strings into añéWY mpty variable, it
is necessary to clear that target variable with dMOVE "" to STRINGI
command (substitute your variable's name for STRINGI). If this fs not
done, the APPEND command will attanpt (and fail) to operate on the
string in its default initialized statep which is a17 spaces (to the
declared length of the string). String variables are initialized in
this way to reserve enough space in mtmory for the stringfs maximum
sIze, but it cannot be APPENDed to in this state, since It is "full"
of spaces.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual MANIPULATING STRINGS D-17
,———
UPPERCASE ~and
The UPPERCASE connand scans adesignated string and converts al? lower
case letters to uppercase.
FORMAT:
UPPERCASE string
Where UPPERCASE is the comand acting on STRING.
EXAMPLE:
Where STRING="Smith"
UPPERCASE string
will return STRING as "SMITH"
————————————
CMDLINE Command
When executing aDataFlex configuration, comnand arguments entered at
the operating systan level as part of the initial command entry line
can be stored to string variables for later repetitive use? with the
CMDLINE comnand. This permits certain run-time choices to be made by
the operator (or the menu system) and entered without Separate
prompting from within the configuration.
EXAMPLE:
FLEX MYREPORT CON:
Executes the FLEX.COM file and runs the configuration called
"MYREPORT". The "CON: "is not executed until alater point in
the execution of the configuration when aCMDLINE cotmand
retrieves that argument and stores it to astring variable
which is subsequently read by the configuration (and used, in
this casep to direct the reportfs output to the screen).
(MOLINE will retrieve arguments with no limitation as to number from
the last prior-executed operating system comand or the last pr"kr
CHAIN commancb whichever was executed more recently. Arguments are
separated from each other by spaces (per the example above), and, once
retrieved by CMDLINE, are no longer available from the same sourceg
having been replaced by the next succeeding argument, if any.
FORMAT:
CMDLINE string_arg
EXAMPLE:
aqDLINE output_device
—— ~~~~~
——— G
Copyright (c) 1984 Data Access Corporation 05/16/84

D-18 MANIPULATING STRINGS DataF1ex 2.0 User's Manual
================.========————~——— — — ·~.———————————
—————— ~,~~~~ ——
SIRING OPERATIONS
The class (in-memory variab1ep database e1aneñt» or window contents)
of astring affects the way trailing blanks are handled. Basically,
the differences are as follows (B indicates ablank space):
Database Element: All characters plus additiona1 blanks to fill the
declared length of the eWnent (set in File Definition). Example:
"The8Hague8" (IQ characters)
WIndow Contents: Only actual characters, fncludlng embedded blanks.
Example: "TheBHague" (trailing blank dropped)
In-memory Variable: Whatever was input to it. If avariable were
loaded from the database element illustrated aboveg it would contain
all 10 characters, including the tráiling blank. If it were loaded
from the window illustrated above9 it would contain only the 8non-
blank characters plus the embedded blank.
Windows, then, TRIM strings just as does the TRIM connand (see abovek
which is a way to TRIM leading and traf1ing blanks without MOVEing tOg
and back from awindow.
This is how to display "Miami,8F1orida" from two lO-character
database e7elnentsp file.city and fi]e.state:
STRING city 10
STRING state 10
TRIM fi1e.city to city
TRIM f'l1e.state to state
SHOW city ".r state
This is how to display the same thing from in-mcmory variables
var.cíty and var.state, each of which has length equal to their
contents (5 and 7 respectively for Miami and Florida). The coma and
space are handled differently only to illustrate an alternative; they
could be handled either way in either instance:
STRING comma 2
MOVE "gY' TO comma
SHOW var.city comma var.state
In generañ it is preferrable to use in-memory variables for
manipulation by the String comands.
———
Copyright (C) 1984 Data Access Corporation 05/16/84

---------------- """ ":::"::J:::: 0~19
—
""="==="""""""""""" "=""====""»
=~==~=~ ~———"~—=
=Z=====Z== CONDITIONAL EXECUTION ===ZZZZZ
=_=====~==
————————————
DataFlex provides two means for obtaining conditional execution of
commands, INDICATORS and IF tests. Indicators will be discussed
first. They are aspecial type of argument (often referred to as
"flags") which conditionally controls command line execution. There
are two possible statuses for an indicator: TRUE and FALSE.
An indicator is created with the INDICATOR command. (See the chapter
on Declaring Data Elements.) Upon declaration, indicators remain in
their default status of FALSE until an INDICATE comnand or some other
event in the execution of the configuration resets it to the other
status of TRUE.
If an indicator is TRUE» the cormand which follows it on acommand
line in aconfiguration will be processed. If an indicator is FALSEp
the connand line (or group) will be skippe& and execution will move
to the next line. ATRUE indicator will also cause the processing of
aWHILE -ENCL, REPEAT -UNTIL or BEGIN -END structured cormíand group
which follows the indicator on a connand line.
Once definecb an indicator may be used by enclosing it in brackets
("I" and "I") to identify it to the DataF1ex command processor. It
must be placed at the beginning of the connand 1ine(s) it is intended
to control. The command processor recognizes the bracketm and does
the appropriate conditional testing on the enclosed indicator.
FORMAT:
[ind1cator_arg] command
EXAMPLES:
[salel MOVE (lnvt.qty-amt_sold) TO lnvt.qty
[mentber] SHOW IEnter membership code: '
[cred1t_ok] SHOW 'Credit approved up to ' cust.l'lmit
[sIngle male] SHOW fNot1ce format for multiple indicators'
[s1ng1e][male] SHOW "This format works the same!"
Using this format, the connand processor tests the INDICATOR for a
TRUE status. If the INDICATOR is TRUE, COMMAND is processed. If
INDICATOR is not TRUE (FALSE), then the command is skippech and the
next comiand in the configuration is processed (or the next indicator
fs tested, etc.).
When creating aconfiguration, it is sometimes useful to be able to
execute aconnand based on the FALSE status of an indicator rather
than its TRUE status. This is done using the word NOT in front of an
indicator on a comand line to reverse the sense of the test applied
to its status.
———————————————————————————-—-——————-—
——-————————
—————————————
Copyright (C) 1984 Data Access Corporation 05/16/84

D-20 CONDITIONAL EXEájTION DataF1ex 2.0 User's Manual
FORMAT:
INOT indicator] comnand
EXAMPLES:
[a_test] MOVE argl TO screen.l
MOVES "argl" if A_TEST is TRUE.
Cnot a_test] MOVE arg2 TO screen.l
MOVES "arg2" if A_TEST is FALSE.
[NQT member] SHOW 'Who is this guy?'
INOT cred1t_ok] SHOW 'Confiscate the credit cardll'
Up to three indicators, separated by spacesp can be used together
within the brackets to test whether acomand line should be pro-
cessech or, if space a11OWSg aset of brackets may be used for each
indicator to improve readability. Either format works, and both are
used in illustrations in this manual. A NOT can precede any indicator
to reverse the sense of the test on the indicator which follows it.
Concatenation of indicators in this manner interrelates them through
"ANDS" (that fSg all of them must be TRUE for aTRUE result--if any is
FALSE, then the combination is FALSE).
FORMAT:
[{NOT }indicatorl {NOT }ind1cator2 {NOT }indicator3] ccmmand
EXAMPLES:
[sale][cred1t] SHOW °Enter item ID: '
Icred1t sale] SHOW 'Enter item ID: i
Same function as example above.
[saiej[N0T credit] SHOW 'Sorry? credit limit exceeded.'
Indicators can be used to conditionally set other indicators:
[member] INDICATE charge TRUE
SETTING INDICATOR STATUS
There are three distinct formats for using the INDICATE comand to
establish an indicator's status.
First, and most simply, indicator arguments can be explicitly set or
reset using the following command format:
EXAMPLES:
INDICATE indicator TRUE
INDICATE indicator FALSE
Copyright (C) 1984 Data Access Corporation 05/16/84

OataFlex 2.0 User's Manual CONDITIONAL EXECUTION D-21
Secondly, the TRUE or FALSE condition of an fndicator can be estab-
lished by the use of acomparison mode operator. There are eight (8)
comparison modes for an indicator:
LT lass than
LE less than or equal to
EQ equal to
GE greater than or equal to
GT greater than
NE not equal
IN string Inclusion
MATQI string matching
When using the INDICATE comiand with acomparison mode operator, a
status of TRUE or FALSE is given to the named indicator based on the
outcome of the comparison of two arguments and the selected mode of
comparison. That status is then tested each time that the indicator
is encountered to determine whether the comnand line which follows the
indicator In aconfiguration should be processed or not.
For example the following comparisons are:
IR!JE EALSE
5GT 33GT 5
666 EQ 666 666 EQ 999
999 LT 1000 1000 LT 999
'B' IN 'ABC' 'A' IN 'XYZ'
'ABC*' MATQ1 'ABCDEF' 'A' MAT(J1 'B'
"IN" and "MATM" have the following differences:
IN scans one string for the presence of another string; for
example "A" fs IN "DAC". When one string is IN anothem the
indicator is returned TRUE.
i'«re tests for one string equal1ing another. If the strings
are equal the indicator is returned TRUE. It varies from the
EQ comparison mode in that MATQI will perform the comparison
against only part of the string and if it is equal to the same
part of the other string the indicator will be returned TRUE.
The partial string to be tested is represented with the
asterisk convention used by most operating systems where "AB*"
means anything that starts with "AB" is considered TRUE with
whatever follows in the rest of the string not being evaluated
or considered for the test. The asterisk may be used only in
the first argument. The second argument must be acompletely
explicit string.
————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

D-22 CONDITIONAL EXWJTION DataF1ex 2.0 User's Mama?
="="==""""—."="=—"""====———— —
The comparison mode operator will be represented as "MODE" in examples
In this manual.
The format of the INDICATE comand with amode operator creates an
easy-to-read "sentence" which includes the INDICATE comnand, the
indicator argument, and two other arguments which are compared by a
comparison mode operator:
FORMAT
INDICATE 'lndicdtor_arg AS argl mode arg2
All of the illustrated components are required for acorrect INDICATE
command "sentence". The connand "INDICATE" instructs the DataFlex
command processor to set an indicator; the indicator_arg is the
indicator which will receive the TRUE or FALSE status that is the
result of the comparison; "AS" provides asyntax transition from the
establishment of the indicator to the comparison itself; argl and
arg2 must be present to create avalid 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:
INDICATE of_age AS age GT 21
INDICATE in_stock AS lnvt.qty GE order_amt
INDICATE credit ok AS cust.ba1 LT cust.cr_1imit
INDICATE eureka AS strlngl IN strfng2
INDICATE gotcha AS 'ab*' MATM string2
The third format for setting an indicator uses other previously
established indicators. To support this form of the INDICATE command,
the following syntax is provided:
GROUP, ANY, ALL. AND, OR and NOT
GROUP is used to define up to three other indicators which will be
tested together to estab7ish TRUE or FALSE status of the Indicator
defined by the INDICATE comand. It replaces the transitional "AS" in
the INDICATOR command definition "sentence".
ANY creates aTRUE status for the indicator argument if any of the up
to three indicators Included in GROUP Is TRUE. ALL requires that all
of the fnd'lcators in the GROUP be TRUE to pass aTRUE 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 Manual CONDITIONAL EXEájTION D-23
——————— —————————————
FORMAT:
INDICATE Ind GROUP ANY/ALL [ind ind {ind}] {AND/OR ANY/ALL [fnd fnd]}
The bracket characterm "C" and "J", used to enclose the
GROUPed indicators are anecessary part of the convnand syntax.
Each GROUP may contain up to 3indicators, and up to 2 GROUPS
(conjoined by and or OR) may be in one comand. Each group
must be preceded by ANY or ALL. "
EXAMPLES:
INDICATE us_car GROUP ANY [gm ford chrysler]
would set the indicator US CAR TRUE when any of the three
indicators GM. FORD, or CHRYSLER was TRUE.
INDICATE conscript GROUP ALL [male citizen of_age]
would require that all three indicators MALE, CITIZEN? and
0F_AGE be TRUE for the indicator CONSCRIPT to be set TRUE.
The AND and OR conjoiners allow conditional testing to be compounded
to set an indicator. NOT enables the sense of an indicator to be
reversed for aparticular test.
EXAMPLES:
INDICATE e1ig1b1e GROUP ALL Cma1e singl of_age] AND ANY [rich handsoml
would set the indicator ELIGIBLE TRUE only if indicators MALE»
SINGL, and 0F_AGE and at least one of the indicators RICH and
HANDSOM were TRUE.
INDICATE hunt GROUP ANY [squirrel possum] OR ALL [bear 1n_season]
would set the indicator HUNT TRUE if either of the indicators
SQUIRREL or POSSUM were true, or if both BEAR and IN SEASON
were TRUE.
INDICATE spanish GROUP ALL [cent_amer] OR ALL [south_amer NOT braz11]
would set indicator SPANISH TRUE if indicator CENT_AMER were
TRUE, or if indicator SOUTH AMER were TRUE and indicator
BRAZIL were FALSE.
The limitations on number of indicators in agroup and number of
groups in acomnand (3 and 2 respectively) can easily be overcome by
use of successive INDICATE GROUP connandsg and within aconsecutive
series of such connandm the same indicator can be reset many times to
avoid consuming memory space for many different indicators.
Copyright (C) 1984 Data Access Corporation 05/16/84

D-24 CONDITIONAL EXEQJTION DataF1ex 2.0 User's Manual
—— ——
PREDEFINED INDICATORS
Several predefined 'Indicators are available as part of the DataFlex
syntax:
FINDERR TRUE if no record returned to buffer on FIND
FOUND TRUE if record returned to buffer on FIND
SEQEOF TRUE if end of sequential file
SEQEOL TRUE if end of line in sequential file
KEYPRESS TRUE if akey has been pressed (set by KEYMECK)
PAGEBREAK TRUE if new page (set by F'AGEOECX)
MULTIUSER TRUE if your DataFlex system is set multi-user
These indicators can be used at any point in aconfiguration to make
portions of the configuration dependent on the condition which sets
the status of the indicator. The status of the indicator can even be
reset using the INDICATE connand, but this should be done with great
care, since other operations are likely to depend on internal.settings
of the status of these indicators.
IF TEST
The IF test is an alternate means of obtaining conditional execution.
Indicators provide ameans of applying the results of atest to
numerous individual comand lines throughout aconfiguration. The IF
test, on the other hand, allows aspecific test to be created on a
command line that determines whether or not the single comnand
following the IF test on the same line will be executed.
What is an IF test?
An IF test sets up a "comparison" sentence. In the sentencep a
statement is made regarding the relationship of two items. They are
compared using acomparison mode operator to see if they are equab
one greater than the other, or any of several other relationships.
EXAMPLE:
Acar is bigger than abreadbox.
This sentence compares a car and abreadbox. Its comparison
mode is "bigger". This sentence is TRUE.
The objective of the test is to arrive at astatus result of TRUE or
FALSE. For the purposes of conditionally executing acormand line, if
the comand sentence correctly states the relat1onshfp between the
variables, the sentence is TRUE and the comand following the IF
command will be executed. A FALSE sentence will pass by the comíand
on the IF line, and go on to the comand on the line following the IF
line.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual CONDITIONAL EXECUTION D-25
There are eight comparison modes for IF tests:
LT less than
LE less than or equal to
EQ equal to
GE greater than or equal to
GT greater than
NE not equal
IN text string inclusfon
MATCH text string matching
When using the IF testp astatus of TRUE or FALSE is created based on
the outcome of the comparison of two arguments in the comnand line and
the selected mode of comparison.
The followíng are examples of comparisons which might be stated in IF
commands:
IBUE EALSE
5 GT 3 3 GT 5
666 EQ 666 666 EQ 999
999 LT 1000 1000 LT 999
'El' IN 'ABC' 'A' IN 'XYZ'
'ABC*' MATQ1 'ABCDEF' 'A' MATQI 'B'
Now all of the pieces are in place for the full command sentence.
FORNAT:
IF argl mode arg2 ccmnand
All of the illustrated components are required for acorrect IF
command "sentence". The coímand IF specifies the correct action to
the command processor; "argl" is avariable which will be compared to
"arg2" according to the mode; "argl" and "arg2" must be present
because you cannot compare one thing; and the comparison mode operator
must establish what test is to be applied; comnand will be executed
if the test is TRUE.
EXAMPLES:
IF numberl GT number2 DISPLAY "Hoorayl" TO screen.5
In this example if numberl is greater than numberb then the
DISPLAY comand wi71 be executedD placing "Hoorayt" in window
5of pagename "screen" in the configuration. If numberl is
smaller than numberb then there will be no DISPLAY.
IF (balance +purchase) LE credit_lim1t GOSUB sale
In this case, if the result of the expression is less than the
credit_l1miC then the configuration is sent to asubroutine
called "sale". If (balance +purchase) exceeds credit_1imitp
the GOSUB will not be executed.
————————————"_"—""—"____"_ ""__====.======X
—————— —————————————-————————————————
Copyright (C) 1984 Data Access Corporation 05/16/84

D-26 CONDITIONAL EXECUTION DataFlex 2.0 User's Manual
=====————————— ————~——————————
IF payment LT balance BEGIN
commands
END
Herep the IF statement is being used to control the execution
of agroup of commands enclosed by BEGIN and END.
Most of the comparison mode operators are self-explanatory. However.
"IN" and "MATM" warrant further explanation. IN scans one string for
the presence of another string; for example "A" is IN "DAC". When one
string is present IN another, the test is TRUE.
MATCJ4 tests for one string equa1ling another. If the strings are
equal the IF test is TRUE. A special case exists for MATM where only
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
asterisk convention used by most operating systems where "AB*" means
to compare only the first two characters for anything that starts with
"AB" regardless of the rest of the string. If the first two
characters are "AB" the test is comMdered TRUE.
USING NOT
The "sense" of any IF test can be reversed by placing the word "NOT"
in front of the first argument of the IF comnand:
FORMAT:
IF NOT argl mode arg2 command
Point of interest...
When the DataFlex comand processor encounters an IF command it
internally expands the statement as a macro using the pre-defined
indicator "LASTIF"o A model/macro example is:
MODEL:
IF xx GT yy command
MACRO:
INDICATE LASTIF AS xx GT yy
[LASTIF] COMMAND
Copyright (c) 1984 Data Access Corporation 05/16/84

D-28 CONDITIONAL EXEájTION DataFlex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manua7 CONDITIONAL EXECUTION D-27
—— -—- ———
.
STATUS File Indicator
Two forms of the STATUS indicator are available to indicate whether a
record from aspecified file is active in the buffer.
FORMATS:
INDICATE ind_arg STATUS f1'lename_arg
The indicator IND_ARG is returned TRUE when the file is active
(record is foundL and FALSE if the record is not found.
IF STATUS f11ename_arg comand
The comaná on the line is executed if the file is active
(record is found), and not executed if the record is not
found.
The STATUS indicator is used in a manner similar to the FOUND
predefined indicator, but is useful in situations 'inolving successive
FINDs in anumber of fi1em because unlike the FOUND indicator, which
is set according to the last FIND attanpted, the STATUS indicator
returns aresult which is specific to the file which is named in the
command.
~~
Copyright (C) 1984 Data Access Corporation 05/16/84

------------- D-29
—~———————~ ==""="=="=
==Z:::: CONTROLLING EXECUTION SEQUENCE ==: :=:==:=
"~ "_
_ _ _ _ _ _ _ _ ~ _ _ _ _ _ ___ _ ___ ___=———————————————~——~——
————————
The Control comnand group provides structured flow of control within a
configuratiom error message handling, adebugging mode, and termina-
tion procedures.
Many of the control comand group's actions alter DataFlex's default
(top to bottom) sequence of configuration's comand lines execution.
Norma11y» comtands are executed in the order in which they are
written. Control cormands are used to provide other sequencé»~ in
whicM for examp1e9 often-used processes may be written once and
"called" for execution from any of several other points in aconfigu-
ration. The usual term for these called processes is "subroutines".
Control commands can also provide conditional skipping of comands and
groups of comnands in aconfíguratfon. The "target" for these
coimands that tells DataFlex Where to go and continue execution is
called a"LABEL", and is defined as any continuous string of
characters at the beginning of aline followed 'lmediately by acolon
(:). Labels must begin with a1ettem which may be followed by up to
79 numbers and letters (no spaces or punctuation). These are examples
of labels (they must be the first characters on their lines):
EXAMPLE:
LABEL: command
EXAMPLELABEL:
command
P0 0
command
Alabel may optionally be followed by acomand on the same line (as
in the first example aboveh or the following comands may be placed
on following lfnes for readability (as in the second example).
GOTO Command
GOTO transfers the execution of aconf'lgurat'lon to alabeled jocatlon
in the configuration other than the next comand line, Execution of
comand(s) following the "target" label will continue until the
configuration ends, or another control command again transfers
execution to another 1abe11ed 7ocat1on. As with all corwnandsp the
GOTO may be preceded by indicators
FORMAT:
GOTO 1abel_arg
EXAMPLES:
GOTO update
GOTO de1_rec
"""_———
Copyright (c) 1984 Data Access Corporation 05/16/84

D-30 CONTROLLING EXECUTION SEQUENCE DataF1ex 2.0 User's Manua7
———
ON GOTO Command
The ON GOTO cormand transfers execution to alabel that is part of a
list of labels. The 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
the argument. NOTE: In the event the expression evaluates to less
than lor greater than the number of labels in the 1iStp the comnand
will be ignored and the following command will execute. If this is an
error condition in your application (should never happenL your confi-
guration should declare an error (see ERROR command) on the next line.
FORMAT:
ON integer_arg GOTO 1abe1_l labe1_2 1abel_n
EXAMPLES:
ON (ftems-l44) GOTO apples, orangesg peaches. bananas
If ITEMS-144 equals Ib go to the label APPLES and execute from
that point. If ITEMS-144 equals 29 go tO ORANGES and execute
from there. If the expression equals 3, go to PEACHES» for 4,
to BANANASg and otherwise go to the next line.
ON screen.3 GOTO exit saveit de1eteit
ERROR 198
Go to labels EXIT, SAVEIT» DELETEIT according to the value in
the window SCREEN.3. If SCREEN.3 has avalue other than Ip 2»
or 39 declare Error #19& where Error #198 has been defined
for the circumstance in FLEXERRS.DAT
=""""""_"_
GOSUB Command
GOSUB transfers command execution to a1abe11ed procedure elsewhere in
the configuration with provision that when aRETURN comand is
encountered in the label1ed procedure, execution will return to the
command on the line imed1ate1y following the line on which the GOSUB
appears. The RETURN comnand, 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, aGOSUB whídí itself calls aGOSUB,
and so on).
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 Manual CONTROLLING EXECUTION SEQUENCE D-31
===========.——— —~~————~
———— ——————————
=~_ ~=" "
ON GOSUB Command
The ON GOSUB comand transfers execution to a1abe11ed procedure whose
label is one of a1ist of labels given in the comnand, with provision
that when aRETURN command is encountered in the 1abe1led procedure9
execution will return to the comand on the line 1rm'ied'late1y following
the line on which the GOSUB appears. The RETURN cotrmañd» of course9
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
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 the argument. NOTE: In the event
the expression has avalue during running less than Ior greater than
the number of labels in the listo the corrmand will be ignored and the
following cormnand will execute. If this is an error condition in your
app1icatlcm (should never happen), your configuration should declare
an error (see ERROR comand) on the next line. DataF1ex supports
nesting of up to 20 GOSUB procedures at one time (that 1»»p aGOSUB
which itself calls aG0SU& and so on).
FORMAT:
ON fnteger_arg GOSUB label _1 1abel_2 1abel_n
RETURN Command
The RETURN comand is used at the end of alabeled procedure called by
aGOSUB command to cause the execution to transfer back to the origin
of the control transfer. If RETURN has no argumentg then execution
will transfer back to the comand line following the GOSUB command
line which originally called the procedure.
RETURN can have an argument. Valid arguments for the RETURN comand
are other labeled comands in the configuration. This allows the
chaining of labeled procedures within aconfiguratiom or conditional
branching to labeled procedures at locations other than the line
following the calling GOSUB.
FORMAT:
RETURN // return to line after GOSUB
RETURN label _arg // return to alabeled connand
EXAMPLE:
[rainy] RETURN d1fferent_p1ace
RETURN
Copyright (C) 1984 Data Access Corporation 05/16/84

D-32 CONTROLLING EXECUTION SEQUENCE DataFlex 2.0 User's Manual
eAIN Command
CHAIN terminates the execution of one configuration and begins the
execution of the configuration named in the command argumentp as if an
operating system command were being executed. All data files (random
and sequential) used in the configuration containing the MAIN command
are closed. All integer variables used by the terminating configura-
tion remain avai1ab1eg with their va1uesp for use by the succeeding
configuration, after they have been redeclared in the succeeding one.
The argument of the CHAIN command may be either aliteral string
enclosed entirely within apair of quotation marks, or astring varia-
ble. The literal contents of the argument may contain as many
characters as your operating system will allow in acommand (typically
up to 128 charactersg counting spaces). The literal string and the
contents of the variable will be interpreted in the same manner: the
characters preceding the first space will be considered the rootname
of aDataFlex configuratiom and DataFlex will append the .Fl-X
extension and execute it. The characters following the first space
and preceding the second will be retrieved by the first CMDLINE
command in the configuration (see explanation of CMDLINE in this
section). If there are characters following the second space, the
second CMDLINE command (if any) will retrieve those characters up to
the third space9 and so on.
FORMATS:
CHAIN "config_name {string ... string}"
CHAIN string_var
EXAMPLES:
CHAIN "inventory" //Execute configuration INVENTORY.FLX
CHAIN next_config //Execute first substring in variable
//NEXT_CONFIG and pass following substrings
OAIN "accts_rec LST: cust_name" //Execute configuration
//ACCTS REC.FLX and pass
//substrlngs LST: CUST__NAME
——————
MOLINE Command
When executing aDataFlex configuration, command arguments entered at
the operating system level as part of the initial command entry line
can be stored to string variables for later repetitive use, with the
CMDLINE command. This permits certain run-time choices to be made by
the operator (or the menu system) and entered without separate
prompting from within the configuration.
EXAMPLE:
FLEX MYREPORT CON:
Executes the FLEX.COM file and runs the configuration called
"MYREPORT". The "CON: "is not executed until alater point in
the execution of the configuration when aCMDLINE command
retrieves that argument and stores It to astring variable
which is subsequently read by the configuration (and used, in
this casep to direct the report's output to the screen).
Copyright (C) 1984 Data Access 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 command, whichever was executed more recently. Arguments are
separated from each other by spaces (per the example aboveb and, once
retrieved by aqDLINEp are no icmger available from the same SOWCéo
having been replaced by the next succeeding argument, if any.
FORMAT:
CMDLINE strfng_arg
EXAMPLE:
CMDLINE output_dev1ce
" "~" " =========== ==== ===
DEBUG Command
DEBUG is amode command which toggles on and off from its default
condition of "OFF". When on, it will cause the line number in the
compiled .FLX configuration ftle being executed to display on the
screen as it is being executed whenever the configuration is run.
Constants and variables will also be displayed as they are declared if
the DEBUG command is the first command in the configuration. The
intermediate FCODE output of the DataFlex Macro Processor is also
displayed with the line number when aconfiguration containing aDEBUG
command is compiled. Natura11y? this command would not normally be
left in afinished configuration ready for running by operators.
=====——~~——— ~==== ===
ERROR Command
Error reporting is done using the ERROR command. The trapping of the
error must be done prior to the ERROR command executiom System
errors are trapped by DataFlex. The system errors (those under lOó)
are listed in the appendix under "RUN TIME ERRORS'4 and may also be
read directly from the DataFlex database file FLEXERRS.DAT, Errors
which occur during execution must be trapped by the configuration.
The argument of the ERROR command is the number of the error which is
to be declared, specified either 1iteral1y in the command or by the
use of a(n INTEGER) variable. The errors are defined in the DataFlex
FLEXERRS.DAT file supplied with the system. Custom error messages may
be added to the file by use of the DataFlex configuration FLEXERRS.
using error numbers greater than lOó. The added error message(s) wil7
then be displayed on the screen on the last line if the ERROR command
is ever executed with the number of the message (on an error
=========———~——~ —== ======= = —~~——————~——============
""" ~~~—~~~—~=~——————~~—~~~=="====
Copyright (C) 1984 Data Access Corporation 05/16/84

D-34 CONTROLLING EXE(1JTION SEQUENCE DataFlex 2.0 User's Manual
——-—————
—————————————————————————————
—————
condition). Such error message(s) will then be "standard" to all
DataF1ex configurations run with the FLEXERRS.DAT file.
FORMAT:
ERROR A'
EXAMPLE:
ERROR 4
would display the message "SEEK TO UNWRITTEN EXTENT (CP/M
ERROR)."
CLEARWARNING Comnand
Warnings and messages printed on the last line of the CRT using the
ERROR comand can be removed with CLEARWARNING. It prints spaces to
the line and deletes whatever was displayed there. CLEARWARNING is
automattca11y executed after an ACCEPT comand. It has no argument.
FORMAT:
CLEARWARNING
ABORT Command
ABORT returns control to the DataF1ex Menu. Any open data files are
closed when ABORT is executed. However no "cosmetic" cleanup is done,
so at least aCLEARSCREEN would be in order in most cases when this
command is executed from ascreen-oriented configuration. ABORT has
no argument.
FORMAT:
ABORT
Copyright (c) 1984 Data Access Corporation 05/16/84

=======FZZZZZZZ¶EZZZ: :""::::7:::::[:"I7I::::::Z::" 0"35
===== BLOCKS AND LOOPS ::::=Z====
—————————— —————
== ==== =,
The DataFlex Structured Control connands provide a means of executing
parts of aconfiguration conditionally and/or in loops. The parts of
aconfiguration under control of Structured Control commands are
called "blocks", and they are made up of asequential series of
commands which are placed between the "beginning" command (e.g.p
BEGIN, REPEAT? WHILE, FOR), and the "ending" command (END, UNTIL,
LOOP). Indicators and parameters of the comnands control whethem and
how many times3 the blocks are executed.
BEGIN -END Cand
The simplest of the structured control commands is BEGIN -END. The
BEGIN defines the start of agroup of commands that are executed until
an END comíand is encountered. Indicators and "IF'S" can be used to
test both BEGIN and END commands. The BEGIN and END comands do not
support arguments. After execution of the line containing the END
command, execution goes to the next line of the configuration.
FORMAT:
BEGIN
COINAND GROUP
END
EXAMPLE:
[found] BEGIN
DISPLAY 1ist.name TO screen.]
DISPLAY 1ist.address TO screen.2
DISPLAY list.city_state TO screen.3
END
If [FOIJND] is TRUE, the DISPLAY commands will all be executed.
If it is FALSE, they will be skipped.
———————
REPEAT -UNTIL Command
The REPEAT -UNTIL construct executes agroup of commands in aloop
UNTIL aspecified condition is met or created, inclusive. If the
condition is already met at the time execution first encounters the
1OOPg the loop will still be executed at least once.
FORMAT:
REPEAT
commands
UNTIL arg mode arg
————-———
————
Copyright (c) 1984 Data Access Corporation 05/16/84

D-36 BLOCKS AND LOOPS DataF1ex 2.0 User's Manual
—
——
EXAMPLE:
REPEAT
MOVE (count+1) TO count
SHOW count
UNTIL count EQ 5
The loop would REPEAT until COUNT equa11ed 5(inclusive).
REPEAT -LOOP Command
The REPEAT -LOOP construct is aloop which requires that execution
continue until aconditional statement (indicator or IF command)
within the cormand group or on the LOOP comand line terminates the
processing and causes an exit.
FORMAT:
REPEAT
connands
conditional or indicator-contro11ed exit connand
comnands
LOOP
EXAMPLES:
REPEAT
SHOW "*"
INPUT "Enter data: "some_data
[KEY.ESCAPE] ABORT
[KEY.RETURNJ LOOP
Loop only if RETURN key is pressed. Abort if ESCAPE
key is pressed.
REPEAT
CALCULATE (count +l) TO count
IF count GE lOó GOTO aroutine
LOOP
========= ========—
Copyright (C) 1984 Data Access Corpciration 05/16/84

DataFlex 2.0 User's Manual BLOCKS AND LOOPS D-37
———————————
WHILE -END Command
The WHILE comand establishes atest like an IF command which is
executed until the test becomes FALSE. The END establishes the end of
the comnand group, after execution of which the process checks the
WHILE condition, and if it is TRUE, loops back to the beginning of the
group, and if it Ís'FALSE. continues on with execution of comands
following the END statement. If upon first execution, the "IF"
condition is FALSE, the comnand group will be skipped (not executed at
all).
FORMAT:
WHILE arg_l mode arg-2
comiands
END
Where arg_l is avariab1eg mode is an IF comparison mode (see
discussion of IF commandL and arg_2 is astring, date or
numeric value. or avariable whose value is reset within the
loop.
EXAMPLE:
WHILE in_stock GT O
INPUT sale
CALC (in stock -sale) TO ín_stock
END
FOR -FROM -TO -LOOP Command
This is aloop construct that has aspecified range for its operation.
It is based on execution for acertain number of repetitions defined
by starting (FROM) and ending (TO) integer limits. If execution first
encounters the loop while the value of the integer is outside the
limits in the comand. the command group will still execute once
before exiting.
FORMAT:
FOR 1nteger_var FROM argl TO arg2
comnands
LOOP
Where integer_var is any previously-declared integer variab1ep
and arg_l and arg_2 is are numeric constants, expressionsp or
variables.
EXAMPLES:
FOR timer FROM I to 500
MOVE timer TO an_integer
LOOP
Copyright (C) 1984 Data Access Corporation 05/16/84

D-38 BLOCKS AND LOOPS DataFlex 2.0 User's Manual
+
All BÉGÍÑ7 LOOP, and END comands in the Structured Control command
group can be used with indicators or IF commands for multi-level
conditional execution. Structured Control comands should not be used
in the ENTRY sections of the ENTER and ENTERGROUP macrcm because the
BACKFIELD key is capable of defeating the initial comand which
controls entry to the loop.
Copyright (C) 1984 Data Access Corporation ,05/16/84

===="============------------- -= ___==== 0"39
———————
"
—_
-======2== DIRECT CONTROL OF THE CONSOLE =Z====Z===
——
The Console Input/Output (1/0) command group provides afacility for
directly addressing the CRT device (terminal screen) and to perform a
range of CRT operations which are sometimes useful in the development
of more advanceA applications. Before any of the console I/O group of
commands is uséd» it should be considered whether it might be easier
or more direct to utilize DataFlex's powerful screen imaging facility
which is available at the beginning of any and every configuration.
The console I/O command group is generally less efficient than screen
images for moderate to elaborate displays, and is intended for use
only in exceptional situations.
The actions of the Console I/O command group are totally independent
of the particular codes and routines which activate screen functions
on any particular computer or terminal. DataFlex acquires and
maintains system-specific data about your CRT when the SETSCREEn
utility is run. The data from SETSCREEn is stored in the file
FILELIST.CFG. Data about your system is read from FTLELIST.CFG each
time DataFlex is initialized to provide the necessary system-specific
data for the execution of the comiands.
SHOW Command
The SHOW command provides the facility to output data to the CRT
device. It will not output to the printer even if output is directed
to the printer (see WRITE and WRITELN commands). The data output to
the CRT"may be of any type (constant, variab1e» numeric, strin>
expression, etc.). The SHOW command acts on an argument which defines
the data that is to be "shown" on the CRT. Literal arguments must be
embedded in single or double quotation marks, and produce adisplay of
the argument itself. Arguments without quotes are variables, and
produce adisplay of the contents of the variable. Multiple arguments
can be used. No carriage return is output at the end of execution of
aSHOW command. Two consecutive SHOW command lines will output data
to the same 1ineg one after the other, left to right, on the screen.
Literal strings to be SHOWn cannot be longer than 80 characters.
FORMAT:
SHOW argument {argument ... argument}
EXAMPLES:
SHOW name ". "address "p " cIty'
Display the va?ue of the string variable NAME, fo77owed by a
coma and a@ácEjb then the value of the variable ADDRESSp
followed by acoma and a spácév followed by the value of the
variable CITY on the screen at the cursor position.
(continued next page...)
=_===
———————
Copyright (C) 1984 Data Access Corporation 05/16/84

D-40 DIRECT CONTROL OF THE CONSOLE DataFlex 2.0 User's Manual
———
EXAMPLES (continued from preceding page)
SHOW "Hei1o9 "pers_name
Display Hello, followed by the contents of the variable
PERS_NFME on the screen at the cursor position.
SHOW "Input today's date (MM/DD/YY): "
Display Input today's date (MM/DD/YY): on the screen at the
cursor position.
SHOW (12.70+TOTAL)
Display the results of adding 12.70 to the value of the
variable named TOTAL on the screen at the cursor position.
SHOWLN Command
This command is the same as SHOW, except that SHOWLN outputs a
carriage return after displaying all of the arguments that it outputs
to the teminab giving the cursor a new line on which to disp1ayg
including succeeding SHOWLN connands. It is useful, among other
thingsg for displaying vertical columns of output on the screen, which
is usually done in aloop.
FORMAT:
SHOWLN argument {argument ... argument}
EXAMPLE:
WHILE area_code LT 500
SHOWLN "Area Code "area_code "processing completed"
LOOP
would display successive lines on the screen reading "Area
Code <number> processing completed" until the value of
AREA_CODE equa11ed or exceeded 500» where <number> represents
the value of the individual area code.
—————————
INPUT Cmmand
The INPUT comand accepts keyboard input and assigns the data received
to avariable, named in the comnand argument. Data can be INPUT only
from the keyboard. and by no other means. Once the INPUT data is in
the variable, it can be acted upon or processed under the variable
name within the configuration. INPUT functions with all valid
variable types, and if the input data does not match the type of the
variable named in the argument, an error wÍT1 be declared (e.g., if an
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 it to be loaded, although the RETURN key is the usual key
to use for the purpose.
FORMAT:
INPUT 'optional prompting string' var_arg
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DIRECT CONTROL OF THE CONSOLE D-41
—
================——===_———————~———~— ————— """
EXAMPLES: -
INPUT "Enter the date (MM/DD/YY): " todays_date
Display Enter the date (MM/DD/YY): at the current cursor
posltiom pause execution, and store subsequently-keyed
response under the variable TODAYS DATE
INPUT quantity
Halt execution and store keyboard input under the
variable QUANTITY.
GOTOXY Command
GOTOXY sends the CRT cursor to aposition on the screen specified in
the arguments to the connanch providing control of the location of the
actions of other console I/O commands on the CRT device. GOTOXY
provides no other function except positioning; other commands must be
used to do something after the cursor has been moved to the desired
location.
FORMAT:
GOTOXY argl arg2
Where argl is the LINE and arg2 is the COLUMN where the cursor
is to be placed on the CRT.
EXAMPLES:
GOTOXY O O
Position the cursor at the extreme upper left (HOME) of the
screen (line Op column O).
GOTOXY 12 40
Position the cursor on line l2ó column 40 (exact center of a
24-1irm BO-column screen).
The valid range for values of the line and column arguments is
determined by the system configuration as defined in SETSCREEN.
——————
CLEARXY Command
The CLEARXY command clears from the coordinate screen position
specified in the command argument to the end of the screen. After
execution, the cursor is positioned at the argument coordinates. This
command must not be used within anamed PÁGÉ? as it will cause an exit
from whatever PAGE it is invoked in.
FORMAT:
CLEARXY argí arg2
Clear the screen from Line argl. column arg2.
———————
~+
Copy'right (c) 1984 Data Access Corporation 05/16/84'

D-42 DIRECT CONTROL OF THE CONSOLE DataFlex 2.0 User's Manual
———— ——— ————-————
EXAMPLES:
CLEARXY O O
Clear the entire screen (see CLEARSCREEN below).
CLEARXY 13 O
Clear from the beginning of line 13 to the bottom of the
screen (bottom half of a24-1ine screen).
CLEARSCREEN Commánd
CLEARSCREEN clears all printable characters from the screen and sends
the cursor to the "HOA" position. No argument is used with this
command.
FORMAT:
CLEARSCREEN
KEYMECK Command
When aKEYCHECX connand is execute6 apredefined indicatorg KEYPRESS9
is set TRUE if akey was pressed at any time since input was last
accepted to awindow or an ACCEPT stat«nent. (The character generated
by whatever key was pressed is discarded.) KEYCHECX is useful
primarily for interrupting long processing cycles and reports. In
such uses, it is recormended to display aprompt to the screen such as
"PRESS ANY KEY TO INTERRUPT". KEYCHECX may be followed on the same
line with another comnand which is executed if KEYPRESS is TRUE (a key
has been pressed), and skipped if KEYPRESS is FALSE (no key has been
pressed). The KEYPRESS indicator may be used at any time after
execution of aKEYCHECX comnand (to set its stateL so that
intervening comnands may be executed unconditionally before the
command whose execution depends on the state of KEYPRESS. KEYCHECX
does not distinguish among keys; it responds the same to any key
which generates acharacter (it does not respond to CTRLg SHIFT) or
BREAK).
FORMAT:
KEYQIECK {optional following command}
EXAMPLES:
KEYQÍECK //Set KEYPRESS to TRUE or FALSE.
commands //tO execute unconditionally
[KEYPRESS] comand //executes depending on KEYPRESS
KEYQIECK GOSUi3 shutdown
If akey has been pressed, execute subroutine SHUTDOWN.
NOTE: KEYCHECK comands should not be used under the REPORT macro.
If it is desired to control branching by keypresses in the REPORT
Copyright (c) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual DIRECT CONTROL OF THE CONSOLE D-43
="=======——_——————————— ————~——————~——
macro, the appropriate subroutine under the name RPT.KEYPRESS should
be defined in the configuration, ending with the special form of
RETURN connand for the REPORT macro, RETURN RPT.LOOP.
~
INKEY Ccmnand
INKEY inputs one character from the keyboard into an argument. It
does not display the character on the screen. It does halt execution
of the configuration until akey is pressed, aríd is very useful for
this purpose. The cotmand requires an argument; it cannot be used
without one.
FORMAT:
INKEY argument
EXAMPLES: .
INKEY a_key
Store the first key input to the keyboard under the
variable A_KEY.
SCREENMODE Command
The SCREENMODE command sets the high- and low-intensity screen
attributes as established in the DataFlex SETSCREEn utility. The
attribute will remain until another SCREENMODE comnand is executed, or
aPAGE is displayed, at which time the attribute will be set to low
intensity. SCREENMODE does not affect display of aPAGE. There are
no arguments for this connand other than the two shown below:
FORMAT:
SCREENMODE Isets high intensity
SCREENMODE 2 sets low intensity
——————-——————
Copyright (C) 1984 Data Access Corporation 05/16/84

D-44 DIRECT CONTROL OF THE CONSOLE DataFlex 2.0 User's Manual
=========
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (C) 1984 Data Access Corporation 05/16/84

=============_"________"______"__""______""_ __ D-45
——
==="==="==
::::-: MANIPULATING RECORDS ::::::::::
=~
""""""""""""""""========—===="""""""" """""
The DataFlex Database comnands provide the facility to finch save and
delete records in the database, and to establish "relationships"
between and among records.
The power of these individual DataFlex commands far exceeds that
ava11ab1e in conventional high level 1angUages> making "Flex"
configurations sma1]erg more consistent and easier to maintain than
alternative application development techniques.
Database Commands and FILEDEF
The DataFiex Database connands are integrally linked to data
dictionary information established with the DataFlex FILEDEF and
AUTODEF ut11ities. These utilities create adictionary of
specifications for adata structure and stores it on disk. The data
dictionary contains data on each file's number of fields, field length
and type9 decimal formatting on numeric fie1dm name including drive
reference, multi-user statum key index structure, etc. All other
DataFlex operations can then "look up" the file specifications in the
data dictionary whenever needed. This precludes the necessity for
each program to maintain file-specific data and substant1a?1y reduces .
application development time.
Understanding Record Buffers
The data in your DataFlex files resides on the disk drives. One
ACTIVE record from each file can reside in RAM memory. The place in
memory where this record resides is ca?1ed the RECORD BUFFER. When a
record is read from the disk to the record buffer, data can be
extracted from and/or changed in the buffer. The record can then be
written back to disk (SAVED). The buffer is where DataFlex does its
work on a given record.
An ACTIVE record buffer contains arecord that has been previously
read from the database. That is, the record exists both on disk and
in main memory in exactly the same form. If changes have been made to
an active record bUfferB that record is considered EDITED. An edited
record MUST be saved back to the database in order to retain the
changes which have been made. An edited record is still active.
An INACTIVE record buffer contains either no data or data that does
not (as yet) exist in the database (specifica]1y» newly entered data
which has not been SAVEd to disk). ACLEAR record buffer is an
inactive record that has had no data PUT into it at all. In aCLEAR
buffer all numeric and date fields are zerop and all ASCII fields
contain spaces. When an inactive but not clear record buffer is
SAVEIL a new record will be created.
—————————————————————————————
Copyright (c) 1984 Data Access Corporation OÉJl6/84

D-46 MANIPULATING RECORDS DataFlex 2.0 User's Manual
————————
FILE MANIPULATION
When using the highest level of the DataF1ex cocrmandm like ENTER and
REPORT, all of the details of the record buffers, FINDing, SAVEing and
CLEARing are taken care of for you. The way in which these operations
are done is completely transparent to the operator and the config-
urator. But when you have arequirement that necessitates manipula-
ting the files manually, you must understand the basics of file
manipulation. When using the manual file comandsg records are NOT
automatically re1atech saved, and cleared. You must ensure that these
operations are done, and done in the proper sequence.
There are four basic manual operations to perform on a database:
I) FINDING: Read records for reference only.
2) EDITING: Read records, modify them, and write them back to
the database.
3) CREATING: Create new records.
4) DELETING: Delete existing records.
The procedure for FINDING arecord is:
a) CLEAR the record buffer.
b) Put the KEY data into the record buffer.
C) FIND the record by the KEY field.
d) 0ptiona11yg RELATE the found record.
After aFIND you may get data out of the record buffer. If the FIND
is unsuccessfuK the KEY data will be in the buffer and the record
buffer will be INACTIVE.
The procedure for EDITING an existing record is:
a) FIND the record (see above) to edit.
b) Put new data into the record buffer fields to edit the record.
c) SAVE the record.
ASAVE must be done after a"put" to an active record buffer to move
the data to disk. Continuing processing after editing an active
record without SAVEing it will cause Error 82v and the file will have
to be REINDEXed.
The procedure for CREATING areccmd is:
a) CLEAR the record buffer.
b) Put the data into the record buffer fields.
C) SAVE the record.
The procedure for DELETING arecord is:
a) FIND the record (see above) to delete.
b) DELETE the record.
Copyright (C) 1984 Data Access Corporation 05/16/84

O
DataF1ex 2.0 User's Manual MANIPULATING RECORDS D-47
—————
= =
OPEN Conunand
An OPEN command makes all database files associated with afile
"df_fi]ename" (data and Kay files) available for DataFlex operations.
(See the FILEDEF documentation for information on df_fi1ename).
Spec1f1caI1y» when afile is OPENedg the referenced data file, and all
associated key index files are opened, buffer space is autcmat1cal1y
allocated in memorµ and upon completion of the OPEN operatiom all
files are available for on-line processing.
The OPEN canmand(s) should be at the beginning of the configuration
and must be executed before the flies associated wIth the df_fi1ename
can be addressed by other commands.
FORMAT:
OPEN fi1e_name_arg {lndex.n}
Where OPEN is the command, "ff1e_name_arg" is the "SHORT
NAME" (created in FILEDEF) of the file to be 0PENed,p and n
represents the number of an index that may optimally be
loaded into amemory "buffer" to speed sequential access to
records in afi?e.
EXAMPLE:
OPEN lnvantory
OPEN personnel 1ndex.2
In the second example abovep the "index.2" option after the
df_fi1ename "personnel" elects to load the second index for that
database file fnto amemory buffer.
The optional Index buffering only provides aspeed improvment when
the access to records Is sequential, as in areport. Random
operations, such as transaction entry to non-sequent1a1 recordm wIll
not benefit from buffering.
The usefulness of the index buffering option is, as with most other
options, subject to tradeoffs. The number of the index is established
in the index definitions as previously created in the FILEDEF func-
tion. If the option is selected, record locations required by FIND
and other accessing operations are read directly from the computeMs
active m«nory (RAM) rather than via aseparate (slower) disk access
and file-read operation.
The tradeoff when using record buffering is the sacrifice of aportion
of tho computerG RAM that is consumed by this process. The overall
size of your configuration. number of files opened, RAM capacity of
your computerg and so om determines how (ñüch RAM is available over
and above what is required to carry out the applicationG basic
functions, and will dictata whether the index-buffering option is
worthwhile, or even possible.
+_
_~»————— ——————————————~——
Copyright (C) 1984 Data Access Corporation 05/16/84

D-48 MANIPULATING RECORDS DataF1ex 2.0 User's Manual
—
In amulti-user environment, the optional index buffering is allowed
and DataFlex will maintain indexes proper1y9 even in those cases where
buffered indexes are updated.
When DataFlex configuration source files are being compilech aspecial
file needed by the compiler macro processor must be resident on the
logged device on which the compiler is located. The needed file is
referenced as OF FILENAME.FD. "OF FILENAME" is established in the
—
FILEDEF utility when the file is defined. Its name is maintained
separately so that the ".FO" file can be addressed wIthout assuming
the drive specification attached to the data file.
—————————
FIND Command
The FIND command is used to get adesired specific record from adata
base on disk and place it into the record buffer. FIND uses data
placed in the record buffer (normally by prompted keyboard input) to
search akey indexg "find" amatch and get the record. For examp1e9
in afile maintenance situation, the operator could be prompted for a
record ID or "key" of some kiñdv an account number, part code9 etc.
Data entered in response to the prompt is placed into the buffer and a
search for amatch (or other relationship--see MODES below) is
performed by the FIND command.
The FIND command must reference an existing index or record number.
All segments in the index will be used to locate the record with the
FIND operation, including record numbem if included in the index.
FIND must be given aparameter by which to execute. Do we want to
search for arecord with an exact match to the "key% or do we want
the record with a"key" greater than the value entered to the buffer?
This parameter is called the MODE of the FIND. Five MODEs are
available:
LT Less Than
LE Less than or Equal to
EQ Equal
GE Greater than or Equal to
GT Greater Than
Finally, we must define what index is to be used for the FIND
operation. This is specified by the number of the index to be usecb
as defined in the database (see File Definition) as INDEX.m where n
is the index number.
FORMAT:
FIND mode filename BY INDEX.n
Where nis anumber between land 5 (for B-bit computers) or
between Iand ID (for 16-blt computers). INDEX.BATM and
RECNUM may be used alternatively. The index must first have
been defined in the database definition.
~"" _~
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual MANIPULATING RECORDS D-49
EXAMPLES:
FIND EQ lnvt BY INDEX.2
Find arecord in the INVT file by INDEX number 2 with akey
equal to the data in the buffer.
FIND GE member BY INDEX.3
Find arecord in the MEMBER file by INDEX number 3 where
the value is equal to or greater than the data in the buffer.
NOTE: The filename In the command must previously have been OPENed
with the OPEN command.
The FIND GE is probably the most used command/MODE combination. It
will retrieve arecord based on an exact match with data in the
bufferD or if no match is found, the next record following the value
of the buffer data.
The result of executing aFIND operation is shown by either of two
indicators: FINDERR and FOUND. FINDERR will be TRUE when the FIND
operation is not successful by the specified MODE. FOUND will be set
TRUE when arecord 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.
An alternate form of the FIND connand can be used where the index
number is not known.
FORMAT:
FIND mode fi1ename,f1e1dname
EXAMPLE:
FIND GT INVENTORY.DESCRIP
The fi1ename.fie1dname must, of coursep be indexed. If it is not» an
error will occur at runtime when the command is executed.
The FIND command works only when it occurs within adefinite sequence
of commands, specifically:
I. CLEAR the record buffer.
2. MOVE the finding data (data to be matched or related tO).
3. Execute the FIND.
4. Execute conditionally on successful or unsuccessful FIND.
The following commands represent an example of this sequence:
INPUT "Enter the name you wish to find: "find_name
CLEAR people
MOVE find_name TO people.lname
FIND EQ geop1e.lname
[FINDERR] GOTO no_match
-.——————
—
———·.. .
Copyright (c) 1984 Data Access Corporation 05/16/84

D-50 MANIPULATING RECORDS DataFlex 2.0 User's Manual
CONFIGURATION EXAMPLE:
I* // starts configuration
STRING pause l// declare variable PAUSE
OPEN ma'í1list // opens mail1ist file
START: CLEARSCREEN // clear the screen
CLEAR mai11ist // clear before FINDing
INPUT "Enter NAME to display: "mai1list,name
// get keyboard input
FIND GE mai11ist BY INDEX.Z // search for match
[FOUND] BEGIN // FOUND is set TRUE automatically by a
// successful FIND operation
// Commands from here to the next END are
// executed only if the FIND was successful
SHOWLN mai71ist.address
SHOWLN mai]1ist.cty st_zip
END // **** ERROR TRAP ****
// FINDERR is set TRUE automatically by an
// unsuccessful FIND operation
// The next comand is executed only if the
// FIND attempt was unsuccessful (no match).
IFINDERRI SHOWLN "No names matching: " mai11ist.name
INPUT "PRESS RETURN TO FIND ANOTHER. <ESC> TO QUIT" PAUSE
[KEY.ESCAPE] ABORT
GOTO START
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual MANIPULATING RECORDS D-51
_________ =
SAVE Command
The DataFlex SAVE connand takes data in arecord buffer and "saves" it
on disk. The comnand can have mu1itip1e arguments on the comand
line. If multiple files are OPEN and relationships exist, all files
related to the file being saved will be automatical1y ATTAMed (see
below) and saved.
FORMAT:
SAVE f1iename_argl {f11ename_arg2 ... f11ename_argn}
EXAMPLES:
SAVE inventory
SAVE client transaction system
NOTE: The fi1ename(s) in the command must previously have been OPENed
with the OPEN command.
The action of the SAVE comnand varies based on how data has been
placed in the buffer, and what has happened to it once it arrived
there.
An empty (or CLEAR ...see below) buffer that has data moved into it
from any source (window another fi1ek will simply move the data from
the buffer into anewly created record on disk.
If arecord is FOUND (past tense of FIND). and the data in it is then
modified (e.g.p by keyboard entry) then the buffer (containing the
altered data) will be SA\lEd back to the same record in which it was
originally stored.
NOTE: It is important to remember that the process of editing in
DataFlex occurs when data is moved to the record buffer. Thereforep
no changes-are made to the database on disk until aSAVE comnand is
executed after the modification of the data in the buffer. It is an
error to edit arecord and not SAVE it.
SAVERECORD Command
SAVERECORD saves a record from its buffer to the disk. No automatic
ATTAM fs executed and no related files are saved; only the file that
is the argument of the command is saved.
FORMAT:
SAVERECORD fi1ename_arg
NOTE: The f1lename(s) in the command must previously have been OPENed
with the OPEN command.
——
Copyright (c) 1984 Data Access Corporation 05/16/84

D-52 MANIPULATING RECORDS DataFlex 2.0 User's Manual
—————
CLEAR Command
The CLEAR command acts upon the record buffer of the filename
referenced in the comnand argument(s). Any data in the buffer is
flushed by the execution of aCLEAR.
FORMAT:
CLEAR f'l1ename_argl {f11ename_arg2 ... f11ename_argn}
EXAMPLES:
CLEAR myffle
CLEAR myfi1e yourfi1e ourfile
NOTE: The fi1ename(s) in the ccmnand must previously have been OPENed
with the OPEN ccmnand.
The CLEAR command should be used at any time that an initialized
record buffer is required. For examp7e9 if keyboard entry has been
used to create data in the buffer for aFINCh and no record is found
(FINDERR is TRUE)g then aCLEAR would purge any entries that had been
made to the buffer before making fresh entries in an attempt to
proceed and FIND other records. Iñ on the other hand, you w.ish to
de-active an active (FOUND) record and retain entered data in the
buffer, aMOVE OTO RECNUM command will accomplish that.
DELETE Cmmand
The DELETE command r«noves an existing record from the data base. A
record must be FOUND before it can be DELETEd. When the DELETE
ccimand is executecb a71 key indexes for the record being deleted are
updated on-line to remove key entries for the deleted record.
FORMAT:
DELETE f'i1ename_arg {ff1ename_arg2 ... fi1ename_argn}
EXAMPLES:
DELETE names notes reminders
NOTE: The f11ename(s) in the command must previously have been OPENed
wfth the OPEN command.
———————————
RELATE Command
The RELATE comnand works in conjunction with the FIND comand. After
arecord has been found with FINIL RELATE will find all related
records in the database. For examp1eg if atransaction record is
found and placed in the bufferg the execution of aRELATE comnand
could find arelated master record(s) in the database and place it
(them) in the buffer additlonally.
—
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual MANIPULATING RECORDS D-53
=======
FORMAT:
RELATE f'j1ename_arg
EXAMPL ES :
FIND GE 'lnvt_ trans.posting //executed fi rst
RELATE 1nvt_trans
NOTE: The ff1ename(s) In the command must previously have been OPENed
with the OPEN command.
AFIND must be executed before RELATE. The record buffer for the
fi1ename_ arg must be "active" for RELATE to function. Files to be
used as the argument(s) of the RELATE command must be OPENed prfor to
the command executi on. Related files that are not OPENed are ignored
by the RELATE command. In the case of a"chain" type relationship, an
attempt to RELATE afile that is not OPENed precludes access to other
files further up the chain.
The use of RELATE assumes that the proper relationships have been
established in FILEDEF between (among) the files.
ATTAQ1 Command
When file relationships have been established in FILEDEF, the ATTACH
comnand provides the means of placing the data on which the
relationship is based into a new database record. If it is desired
only to SAVE related recordm it is not necessary to ATTAN them.
since ATTAMment is done automatica)jy in execution of the SAVE
command. Thereforep ATTAQI should be used only where further
processing is required before the SAVE is done.
FORMAT:
m"uai f11ename_ arg
EXAMPLE:
ATTAQI transactions
NOTE: The ff1ename(s) in the command must previously have been OPENed
with the OPEN command.
Upon execution of the ATTACH commancb DataFlex moves the record number
or field data that is defined as the basis for the relationship into
the new record. All related files that are open when the convnand is
executed will have arelationship created.
The ATTACH command only moves data into the new database record. That
datá» and the entire new record, is not apermanent part of the
database until aSAVE command is executed to put the information on
disk. ATTMXI moves data from "higher" to "lower" data files only
within an application data structure. Brief1yg a"higher" file is one
with records (such as "employer") which are related to many other
records (such as "employee"L and a"lower" file is one which contains
——————
Copyright (C) 1984 Data Access Corporation 05/ 16/84

D-54 MANIPULATING RECORDS DataF1ex 2.0 User's Manual
———————
those many records which relate to the "higher" one. These terms are
more fully discussed in the section of this manual on Fi1e Definition
-Step One -Plan the Relationships Among the Data Files.
ZEROFILE Command
The ZEROFILE comiand is potentially very destructive of data, and
should be used only with great caution. Its effect is to permanently
erase all data from adatabase file. It may be useful to do this in
order to remove experimental or sample data from aset of database
files (without erasing the files themselves and having to redefine the
entire databaseR or to reinitialize adatabase for anew period.
FORMAT:
ZEROFILE filename
NOTE: The f11ename(s) in the cammand must previously have been OPENed
wIth the OPEN command.
Agaim improper use of this comand on valid. needed data can be
disastrous. Great caution is advised in using this command.
SYSTEM FILES
It is frequently desirable to have afile with only one record to hold
today's dateg your company's name and addresm the last-used invoice
number, cumulative tota1m and other-system-oriented information.
This type of file is referred to as aSYSTEM FILE.
Asystem ff1e is deflnech created and changed just like any other
DataFlex f'[1é» but system files can contain only one record.
To define asystem file, set the "MAXIMUM NUMBER OF RECORDS" in the
"SET SYSTEM PARAMETERS" of FILEDEF to one (I) when the file is set
up. DataFlex recognizes this parameterg and automatically reads the
single record from this special type of file into abuffer without a
FIND opration. Any data in the systm file is then available in the
buffer with.out adisk access.
System fijes should not have any indexes since there is only lrecord.
When used with the ENTER comand, systm files must be 0PENedg but the
system file should not be Included on the ENTER command line.
An example of asystem file can be found in the DEMO files as SYSFILE.
Invoice uses the date from SYSFILE.
It Is recomended that file one be used as the system file. A1SOg
that File I, Field I be assigned as the company name and that Fi7e 19
Field 2be the date. Append other system file fields to the end of
these as needed. There may be multiple system files.
Copyright (c) 1984 Data Access Corporation 05/16/84

========k==============-- -=====- D-55
===~~~~
"
=="====".== ."=======,"=
EÉE2ÉEÉE=Z MANIPULATING FILES =====
————————————
~
==============.====~~—==——————————————————————— —~"""—"""—
The System command group provides for the execution of operations that
would normally be done at the operating system command level. These
commands can be executed within aDataFlex conffguration file as
required. In that these cocrmands are very powerfuC and can make
major alterations to asystem they should be used with respect and
care. Supportive operator prompting and verification prior to the
execution of these comnands are recommended.
A sub-group of commands wihtin this group manipulates the operating
system directory. Filename arguments in the sub-group that are
literals must be enclosed in single or double quotation marks. Those
filenames that are referenced in data elements (string variables or
ASCII windows) do not require quotes.
=""""""""
ERASEFILE C=Iand
Deletes the file named in the command argument from the operating
system directory.
FORMAT:
ERASEFILE fi1ename_arg
EXAMPLES:
ERASEFILE "myfile.dat"
ERASEFILE file_to_kí1l
RENAME Command
Changes the name of afile in the operating system directory.
FORMAT:
RENAME fl1ename_argl TO fllename_arg2
EXAMPLES:
RENAME fi1e_to_rename TO "TEMP.DAT"
RENAME oldfi1e TO n0wf11e
Copyright (c) 1984 Data Access Corporation 05/16/84

D-56 MANIPULATING FILES DataFlex 2.0 User's Manual
== ____"""_
COPYFILE Comand
Transfers data from one file to anothem or transfers fi1e(s) from one
device to another. "Wild card" or ambiguous file name entries are
supported for the purposes of this command so that groups of files can
be manipulated.
FORMAT:
COPYFILE sourcef1le(s) TO destfi1es(s)
EXAMPLES:
COPYFILE "a:current.dat" TO "b:history.dat"
COPYFILE "a:*,f1x" TO "bT
COPYFILE screen.6 TO 'b: newstuf.txt'
==
DIRECTORY Convnand
Displays adirectory of the disk files specified in fi1espec_arg.
FORMAT:
DIRECTORY fi1espec_arg
EXAMPLES:
DIRECTORY "c: *.dat"
DIRECTORY screen_window.20
FILELIST Comnand
The FILELIST cormand displays information from the list of current
DataFlex data files. It can read the PATHNAME, DISPLAY NAME, DataF1ex
file name and file number from FILELIST.CFG. The file number is
stored in apre-defined integer variable called FILENUMBER. There are
three variations on the use of the comand.
FORMAT l:
FILELIST f11enum_arg TO str1ngl_arg {string2_arg]
Where fi1enum_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.
EXAMPLE l:
FILELIST 22 TO screen.6 screen.7
Puts the file's user display name for File 22 into Window 6on
page "screen", and its DataFlex filename into Window 7.
—"—————""""" "________—_+ ———===
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual MANIPULATING FILES D-57
— ——
The FILELIST NEXT comnand scans FILELIST.CFG and returns the next
ACTIVE file (the next larger number for an existing active file). The
file number is returned in FILENUMBER. The value of FILENUMBER is the
starting point for the execution of the command. To get acomplete
FILELIST, initialize FILENUMBER to zero (O).
FORMAT 2:
FILELIST NEXT TO strlngL-arg {string2_arg}
EXAMPLE 2:
MOVE OTO FILEN%ER
REPEAT
FILELIST NEXT TO 1ist.2 11st.3
UNTIL FILENUMBER EQ O
Would sequentially output the entire list of display names and
DataFlex file names for all active files to Window 2 and
Window 3 of Screen list.
The FILELIST PATHNAME comand outputs the pathname and (optionally)
DataFlex filename of the file currently pointed to by FILENUM.
FORMAT 3:
FILELIST PATHNAME TO stringl_arg {string2_arg)
EXAMPLE 3:
FILELIST PATHNAME TO screen.l5 screen.l6
———
SYSTEM Command
The SYSTEM command returns control of the computer to your operating
systw. All files opened in the configuration will be closed in the
process of the executing the command. No CRT screen "clean-up" is
performed by SYSTEM, so any cosmetic work must be done by other
commands. SYSTEM differs from the ABORT command in that ABORT will
return to the DataFlex Menu if it is on the disk drivep while SYSTEM
explicitly exits to the operating system.
FORMAT:
SYSTEM
CAUTION: If DataF1ex is being run under control of abatch or submit
operating system f11eg SYSTEM will cause the next entry in the batch
file to begin executing just as any other return to the operating
system would do. If the "RETURN TO OPERATING SYSTEM" prompt which
occurs upon use of the SYSTEM cormand is confusing to operators, an
explanatory prompt just before the SYSTEM command can help alleviate
such confusion.
———-—— ————
Copyright (c) 1984 Data Access Corporation 05/16/84

D-58 MANIPULATING FILES DataF1ex 2.0 User's Manual
—————
——————— ————
———————
RUNPROGRAM Comnand
The RUNPROGRAM comand runs an operating systan level program (.COM or
.CMD FILE). It can have two arguments. Argument One Is the program
name, Argument Two is the comand line to pass to the program. After
the program has execute6 control is returned to the operating system.
FORMAT:
RUNPROGRAM prog_name.com_arg prog_arg
EXAMPLES:
RUNPROGRAM "PIP" "B: =A:*.*"
RUNPROGRAM screen.2 screen.3
RUNPROGRAM "edit" prompt_input
REGISTRATION Command
The REGISTRATION command will retrieve the registered name and serial
number of aDataFlex license and place the data into variables that
can be used in aconfiguration.
FORMAT:
REGISTRATION str1ng_arg numer1c_arg
EXAMPLE:
REGISTRATION 1icensee_name seria1_number
Use of the REGISTRATION cormand to display the name of the application
author (company or individual) is effective in identifying the
software to the creator/ownem and is one of the main purposes for
which this comnand is provfded.
——————————
SYSDATE Comand
The SYSDATE comand retrieves date and time information from the
operating systam provided the date and time have been properly set in
the operating system. The SYSDATE comand stores the system date to
the first variable named after the coman6 the hour (in 24-hour
format) to the second (optional) argument9 and the minutes to the
third, if athird argument is specified in the cotmand. The date will
be returned in DATE formatg and the second two will be returned as
two-digit numbers. The name DATE should not be used, since that is a
—————————————————————————_______========
——————————————
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual MANIPULATING FILES D-59
==",========".=~————————~——— ——~———=~——~—
DataFlex reserved word.
FORMAT:
SYSDATE <date_arg> {hour_arg} {m1nute_arg}
Where <date_arg> is adate variable, and {hour_arg} and
{minute_arg} are optional 2-digit numeric variables.
The command returns the year in two digits (as in 12/24/44). If a
four-digit format is desired (12/24/I944R it can be obtained by
adding the amount 693975 to the returned value.
EXAMPLE:
SYSDATE sdate hour minute
MOVE (sdate+693975) TO sdate
All MS-DOS-based operating systems and operating systems which support
the MP/M (BÉX)S 105) DATE system call are supported. CP/M 2.2 and
CP/M-86 1.0 do not have time and date functions. Among operating
systems which are supported are: CP/M 3.0, Concurrent CP/M, MP/M-86
and MS-DOS, as well as TurboDOS, DPC/OS 3.0, MS-DOS, and NStar.
—————————
——
————
Copyright (C) 1984 Data Access Corporation 05/16/84

D-60 MANIPULATING FILES DataFiex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (C) 1984 Data Access Corporation 05/16/84

======————~~———~~——~— ————————————"
—0"61
======
EEEEEFFáEE DIRECT INPUT AND OUTPUT ===t======
——————————
—
"_———— ~—
========~——~————————————————~————
The Sequential I/O connand group provides a means of reading data
from, and writing data to, physical input/output devices (such as
printers) and disk files produced by, or for further processing byp
programs other than DataFlex (WordStarp CBASIC, etc.). These commands
do not use "image" formatting. Data sent to files and devices from
this command group must be formatted (where necessary) in the
configuration to satisfy the requirements (delimiters, etc.) of the
destination device or non-OataFlex program.
NOTE: The first four commands of this group use an underline
character (_) within the comand name. This character is Integral
with the comand name and cannot be emitted wfthout causing acompile-
time error.
————-
DIRECT_INPUT CQmnand
DIRECT_INPUT specifies adisk file name or device from which sequen-
tial input is to be received for processing by aDataFlex configu-
ration. The argument for the cocmand is the name of the file or
dévicéo or the name of avariable or wIndow which contains the desired
file name or device designator. If the argument is the literal name
of the file or device &sigñátwt it should be surrounded by quotation
marks. If the argument is astring variab1ep quotation marks should
not be used. Execution of the command automatically opens the
necessary buffers and makes the file or device fully ready for input
operations. If aspecified file or device cannot be found in the
system the end-of-file indicator is set TRUE. If there is need in
the application to declare an error in this casé» an error message can
be established which is triggered by the state of the end-of-file
Indicator.
FORMAT:
DIRECT_INPUT str1ng_arg
Where string_arg contains the source file name or device
designator.
EXAMPLES:
DIRECT_INPUT "wsmerge.txt"
Open afile named WSMERGE.TXT for input
DIRECT_INPUT "RDR: "
Open the port designated RDR: in the operating system for
input
DIRECT INPUT screen.l
Evaluate the contents of Window #1 on the screen and open the
file or device identified thereby
—
_
Copyright (C) 1984 Data Access Corporation 05/16/84

D-62 DIRECT INPUT AND OUTPUT DataFlex 2.0 User's Manual
———————
DIRECT_0UTPUT Command
DIRECT_0UTPUT identifies adisk file or physical device to which
sequential data is to be sent from aDataFiex configuration. The
argument for the comand is the name of the fije or device. Execution
of the comand automatically opens the necessary buffers and makes the
file or device fully ready for output operations. If the argument to
the command is the literal name of the file or device, it should be
embedded in quotes ("). If, on the other hand, the argument is the
name of avariable which contains the file name or device designation,
quotes should not be used. If afile or device 'Is specified in the
command which does not exist in the system anew disk file will be
created under the name specified in the command. CAUTION: If the
command names an existing fi1e9 that file will be erased by the
DIRECT_0UTPUT cormand, with no warning to the operator unless one is
explicitly written into the configuration.
FORMAT:
DIRECT_0UTPUT str1ng_arg
Opens the file or device specified by the contents of the
string variable named STRING_ARG.
EXAMPLES:
DIRECT_OUTPUT "myfi1e.txt"
Opens for output the file named MYFILE.TXT.
DIRECT_0UTPUT screen.4
Get name of device or file from Window 4 on Page SCREEN.
CL0SE_INPUT & CL0SE_OUTPUT Commands
These two comands simply close the file or device opened by the
DIRECT_INPUT AND DIRECT_0UTPUT comands respectively. They operate on
any device or file which may be opem and require no argument,
FORMAT:
CL0SE_INPUT
CLOSE_0UTPUT
———————————————
READ (»nmand
The READ comand reads sequential data from afile or device and
assigns data thus read to the variable name(s) given in the argument
of the READ command. READ recognizes the coma (p) as the delimiting
character between data elements» and ignores comas which are con-
tained wIthin double or single quotation marks. If there are single
quotes (') in embedded material double quotes (") should be used as
the embedding character. If there is need for double qUotesg single
quotes may be used for embedding. It is not recomended to attempt to
embed any single data element containing both types of characters.
Copyright (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DIRECT INPUT AND OUTPUT D-63
EXAMPLE:
Rfng,Mahoney and ArnerM1ambF1or1da
would be interpreted as four data elments, specifically:
l: Ring
2: Mahoney and Amer
3: Miami
4: Florida
while:
"Rfng» Mahoney and Arner%MiamiMorida
would be interpreted as three data elements. as follows:
l: Ring, Mahoney and Arner
2: Miami
3: Florida
The READ cotmand will read as many data elements as there are argu-
ments given in the connandD unless the CR/LF end-of-record character
is encountered in the source data before all arguments have been
assigned data elements.
FORMAT:
READ argumentl ... argumentN
EXAMPLES:
READ an_e1ement
Read one element from the current input line and store it
under variable name AN_ELEMENT.
READ name address cIty state zip
Read the first data element in the record and store it under
the variable name NAME, read the next element and assign it,to
ADDRESSp the next to CITY, and so on.
If the number of data elements in arecord exceeds the number of
arguments in aREAD command, execution will stop short of the end of
the recoi"d» after reading the last data element for which there is an
argument to assign it to. Thus, if the second comiand example shown
above were run against this data:
Data Access.129th Terr.,Mfami.FL»3315&(305)987-6543<CR>
only the first five elements (name, addresm cÍtyp statep zip) would
be read into DataFlex. The phone number would not be read (although a
succeeding READ command could, and would, read it). If the number of
READS for arecord exceeds the number of fields in the record, the
exceeding READS output null fields for the output record.
——————————— ——~
Copyright (C) 1984 Data Access Corporation 05/16/84

D-64 DIRECT INPUT AND OUTPUT DataFlex 2.0 User's Manual
======== ~~"" ================== ======
=""""
Thus, if the second comand example above were run against this data:
Data Access.129th Terr.gM1amfpFL<CR>
The resultant data in DataFlex would be:
NAME: Data Access
ADDRESS: 129th Terr.
CITY: Miami
STATE: FL
ZIP: (blank)
========"= ~~——========================= = =
READLN Command
The READLN command is similar to the READ cotmand (see above), except
that it reads all data from wherever the comand is invoked to the end
of the record (defined by acarriage 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.
Where aREADLN command is issued with one argument, all data from the
source file or device on a line is stored under asingle variable
having the command argument as its name. When multiple arguments are
uséd» data elements will be stored sequentially under the argument
names, provided that the source data is delimited by comas (as it
custcx'narily is in sequential files created under MBASIC*, CBASIC*,
WordStar* MailMerge*),
FORMAT:
READLN argumentl argument2 ... argumentN
EXAMPLE:
READLN fnput_string
Read aline of data and store ft under the varfable name
INPUT_STRING (regard1es5 of delimiters which may be within the
line).
READLN name address city state zip a/c phone
Read aline of data and store the first data e1went under
variable name NAMEg the second under ADDRESS9 the third under
CITY. and so on.
The multi-argument command READLN A B C would execute in exactly the
same fashion as the following group of READ coímands:
READ A
READ B
READLN C
Where the last command causes a READ from the third data
element to the next <CR>9 inclusive.
—=—— ======================================
~~~— ~
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual DIRECT INPUT AND OUTPUT D-65
"——
If the number of data elements on a source line happens to exceed the
number of arguments in aREADLN command, the "exceeding" data elements
will be stored under avariable together with the last element for
which there was an argument. The variable name for this last (group
of) data e1ement(s) will be the last argument in the READLN command.
In this sltuatiom the (comma) delimiters between each pair of
"exceeding" data elwents will also be stored in the resultant data
element.
Generai1y» multi-argument READLN commands will be used where afixed
number of data elements. constitutes one recorch as where:
Name.Address,Cfty.State,Z1p<CR/LF>
represents arecord. The READLN command which would read this data in
under the appropriate variable names would be:
READLN Name Address CIty State ZIp
It would be nocessary in this instance that any empty data eleent be
represented by adelimiting commm as in:
2nd Nat1ona7 Bank,gAnytown,Anystate,l2345
Where the address element is blank or non applicable.
SEQEOF and SEQEOL Predefined Indicators
DataFlex provides two predefined indicatorm SEQEOL (sequential end of
line) and SEQEOF (sequential end of fi1eL which can be used to
control operation of READing and other configurations. Both
¶ndicators are set FALSE upon execution of aREAD or READLN comandg
and are reset TRUL respective1yp upon the READing of an end-of-line
character (<carriage return>), and upon the READing of an end-of-file
character ("Z). NOTE: READLN will always read to, and including, the
next end-of-line character, but will not read an end-of-file character
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
the EOF. Similarly, READ wf11 not READ an EOL with the last field if
the EOL is immediately preceded by acoma; it will require an
additional READ (or READLN) to detect the EOL. These factors should
be kept in mind in the design of READing configurations, record
counters and the like, as should the exact format of your source data.
—-————-—..—
—============~~——~—————————"—— —"""—
Copyright (C) 1984 Data Access Corporation 05/16/84

D-66 DIRECT INPUT AND OUTPUT DataFlex 2.0 User's Manual
WRITE Command
The WRITE command sends data sequentially to the device or file name
given in apreceding DIRECT_OUTPUT command. Arguments to this comnand
identify the variable names under which the data is found for output.
Multiple arguments can be used with this cormand. No carriage returns
or delimiters are provided by use of this cormand, for which reason
they must be added to the data in the argument to the comand as
1itBra1s (see examples below). If it is desired to include quotation
marks (", also called double quotes) in the literal, most non-OataF1ex
programs permit the use of single quotes (') as the embedding char-
acter. This provision affords total flexibility in adding delimiting
characters to data being output.
FORMAT:
WRITE argument
Output one data elment stored in the variable ARGUMENT.
WRITE argl arg2 ... argN
Write the first data element from variable ARGb the second
from ARG2> and so on through ARGn.
EXAMPLES:
WRITE "datadata"
Output the literal string datadata
WRITE "Your balance is: "cust.ba1_due " as of "due_date
Output the literal Your balance is: followed by the value of
the variable cust.bal _due followed by the literal as of
followed by the value of the variable due_date.
It is important to note that all formatting spacing and punctuation
for the output information must be supplied by the WRITE Command.
EXAMPLES: Where FIRM.NAME =Dewey9 Cheatum and Howe
WRITE fim.name
would output Dewey, Cheatum and Howe
WRITE rm fim.name fn9
would output "Dewey9 Cheatum and Howe"
WRITE tnr flm.name t",¥
would output "Dewey9 Cheatum and Howe%
=====."===—"===-======——==MMM——=: -—— —~—————————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual DIRECT INPUT AND OUTPUT D-67
WRITELN Command
The WRITELN command sends data sequentially to the physical device or
file name specified in apreceding DIRECT_OUTPUT commanck just as in
the WRITE command. Just like the WRITE command, WRITELN outputs data
under the variables and/or literals specified in the command argument.
The difference is that WRITELN outputs acarriage return (CR) after
data for the last argument on the command line has been sent. This
character signifies the end of arecord in many non-OataFlex program-
ming languages and devices, such as WordStar* Mailmerge*, CBASIC* and
MBASIC*. WRITELN can have mu1tip1e arguments on the command line MÁp
just as with the WRITE command, it is necessary to include any needed
delimiting characters as literals in the command line.
FORMAT:
WRITELN argument
Output the contents of variable ARGUMENT, followed by a<CR>
WRITELN argl arg2 ... argN
Output the contents of ARGI, then ARG2, and so on through
ARGn, the last followed by a<CR> character.
EXAMPLES: where argl =apples, arg2 =peaches, and arg3 =pumpkin pie
WRITELN argl
Would output app1es<CR>
WRITELN argl "," arg2 "," arg3
Would output app1es,peaches,pumpkin pie<CR>
———————————————_—————————'———— ——_" "—_"" '_"' ==="
Copyright (C) 1984 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 KEYS FFFFFZ=---
—————————— ——————————
—————————————
~
DataFlex provides aset of system-independent function keys to perform
numerous entry and search functions, as described in the section on
the SETSCREEn procedure. They are referred to as DataFlex Command
Keys, or simply "F1ex-Keys'°. On terminals lacking function keysg the
Flex-keys must be assigned to control key sequences. On terminals
having function keym they can be assigned to the various function
keys available on the keyboard. In either casé» the name and function
of the key Is maintained over all systems and applications.
It is very important to note that the Flex-keys have NO Intrinsic
functions. They derive their various functions from the DataFlex
configuration which Is runn1ngg either from KEYPROC commands discussed
in thfs section, or from the use of the ENTER or ENTERGROUP command
macros discussed respectively in other sections of this manual.
The Flex-keys are divided up into two main groups: input-terminating
Flex-keys and field editing Flex-keys. The field editing keys include
backspace, the arrow keym insert character, and delete characterg and
all have effects on the contents of awindow or other means of
keyboard entry. The input-terminating keys, on the other hand.
control movement from field to field, and any of them functions in the
manner of the <RETURN> key to enter any characters which may have been
entered into the active window at the time the input-terminating Flex-
Key is pressed.
THE INPUT-TERMINATING FLEX-KEYS
TNnT¢ÁTnf? Fl!NcTTnN
KEY.RETURN RETURN OR ENTER
KEY.ESCAPE EXIT THE CURRENT FUNCTION
KEY.FIELD BACK UP ONE WINDOW OR FIELD
KEY.FIND FIND A RECORD
KEY.SFIND SUPERFINO
KEY.SAVE SAVE ARECORD
KEY.DELETE DELETE A RECORD
KEY.CLEAR CLEAR THE FORM OR SCREEN
KEY.NEXT GO FORWARD ONE RECORD
KEY.PREVIOUS BACK UP ONE RECORD
KEY.UP UP ARROW
KEY.DOWN DOWN ARROW
KEY.USER FUNCTION DETERMINED BY CONFIGURATOR
KEY.HELP DISPLAY HELP SCREEN
Note that the field edit keys are not listed here since they function
normally under the ACCEPT comand.
When the ENTER macro command is uséd» all the Flex-keys are
automatically endowed by the macro with their customary functions (see
list of the Flex-keys above). Where the ENTER macro is uséd» it is
———————
Copyright (C) 1984 Data Access Corporation 05/16/84

E-2 USING FUNCTION KEYS DataFlex 2.0 User's Manual
still sometimes desirable to alter the default functions of the Flex-
Keys. Where the ENTER macro is not useL the Flex-keys have no
effects at alb and they must be provided in the configuration by use
of either of the two methods described below. The effect(s) of using
the Flex-keys can be altered or extended by two different means: (a)
use of the pre-defined indicators which are automatica1ly controlled
by use of the Flex-keys; and (b) use of KEYPROC subroutines.
THE USER-DEFINED FLEX-KEY
No function is assigned automatically to the User-Defined Flex-key.
The key is provided so that the configurator may have the option of
providing any chosen function to be available with asingle keystroke.
Such special function can be provided only through aKey Procedure
(see below) within one or more configurations.
USING THE FLEX KEY INDICATORS:
Each time one of the field-terminating Flex-keys is used. the
predefined fndicator relating to that key is set TRUEp and all the
other Flex-key indicators are set FALSE. For examp1ep when the
<RETURN> key is used to terminate entry to awindow9 the indicator
KEY.RETURN is set TRUE. These fndicatorm which are listed abovep all
have the prefix "KEY." followed by adistinguishing term which refers
to the default function of the key. Subsequent actions or branching
may be controlled by use of the reset indicators.
EXAMPLE:
GETNAME: ACCEPT COMPANY.NAME
[KEY.ESCAPE] ABORT
ACCEPT COMPANY.ADDRESS
[KEY.ESCAPE] ABORT
[KEY.FIELDJ GOTO GETNAME
This example opens the configuration for input to the variable
COMPANY.NAME, 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
will cease (ABORT). If other than the ESCAPE key is pressed, the
input is accepted and execution goes on to open for input to the
variable COMPANY.ADDRESS. The following line, again beginning with
[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
this example (GETNN\E: ). If neither key is pressed, execution goes on
to other comands following the example.
USING KEY PROCEDURES:
Using the key indicators can be practical in configurations involving
relatively little inpUtg but in configurations involving alarge
Copyrfght (c) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual USING FUNCTION KEYS E-3
——————
number of ACCEPT or INPUT state|nentsp it wIll normally be preferable
to standardize the actions of the Flex-keys. Key procedures (activa-
ted by use of the command KEYPROC) provide the means of programming
function key effects uniformly across an entire configuration for
whenever aparticular key is used. Like general-purpose subroutines
(see GOSUB command in the chapter on Control Commands)» KEYPROC
subroutines must be terminated with either aRETURN command to resume
execution of the configuration at the comand following the ACCEPT or
INPUT statement which called the KEYPROC» or an ABORT command to
terminate exec'ution of the configuration.
FORMAT:
KEYPROC f1ex_key
Where f1ex_key is one of the Flex-key indicators listed above. When
the Flex-key which relates to the indicator given in the connand
argument is pressed, execution will automatica11y branch to the
KEYPROC subroutine.
EXAMPLES:
KEYPROC KEY.ESCAPE
CLEARSCREEN
ABORT
Causes use of the ESCAPE key to clear the screen and
termínate execution of the configuration.
KEYPROC KEY.CLEAR
CLEARFORM
RETURN
Causes use of the CLEAR ALL key to clear the form and return
to execution of the next command of the configuration.
If it is desired that akey procedure not be in effect under certain
conditions during execution of aconfiguratiom indicator-driven
conditionals can be included within the KEYPROC subroutine to provide
the desired conditional effect.
EXAMPLE:
KEYPROC KEY.ESCAPE
INOESCAPEI RETURN
ABORT
This example illustrates the provision that pressing the
ESCAPE key will cause execution to ABORT unless the indicator
NOESCAPE is set TRUE, in which case execution RETURNS to the
next comnand in the configuration (the ESCAPE key is prevented
from "working").
There are some other commands that can ONLY be used within key
procedures. These connands can alter the place the key procedure
returns to and allow key procedures to do things like trap an error
and return to the original window:
===============——————~——————— —~————————"_
————————
Copyright (c) 1984 Data Access Corporation 05/16/84

E-4 USING FUNCTION KEYS DataFlex 2.0 User's Manual
ENTAGAIN Cocmand
ENTAGAIN stands for enter again and will make the key procedure return
to the same window and ACCEPT command that called it. If akey
procedure determines that there was an error it can then go back to
the same place. ENTAGAIN does not use arguments.
FORMAT:
ENTAGAIN
EXAMPLE:
KEYPROC KEY.ESCAPE
[NOESCAPEI ENTAGAIN
[NOESCAPE] RETURN
ABORT
In this examp1eg it is provided that the ESCAPE key trigger an
execution ABORT (first and last lines). unless the NOESCAPE
indicator is set TRUE by action of other parts of the config-
uration. in which case execution returns to the place at which
the ESCAPE key was pressed, and the cursor goes back to the
beginning of the window it came from.
ENTERMODE Command:
The ENTERMODE command establishes the begíning of aseries of data
entry comnands and serves to set up the correct modes for the next few
commands. The ENTERMODE command should always be the first command in
aseries of ACCEPT comands when the BACKFIELD (see next cormand) is
,used:
BACKFIELD Ccxnmand
The BACKFIELD comand will cause the key procedure to return to the
ACCEPT comand PREVIOUS to the one that was just executed. This makes
the cursor seem to back up one window. The BACKFIELD command will not
go back past an ENTERMODE command. A properly-placed ENTERMODE
command should be used since otherwise the BACKFIELD command will go
back as many command lines as is necessary to find an ACCEPT to
execute. The BACKFIELD command can be controlled by the status of
indicators, This comand should be used judiciously in configurations
conta1n'lng loops, GOTCM GOSUBs and the like. since the comnand in
effect executes aGOTO to the previous ACCEPT comand, and this may
seriously upset processing if it occurs in aloop. The operator may
be prevented from making such an error by manipulation of arMnverse"
user-named indicator (NOBACK, for example) included within the KEYPROC
tCj disable the key at the appropriate poInts in execution. This
technique is illustrated above for the ESCAPE key.
==—.====________________ ____ ~—~~_~ ====
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual USING FUNCTION KEYS E-5
———— —————————————————
———————————
EXAMPLE:
KEYPROC KEY.FIELD
BACKFIELD
RETURN
This example merely defines the function of the BACK WINDOW
(KEY.FIELD) key to back up one window.
HELP KEY:
The key is called KEY.HELP and is generally assigned to "Q on the
standard keyboard.
The HELP command can be used within astandard key procedure and is
implemented in ENTER and ENTERGROUP. The standard format for this key
procedure is:
KEYPROC KEY.HELP
HELP
ENTAGAIN
RETURN
HELP Ccxnmand
The help comnand with no arguments will go to the next sequential page
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.
If the HELP command is used with an argument of a page name, that page
will begin the help screen sequence.
————————-————
————————
Copyright (C) 1984 Data Access Corporation 05/16/84

E-6 USING FUNCTION KEYS DataF1ex 2.0 User's Manual
========""====""=—————————————— ———————————
EXAMPLE:
/SCREEN1
INPUT SCREEN
NAME:
/SCREENIHELP HELP
Please enter your name in the blank provided.
Press any key to continue
/SCREEN2
ADDRESS:
/SCREEN2HELP HELP
Now9 please enter your home address.
Press any key to continueg or press HELP for more help
/SCREEN2HELP2 HELP
If you don't know your home addressp try getting out your driver's
license and Copying the address off of it.
Press any key to continue
l*
============ —— ——
Copyright (c) 1984 Data Access Corporation 05/16/84

——
——————
EFZZE===== MULTI-USER FUNCTIONS Z"="=: _
_
==========
——"
——
~~~~
~~———————————— —————————————————————————__==—=
DataFlex provides true multi-user operation. This means multiple
users with simultaneous write privilege to the same record at the same
time. This provides atransparent multi-user operation with data
protection to the field level. No other microcomputer product can
match DataFlex in the multi-user environment.
Problems inherent in the "traditional" method of handling multi-user
operations (record lock on each read) are illustrated by the following
example:
Acompany has alarge number of custaners9 say 20A0M but only sells
10 different items. Traditional locking on custaner records would
seldom produce avisible lock, but if one of 10 inventory part records
was locked on READ, the system would become virtually unusable with
only two or three operators. DataElex allows unlimited READ access to
the database and RE-READs the data when the operator SAVES achanged
record.
In DataF1ex, the record or systan is locked only for the time of the
SAVE. Updates are then done based on the freshg safe? data. And only
those fields that have actually been changed are saved to the recorch
thus preserving any other changes. This type of multi-user is
virtually undetectable to the operator9 greatly in contrast to aread-
time lock.
Multi-user updates are of two basic types: transactional and
replacement. Transactional updates are generally numeric adds or
subtracts from totals in amaster record. Since the update is based
on the re-read (safe) data7 updates of totals will always be accurate.
Replacement updates, (changing an address or credit limit) do not
usually require multi-user interaction, but do require that the
application not arbitrarily rewrite fields that were not changed as
traditional methods provide. DataFlex keeps track of which fields
were changed in order not to rewrite an old value over changes made by
another user subsequent to the first user's READ.
Here is an example of how this works:
Three users have the inventory part "ABC" on their screens. The
quantity in stock (ID) and the description (WIDGET) are shown on each
screen. User lis invoicing the sale of one wIdget, while User 2is
invoicing asale of two. User 3 is changing the description to
"WIDGETp GREEN". All three users read their (identical) screens, key
their input, and then press "SAVE" within the same second. Let's say
that the actual sequence of SAVES fell out as User l first, then User
2, and User 3last.
User l's SAVE will re-read the record and find it unchanged. His sale
of one widget will then be subtracted from the quantity in stock, and
the quantity in stock written back as 9.
Copyright (C) 1984 Data Access Corporation 05/16/84

E-8 MULTI-USER FUNCTIONS DataFlex 2.0 User's Manual
.
User 2G SAVE will then take control, reread the record (9 in stock).
subtract two» and write back the proper number (7).
User 3$s SAVE wflj then get control, reread the record (with 7in
stock), ONLY update the description, and write it back correctly. All
this occurs with speed which typically is imperceptible to any user.
In such asystem replacement privilege to transactionally-updated
fields should be very carefully limited to responsib]e9 thoroughly-
trained users. To make sure two users do not sell quantities in
excess of the quantity in stock, the app7ication configuration should
be written to check for amount sold exceeding quantity in stock (and
declare an error while rejecting the sale).
The foregoing provisions reduce the time asystem or record is locked
to the very brief interval actually required for the SAVEing of a
record instead of the reading and entry speed of the operators. Since
one field does not interfere with another and transactional updates
are optlma11y handled, the statement "DataFlex provides transparent
multi-user protection to the field level" is amply justified.
MULTI-USER OPERATION UNDER THE ENTER MACRO
Multi-user operation is provided autanatica11y within the ENTER macro.
An ENTRY command will only update the database if data in one or more
windows has been changed (unless the FQRCEF'UT QptiQn is in effect).
A1SOp the actfve records are reread from the disk BEFORE the save or
delete procedures. If it is desired to re-display the buffer data
after REREAD but before SAVE. the ENTDISPLAY command should be used
for the purpose. During the save and delete procedure, only one
terminal will have write privilege, and all other updates initiated
during the processing interval will be delayed until that update is
done. For these reasorm the following rules must be fol'lowed when
using ENTER in amulti-user environment:
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.
2) When in aSAVE or DELETE procedurep refer to the record
buffer instead of the data windowsp since data in the record
buffer could have changed during are-read.
3) NEVER allow data entry of any kind within aSAVE or DELETE
procedure since other users will be locked out of SAVE
operations while the first operator is in the procedure.
MULTI-USER C0~DS:
The fo71owing comands will only function in multi-user systems.
There is no ham in providing them in single-user systems for
compatibi7ity7 since they have no effect in single-user mode.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual MULTI-USER FUNCTIONS E-9
——
LOCK Command
The LOCK comnand wIll prevent other users from LOCking the databasep
so that only one user at atime has database write privileges. Once
LOCK is invoked, no other user may update the database until the
invoking user's procedure is complete. The LOCked condition should be
kept in force for only those succeeding comands for which it is truly
required.
——————————————
UNLOCK Cand
The UNLOCK command will restore the system to normal state after a
LOCK or REREAD. It is imperative that the system be UNLOCXed after a
LOCK or REREAD is issued.
FOR EVERY REREAD OR LOCK THERE MUST BE AN UNLOCXI
——————————————
REREAD Command
The REREAD command first LOCKs the system and then re-reads all of the
ACTIVE records in the database. Since this is done In aLOCked
condltiom the resultant re-read records are "safe" for update. Use
of this comnand requires that all updates (edits) to an active record
buffer are done at one time, since the LOCked condition should only be
kept in force for those few commands for which it is required.
In the locked condition resulting from aLOCK or aREREACb data entry
statements such as INPUT, ACCEPT, ENTRY or INKEY should NEVER be used
in aconfiguration.
The REREAD command can optionally be followed by alist of files to
REREAD. In this form of the command, only those files listed will be
REREAD from among the open data files. Without the option, all open
data files for which there is data active in the buffer will be re-
read.
IFMANGE Command
In amulti-user environment it may be desired to have certain cotmands
execute conditionally based on whether there has been achange in a
window. The connand to do this is IFCHANGE. IFCHANGE is followed by
awindow number and the command which is to be executed if the window
has changed.
EXAMPLE:
IFMANGE form.l MOVE form.l TO lnvt.id
If the operator has changed window one, MOVE it to INVT.ID
The IFQIANGE comand can also respond to change in the record buffer.
If the argument is afile name» then the command after it will only
execute if the record buffer has been changed since the last FIND.
Copyright (C) 1984 Data Access Corporation 05/16/84

E-lO MULTI-USER FUNCTIONS DataFlex 2.0 User's Manual
————————————————————
—————————
SETMANGE Camnand
The SETQUNGE command creates a"change" in the window without
altering any data. It satisfies the conditions required for execution
of the IFMANGE comand unconditionally.
FORMAT:
SETQIANGE wIndow
DESPOOL Command
The DESPOOL comand will cause the spooler to start printing if a
spoo'Áng function is provided in the operating system.
FORMAT:
DESPOOL
EXAMPLE OF UPDATE IN MULTI-USER ENVIRONMENT:
FIND INVT BY INDEX.I // Get the record to update
DISPLAY INVT.ID TO FORM.I ll display default data
DISPLAY INVT.PRICE TO FORM.2
ACCEPT FORM.I // accept changes to default data
ACCEPT FORM.2
REREAD // prepare for multi-user update
// update only changed fields
IFMANGE FORM.I MOVE FORM.I TO INVT.ID
IFCMNGE FORM.2 MOVE FORM.2 TO INVT.PRICE
SAVE INVT // save the file
UNLOCK // and unlock
———
Copyright (C) 1984 Data Access Corporation 05/16/84

=="==================——————————— "====
——— "
ez==== FIELDINDEX AND WINDOWINDEX ::::::::::
=————————."'.——
________ ===== ———————————~———————————~———_————=======———
FIELDINDEX and WINDOWINDEX provide means of accessing and processing
ranges of fields in adata file or of wIndows on ascreen, affording
greater efficiency in both the writing and execution of configurations
for sequentially accessing ranges of fields and windows.
WINDOWINDEX is apredefined variable which counts windows in screen
image PAGEs, and FIELDINDEX similarly counts fields in databases.
Where WINDOWINDEX and FIELDINDEX start counting is controlled by the
placement of an ampersand (&) character which is appended, in the case
of awindow, to awindow number, and in the case of FIELDINDEX, to a
field number. For examp1e» if the current value of WINDOWINDEX is 3d
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
changed to 4p SALES.I& would refer to the next, or fifth, window in
the PAGE. Likewise. if FIELDINDEX were equal to I, EMPL0YEE.LNAME&
would refer to the first field after field EMPLOYEE.LNAME. The
ampersand cannot be used by itself as a fie7d number or window number.
It must be appended to an actual wIndow name or numbem or to an
actual field name (as defined in FILEDEF) or number.
The following example would SHOW the contents of fields Othrough 20
of the record currently in the buffer:
FOR FIELDINDEX FROM OTO 20
SHOW EXAMPLE.RECNUM&
LOOP
The initial FOR statement increments FIELDINDEX from zero
through 20 with each repetition of the loop. The SHOW command
takes the whichever record from the EXAMPLE data file is
currently in the buffer and shows RECNUM (the record number--
always the first9 or 0th. field in any record) and the 20
fields which follow it, on the screen, through the presence of
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.
Caution: When using FIELDINDEX and WINDOWINDEX to MOVE data, make
certain that the data type of the destination fields or windows is the
same as that of the field (or window) name in the command line to
which the ampersand is appended (RECNUM in the example above).
FIELDINDEX and WINDOWINDEX check the type of this data element and
assume that the destination windows or fields will be of the same
type. If amismatch exists between the data typem it will produce a
BAD FORMAT IN EXPRESSION error at run time. If source data types are
mixed (as when the field referred to is RECNUM, aNUMERIC typeg and
those following are ASCII fields), use of one or more of the type-
changing forms of the MOVE command will overcome the problem. The
commands (MOVENUM, KK)VEINT» and MOVESTR) are described under Element
Processing Commands, and should be used according to the data
Copyright (C) 1984 Data Access Corporation 05/16/84

E-12 FIELDINDEX AND WINDOWINDEX DataFlex 2.0 User's Manual
type(s) of the destination fields or windows.
The steps for using WINDOWINDEX and FIELDINDEX, then, are:
l. Identffy the ffe1d.# or w1ndow.# at which the range of
windows or fields you want to process begins. You can start and stop
where you 1ikeg but you can't skip fields or windows;
2. Write the processing command(s) you want for either
fie1d.#& or window.#&, and
3. Set up aloop or other counter to drive FIELDINDEX or
WINDOWINDEX, whichever is appropriateg through the range you wish to
process.
In another examplm we could have a page (display screen) called SALES
with the twelve calendar months on it as wIndows displaying totals by
month, and two entry windows at the bottom for the entry of additive
amounts and of the number of the month to which the entered amount is
to be added. The month numbers shown on the screen display below are
strictly to cue the operator--they are not used by the system. Like-
wise7 the window numbers shown are merely for explanatory purposes.
They would not normally be displayed on the screen:
/SALES
# MONTH SALES
lJanuary $._(window l)
2 February $._(window 2)
3 March $_._ (window 3)
4April $._(window 4)
5 May $._ (window 5)
6 June $._ (window 6)
7July S._ (window 7)
8 August $._ (window 8)
9 September $._ (window 9)
10 October $._ (window 10)
li November $._(window li)
12 December $._(window 12)
MONTH #: _.(window 13) AMOUNT TO ADD: $._(window 14)
l*
ACCEPT SALES.13
CALC (SALES.13-1) TO WINDOWINDEX
ACCEPT SALES.14
CAl-C (SALES.14+SALES.I&) TO SALES.I&
4
The first line accepts the month number as shown on the screen through
Window 13 of Page SALES. The second line reduces the entry (in the
range l-12) by one (making the range O-li). The third line
accepts the additive amount to Window 14. The last line takes the
additive amount and adds it to the amount a7ready in the window
specified by SALES.1&, or one plus WINDOWINDEX. which is the month
number entered in Window lZb and stores the new total back to the
window for the specified month.
=== =============== === ——
Copyright (C) 1984 Data Access Corporation 05/16/84

=—"====""=~=~—=————————— —~~~———~—~ "_~~— E"13
——————————
—————— ——————————
——————————
==== MODIFYING AND EXTENDING DATAFLEX :EE::E::::
———————— ——————————
__ _ _ _ ___=~==~=_____
NOTE: This section describes some unusual and powerful features of
DataFlex. The vast majority of users will not have the need
to make use of them. The information Is Included here as a
matter of interest for the general user and to provide further
access to the powerp flexibility and utilfty of DataFlex for
the advanced user with specfal requirements.
DataFlex offers the advanced configurator the unusual opportunity to
actually define new command words that become an integral part of the
software syst«n--in effect» the ability to extend the command
language. These operations create macros that may be used for special
types of functions to satisfy highly unusual requirementm or to
enable aconfigurator to distinctively impart his personal or company
"style" to the final application product.
The commands provided with DataFlex form the basic framework for the
extended "macros", and are themselves macros. Macros can be thought
of as compile-time subroutines. User-defined macro comands accept
arguments and textually substitute the arguments into the comnand
model. The resultant commands are then compiled and included with the
rest of the program. Using acormand created through macro operations
is exactly like using any other DataFlex command: the basic syntax is
acomnand verb followed by one or more optional arguments.
Macros can be defined directly within one or more configurations, or
they can be added to FMACp the standard macro file which DataFlex
refers to for the definition of all commands in aconfiguration at
compile time. Macros defined within aconfiguration will operate only
within that configuration when executing. The definition must appear
in the source code before' the defined macro is first used. Defini-
tions added to FMAC on the other hand, will make the new macro
available to every configuration which is compiled under it.
If a macro is defined by adding it to FMAC, the modified version of
FMAC must be re-packed into the file "FLEX.CFL." FLEX.CFL is the file
to which the compiler actually refers for the definition of each
command it encounters in aconfiguration as the configuration is being
compiled. The PACK program, supplied with DataFlex, is used from the
operating system prompt to pack FMAC by the following comand:
d:PACK d:FMAC
where D: in both places shown above represents the logical
drive on which PACK.COM and the (uncompiled) FMAC files are
found.
FLEX.CFL will be written to the default drive from which the above
command is issued.
———————————————-———————————————————
Copyright (C) 1984 Data Access Corporation 05/16/84

E-14 MODIFYING AND EXTENDING DATAFLEX DataFlex 2.0 User's Manual
REPLACEMENT
The simplest form of macro operation is replacement. Any consistent
string occurring in aconfiguration can be replaced by another string.
For example, if while deffn1ng field names fn FILEOEF, you establish a
long, descriptive field name such as
"TRANSACTIM_FILE.LAST_PART_COST'4 you might find it tedious to type
that name into aconfiguration anumber of times. By including the
following macro definition in your program you can have the compiler
substitute the long name into the compüed configuration everywhere
you typed "LCOST" (or any other short string that seems descriptive to
you while writing the configuration):
FORMAT:
fREPLACE before_str1ng after_string
EXAMPLE:
#REPLACE 1cost transactfon_fl1e.1ast_part_cost
Of coursep the source (uncompiled) version of the configuration would
always have I-COST in it, but as long as either FMAC. had the replace-
ment in it, or the configuration had the replacement cormiand in it
before the first occurrence of LCOST gthe compiled configuration
would have TRANSACTION FILE.LAST_PART_COST substituted for each occur-
rence of I-COST. Especially note the initial pound sign (S) on the
command line. That symboL and certain others which will be illustra-
ted be1owp comprise the distinctive syntax of macro operations.
COMMAND DEFINITICN
Command definition allows you to make up new cormands using sequences
of existfng DataFlex commands. When used in aconfiguratiom your new
command will look just like any other command in DataF1exg but it will
in fact cause execution of asequence of other DataFlex comands.
Again, if the comand is defined In aconfiguration (instead of in
FMAC.L it must be defined before the connand is first used in the
configuration.
FORMAT:
#C0RNAND new_command_name {symbol list}
(existing) command line
additional existing command lines
* 0 g0 0 0 0 0 0
#ENDC0MMAND
The command may optionally be followed by alist of symbols to check
whether arguments given to the comand in the configuration are of the
correct type(s). Sytnbol checking is more thoroughly explained in and
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.
Copyright (c) 1984 Data Access Corporation 05/16184

DataFlex 2.0 User's Manual MODIFYING AND EXTENDING DATAFLEX E-15
—
EXAMPLE:
KOMMAND sign_on
CLEARSCREEN
SHOW
SHOW 'EXAMPLE PRCGRAM'
SHOW '(C) 1983 DATA ACCESS CORP'
'SHOW
#END(j0mAND
This macro defines a new commandg SIGN ON. Whenever it is
used in aconfiguration, the five indented command lines above
,will be executed in its place (it clears the screen and
displays the two-line banner in quotation marks, surrounded by
acouple of blank lines on the screen). This is useful to
save typing but doesn't "expand" the language. To do that we
have to be able to use arguments within our new comnand.
Suppose for example that we wish to be able to insert the name OÍ the
program (instead of the hard-coded legend 'EXAMPLE PROGRAM' shown
above) to sign on as an argument to the SIGN ON command written into
the running configuration. The syntax for an argument is an
exclamation point with an integer between Iand gafter.it. The
comand model will then textually substitute the first argument
written after the command into the command model wherever a!1 appears
in itg the second argument (if any) wherever !2 appears, and so on).
EXAMPLE:
#C0MMAND s1gn_on
CLEARSCREEN
SHOW
SHOW ''II
SHOW '(C) 1983 DATA ACCESS CORP.'
SHOW
#ENDC0NIAND
The "II" used above would be replaced by the first argument
fo1low1ng the use of SIGN ON. A use of this new command macro
could be:
sign_on 'ACCOUNTS PAYABLE PROGRAM'
"ACCOUNTS PAYABLE PROGRAM" would then be substituted at the !1
position when the command was executed. Nine arguments can be
replaced in this manner (i.e. !1 !2 !3....!9). The symbol
"!0" is the total number of arguments that have beeñ passed to
amacro connand.
A WORD OF CAUTION: Macros are not subroutines. Amacro used five
times in a source configuration will be expanded each timep so
frequent use of alarge macro can result in excessive mtmory consumed
by the executable configuration. Generally, larger macros can be more
simply installed and used within less file space if written as
subroutines. The exception to this guideline is where the same macro
is required across agroup of several configurations.
——————
————
Copyright (C) 1984 Data Access Corporation 05/16/84

E-16 MODIFYING AND EXTENDING DATAFLEX DataFlex 2.0 User's Manual
The macro is apowerful tool. Replacements can be made anywhere ,
within the expansion and a macro can even call other macros. The
substitution for arguments is like the multiple search and replace
function found in some word processors. The following utilities
further enhance the utility of macros:
INCLUDE FILES
You can keep common macros and subroutines in an external file and
include these at compile time with the #INCLUDE connand:
Sinclude filename
The entire file "filename" will be included in the compilation process
at the point(s) of the INCLUDE(s). One INCLUDEd file can INCLUDE yet
another file. INCLUDEd files should be source (ASCII) format. not
separately pre-compi1ed. The lines qjf the INCLUDEd fi7e(s) will not
be displayed during compilatton, except for any #REM lines which the
file may contain.
COMPILE TIME VARIABLES
Macros and configuration files can use and evaluate integer numbers
and expressions at COMPILE TIME which are generally used for assigning
sequential numbers to labels or variables. There are 26 such integer
variables (A..,Z). If an upper case letter is used, the value of the
variable is incremented before use; if alower case letter is usech
the value will remain unchanged. The compile time variables are
referenced with apreceding exclamation point "!". The value of the
variable in text form is substituted for the "lx" in the line output.
The value of any integer variable can be set with the #SET command.
FORMAT:
#SET variab1e_7etter$ expression
The variable can be any letter (A...Z) and should not be preceded by a
"!". The "S" separates the variable letter from the expression argu-
ment. The expression can be any integer expression that can be eval-
uated at compile time, and it can itself contain integer variables.
The expressfon should include parentheses.
EXAMPLE:
#SET F$ (Ir-l)
SET the integer variable "F" to the value of the integer
variable "r" minus one. Since "r" is lower caseg It will not
be automatically incremented.
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual MODIFYING AND EXTENDING DATAFLEX E-17
—————
CONDITIONALS:
Portions of your source lines may be selectively included or excluded
from the compiled configuration by use of #IF coímands. These can be
used within amacro to modify its output depending on the number of
arguments or their type. The IF comiands set the condition and an
"#ENDIF" terminates it. You may also have an "#ELSE" to change the
sense of the last IF. There must be an "#ENDIF" for every "#IF", but
the "#ELSE" is optional.
FORMAT
#IF expression
command line to compile if expression TRUE
command line to compile if expression TRUE
etc.
#ELSE
comnand line to compile If expression FALSE
command line to compile if expression FALSE
etc.
#ENDIF
If the expression has avalue other than zerop the TRUE command lines
will be included in the compiled configuration. Otherwise, the FALSE
command lines will be included. For example:
#IF !0>0
SHOW 'THERE ARE !0 ARGUMENTS'
#ELSE
SHOW 'NO ARGUMENTS'
#ENDIF
This will generate only one compiled 1ineg the first SHOhh if
there are any arguments and the second SHOW if there are not.
If we wanted to have debugging statements in our configuration that
could be included or excluded based on a single statementg we could
use an integer variable "d" that would be true (l) for debug mode and
false (O) for runtime mode.
EXAMPLE:
#SET D$ TRUE
...(other command l1nem generatfng value for testvar)
#IF Id
SHOW 'TEST VARIABLE=' testvar
Sendif
This example shows the debug flag initialized to TRUE, followed by
,configuration comnand lines which, among other th1ngsp generate a
value for the variable TESTVAR. Where the debug flag was set TRUE9
then, the value of TESTVAR will be displayed after the legend "TEST
VARIABLE =". When the configuration is debugged. the #SET line can be
rewritten to set the debug flag FALSE, and when the file is compj1edp
the lines triggering debugging statements will not be included.
—
Copyright (c) 1984 Data Access Corporation 05/16/84

E-18 MODIFYING AND EXTENDING DATAFLEX DataFlex 2.0 User's Manual
———————
The other IF commands are:
#IFDEF symbol (TRUE if symbol has been defined.)
#IFTYPE symbol list (TRUE if the type and class of symbol is in
list)
#IFCLASS symbol list (TRUE if the class of symbol is in list.)
#IFSAME symboll symbo12 (TRUE if symboll is the same as symbo?2.)
You may check the type and class of an argument with the "#MECK"
cormand. #(>tE(X will generate an error message if the type or class
of the symbol is not in list.
FORMAT:
#QdECK symbol list
The #CHECX connand and an optional type check line on the #C0NAND
line are both intended for error checking. An error will be generated
if the type or class of symbol matches one of the type check
characters in list (see symbol-checking characters below). An error
will be generated if the argument is the same type or class as the
symbol-checking character in list.
=========================———~——~—~~~—~—~~ —— ~——————————""""
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual MODIFYING AND EXTENDING DATAFLEX E-19
~
SM3OL-MECKING eARAcTERs
Character Meaning
Types.
SSTRING
NNUMBER
DDATE
IINTEGER
EEXPRESSION
#INDICATOR
XNOT AN INDICATOR
OGROUP OPTIONS {}
El GROUP INDICATORS []
LLABEL
Classes.
CCONSTANT
FFILE ELEMENT
WWINDOW
VIN MEMORY VARIABLE
GGROUP ({options} or [indicators])
Literal Content. .
"any""characters" An error will be generated if the contents of
"in quotes" the variab1e(s) named in the argument do NOT
match one of the strings in quotes entered in
the list.
Other.
TERROR IF TYPED (DEFINED)
UERROR IF UNTYPED
RARGUMENT REQUIRED
.NO MORE ARGUMENTS
%SPECIAL, changes constant number
to constant integer.
S SPECIAL, changes all windows
to type string.
In our SIGNON examp1ep the following would be areasonable symbol-
checking line:
EXAMPLE:
A'CONAND SIGNON GURA .
This would specify that SIGNON have one required argument that
CAN'T be aLABEL9 group, undefined or be an indicator.
The order of the type check characters has no significance. If you
don't include type checking in your macrom the basic DataF1ex
comnands will probably pick up any type errors.
The best example of using macros is the FMAC file itself.
Copyright (c) 1984 Data Access Corporation 05/16/84

E-20 MODIFYING AND EXTENDING DATAFLEX DataFlex 2.0 User's Manual
—
———————————————————
INTERNAL TYPING OF SYMBOLS:
The following information is intended for those interested in the
internal workings of the macro processor and is not required to use
DataFlex.
Each symbol, whether constant9 window or file, is REPLACED from its
symbolic name to one which 'Is meaningful to the DataFiex runtime
system These symbols can be identified by avertical bar ":"in the
first character of the replaced symbol. The next two characters
represent the CLASS and TYPE of the symbol and the value of the symbol
(if it is aconstant) or its window8 field and/or file numbers follows
those4
EXAMPLES:
ICNO means C0NSTANTg NUMBER, ZERO.
lWS2 means WINDOW, STRING9 WINDOW NUMBER TWO.
ICI1 means C0NSTANT7 INTEGER, ONE
lCS'USA'means C0NSTANTp STRING, USA
IWN3 means WINDOW, NUMERIC9 WINDOW NUMBER THREE
lFD2gl means FIELD, DATE, FILE 2. FIELD I
The following are the type and class characters used to identify
symbols:
QURACTER INTERPRETATION
CLASSES:
CCCNSTANT
yVARIABLE
WWINDOW
FFIELD
G GROUP
TYPES:
SSTRING
NNUMBER
DDATE
IINTEGER
EEXPRESSION
LLABEL
OGROUP OPTION
BGROUP BOOLEAN (INDICATOR)
If you put the command "#N0ISY 99" at the top of your configuratiort,
all of the conversion will display on the screen at compile time0
together with the final output of your comand lines. The option
SNOISY Owill cause only your original source code statments to
disp1ay9 while #N0ISY lwill cause everything to display except the
intermediate code and expansions.
There is atemporary file that is generated by the compiler with a
name made up of your configuration's rootname plus the extension
".IC'°. This is the internal DataFlex configuration code. If you use
Copyright (C) 1984 Data Access CcÑporation 05/16/84

DataFlex 2.0 User's Manual MODIFYING AND EXTENDING DATAFLEX E-21
————
#N0ISY 99 or have an error, this file will not be deleted from your
disk and can be inspected. Otherwisep the file will be deleted
automatíca11y upon completion of asuccessful compilation. The
general format of the ",IC" file is as follows.
FORMAT:
LINE_NUI¶3ER INDI IND2 IND3 COMMAND ARG1 ARG2
Where INDx stands for indicator x, ARGy stands for argument y»
and CONAND is the internal command number.
Although the ".IC'° file is not generally used at the configuration
level it can sometimes be of interest and help in debugging difficult
configurations. The list of the Internal command numbers is contained
on the Pascal source and library disk in the file called
"COMMAND.DEF".
Copyright (C) 1984 Data Access Corporation 05/16/84

E-22 MODIFYING AND EXTENDING DATAFLEX Dataflex 2.0 User's Manual
——————— ————————————
——-—————————————————————————————
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (c) 1984 Data Access Corporation 05/16/84

"==_ _~"===="""""""""——~——~—~—— _———————Tr _ ____ FA
———————————
========== ==========
——————————
ZZZZZzIzzz RESERVED WORDS OF DATAFLEX ~_____
————————
——————--,- ————-—————
="""""
THE RESERVED WORDS OF DATAFLEX
The words on the next page are those used by. and built into,
DataF1ex. DataFlex uses these words as corwnandm system variables,
system ind1catorsp system procedures, options, and so on. You will
recognize most of them.
They are assembled into an alphabetical list as a convenient reference
to words that must not be used in DataFlex configurations as
indicatorm variable names, field names, window namesp page namesy
file namesp or any other functional string. If they are usech
DataFlex is likely to mistake them for their reserved meaning and
execute something in no way similar to what you intended. The words
may. of course, be used as data within databases, they may be included
in images as screen or report captions. and they may be used in
prompting strings or any other material enclosed in quotes (single or
double) within any DataFlex configuration. They may also be included
within connents (material preceded by the "//" comment character) in
configurations.
Unavoidably, many of the words reserved to DataFlex are words which
would be very useful as variable names or for other prohibited uses.
The deliberate use of small differences will effectively restore the
use of these words to you while at the same time avoiding use of the
actual word itself. For examp1ey if your configuration prints the run
date at the top of areport, you may not bring the date into your
report by use of avariable named DATE. But it is entirely
permissible to use the word within alonger 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).
You may wish to make aphotocopy of the following page to keep where
it may be referred to readily while you are writing configurations.
Copying this manual is expressly prohibited under the terms of your
license agreementp except for the above-described use of the following
page.
——————
Copyright (c) 1984 Data Access Corporation 05/16/84

F-2 RESERVED WORDS OF DATAFLEX DataFlex 2.0 User's Manual
THE RESERVED KORDS OF DATAFLEX
ABORT ENTEREND KEY.SAVE RANGE
ACCEPT ENTERGROUP KEY.SFIND READ
ALL ENTERMODE KEY.UP READLN
AND ENTRY KEY.USER RECCOUNT
ANY EQ KEYCHECX RECNUM
APPEND ERASEFILE KEYPRESS REGISTRATION
AS ERR KEYPROC RELATE
ASCII ERRLINE LASTERR RENAME
ATTAM ERROR LASTIF REPEAT
AUTOFIND FALSE LE REPORT
AUTOPAGE FIELDINDEX LEFT REPORTEND
BACKFIELD FILELIST LENGTH REQUIRED
BEGIN FILENUMBER LINECOUNT REREAD
BLANKFORM FILL LOCK RETAIN
BREAK FIND LOOP RETAINALL
BREAKINIT FINDERR LT RETURN
BREAKPOINT FINDREQ MATM RIGHT
BY FLEXKEY MEMAVAIL RPT.anything
CAl-C FL0AT$ MID RUNPROGRAM
CALCULATE FOR MOVE SAVE
CAPSLOCK FORCEPUT MOVEINT SAVERECORD
(>ÍAIN FORMAT MOVENUM SCREENEND
NARACTER FORMFEED MOVESTR SECTION
MECK FOUND MULTIUSER SELECT
CLEAR FROM NAME SEQEOF
CLEARFORM GE NE SEQEOL
CLEARSCREEN GOSUB NEWPAGE SETNANGE
CLEARWARNING GOTO NEXT SHOW
CLEARXY GOTOXY NOENTER SHCMLN
CL0SE_INPUT GROUP NOISY SKIPFOUND
CL0SE_OUTPUT GT NOPUT STATUS
CMDLINE HEADER NOT STRING
COPYFILE HELP NUMBER STRLEN
DATE IF NUMPAGE STRMARK
DEBUG IFCHAMGE NUMWINDOW SUBHEADER1...9
DELETE IFNOT ON SUBTOTAL
DESPOOL IN OPEN SUBTOTALI...9
DIRECT_INPUT INCREMENT OR SUPPRESS
DIRECT_OUTPUT INDEx.BATe OUTCLOSE SYSDATE
DIRECTORY INDEX.1...IO OUTFILE SYSTEM
DISPLAY INDICATE OUTPUT TERMCHAR
DISPLAYONLY INDICATOR PAD THRU
END INKEY PAGE TO
END$OF$REP0RT INPUT PAGE.LINES TOTAL
END.OF.REPORT INTEGER PAGEBREAK TRIM
ENDGROUP KEY.CLEAR PAGEC11ECX TRUE
ENT$PERMISSIVE KEY.DELETE PAGECOUNT UNLOCK
ENTAGAIN KEY.DOWN PAGEEND UNTIL
ENTDISPLAY KEY.ESCAPE PAGEFEED UPPERCASE
ENTER KEY.FIELD PAGE1...255 WHILE
ENTER.CLEAR KEY.FIND PATHNAME WINDOWINDEX
ENTER.DELETE KEY.HELP POINTS WRITE
ENTER.EDIT KEY.NEXT POS WRITELN
ENTER.EXIT KEY.PREVIOUS PRINT ZEROFILE
ENTER.SAVE KEY.RETURN QUIET
------
Copyright (C) 1984 Data Access Corporation 05/16/84

~
========== FILES. ARGUMENTS AND COMMANDS ZZFFZF±Z==
——————
FILE NAME AND EXTENSION TYPES
Each DataFlex database is actually composed of a"family" of operating
system files which function with each other for the DataFlex user as a
single unified whole. The data file "rootname" (specified by the user
in the FILEDEF routine) is common to all the m«nbers of afamily of
data files, while differing extensions denote various standard func-
tions for each of the different files.
The following are the standard extensions and file names used by Data-
F1ex. The "*" indicates afile required" for runtime. The "r indi-
cates afile required only at compile time. SOLID CAPITAL letters
denote explicit content (usually extensions). Lower case letters are
descriptive of afilename which may be virtually any unique string of
characters recognized by the CP/M operating system as a file name
element.
FILE NAME TYPE DESCRIPTION
—
rootname.DAT *RAND DataFlex data file. Contains file definition
and data (one per database)
rootname.K?? *RAND Dataflex index file (one for each index)
rootname.DEF SECt File definition listing
rootname.TAG #SEQ Field tag names file
FILELIST.CFG *RAND List of active file numbers and screen control
codes for configured terminal
TERMLIST.CFG RAND Available CRT configurations pre-coded
program.COM PROG Executable program (CP/M and MS-DOS systems)
program.CND PROG Executable program (CP/M-86 systems)
module.ERL SEQ Unlinked Pascal MT+ library module
program.OVF PROG Program overlay ftle
config.FLX *FLEX Executable DataFlex configuration
config.FD #SEQ File definition info for compiler
config.lC SEQ Intermediate DataFlex code file.
config.RPT SEQ Source code for sample reports
config.FRM SEQ Source code for sample screens
SHOWDEMO SEQ Source code for COMDEX show demo
FLEX.CFL SRAND Packed macro command file
FMAC SEQ Unpacked macro connand file
PACK.COM/CMD PROG Program to pack FMAC (command=PACK FMAC)
ENTER SEQ List of the ENTER macro
REPORT SEQ List of the REPORT macro
FLEX.COM/CMD *PROG DataFlex runtime program
RUN.OVF *OVF DataFlex runtime overlay file
COMP.COM/CMD #PR0G DataFlex compile program
CCNP,C!VF #OVF DataF1ex compile overlay file
READ.FLX FLEX Program generator to read sequential files
NOTES: .OVF and .FO files must reside on the logged-in disk drive.
ItS-bit versions do not haveg or use, COMP.OVF
In 16-bit versions, RUN.OVF is replace by RUN.OOI thru .004
C¿pyright (C) 1984 Data Access Corporation 05/16/84

F-4 FILESr ARGUMENTS AND COMMANDS DataFlex 2.0 User's Manual
== ——
——————
PREDEFINED ARGUMENTS
The fo11lowing are the predefined indicators and system variables
discussed in sections of the manual to which they pertain:
INDICATORS:
ENTSPERMISSIVE Disables resetting of FIND and AUTOFIND
ERR 'Error indicator
FINDERR Result of last FIND (opposite of FOUND)
FOUND Result of last FIND
KEY.CLEAR Clear screen Flex-key
KEY.DELETE Delete record Flex-key
KEY.DOWN Dom arrow Flex-key
KEY.ESCAPE Escape? end function Flex-key
KEY.FIELD Back Field, window Flex-key
KEY.FIND Find Flex-key
KEY.HELP Help Key Flex-key
KEY.NEXT Next record Flex-key
KEY.PREVIOUS Previous record Flex-key
KEY.RETURN' Return/enter Flex-key
KEY.SAVE Save record Flex-key
KEY.SFIND Super Find Flex-key
KEY.UP Up arrow Flex-key
KEY.USER User-defined Flex-key
KEYPRESS Set by KEYCHECK, if key press
LASTIF Result of most recent IF test
MULTIUSER Set by MULTIUSER system option
PAGEBREAK If new page, set by PAGEMECX
SEQEOF Sequential end of file
SEQEOL Sequentfal end of 7ine
SELECT Triggers selection in REPORT macro
STATUS Shows whether file named Is ACTIVE
SUBTOTAL1..9 Breakpoint indicators
SYSTEM VARIABLES:
ERRLINE Configuration line number of last error
FILENUMBER Number of last DataF1ex file for FILELIST
FIELDINDEX Indexed addressing for fields
FLEXKEY Number of last Flex-key used
LASTERR Number of most recent error triggered
LINECOUNT Output line counter
MEMAVAIL Amount of mmory of available
NUMPAGE Number of pages
NUMWINDOW Number of windows
PAGECOUNT Output page counter (set by PAGEMECX)
PAGEEND Printable lines per page
PAGEFEED Action to take on page feed
RECCOUNT Running total of records selected in REPORT
STRLEN String length
STRMARK -String position marker
WINDOWINDEX Indexed addressing for wIndows
======_———————————————————————————————————————————
—
Copyright (C) 1984 Data Access Corporation 05/16/84

DataFlex 2.0 User's Manual FILESg ARGUMENTS AND COMMANDS F-5
=————————————
WINDOW FORMAT AND ENTRY OPTIONS
The brackets {} shown below are part of the comand syntax, and should
be included with the desired option(s) when written into
configurations.
WINDOW FORMAT OPTIONS:
OPTION SYNTAX EFFECT
DECIMAL {PQINTS=Q} Numeric decimal points
* FILL {FILL="*"} Fill character
*FLOATS {FL0AT$} Floating "$" sign
RANGE {RANGE=l*l0} Numeric range checking
*SIGN ON RIGHT {SIGNRT} Minus sign on right
*SUPPRESS {SUPPRESS} Space suppression
UPPERCASE {CAPSL0CK} Force upper case
VALIDITY {eEcK="YlN"} Valid response checking
ENTRY OPTIONS
AUTOMATIC FIND MUTOFINW FIND record automatically
DECIMAL POINTS {P0INTS=Q} Numeric decimal points
DISPLAY ONLY {DISPLAYONLY} Cursor always skip window
FIND REQUIRED {FINDREQ} Successful FIND required
FORCE PUT {F0RCEPUT} Update buffer uncondittona11y
NO PUT {N0PUT} Do NOT put to the database
NO ENTER {NOENTER} No data entry to window
RANGE álECXING {RANGE=l¶l0} Numeric range checking
REQUIRED {REQUIRED} Required entry.
RETAIN {RETAIN} Retain window, clearablé
RETAIN ALWAYS (RETAINALL} Retain window, not c1earab1e
SKIP IF FOUND {SKIPF0UND} Skip entry if record found
UPPER CASE {CAPSLOCX} Force upper case
VALIDITY {NECX="YN"} Valid response checking
*0ption may be used by PRINT command only.
C(·'-riC:-)t (C) 1984 Data Access Corporation 05/16/84

F-6 FILES9 ARGUMENTS AND COMMANDS DataFlex 2.0 User's Manual
COMAND SYNTAX LIST
<Darts> indicate required substitutive elements (do not type darts).
{Brackets} indicate optional substitutive elements (do not type
brackets except where they are shown below in double {{ and }}).
[Braces] enclose GROUPed indicatorsn and are to be typed.
"Arg" signifies an argument which may be adatabase e1ement9 WindOWg
or in-memory variable.
Three periods (...) indicate anon-specific quantity of the elements
which appear on either side of the periods.
CONSOLE I/O GROUP
CLEARSCREEN
CLEARXY <1ine> <co1umn>
GOTOXY <1ine> <co1umn>
INKEY <arg>
INPUT {'prompt'} <arg>
KEYCHECK {colnmand}
SHOW <arg> {arg ... arg}
SHOWLN <arg> krg ... arg}
CONTROL GROUP
ABORT
CLEARWARNING
CHAIN "<configuration> {string ... string}"
DEBUG
ERROR <number>
GOTO <1abel>
GOSUB <1abel>
ON <integer_arg> GOSUB <1abel> {label ... iuen
ON <integer_arg> GOTO <1abel> {label ... 1abe1}
RETURN {1abeR
DATABASE GROUP
ATTACH <fi1ename>
CLEAR <fi1ename> {filename 0.. filename}
DELETE <fi1ename> {filename ... filename}
FIND <mode> <e1ement> M0DES=LT,LE,EQ,GE,GT
OPEN <fi1e name> {INDEX.n}
RELATE <fi1ename>
SAVE <ff1ename> {filename ... filename]
SAVERECORD <fi1ename> {filename ... filename}
ZEROFILE <fi1ename>
DEFINITION GROUP
DATE <date> {date ... date}
INDICATOR <fndicator> {indicator ... indicator}
INTEGER <integer> {integer ... 'Integer}
NUMBER <number> {number ... number}
STRING <string> {length}
Copyright (C) 1984 Data Access Corporation 07/18/84

DataF1ex 2.0 User's Manual FILES» ARGUMENTS AND COMMANDS F-7
——————
ELEMENT PROCESSING GROUP
CALCWLATE} <expression> to <arg>
INCREMENT <1nteger>
MOVE <arg> TO <arg>
MOVEINT <arg> TO <integer>
MOVENUM <arg> TO <number>
MOVESTR <arg> TO <string>
ENTER MACRO GROUP
ENDGROUP
ENTDISPLAY
ENTER <fi1ename> {filename ... filename}
ENTEREND
ENTERGROUP
ENTRY <fi1e.fie7d> {window {options}}
FORMS GROUP
ACCEPT <window> {TO <arg>}
AUTOPAGE <pagename>
BLANKFORM <pagename>
BLANKFORM <window> {THRU <window>}
CLEARFORM <pagename>
CLEARFORM <w1ndow> {THRU <window>}
DISPLAY <arg> {T0 <wíndow>}
FORMAT <window> {{optiorisñ
NAME <pagename.#> <windowname> {windowname ... windowname}
OUTCLOSE
OUTFILE <device>
OUTPUT <pagename>
PAGE <pagename>
PRINT <arg> {TO <w1ndow>}
INDICATE CROUP
IF <arg> <mode> <arg> <command>
INDICATE {NOT} <indicator> AS <arg> <mode> <arg>
MODES: LT, LE. EQ, GE, GT, NE, IN, MATCH
INDICATE {NOT) <indicator> GROUP ANY/ALL [indicator indicator]
{AND/OR ANY/ALL [indicator indicator {indicator}]}
INDICATE {NOT} <indicator> STATUS <fi1ename>
INDICATE <indicator> TRUE
INDICATE <indicator> FALSE
KEY GROUP
BACKFIELD
ENTAGAIN
ENTERMODE
KEYPROC <f1exkey>
MULTI-USER GROUP (compile, but do not execute under single-user)
DESPOOL
IFCHANGE <arg> <command>
LOCK
REREAD {filename ... filename}
UNLOCK
——————— ——————————————————
Copyright (C) 1984 Data Access Corporation 07/18/84

F-8 FILES, ARGUMENTS AND COMMANDS DataFlex 2.0 User's Manual
————————
———————
REPORT MACRO GROUP
FORMFEED
OUTPUT <section>
SECTIONS: HEADER, SUBHEADER#, BODY, SUBTOTAL, TOTAL
PAGEMECK <1ines>
REPORT <fi1e> {BY <index.n or RECNUM>) {BREAK fi1e.field
file.fie1d ... fi1e.fie1d}
REPORTEND
SECTION <section>
SEQUENTIAL I/O GROUP
CLOSE INPUT
CL0SE_OUTPUT
DIRECT_INPUT <device>
DIRECT_0UTPUT <device>
READ <arg> {arg ... arg}
READLN <arg> {arg ... arg}
WRITE <arg> {arg ... arg}
WRITELN <arg> {arg ... arg}
STRING GROUP
APPEND <destination string> <string> {string ... string}
ASCII <string> TO <number>
CHARACTER <number> TO <string>
CMDLINE <string_ variab1e>
LEFT <string_variab1e> TO <string_variab1e> <1ength>
LENGTH <string_variab1e> TO <number>
MID <string_variab1e> TO <strfng_variab1e> <1ength> <start>
PAD <string_variab1e> TO <string_variab1e> <7ength>
POS <string_variab1e> IN <string_variab1e> TO <number>
RIGHT <string_variab1e> TO <string_variab1e> <1ength>
TRIM <string_varíab1e> TO <string_variab1e>
UPPERCASE <string_variab1e>
STRUCTURED CONTROL GROUP
BEGIN -END
FOR <integer> FROM <arg> TO <arg> -LOOP
REPEAT -UNTIL <arg> <mode> <arg> -LOOP
WHILE <arg> <mode> <arg> -END
MODES: LT9 LE, EQ, GE. GT
SYSTEM GROUP
COPYFILE <sourcefi1e(s)> TO <destfi1e(s)>
DIRECTORY <specifications>
ERASEFILE <fi1ename>
FILELIST <fi1enumber> TO <disp1ay name> {filename}
REGISTRATION
RENAME <fi1enamel> TO <fi1ename2>
RUNPROGRAM <prog_name.com> {program_arg}
SYSDATE <date> <number> {number}
SYSTEM
Copyright (C) 1984 Data Access Corporation 07/18/84

——————————————
————————— F"9
———
_~___~ __ """""==".==",===="=========",====".===", ———————
===--===== SPECIFICATIONS ==========
_____~ ==========
—————————
Provided by DataF1ex:
File Maintenance (on line, ¶nteractive)
File Update (on line, interactive)
·Data Entry (on line, interactive)
Report Generation
Query (on 1inep interactive)
Command language
Data Base Management
Pascal Library (optional)
Program-independent menu system
Microprocessor Environment:
8080. Z-80, 8085 etc.
8086, 8088, 80186» 80286 etc.
Supported Operating Systems:
CP/M, CP/M-86, MP/M-86, MS-DOS, PC-DOS,
TurboOOS, Novell Sharenet, PC-Net, 3COM,
OMS Hi-Nét» Molecular N-Star» Te1evideo
khmOST, Action DPC/OS, Omninet, Network.
IBM "PC" with Corvus
Requirements:
Transient Program Area: (8 bit): 52k
(16 bit): lOOk
CRT with addressable cursor
60Ok of disk storage
Purpose: Applications Development
Structure: Extended Relational DBMS With
Data Independent Utilities and
comand language.
Host Language:
Pasca1/MT+ (C) Digital Research) (NOt
required for execution or configuration.)
NOTE: Many DataF1ex utilities are
themselves actually DataFlex configurations.
Maximum DBMS Files: 125
Maximum data elements per file: 255
Maximum indexes per file: (8 bit): 4
(16 bit): 9
Pius one "ad hoc" index.
_==_=_========================——~— ———————————
——————-——
Copyright (C) 1984 Data Access Corporation 05/16/84

F-lO SPECIFICATIONS DataF7ex 2.0 User's Manua7
Maximum elements per index: (8 bit): 4
(16 bit): 6
Maximum File sIze: 8Megabytes
Maximum records per file: 65g536
Maximum record size: 49Ó(jÓ bytes to *MEML
Indexing: B+ Multi-1evel ISAM
Data File type Packe&
fixed-length random access
Numeric Type: Packed BCD fixed point.
Numeric precision: 4places after decimal point
Numeric range: +or -99,999,999,999,999.9999
Maximum data files Qpen (*MEML) only
sfmu1taneous1y: (8 bit): at least 5
(16 bit): at least 10
(plus associated index files)
Maximum configuration lines: 32AOO (*MEML)
Maximum line length: 255 characters
Maximum argument size: 80 characters
Maximum number of windows: 32>000 (*MEML)
Maximum pages per configuration: 255 (disk or mmory residentj
Maximum number of indicators: 89 (plus 38 pre-defined)
Maximum number of variables: 32AOO (*MEML)
Maximum INTEGER variables: 40
Integer range: +or -32»767
Flex-keys: l89 terminal-independent
Sub-category breakpoint levels: 9
Sequential files: Line- or comma-delimited
Device-independent.
Command f't7e characteristics: Protected sourcep semi-compiled.
—— —————————
———————
Copyright (C) 1984 Data Access Corporation 05/16/84

DataF1ex 2.0 User's Manual SPECIFICATIONS F-ll
——————————————
=."=== ~————_~___—_""""""
Types of arguments: Text strings
Numeric (bcd)
Integer
Date (extended julian)
Types of cotmands: Data Mov«nent & conversion
Indicators (conditionals)
Calculation
Control, unstructured
ControL Structured
IMAGE forms
Data Entry
Reporting
Data Base Manipulation
String
Sequential I/O
Console I/O
(terminal-independent)
Macro pre-processor
Uti1itles: Data Base Definition
Data Base recovery
Terminal & system installation
Text editor
Program generation
Query
Configurable MENU
Configuration compiler
*MEML -Memory 1imfted, affected primarily by the available memory
(TPA) in the computer system and the memory consumed by the rest of
the configuration.
————
—————
Copyright (C) 1984 Data Access Corporation 05/16/84

F-12 SPECIFICATIONS DataFlex 2.0 User's Manual
===~ =======================================
=""===~=~===="============================= ——~=======~~=========
THIS PAGE INTENTIONALLY LEFT BLANK
=~"" == ====== ""~=="====
Copyright (C) 1984 Data Access Corporation 05/16/84

-———+————— ""======== F"13
===~~~————————~~ ==""""===
""__ ~
=ZEFÉ== COMPILER ERROR MESSAGES _=~__=: :::
TYPES OF ERRORS
COWILE time and RUN time: It is important to distinguish those
actions and errors which occur when aprogram is compiled from those
which occur when a program is run. The DataF1ex compiler takes your
English command source code and translates it into a"compiled" form
that is more efficient to execute, This compiled form is not machine
language, but an internal form unique to DataFlex.
When this translation (compilation) takes place, the compiler may run
into acomíand line which it doesn't know how to translate; this (s
called acompile time error. Most errors in the use of commandsp as
well as typographical errorsg are caught at compile time, which
guarantees that your program is syntactically correct when it runs.
Other errors may be caused by the action of the operator, the data
which is acted upon by the program. or faulty logic by the programmer.
These errors are usuaRy flagged when the compiled program is actually
run (runtime). For this reason, compile time errors and runtime
errors are separated into separate groups. Be sure to look at the
correct table when trying to diagnose an error!
CCNFJGURATION SYNTAX ERRORS
If you misspell or misuse aDataF1ex reserved word in acommand line,
you will get asyntax error when you compile the configuration. These
errors are the simplest to find and the easiest to correct. Simply
edit the configuration, make corrections on the indicated 1ine(s)» and
recompile. You may need to refer to the manual to determine the
required syntax for the connand you are trying to use. Pay particular
attention to the arguments of the command and what type of argument is
reasonab.le and legal to put in aparticular position (é.g.o trying to
move a new value into aconstant is both illegal and unreasonable).
Most syntax errors are caused by simple misspellings or typographical
errors. Very few syntax or usage errors will occur at runtime. Those
which do usually arise from use of window- and field-indexing, which
can change avariable's type at runtime.
Another type of compile time error is the use of duplicate symbols.
If you use the same name for two variables or labelm you will get an
error. Each label and symbol must be uniquel (DataFlex won't detect
duplicate use of avariable if both uses are syntactically consistent
with each other, so this is not atotal failsafe.) You must also
avoid the use of DataF1ex reserved words. These reserved words
(listed in the section on "Reserved Words of DataFlex") canNOT be used
as symbol names. It IS legal to use symbol substitution for command
names. This will not generate an error, but great care must be
exercised and this practice is not recommended. If you use acomand
name as a symbob you will get an error when you then try to use that
command. In summary, when naming your filem pagesg variables and
labels, make sure to use unique names which are not reserved words.
————————————————————————
—————————
Copyright (C) 1984 Data Access Corporation 06/08/84

F-14 COMPILER ERROR MESSAGES DataFlex 2.0 User°s Manual
__ __________=— =
~ ~
The DataFlex compiler program (COMP.COM) completes four processes in
two passes through the source file. There is aclass of errors for
each process:
l) Initialization ~_"_—0
2) Forms 1-------> PASS ONE
3) Macro —————g
4) Compile >PASS TWO
INITIALIZATION ERRORS:
SOURCE FILE NOT FOUND
Check disk directory for correct file name.
FORMS ERRORS:
IMAGE NOT FOUND
Check that first line of file begins with "/". If no image
desired begin with "l*".
MACRO ERRORS:
MEMORY: 'amount_m«nory_avai1ab1e'
Warning updated every time a new symbol is encountered if
remaining memory is less than one kilobyte. Displays amount
of memory remaining available. If "Out of Memory" error is
declared, see compiler option "M" for possible fix.
150 MACRO BUFFER SIZE EXCEEDED
Macros as defined are too large to fit in available buffer
space. Usually the result of asyntax error. 0therwisep
compiler option "M" may permit compilation with larger macro
expansion buffer.
151 INCLUDE FILE NOT FOUND
Check device directory to ensure that the specified file
exists.
152 UNEQUAL PARENTHESES IN EXPRESSION
Open and"c1ose parentheses not matched.
155 INDICATOR NOT RESOLVED: 'symbol _name'
Indicator used has not been defined. Often caused by
m1sspe11ing.
155 TOO MANY INDICATORS
Maximum of 3indicators per line exceeded.
156 NO ACTIVE CONDITIONALS
A#ELSE appears in a macro wfthout a#IF being open.
—
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFjex 2.0 User's Manual COMPILER ERROR MESSAGES F-15
~___________ =—_—~ =————— ———~===================
157 FORWARD REFERENCE: 'symbol name' NOT RESOLVED
Label (GOTO or GOSUB) not found. Often caused by spelling
inconsistencies. If the error is not apparent in the source
H1éo check whether one of the cotmands may be using an
internal GOTO or GOSUB.
159 TOO MANY CONTROL BLOCKS
The maximum number 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
structured control commands, among other things.
160 TERMINATED CONT'L BLOCX W/O BEGIN
Acontrol block terminator appears without apreceding block
initializer. Examples are END (requires BEGIN or WHILE),
UNTIL or LOOP (require REPEAT), etc.
162 TYPE MECX ERROR IN ARGUMENT: ARGUMENT REQUIRED
The comand was issued with fewer than the minimum required
number of arguments.
162 TYPE CHECX ERROR IN ARGUMENT: CONSTANT NOT ALLOWED
162 TYPE QIECX ERROR IN ARGUMENT: DATE NOT ALLOWED
162 TYPE MEO ERROR IN ARGUMENT: EXPRESSION NOT ALLOWED
162 TYPE (MECX ERROR IN ARGUMENT: FILE ELEMENT NOT ALLOWED
162 TYPE CJ1EO ERROR IN ARGUMENT: GP INDICATOR "Cl" NOT ALLOWED
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 NOT ALLOWED
162 TYPE mEcx ERROR IN ARGUMENT: MUST BE AN INDICATOR
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 "{}" NOT ALLOWED
162 TYPE mEcK ERROR IN ARGUMENT: SHOULD NOT BE DEFINED
162 TYPE MECK ERROR IN ARGUMENT: STRING NOT ALLOWED
Astring, or string variable. was used in acommand which
does not deal with strings (uses numericsp etc.).
——— —— == = = ===
~~"""""""""""==——==—"—==——————
Copyright (C) 1984 Data Access Corporation 06/08/84

F-16 COMPILER ERROR MESSAGES DataFlex 2.0 User's Manual
———————
—————————
162 TYPE OECK ERROR IN ARGUMENT: TOO MANY ARGUMENTS
Multiple arguments were used with acommand which allows only
one argument, or multiple arguments were used with acommand
which can handle only acertain number (see explanations of
comands in other sections of this manual).
162 TYPE mEcK ERROR IN ARGUMENT: VARIABLE NOT ALLOWED
Avariable name was used in acommand which cannot deal with
variables.
162 TYPE OEQ( ERROR IN ARGUMENT: WINDOW NOT ALLOWED
A window was used in acommand which cannot deal with windows.
164 COMMAND NOT FOUND: 'symbol name'
Acommand in the source file is not present in FLEX.CFL
Misspellings frequently trigger this error. Not rePACKing
FMAC after modifying it for new macros can trigger this error,
as can use of areserved word as a variable or other improper
use. This error occurs if FLEX.CFL is not on the default
drive.
170 CANNOT REPLACE TO ITSELF
Logic of replacement is not valid. Often caused by misuse of
reserved word(s) or syntax error(s).
COMPILE TIME ERRORS
ICODE FILE NOT FOUND
Intermediate code file from first pass of compilter not found.
Usually afailure of hardware or operating systan. Adisk
full condition is afrequent cause of this error.
101 NUNBER EXPECTED
A numeric expected but not found. ICODE error in the cormiand
sequence.
102 LINE NUK3ER OUT OF SEQUENCE
Interna) code inconsistency. Error in auser-defined macro.
103 ILLEGAL VARIABLE TYPE
Compiler type check of the ICODE.
104 DUPLICATE VARIABLE DEFINED
Same variable defined twice as different types. Coding error.
105 TYPE/CLASS NOT FOUND .
Internal compiler conf7ict caused by acoding error.
106 ERROR IN WRITING .FLX FILE
Operating system error (Disk or Directory Full).
107 ERROR IN CLOSING .FLX FILE
Operating system error (Disk or Directory Full).
Copyright (c) 1984 Data Access Corporation 06/08/84

DataF1ex 2.0 User's Manual COMPILER ERROR MESSAGES F-17
===—=========—————————————— ———————————
—————-——
108 OPEN PARENTHESIS EXPECTED
Start of an expression not found.
109 UNEQUAL PARENTHESES
End of an expression not found.
Ill INVALID ARGUMENT
Internal compiler conflict. Unresolved symbol encountered.
112 INVALID ENTRY OR FORM COMMAND
Check options "{}" for validity and spelling.
122 LINE TOO LCNG
The maximum line length allowed is 255 characters. This error
is triggered by any line longer than that. Check for omission
of carriage return/line feeds from the source file.
———————————————————— ————————————
Copyright (c) 1984 Data Access Corporation 06/08/84

F-18 COMPILER ERROR MESSAGES DataF1ex 2.0 User's Manual
————
THIS PAGE INTENTIONALLY LEFT BLANK
Copyright (C) 1984 Data Access Corporation 06/08/84

———————————————— ———————~—~~—— F"19
—————————
————— —————
TEEEa===-- RUNTIA ERRORS AND DIAGNOSIS ::::::::::
——————————
-————-
~
TYPES OF ERRORS
Runtime errors are those which occur when you are actually running a
configuration (as opposed to compiling it). Compiler errors are
discussed in the preceding section of this manual. Runtime errors can
be the result of afault in afile definition, the specifications made
in the installation of Dataf1e: u configuration of your operating
system, or operator actionsI but most runtime errors result from a
condition which has to be corrected in the configuration. When this
is the case, corrective action usually includes the same steps
required to correct compiler errors: edit the configuration, make
corrections, and recompile the configuration. Other steps (discussed
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.
If you are dealing with aparticular errom find it in the numerical
list below and review the discussions under the c1assification(s) to
which it is assigned. Agiven error may be discussed under more than
one classification where the error may be triggered by more than one
cause.
OP: OPERATOR ERRORS
MH: MEDIA AND HARDWARE ERRORS
LID: LIMITATION, DISK
L/M: LIMITATION, MEMORY
L/C: LIMITATION, CONFIGURATION
CE: CONFIGURATION ERROR
SU: SET UP ERROR
MU: MULTIUSER ERROR
ERROR # DESCRIPTION CLASSIFICATION
OPERATING SYSTEM ERRORS:
lREADING UNWRITTEN DATA (SYSTEM) MH
2OPERATING SYSTEM ERROR NH
3 CANNOT CLOSE CURRENT EXTENT m
4 SEEK TO UNWRITTEN EXTENT (SYSTEM) PH
5DIRECTORY OVERFLOW (DISK FULL) LID
6SEEK PAST END OF DISK (DISK FULL) LID
==== ==
Copyright (c) 1984 Data Access Corporation 06/08/84'

F-20 RUNTIME ERRORS AND DIAGNOSIS DataF)ex 2.0 User's Manual
ERROR SDESCRIPTION CLASSIFICATION
DATAFLEX ERRORS:
10 +++ OUT OF MEMORY +++ L/M,CE
II NUNBER TOO LARGE FOR FIELD ALLOCATION OP. CE
12 WINDOW NUDER OUT OF RANGE CE
13 AN ENTRY IS REQUIRED ON THIS WINDOW OP
14 PLEASE ENTER A NUNBER OP
15 INVALID ENTRY FOR THIS WINDOW OP
16 PLEASE ENTER A VALID DATE (MM/DD/YY) OP
17 NUMERIC ENTRY IS OUT OF RANGE OP
18 CAN'T OPEN SYSTEM COMMUNICATIONS FILE CE
19 MULTIUSER TIME OUT (BUSY TOO LONG) CE
20 READ ERROR ON INDEX FILE, REINDEX FILE m
21 WRITE ERROR ON INDEX FILE 6'H, LID
22 INDEX FILE DAMAGED, REINDEX FILE b'H
Z3 INDEX FILE FULL, EXCEEDS DEFINED SIZE L/C
25 RECORD NOT FOUND OP
26 CAN'T CLOSE INDEX FILE N, MU
28 DUPLICATE RECORDS NOT ALLOWED IN FILE OP, CE
30 CAN'T READ CONFIGURATION FILE CE, N
31 CONFIGURATION FILE NOT FOUND OP, CE
32 CAN'T OPEN OUTPUT FILE CE, PH, LID
41 FIND PAST BEGINNING OF FILE OP
42 FIND PAST END OF FILE OP
43 CAN'T OPEN INDEX FILE SU, MU
49 DEMO VERSION LIMITATION EXCEEDED L/D,BUY DATAFLEX
51 BAD FORMAT IN EXPRESSION (OPERAND) CE
52 BAD FORMAT OF EXPRESSIÓN (OPERATOR) CE
71 NO RECORD IN MEMORY TO DELETE OP, CE
72 FILE NOT OPEN SU, MU
73 FIELD NUKEIER OUT OF RANGE CE
74 CAN'T QPEN "FILELIST.CFG" SU, MU
75 CAN'T OPEN DATA FILE (.DAT) SU, MU
76 FIELD NUMBER OUT OF RANGE CE
77 FIELD NUMBER OUT OF RANGE CE
78 CAN'T UPDATE RECORD ZERO OF DATA FILE MH, MU
79 FIELD NOT INDEXED, CAN'T FIND BY THIS OP, CE
80 CAN'T CLOSE DATA FILE m, MU
81 RECORD NU*ER OUT OF RANGE m, m
82 EDITED RECORD NOT SAVED CE
83 TYPE NECX ERROR, ASCII USED AS NUR'BER CE
85 ISAM NOT LINKED TO PROGRAM PS
86 RELATED FIELDS ARE NOT THE SAME LENGTH CE
87 NO SUPERFINO PATH TO THIS RECORD OP
88 INVALID FILE NAME OP
90 PLEASE ENTER A VALID RECORD ID OP
91 ATTEMPT TO PUT INTO INTEGER CCNSTANT MACRO COkNAND
92 CONFIGURATION FILE NOT FOUND OP, SU, CE
96 CAN'T OPEN C0NFIGURATION!PROGRAM FILE OP, SU, CE
97 MULTIPLE GOSUB'S WITHOUT RETURN CE
lOó OPERATOR ERROR OP
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual RUNTIME ERRORS AND DIAGNOSIS F-21
—————
=
OP: OPERATOR ERRORS
The most comnon error is asimple mistake by the operator. DataFlex
handles many operator errors directly and gives you the capacity for
providing additional checks where required. Most of these error"s»
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 is operator instruction in those cases where the error
message itself is not sufficient for the purpose. The fo11ow1ng are
errors that can be generated by an operator in aproperly written
configuration.
ERROR li: NUMBER TOO LARGE FOR FIELD ALLOCATION
Number is too large for adata field
ERROR 13: AN ENIRY IS REQUIRED ON THIS WINDOW
Operator attempted to return past a"REQUIRED" window
ERROR 14: PLEASE ENTER ANUMBER
Entry of letters ("O", lower case "L"p etc.) in anumeric-typed
window
ERROR 15: INVALID ENTRY FOR THIS WINDOW
Entry does not conform to CHECK or format specification made in
the configuration. Some means for determining what is acceptable
must be provided for the operator (Help screen, prompt» custom
error message)
ERROR 16: PLEASE ENTER A VALID DATE (MM/DD/YY)
Improper date format or value
ERROR 17: NUMERIC ENTRY IS OUT OF RANGE
Entry does not conform to "RANGE" in entry option made in the
configuration. Some means for determining what is acceptable must
be provided for the operator (Help screen, promptp custom error
message)
ERROR 28: DUPLICATE RECORDS NOT ALLOWED IN FILE
An attempt was made to enter two records with the same key
ERROR 41: FIND PAST BEGINNING OF FILE
Previous record find attempted at beginning of file
ERROR 42: FIND PAST END OF FILE
Next record find attempted at end of file
ERROR 71: NO RECORD IN MEMORY TO DELETE
Delete key pressed with no record found
ERROR 87: NO SUPERFINO PATH TO THIS RECORD
Cánft superfind from this window; main file does not relate to
this field
ERROR 88: INVALID FILE NAME
A badly formatted or too long file name has been entered
Copyright (c) 1984 Data Access Corporation 06/08/84

F-22 RUNTIME ERRORS AND DIAGNOSIS DataF1ex 2.0 User's Manual
ERROR 90: PLEASE ENTER A VALID RECORD ID
No record is found with a"FINDREQ"; press FIND
ERROR 92: CONFIGURATION FILE NOT FOUND
Operator entered aconfiguration file name that is not found on
the indicated disk (also see Error 96).
kSi: MEDIA AND HARDWARE ERRORS
If there is aproblem with your equipment, disk media or operating
system, it will usually show up in the filing system. If aprogram
which was working properly suddenly stops working, it is usually (but
not absolutely always) some sort of hardware or media problem. A
problem which does not happen consistently under exactly the same
conditions is almost always ahardware problem. If you are having
this type of prob1«m you should run all of your system diagnostics
several times. You should also test other software which uses similar
resources. After any hardware malfunction, the data recovery utili-
ties REINDEX and FREL should be used (see the section on "Utilities").
r
Media and hardware errors refer to problems which result in physical
corruption of the data on your d1Skg not operator or program error.
There are two primary causes for these errors: disk media defects and
power failure. There is agood statistical probability that
eventually you will have amedia failure. It is equally true that you
Wi17 have power failures. DataF1ex keeps all of your data current on
disk in case of power fai1ure9 but different equipment and operating
systems have different capacities for coping with this probWn. Some
poorly designed equipment can destroy an entfre disk if the power goes
out. at the wrong time, while others handle it with almost no effect.
Probably the worst case is when asystan makes sma1b almost
undetectable errors on the disk after a power failure. Some power
"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 error, you should use the data recovery utilities FREL and
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
you should consider an uninterruptible power supply to prevent power
failure problems.
DATA RECOVERY TEWNIQUES: WHY WOULD YOU NEED TO RECOVER DATA?
Due to power problems, media failure and sometimes configuration
errors. it may become necessary to restore the Integrity of your data.
This recovery may be necessary on several levels. If you have a
corrupted disk directory9 you will need to recover all of the ffles on
adisk (primary data recovery). If only one file is corrupted, there
are specific methods for recovering one file (secondary data
recovery).
Before you start any kind of data recovery you should consider whether
It is worthwhile. Assuming you have made proper backups, it may be
sfmpler to restore your back ups and bring those files up to date by
maríua17y re-inputtfng data!
Copyright (c) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual RUNTIRE ERRORS AND DIAGNOSIS F-23
PRIMARY DATA RECOVERY: CORRUPTED DIRECTORY
If the directory on your disk is corrupted (see media and data
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
to the operating system instructions. Next, verify the disk drive to
make sure there are no media errors. Fjna1]y» restore the fields from
your backup. You should examine all data files for correctness and
proceed with secondary file recovery on ALL files.
SECCNDARY DATA RECOVERY: CORRUPTED FILE
If the integrity of any file is suspect. you should use both the FREL
and the REINDEX utilities on each file. The FREL utility will restore
the internal list of deleted records in the .DAT file and the REINDEX
utility will recreate the indexes. If there are any bad or duplicate
records in the file, they will be removed. After this procedure, it's
agood idea to use QUERY to look at the data in the files.
If the recovery programs cannot recover the badly damaged data. it is
usually better to restore the backup files than to try further
recovery. Let us emphasize the importance of good back upsl
Common errors associated with media and hardware failures are:
SYSTEM STOPS OR "LOCKS UP" at random times
Most probably a power flicker or spike! (Also check memory
available)
BOOS Error: Bad Sector; I/O Error; Read/Write Error
These errors are returned directly from the operating syst«n, not
from DataFlex. The exact wording may vary from system to system.
This type of error is caused by an unrecoverable hardware or media
error. The first thing to do is to reformat and restore your data
from backup. If this happens frequent1yp your hardware should be
examined. If you use floppy diskm you should consider another
brand.
ERRORS I, 2, 3, 4
These errors generally indicate problems with the operating
system's directory structure of the disk drive. Power failure is
acommon cause of directory corruption. If you have had other
media errorm they can show up later as directory problems.
Generally the disk should be reformatted and the data recovery
techniques used. (See also Disk Limitations)
ERRORS 20, 21. 22, 26
Errors 20. 22 and 26 are caused by acorrupted index fi1é»
generally caused by the same types of errors as above. Error 21
can also be caused by adisk full condition. The data mcovery
utilities should be sufficient. If this happens repeated1yg there
may be asubtle problem with the operating system or equipment.
If you are on a multiuser system, make sure that you fo?1ow the
multiuser checklist below.
Copyright (c) 1984 Data Access Corporation 06/08/84

F-24 RUNTIME ERRORS AND DIAGNOSIS DataFlex 2.0 User's Manual
———————
———————
ERROR 81: RECORD NUPBER OUT OF RANGE
If arecord number out of range error ocurrs when saving arecordg
it indicates acorrupted data file. You should use FREL and
REINDEX on the file.
ERROR 30: CAN'T READ CONFIGURATION FILE
Configuration file (.FRM) is not acompiled DataF1ex configuration
or the file is damaged.
ERROR 32: CAN'T OPEN OUTPUT FILE
The disk is full or the file name is improper.
ERRORS 78, 80
Directory is damaged. (above)
LID: DISK LIMITATIONS
Each fi1eg program and configuration takes up disk space. In partí-
cu1am if you are using afloppy-disk-based systam you will probably
run into disk full conditions. You may run into this at any time
whether creating, editing, or compiling any type of file. The error
code for afull disk depends on what type of file you are processing.
(The error when you are running DataFlex is different from the same
error when you are using the EDITOR.) In any Caseg you will either
have to reorganize the files on your disks or get more storage space.
Additiona11y? be aware that the last edit or addition you attempted
was probably not saved properly. Note that there are TWO ways to fill
up your disk: (l) the storage can be used up; or (2) the directory
(number of files) can be filled úPa Both of these conditions are
treated in the same way; you must remove files from your disk.
The fo11owing runtime error codes are returned for disk full.
ERROR 5: DIRECTORY OVERFLOW (DISK FULL)
Directory (number of files) full.
ERROR 6: SEEK PAST END OF DISK (DISK FULL)
Disk space used up.
ERROR 21: WRITE ERROR ON DISK FILE
Disk full while trying to expand index file.
ERROR 32: CAN'T OPEN OUTPUT FILE
Disk directory full while trying to open an output file.
NOTE: The compiler needs disk space on the logged-in drive to store
temporary files created during the compile process. Typica?1yp the
space needed is approximately the size of the configuration source
file, If there is not enough space for the compiler to write its
temporary files, Errors lor 2will occur during compilation.
—————-—-.-,-—
Copyright (C) 1984 Data Access Corporation 06/08/84

.
DataF1ex 2.0 User's Manual RUNTIIE ERRORS AND DIAGNOSIS F-25
———————————————————————————— ——————————
L/M: MEMORY LIMITATIONS
With DataF1exrs capacity to relate many data files and have many pages
of screenm it is possible for aconfiguration to simply run out of
RAM (random-access memory). There are two factors at work here: the
amount of memory available to aprogram (TPA, for Transient Program
Area) and the size of the program or configuration. It is also
possible to run out of mmory during the compile phase. Compile time
minimum memory is different from runtime minimum mmory. Minimum
compile manory is 1000 bytes. You should find out how much m«nory
your system has available to the program AFTER the oPerating system is
loaded.
Atypical computer with a64-kilobyte Z80 processor can have from 42
to 58K of TPA. In B-bit systems, aminimum of 52k TPA is required to
run DataFlex. On a16-bit system you must have aminimum TPA of
lOOk. This means that If your computer has 128 kilobytes of hardware
RAM and your operating system consumes 34K» you do NOT have enough
manory to run DataFlex properly. Note that operating systans that
control hard disk drives take more memory than comparable floppy-based
systems, For example, a16-bit system with 128K of hardware RAM that
runs DataFlex successfully with floppies may not be able to run
DataFlex if ahard disk driva is installed unless more RAM memory is
also added to handle the larger hard disk driver program. The more
memory you have, the larger the configuration you can hand1ep up to a
point. On a16-bit system, DataFlex will take advantage of amaximum
of about 192K of TPA, so the maximum capabilities of DataFlex are
likely to be realized with 256K of hardware RAM. Further expansion of
RAM would probably yield no benefits to running DataFlex.
When DataF1ex is running0 it maintains an internal predefined variable
called MEMAVAIL, which will return the amount of unused memory
available dynamically (the value changes whenever memory usage
changes). This amount is what remains after DataF1ex and your
configuration are loaded. If you run the following test program it
will show you your systemG free memory as of the time you run it:
l*
SHOWLN MEMAVAIL
SYSTEM
The number displayed should NEVER be below WJ)ÓÓp and if it is above
3L1O(L your available memory is greater than DataF1exIs maximum
capability to utilize manory. Aresult below 10.000 indicates that
your computer and operating system as configured do riot have
sufficient TPA available to run DataFlex.
If you are working with aparticularly large configuration that may be
close to exceeding available TPA, you should incorporate the procedure
shown above at certain points in the configuration so you can keep
track of remaining TPA availability. IMPORTANT NOTE: DataFlex
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 06/08/84

F-26 RUNTIME ERRORS AND DIAGNOSIS DataFlex 2.0 User's Manual
—,_===r'm
below 57Ó()Óp the possibility of trouble at run time exists, and is a
virtual certainty when MEMAVAIL declines below 2.000.
HOW BIG MUST MEMAVAIL BE?
The amount of memory that must be available to run a particular
configuration is the greater of: (a) the largest index for the data
fi1e(s) used by the configuration; or (b) the largest screen image in
the configuration.
Atypical screen image is about 2AOO bytem so the largest data file
index is usually the limiting factor. The minimum memory requirwent
can be estimated with the following formula based on the information
returned when an index is created in FILEDEF or REINDEX:
(512+KEYSIZE)*(LEVELS+1)
Where KEYSIZE Is the size in bytes of the key being indexed
and LEVELS is the number of ISAM levels required.
Note that LEVELS can be computed by the ISAM module ONLY when the
index is created, so take careful note when these numbers are
displayed at the end of index creation in FILEDEF, AUTODEF, or
REINDEX. The number of levels is based on the key size and the
maximum number of records you define in FILEDEF or AUTODEF. So if you
define afile for 30AOO records and it only has 1,000 with data in
them. you may be wasting memory! This precaution guards against
running out of memory halfway through entering the data to afile,
since the maximum memory is used even when the actual data and index
files are still small.
WHAT USES MEMORY?
Most of the resources available in DataFlex (or any other language)
consume some memoryp but there are two areas that typically consume
your work area: open data files and screen image windows. Generally
if you can do without opening adata file in an application, you will
save significant memory. The following table should help you
determine what uses memory and therefore where you should look should
you have to conserve it. THE FOLLOWING FIGURES ARE IN BYTES.
8-Bit 16-Bit
COMMANDS
Each comnand line II II
Indicators Free -included in commands
Each string variable Actual string length +2
Each numeric variable 10 10
Each integer variable Free -pre-allocated
Each string constant Actual string length +l
Each numeric constant LO 10
Each expression String length (compacted)
Copyright (c) 1984 Data Access Corporation 07/18/84

DataFlex 2.0 User's Manual RUNTIME ERRORS AND DIAGNOSIS F-27
8-Bit 16-Bit
SCREEN IMAGES (PER PAGE)
Overhead (unbuffered) li 11
0verhead(buffered) Actual page size
Each window Actual window size +li
Each subtotal 10 ID
Each range check 20 20
Each check string Actual string length +l
DATA FILES (PER OPEN FILE)
Overhead 120 180
Each field 810
Each BATCH index 128 170
Each ON-LINE index (Number of 1eve1s)*512
Record buffer (actual) Record length (per FILEDEF)
If aconfiguration runs out of memoryy it can be divided up into two
or more configurations but still run as though one with the CHAIN
command (see the section on "Controlling Execution Sequence").
INDICATIONS OF OUT OF MEMORY
ERROR 10 (DataFlex out of memory)
Recursion stack overflow (PASCAL error)
OUT OF MEMORY (compile time)
In some cases, systems may 'lock up' or drop to the operating
system
Final note: There are no "secrets" for getting more memory. If there
werep they wouldn't be secret; so please doMt ask your dealer or
distributor for one.
+
L/C: CONFIGURATION LIMITATIONS
Designing aconfiguration necessarily involves specifying limits on
the application's capacities. Examples of these limits are:
Maximum number of records in afile
Field lengths
Window lengths
Frequently, configuration limitation errors are triggered by errors on
the part of the operator, such as entering anumber that is too large
by mistake. In such Casesg the resultant overflow error serves as an
automatic form of range verification. If the capacities are not
specified thoughtfully, however, they may hamper the purposes which
the configuration was designed to serve. If field sizes must be
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
requirement to rekey the data. First, the data should be written to a
new disk file in READ format using the DataFlex QUERY utility, then
the file definition changed, and then the data reread back into the
restructured file with aconfiguration built using the DataFlex READ
utility.
Copyright (C) 1984 Data Accc55 Corporation 07/18/84

F-28 RUNTIME ERRORS AND DIAGNOSIS DataFlex 2.0 User's Manual
The following errors are those most frequently caused by configuration
limitations:
ERROR II: NLM3ER TOO LARGE FOR FIELD ALLOCATION
This is usually caused by the operator entering too large anumber
in adata window. 0therwise9 anumeric field is just not big
enough to hold the required value. You may have to change the
file definition to allow the field to hold alarger number.
ERROR Z3: INDEX FILE FULL, EXCEEDS DEFINED SIZE
In FILEDEF and AUTODEF you are asked for the maximum number of
records that could be in afile. If this number is greatly
exceedech you will get Error 23. To fix this, simply re-enter
FILEDEF and change the maximum number of records. You will then
have to rebuild ali indexes for the file using REINDEX.
CE: CONFIGURATION ERRORS
In any program or configuration, it is possible to use comands which
are syntactically correct but which make no sense or cause errors when
the progam is run. These are generally cases where the operation of a
command is not fully understood or is applied improperly. It may be
necessary to put in special "debugging" statements to determine the
state of the program while it is running. Sti16 the most important
step is to read the manual carefully and review the sample configura-
tions and programs providecL Due to DataF1ex's great f1exibi1ityp
configuration errors can appear to be other types of errors.
DATA CONSISTENCY
Data consistency errors are those caused by improper operation of the
applicátíÓn and its failure to do the checks necessary to guarantee
data consistency. An example of this would be the deletion of a
customer while there are still transactions for that customer in
another data file related to the custcmer file. In transactional
environments it is necessary to prevent the user from deleting such
records. One way to do this is to keep acounter of transactions
posted to arecord and only allow deletion when that counter is zero.
Arelated error is allowing the user to change the primary key of an
active record. It is best to use record number relationships as well
as data relationships if you want to allow the user to change key
data. Noto that in some applications it is normal and acceptable to
have "null" relationships, sc) the application must check for this
condition. QUERY can be avaluable tool for inspecting files and
diagnosing data problems. Once aproblem is uncovered. acheck should
be put into the application to prevent it from happening again.
Data consistency errors are usually at issue when reports have
incorrect totals or data entry screens show the "wrong" records
related.
Copyright (c) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual RUNTII¶Z ERRORS AND DIAGNOSIS F-29
.
The following errors typically arise from configuration errors:
ERROR IQ: +++ OUT OF MEMORY -F++
New installation on l6-bitp run SETSCREEn. Otherwise, out of
memoryg see above.
ERROR li: NLNBER TOO LARGE FOR FIELD ALLOCATION
Number does not fit into the allocated field; redefine field for a
larger value.
ERROR 12: WINDOW NURER OUT OF RANGE
Window number out of range. This is usually caused by improper
use of window indexing. Recount your windows and/or twporari1y
print the index value to the screen while the program is running.
ERROR IB: CAN'T OPEN SYSTEM COMMUNICATIONS FILE
DataF}ex cannot establish multiuser operating systm communica-
tions. Check your instal1at1on notes for information relating to
your particular operating system.
ERROR 19: MULTIUSER TIME OUT (BUSY TOO LONG)
Multiuser time out. The systan is in aLOCKED state for too long.
Check that none of your programs does aLOCK or REREAD without an
UNLOCK. On avery busy system it is possible to get this error
occasionally through no fault of the configuration.
ERRORS 25, 4b 42
FIND errors--FIND connand was unsuccessful. To determine what the
problem is. temporarily print the value of the record buffer to
the screen directly before the FIND. Also with error 25p be
conscious of the record numbem which must be part of the key if
included in the index for aFIND EQUAL.
:Ir .
ERROR 28: DUPLICATE RECORDS NOT ALLOWED IN FILE
ASAVE was done on a record having aunique key that matches akey
already in the database. If unexp1ainab1é» try reindexing the
file.
ERROR 31: C(NFIGURATION FILE NOT FOUND
Configuration file not found. This is caused by an attempt to
load aconfiguration that does not exist. This can also be caused
by an improper menu configuration or an error in a"CHAIN"
statement.
ERROR 32: CAN'T OPEN CUTPUT FILE
If the OUTFILE or DIRECT_0UTPUT connand cannot create the output
file, you will get an error 32. This can be caused by disk full
or a bad file name.
ERROR 51: BAD FORMAT IN EXPRESSION (OPERAND)
If the expression evaluator runs across an improper argument when
it is expecting an argument9 you will get an error 51. Most
expression errors are not reported until runtime. Example:
(1+*2). If unexp1ainab1e9 you may have adata consistency error
(see above).
Copyright (C) 1984 Data Access Corporation 06/08/84

F-30 RUNTIME ERRORS AND DIAGNOSIS DataF1ex 2.0 User's Manual
~~ ————————
ERROR 52: BAD FORMAT OF EXPRESSION (OPERATOR)
If the expression evaluator runs across an improper function Ob
-, *, or l) when it is expecting afunctiom you will get error 52
at runtime. Example: (1=2)
ERROR 71: NO RECORD IN MEMORY TO DELETE
If aDELETE comand is issued against an INACTIVE record bufferp
the DBMS WoMt know what record to delete and will report error
71. DELETE must be used with a"FOUND" record.
ERRORS 73. 76, 77: FIELD NUmER OUT OF RANGE
Field number out of range. This is generated by improper use of
field indexing. Carefully check the index values and make sure
they are in range. This can also be caused by using an old
configuration with amodified file definition.
ERROR 79: FIELD NOT INDEXED, CAN'T FIND BY THIS
Field not Indexed on FIND. A FIND comand has been issued on an
inactive index or anon-indexed field.
ERROR 82: EDITED RECORD NOT SAVED
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
the record wIll be lost from the index9 so this errcjr should be
corrected not only in your application, but in your database as
well. After an error 82 has occurrech the file must be reindexed.
Never MOVE to an active record without aSAVE!
ERROR 83: TYPE CHECK ERROR, ASCII USED AS NUMBER
Type check error. This often arises from use of an old
configuration with adatabase whose file definition has been
modified. Update the configuration to take into account the
revised file structure.
ERROR 86: RELATED FIELDS ARE NOT THE SAME LENGTH
Related fields MUST be exactly the same length and type. Check
your file definitions for all files involved.
ERROR 96: CAN'T OPEN CONFIGURATION/PROGRAM FILE
Configuration/program file not found. This is usually triggered
by aQIAIN or RUNPROGRAM cormand whose target file cannot be
found. Review drive assignments of files concerned and make sure
they are correct in the comand, This is often occurs in MENU
because of incomplete drive designation in action specifications.
ERROR 97: MULTIPLE GOSUB'S WITHOUT RETURN
For every GOSUB or use of aKEYPROC. there must be aRETURN. If
not, after 20 GOSUBS, you will get Error 97. Also if your KEYPROC
is called from within asubroutine. you must RETURN to within that
subroutine.
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual RUNTIKE ERRORS AND DIAGNOSIS F-31
—————————— ——————————————
SU: SET UP ERRORS
Set up errors refer to problems associated with installation of the
DataFlex system or the placement of the required files or the data
files on your system. There are some files that are required to be on
the default drive and other files that reside on the drive specified
by the configuration. Refer to the appendix "File Name and Extension
Types" for more information on the types and locations of files. The
followfng files are ABSOLUTELY required on the default (logged in)
drive:
AT ALL TIMES:
FILELIST.CFG (current terminal configuration and
location/names of active data files)
AT RUN TIME:
RUN.OVF (B-bit runtime overlay file)
RUN.OO? (l6-bit runtime overlay files)
FLEXERRS. DAT (Error messages)
AT COWILE TIME:
COW.OVF (B-bit compile overlay file)
FLEX.CFL (Compiler connand file)
*,FD (File definition file--one for each data file)
WHEN RUNNING SETSCREEN:
TERML IST.CFG (List of terminal codes and your serial number)
DataFiex will not run if you have not activated FILELIST.CFG by
running SETSCREEn.
INSTALLATION ORDER
The DataFiex distribution disks contain mu1t1p1e copies of
FILELIST.CFG and MENU.DAT. These set up DataFlex properly to run on
floppy or hard disk systems depending on the sequence in which the
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 following errors coímonly arise from improper set up:
ERROR 43: CAN'T OPEN INDEX FILE
The index information is kept in aseparate file from the actual
data. The indexes have the "ROOT" file name with a".K?"
extension, where "?" is the index number. These files must reside
on the same drive as the data file (see Error 75).
ERROR 72: FILE NOT OPEN
If aDBMS file is used before it has been OPENed, you will get
error 72. This can also be caused by afile not being on the
diskp in which case you should get an error 75 first.
ERROR 74: CAN'T OPEN "FILELIST.CFG"
FILELIST.CFG must be present on the logged in disk drive.
————
———-—— ——————————
Copyright (C) 1984 Data Access Corporation 06/08/84

F-32 RUNTIME ERRORS AND DIAGNOSIS DataFlex 2.0 User's Manual
————————————
——————————————
ERROR 75: CAN'T OPEN DATA FILE (.DAT)
The data file name contained in FILELIST.CFG can't be found. The
"ROOT NAME" has ".DAT" appended to it for the OPEN. Make sure
that the root name in FILEDEF corresponds with the actual name and
drive of the data file as shown in your operating system's
directory.
ERRORS 92, 96
Configuration/program file not found. This is usually triggered
by aMAIN or RUNPROGRAM comand whose target file cannot be
found. Review drive assignments of files concerned and make sure
they are correct in the ccmnand. This can be caused by incorrect
installation order.
MU: MULTIUSER ERRORS
If you are running DataFlex mu1t1user7 you should scan this check list
before you experience any data related problems.
I) Is multiuser set in SETSCREEn? Option I of SETSCREEn must be
set to Multiuser. For Option 2, "Pre-a11ocate data fi1es'4
refer to the installation instructions provided on loose sheets
for your particular computer or operating systan.
2) Is the data file set to reread? For adata file to be updated
by multiple users, it must be set to re-read, true in FILEDEF.
3) Have you followed each step of the installation instructions?
Each multiuser version is alittle different. These differ-
ences are taken into account in the installation instructions.
4) Is your DataFlex amultiuser version? When DataF1ex signs on
after the systan has been booted, it wIll show you the
multiuser operating system that your copy of DataFlex is to
operate on. Make sure this matches (or is compatible with)
your operating system. If it signs on "single user" or with an
incompatible operating syst«n, you will need to order a
different version of DataFlex. Contact your dealer.
5) Is the operating system configured correctly? Most multiuser
operating systws require you to set "sysgen" parameters
indicating compatibility and the disk volumes enabled to be
shared. Make sure you understand all of these options in your
operating systan and have set them correctly.
The following are indications of improperly configured multiuser
systems:
I) Corrupted index files.
2) Operating system error: FILE/DRIVE IN USE or RIO (read only)
3) Only one user can update adata file.
4) Errors 18, 19. 2b 22, 78, 80.
Copyright (c) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual RUNTIME ERRORS AND DIAGNOSIS F-33
THE DATAFLEX UTILITIES
All of the utility programs in DataFlex except QUERY (FILEDEF,
REINDEX, AUTODEF. QUERY, FREL) are intended for operation only in
singla user mode. Make sure that all other users are logged off the
computer before using any utilities.
THE DATAFLEX FLEX-KEYS
The DataF1ex function keys are active only in the DataFlex Editor and
in running configurations. These keys are not active in the DataFlex
utilities (FILEDEG REINDEX, AUTODEF. QUERY, FREL) unless specified
otherwl se.
CUSTOM ERROR MESSAGES
DataFlex provides the opportunity for the user to create new error
messages to be triggered by conditions defined by the configurati on.
New error messages are defined using error numbers above IÓÓ? as
described in the explanation of the ERROR command in the manual
section on "Controlling Execution Sequence'G The facility which
provides this capability (a ljataF1ex configuration and database having
the rootname "FLEXERRS") also provides the capability to reword the
messages given in the standard errors discussed above. Thi s
capability would permit the substitution of messages which might
better fit the context of the particular appl ication which you are
runningp but this caution must be observed in rewording the standard
DataFlex errors discussed above: the message substituted will be
shown every time that particular error 'is triggered in any
configuration being run on the same disk as the file FLEXERRS.DAT in
which the change(s) were made. This may cause an out-of-context error
message to appear in aconfiguration for which the message was not
intended.
Finally. the predefined system variable LASTERR and the predefined
argument ERR can both be used to provide "chain" messages which will
offer helpful prompting and information (either automatic or operator-
selected) in the event one of the standard errors above is triggered.
ERR is TRUE when any error (standard or custom) is triggered, and it
remai ns TRUE until aCLEARWARNING command is executed. If an error at
aparticular point in aconfiguration has apredictable origin, ahelp
message or execution branch can be provided based on the status of the
ERR indicator. If, on the other hand, the triggering of one or more
standard errors has consistent impl1cations throughout aparticular
configuration, IF commands based on the value of LASTERR (IF LASTERR
EQ some particular error number), can cause the appropriate prompting
or execution branching to assist in efficient recovery from the error.
"""""" """""""""==,""=".""==""""""===="""""""
Copyright (c) 1984 Data Access Corporation 06/08/84

F-34 RUNTIME ERRORS AND DIAGNOSIS DataFlex 2.0 User's Manual
——————— —————————————————
THIS PAGE INTENTIONALLY LEFT BLANK
————
Copyright (C) 1984 Data Access Corporation 06/08/84

===—_"_======="""—————— —_F"35
————
'
======== GLOSSARY =====
=====—= ~
========== "__—___——_
————————————— ———————
—— ———
APPLICATION
Atask, or set of tasks, to be performed by acomputerp
typically through configurations (or programs) and alanguage,
such as DataF1ex. Database management is not an application
in itse16 but Accounts Receivable billing may properly be
described as one database management app1lcation.
AUTODEF.COM
The program in DataFlex for quick and easy file creation.
AUTODEF will set up the file definition as well as build a
data entry configuration file which can either be custom-
ed1tedp or compiled as-is for execution.
B+ or B* TREE
Afast and efficient method of searching adata file for akey
value used by DataFlex.
BATlM UPDATING
The technique of updating files from atransaction file as
opposed to on-line or real-time updates at the time of
operator input.
BIT
The smallest unit of information used by acomputer. Asub-
unit of abyte. Eight bits =lbyte and four bits =I nibble.
BUFFER. RECORD
An area of mcmory (RAM) that is devoted to the current record.
REMEMBER? data or information is: (first) in the file;
(second) in the buffer; then (last) on the screen or in the
window.
BYTE
Eight bits (usually representing acharacter). The smallest
unit of information which can be handled by aDBMS.
MAIN or álAINING
Moving from one program or program module to another without
operator intervention.
COMMAND ACTION
Those comands or controls used/invoked by the user or
operator during data entry. The soft keystroke commands set
with the program SETSCREE.COM.
CONMAND GROUP
The sections of an enter or report configuration which are
invoked when the operator performs acorresponding cotmand
action. The operator key strokes are set with the SETSCREEN
program.
Copyright (c) 1984 Data Access Corporation 06/08/84
t

F-36 GLOSSARY DataF\ex 2.0 User's Manual
———
———————
——————
—
COMMAND LINE
An expression string executable by the operating system (DOS),
typically from the CP/M prompt A>. Usually these are issued
by MENU in acompleted DataF1ex applicatfon. In DataFlex 2.0
these can be executed from configuration comnand lines.
CON:
Customary designation of the output port of the computer which
comunicates with the systanG console, or screen.
CONFIGURATION
Alogical asssembly of DataF1ex connands and values whicM
upon executi on, cause DataF1ex to perform atask (see
Application above) .Configurations are to DataFlex what
programs are to traditional computer languages.
CONFIGURATOR
Person who writes DataF1ex conf igurations.
DAC
Data Access Corporati on, the publi sher of DataFlex.
DATA
The real world information contained in the files of the
Database. Usua11y the smallest unit is afield Crf arecord in
afile. Data is usually stored as one of two typesg formatted
and unformatted. DBMSq$ deal in formatted data. whereas word
processors (for example) deal in unformatted data.
DATA DICTIONARY
Acatalog of all data elements in adatabase giving their
defínitiom format, and source. In DataF1exp the File
Definitions co]1ectively.
DATA STRUCTURE DIAGRAM (OSO)
The logical structure of the database design showing the
relationships of the files and their data.
DATA TYPES
In DataFlex, four data types are recognized. They are
a)phanumeric» nUmericp fnteger and date.
DATABASE
Acomputerized collection of stored operat1ona7 data that can
serve the needs of multiple users or app) ications. The
collective files that make up an app1icat1on in DataFlex. In
this manuab the two forms are referred to with the same term.
Some authors mean other things and make adistinction between
them.
DBMS
Data Base Management System. Traditionally two classes: (l)
Stand alone; arid (2) Higher level language sub-set.
"===================.========————————————~———~—————————— ——————
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual GLOSSARY F-37
="======== ~~~——————
EDITOR
Aprogram which handles unformatted data which is typically a
document or source program. Atext file handler. A word
processor incorporates apowerful EDITOR.
ELEMENT
The smallest discrete unit of data handled by adata
management systan. In amailing 1istp for example, adata
element might be first name? or ZIP code. Also referred to as
"field".
ERGONOMICS
The study or science of human factors in the design of devices
for human use such as chairs and computer moni tors.
" EXTENSION
That part of the directory file name to the right of the dot
(up to 3characters)» often used to classify files by type or
function. See ROOTNAME and FILE below. In DataF1exp
extensions are used for specific meanings:
.DAT =Data file .FRM =Source code for data entry
.Kn =Index file (n=#) .TAG =Database field names
,FD =File definition file .CFG =System information fije
,FLX =Compiled program .RPT =Source code for repQrts
FIELD
Asub-unit of adatabase record. The information unit. Also
called "data element".
FILE
The basic unit of information stored on a disk drive which can
be found by acomputer's operating system. Each file on a
disk drive has aunique name (see ROOTNAME and EXTENSION)
which is found both by the computer and by users in the
operating system's directory of files on adrive. The source
code for aconfiguration is typically contained in aFILEg as
its compiled version is contained in another FILE. Database
data is contained in another FILEp and index data for that
FILE is contained in yet another FILE.
INDEX
Atable containing orderM information on records or data
elements in adatabase and their locations.
INDEX FILE
In DataF1ex, aB+ ISAM file containing information about a
data file in order by akey of selected data ehments within
the data file.
ISAM
Indexed Sequential Access Method. An access method associated
with asequential data file whose contents are ordered by
primary key values.
~~
Copyright (C) 1984 Data Access Corporation 06/08/84

F-38 GLOSSARY DataFlex 2.0 User's Manual
————————
———
JULIAN DATE
A numeric conversion of dates used internally by DataFlex to
facilitate rapid9 accurate calculations of dates and calendar
time Intervals. It is aform of the number that represents
the number of days from the year Zero to whatever date is
being processed. The original method was developed in the
16th Century by Joseph Sca1igem and contrary to popular
assumptionp its name derives from Scaliger's father? Ju1ius?
and not from Julius Caesar or another calendar named after9
and decreed by, him.
KEY
The field or portions of arecord used to uniquely identify
that records in adatabase.
LOGGED-IN DEVICE
The default logical device that the operating system wilt load
programs and data from (typically A: ).
LOGICAL DEVICE
Aperipheral data inputp oUtPutg or storage device addressed
by the convention of one or three letters and acolon. Ccmmon
examples:
B: The "B" floppy or hard disk drive
CON: The conso1ep or screen
LST: The listing devicep or printer
RDR: The punched tape or card reader
PUN: The paper tape or card punch
LST:
Customary designation of the output port of the computer which
communicates with the systemG LiST drive, or printer.
MENU /MENUDEF.FLX
MENUDEF in DataFlex is an interactive program which creates
menus, issues query prompts to the operator, and issues
operating systan and DataFlex comands. MENUDEF is itself
entirely menu-driven.
DIS (OPERATING SYSTEM)
The disk operating systm (DOS).
ONLINE UPDATE
Updating information in the files/database at the time of
operator input.
QUERY
The function of searching for and retrieving information from
adatabase according to operator-specified criteria based on
logical operators such as less than or equal to. In DataF1exg
a user friendly interactive program (QIJERY.COM) which can be
used to generate reports and report configurations.
RECORD
Asub-unit of adata file, in turn divided into fields.
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual GLOSSARY F-39
RELATE /RELATIONSHIPS
Alogical the records of one data file to the records in
another by having one or more pairs of fields contain
IDENTICAL data in both files. In DataFlex relations are
defined using the FILEDEF program. Refer to the File
Definition section of this manual.
ROOTNAME
That part of the directory file name to the left of the dot
(up to 8charactersL typically entirely under the user's
discretion to use in identifying related "families" of files.
In DataF1exp acommon rootname identifies the various data
files which together constitute asingle database. See
EXTENSION and FILE above.
SELECTION
The 1oglca1 operators for selectively retrieving information
from adata base file. Used in combinatiom they can perform
the function of ranging» (i.e. greater than x&less than y).
SETSCREEN "
An Interactive insta11atlon procedure required when installing
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.
TPA
Transient Program Area. That area of the computer's memory
which is available to hold programs and data after the DOS or
disk operating system is loaded and running. On B-bit CP/M
systms, DataFlex requires aminimum of 52K of IPA, and LOOK
for l6-bit systws.
USER /OPERATOR
The final user or operator of adesigned systm. Typically
the data entry clerk. Anon-technical computer user.
WINDOW
The posItion in which information (data) is displayed on the
screen during ENTER or in areport.
Copyright (C) 1984 Data Access Corporation 06/08/84

F-40 GLOSSARY DataFlex 2.0 User's Manual
—
THIS PAGE INTENTIONALLY LEFT BLANK
————————— ————————
Copyright (c) 1984 Data Access Corporation 06/08184

_———_———=== F—41
---------—----
========== =====
==== TABLE OF ASCII CODES sÉ!!EéFáé=
--—-—----
==========
-----—---------—-- =============
- - —- ---
---—-—-----—-
CTRL HR DECIMAL HEX l CHR DECIMAL HEX l NR DECIMAL HEX
r
eNUL 000 00 l+043 2B l V 086 56
ASQH 001 Dl l,044 2C lW087 57
El STX 002 02 l-045 2D I X 088 58
CETX 003 03 l.046 2E l Y 089 59
DEDT 004 04 }/047 2F lZ 090 5A
EENQ 005 05 l O 048 30 l[091 SB
FACK 006 06 l I049 31 ;\092 .5C
GBEL 007 07 l 2 050 32 :]093 5D
HElS 008 08 l 3 051 33 l " 094 5E
IHT 009 09 l 4 052 34 l_095 5F
JLF 010 DA l 5 053 35 l"096 60
KVT OIl OB } 6 054 36 :a097 61
LFF 012 DC l 7 055 37 lb 098 62
MCR 013 OD l 8 056 38 lC099 63
NSO 014 DE l 9 057 39 l d lOó 64
OSI 015 OF l:058 3A l el0l 65
P OLE 016 10 :;059 3E3 lf102 66
QDCl 017 II l<060 3C l g103 67
RDC2 018 12 l=061 3D l h 104 68
SDC3 019 13 :>062 3E :i105 69
TDC4 020 14 l ? 063 3F lj106 6A
UNAK 021 15 l e 064 40 l k 107 6B
VSYN 022 16 l A 065 41 ll108 6C
WETB 023 17 l B 066 42 :m109 6D
XCAN 024 18 lC 067 43 ln110 6E
YEM 025 19 l D 068 44 loIll 6F
ZSUB 026 IA l E 069 45 :P112 70
[ESC 027 IB l F 070 46 :q113 71
\FS 028 lC l G 071 47 lr114 72
]GS 029 ID lH072 48 lS115 73
"RS 030 IE lI073 49 lt116 74
_US 031 IF l J 074 4A lu117 75
SP 032 20 l K 075 4B lV118 76
!033 21 l L 076 4C lW119 77
"034 22 lM 077 4D l X120 78
# 035 23 :N078 4E ly121 79
S036 24 lO 079 4F lZ122 7A
%037 25 :P 080 50 l{ 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 lU 125 55
============
___,_______________________,________=========
Copyright (C) 1984 Data Access Corporation 06/08/84

F-42 TABLE OF ASCII CODES DataFlex 2.0 User's Manual
THIS PAGE INTENTIONALLY LEFT BLANK
————————————
Copyright (C) 1984 Data Access Corporati on 06/08/84

—— —~———————~—————————————=====~—————="
F43
——————
====== INDEX ====
———————
========== ==========
_________ """"" """""""""""""""""==="""."=
—— ~
!Exclamation poiñt» Macro argument marker» E-15
#Pound sigm Macro command marker, E-14
$Dollar sign
Compile time variable identifier, E-16
Menu system question actuatorg B-55
Print format optiom D-7
Window formatting character7 B-18
%Percent sigño Window formatting characterp C-38
& Ampersand
FIELDINDEX drivem E-ll
WINDOWINDEX driver, E-ll
fQuotation mark
Data delimiter, D-62
() Parentheses,, Expression eva1uatorp C-4
* Asterisk, Expression eva]uator9 C-4
+Plus, Expression eva1uatot"» C-4
-Dash, Expression evaluatom C-4
.BAD. Retndex option, B-42
.Decimal point, Data window characterg B-16
/* Screen terminating ctiaracterj B-2p B-l5» B-30
/Slash
Data window charactem B-16
Expression evaluator, C-4
Pagename identifierí, B-30
Report section delimiter, C-32
OZero, Window formatting charactem B-18
<Less than, Expression eva1uaton C-4
>Greater tham Expression eva1uator? C-4
e"
Data file name suppressom C-58
Window formatting character9 B-18
[] Brackets. Indicatom D-19
_Underscore, Command name characterg D-61
{} Braces
ENTRY Format option delimiting, C-19
Option de1imitingp D-6
lBar, Symbol replacement identifier. E-20
-A-
ABORT
Comman6 D-34
Report while runningg C-43
ACCEPT, Command, B-18, D-l
Access controL Systemp B-54
Addition -Expression, C-4
ALL Indicator conjoinem D-22
Ampersand
FIELDINDEX driver, E-ll
WINDOWINDEX driver, E-ll
AND Indicator conjoiner, D-22
———————
———————————————
Copyright (C) 1984 Data Access Corporation 07/10/84

F-44 INDEX DataF1ex 2.0 User's Manual
ANY Indicator conjoiner, D-22
APPEND, Command, D-16
Application
Conversion from earlier DataF1exg B-51
Creating, A-7g B-l
Customizing, B-ll
Structure9 C-87
Transporting, C-67
Argument
C1assesg C-l
Filename, C-6
Indicator8 C-7
Types, C-l
Arguments
Macro commands, E-15
Predefinedg F-4
ASCII
Codes, F-41
Command, D-13
Data type, B-22
ASCII Data typep B-3p B-16
AS -Indicate comparison, D-22
ATTAQI, Command, D-53
Auto-return, System options, A-l9p A-26
AUT0DEF9 A-7p B-L, B-25
Errors, B-26
AUTOFIND, EN7RY Format optfom C-19
AUT0PAGEp Command, C-2l, D-3
-B-
B+ ISAM, B-24
BACKFIELD, Command, E-4
BACK WINDOW, Flex-key, A-37, B-LL B-37
Barp Symbol replacement identifier, E-20
BASIC, Data, D-61
Basic operations in DataF1exp A-5
Batch file, Executing DataF1ex from9 D-57
BEGIN -END, Command, D-35
BLANKFORM, Command, D-3
Blank suppress, Print format optiom D-7
BLOCKS AND LOOPS, D-35
Body, RESIDENT Report option, C-33
Body section, REPORT Macro, C-32
Braces, ENTRY Format option delimiting C-19
Braces -Option de1imiting» D-6
Brackets, Indicator defining, D-19
Breakpoints, Subtotalling, C-34
BREAK Subtotal controller, C-34
Bright screen attribute, D-43
Buffer, Record, D-45
Bufferingp Index, D-47
=========_———— ———————
————————————
Copyright (C) 1984 Data Access Corporation 07/10/84

DataFlex 2.0 User's Manual INDEX F-45
-C-
Cp Window formatting character, B-18
CALC, Command, C-14
CALCULATE
Cotamañd» C-14
F1ex-KeyD A-23. B-37
Capacities
DataFlex, F-9
System, F-9
Capitalization in configurations. B-30
CAPSLOCK
ENTRY Format option. C-19
Format option, D-6
Caps lock, Window formatting option. B-18
Case, Upper and lower, B-30
CHAIN, Command, B-31L D-32
Changing data. A-38
CX4ARACTER, Command, D-14
Characters, Window formatting. B-18
MECK, Macro command, E-18
CHECK=
ENTRY Format option, C-19
Format option, D-6
CLEAR
Command, D-52
F1ex-Keyp C-19
CLEARFORM, Command. D-3
CLEARSCREEN, Command, D-42
CLEARWARNING, Command. D-34
CLEARXY, Command, D-41
CLEAR ALL. F1ex-Keyg A-l9, A-36, B-ll
Clear screen, A-2% A-36. D-3
CLEAR SPace BACK, Flex-key. A-24, B-36
CL0SE_INPUT. Command, D-62
CLOSEJJUTPUT, Command, D-62
CMDLINE, Command, D-17. D-32
Codes
ASCII, F-41
Lead-in, A-28
Positioning9 Cursor, A-31
Terminal controb A-29, A-33
COM/CMD files, A-34
Comma
Data delimiter. D-62
Window formatting character, B-18
Copyright (c) 1984 Data Access Corporation 06/08/84

F-46 INDEX C)ataF1ex 2.0 User°s Manual
———
——————— ———
Command
ABORT, D-34
ACCEPT, B-l8, D-l
APPEND, D-16
ASCII, D-13
ATTACH, D-53
AUT0PAGEg C-21. D-3
BACKFIELD, E-4
BEGIN -END, D-35
BLANKFORM, D-3
CALC, C-14
CALCULATE, C-14
CHAIM. B-33, D-32
CHARACTER, D-14
CLEAR, D-52
CLEARFORM, D-3
CLEARSCREEN, D-42
CLEARWARNING, D-34
CLEARXY, D-41
CLOSE INPUT, D-62
CLOSE OUTPUT, D-62
CMDLINE, D-17, D-32
COPYFILE. D-56
DATE, C-lO
DEBUG, D-33
DELETE, D-52
Under mU1ti-user7 E-8
DESPOOL, E-lO
DIRECTORY, D-56
DIRECT_INPUT, D-61
DIRECT_0UTPUT, D-62
DISPLAY, D-2
ENDGROUP, D-8
END (WHILE), D-37'
ENTAGAIN, E-4
ENTDISPLAY, C-26, D-8
ENTER, C-18
ENTEREND, C-22
ENTERGROUP, D-8
ENTERMODE, E-4
ENTRY, C-19, D-8
Under muÍti-userg E-8
ERASEFILL D-55
ERROR, D-33
FILELIST, D-56
FILELIST NEXT. D-57
FILELIST PATHNAME, D-57
FIND, D-48
FORMAT, D-6
FORMFEECb C-43
FOR -FROM -TO LOOP, D-37
GOSUB, D-30
GOTO, D-29
Copyright (C) 1984 Data Access Corporation 06/08/84

DataF1ex 2.0 User's Manual INDEX F-47
="""""""
Command (continued)
GOTOXY. D-41
HELP, E-5
IFCHANGE, E-9
INCREMENT, C-L4
INDICATE, D-22
INDICATOR, C-l2, D-19
INKEY, D-43
INPUT, D-40
INTEGER, C-ll
KEYCHECK, D-42
KEYPROC, E-2
LEFT. D-ll
LENGTH. D-15
Line length. B-30
LOCK, E-9
LOOP (FOR -FROM -TO), D-37
LOOP (REPEAT)» D-36
Macro command, E-14
Maximum line length. C-21
MID. D-13
MOVE, C-13
MOVEINT, C-13
MOVENUM, C-13
MOVESTR, C-13
NAME, B-16, D-5
NUMBER, C-lO
ON GOSUB, D-31
ON GOTO. D-30
OPEN, D-47
OUTCLOSE, D-4
OUTFILE, D-4
OUTPUT, B-16, D-5
PAD, D-lS
PAGE, B-16, D-l
PAGEHECK. C-43
POS, D-14
PRINT, B-l8, C-38, D-7
READ, D-62
READLN, D-64
REGISTRATION, D-58
RELATE, D-52
RENAME, D-55
REPEAT -LOOP, D-36
REPEAT -UNTIL, D-35
REPORTEND. C-33
REREAD, E-9
RETURN, C-22, C-24, D-31
RIGHT, D-12
RUNPROGRAM, D-58
SAVE, D-51
Under mu1tj-user9 E-8
SAVERECORD, D-51
Copyright (C) 1984 Data Access Corporation 06/08/84

F-48 INDEX DataFlex 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, D-58
SYSTEM. D-57
TRIM, D-16
UNLOCK, E-9
UNTIL (REPEAT), D-35
UPPERCASE. D-17
WHILE -END, D-37
WRITE, D-66
WRITELN, D-67
ZEROFILE, D-54
Commands
Configuratiom B-30
Console Input/Outputp D-39
ControK D-29
Creating new, E-13
Databasep D-45
DataF1exp B-19
Definition, C-9
Key, E-l
List by groups, F-6
Modifying, E-13
Multl-ljser, E-7
Operating system, A-34
FLEX, B-33
Sequential Input/0utpUtp D-61
String manipulation. D-ll
Structured Controb D-35
Syntaxg F-6
System, D-55
Commas, EmbeddecL B-18
Comparisom Modes
IFJ D-25
Indicatorg D-21
Compatibility, DataFlex 2.0 to earlier versions, B-51
Compilation
Compile time options, B-3ln D-3M E-20
Compile time variab1és» E-16
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 ERROR MESSAGES, F-13
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual INDEX F-49
——
Conditionalm Compile time, E-17
CONDITIONAL EXECUTION. D-19
Condition setting, Indicatorp D-20
Configuration
Commands, B-30
Compilation, A-7, B-8, B-29, B-31
Creation, A-41. B-29
Errors, F-28
F1ex-KBys, A-28
Function keys, A-28
Multifile, C-69
READ, 8-44, B-46
Replacements iño E-14
Running, B-8, B-29,, B-33
Samples, C-69
Source file, B-29
TerminaL A-25
Terminatloñ» D-34
Transporting, C-67
Configurations
Creatiom B-35
Editing, B-35
Configuration limitation, Errorm F-27
Conjoiners, Indicatom D-22
Console Input/Output, Commandm D-39
Constant
Dateg C-6
Numeric, C-3
String, C-2
Control
Commands, D-29
Screem D-39
CONTROLLING EXECUTION SEQUENCE, D-29
Conversiom DataFlex earlier verslorm A-8ó B-51
COPYFILE, Command, D-56
Copying. Files, D-56
Corruptiom Data, F-23
Creating record
ENTER Sequence, 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 INDEX DataF1ex 2.0 User's Manual
-D-
Dashp Window formatting character, B-18
"Data
BASIC, D-61
Conversion from earlier DataFlex, B-51
Corruptiom F-23
DBASEII, B-44
Elements,, B-21
Exportingg D-61
Field, B-21
Importing, B-44, D-61
Indexing. B-23
MailMerge, A-46, D-61
Other 7anguages, B-44, D-61
Record9 B-21
Recovery9 F-22
Security9 B-54
Space requirementm B-22g B-25g C-58
Structurep B-18
Types, B-3, B-22
Window, D-l
Window formatting, B-18, D-6
Database
Commandsg D-45
FILES, B-259 D-56
File definition, C-47
File number. A-42
Database files, Maximum number of records, C-58
DATAFLEX UTILITIES, B-35
Data consistencyg Error59 F-28
Data delimiter
' Quotation mark9 O-62
Comma, D-62
Quotation mark, D-62
Data element,, Nameg B-26
DATA ENTRY, C-15
Data type
ASCII, B-22
DATE, B-22, C-79
NUMERIC, B-22
Data windows. Referencing B-16
Data window characterp B-2
.Decimal pointp B-16
Decimal point, B-16
Diagonal, B-16
Slash, B-16
DATE
Command. C-lO
Constant, C-6
Data type9 B-3, B-16. B-2Z, C-79
Julian, C-79
Variable, C-5
Copyright (c) 1984 Data Access Corporation 07/18/84

DataFlex 2.0 User's Manual INDEX F-51
Dates
Calcuíat'lona, C-5
Euro-datep C~5
Julian, B-l6, C-5
Other centuries. B-l6. B-22
DBASEII, Data, B-44
DEBUG» Command, D-33
Debugging, WIth compile time conditionals, E-17
Decimal places
ENTRY Format option, C-19
Format option, D-6
Decimal pointp Data window character, B-16
DECLARING DATA ELEMENTS, C-9
Definitiom Commands. C-9
Definitiorm Termm F-35
Definition of terms -operatcm A-16
DELETE
Command, D-52
Under multi-user, E-8
Index9 C-64
Record, D-52
DELete CHARacter, Flex-key, A-24, B-36
DELete RECord, F1ex-Keyp A-2b B-37
Deleting file, C-66. D-55
Deleting record, B-43
ENTER Sequence, C-28
Procedure, D-46
DESIGNING DATABASES, Chapter, B-21
DESPOOL, Commanb E-lO
Destructive backspace, A-29
Devices, Input/Output, D-61
Diagonal
Data window charactem B-16
Pagename identifien B-30
Report section delimiter. C-32
Diagram, System, A-lO
Dim screen attributep D-43'
DIRECTORY, Command, D-56
DIRECT_INPUT, Command, D-61
DIRECT_0UTPUT, Command, D-62
DIRECT CONTROL OF DATA ENTRY, D-l
DIRECT CONTROL OF THE CONSOLE, D-39
DIRECT INPUT AND OUTPUT, D-61
Disk drive, A-34
Disk limitation, Errors, F-24
DISPLAY, Command, D-2
DISPLAYONLY, ENTRY Format option, C-19
Division -Expression, C-4
——————————————-————-——————
======= —
Copyright (c) 1984 Data Access Corporation 07/18/84

F-52 INDEX DataFlex 2.0 User's Manual
—————
Dollar sign
Compile time variable identifiem E-16
Floating, B-18
Menu system question actuatorg B-55
Print format option, D-7
Window formatting characterp B-18
Down Arrow, F1ex-Keyg B-36
Duplicate
Record, B-24, B-27, B-42, C-55
Records, C-83
~E-
Editingp A-38
Configurations, B-35
Database, A-38
Menu, B-54
Record, A-38
Editing record
ENTER Sequence, C-27
Procedure, D-46
EDITOR, A-7, B-l, B-35
Flex-Keyst B-35
Function keys, B-35
Element
Mameg B-21
Datag B-21
ELEMENTS OF CONFIGURATIONS, Chapter, C-l
ELSE, Macro command, E-17
Embedded, Commas, B-18
END$0F$REPORT, Predefined procedure, C-43
END.OF.REPORT, Predefined procedure? C-43
ENDCONAMD, Macro command9 E-14
ENDGROUP, Command, D-8
ENDIF, Macro command, E-17
Ending session, A-38
END (WHILE), Command, D-37
ENT$PERMISSIVE, Predefined indicator, C-28
ENTAGAINp Commarich E-4
ENTDISPLAY
Command, C-26. D-8
Under multi-user, E-8
ENTER
Command, C-18
Macrog C-15
Sequence of operation. C-27
Structure, C-17
Under multi-user, E-8
ENTER.CLEAR, User-Defined procedurm C-24
ENTER.DELETE
User-Defined procedure, C-24
Under mu1tf-user> 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

DataF1ex 2.0 User's Manual INDEX F-53
ENTER.SAVE
User-Defined procedureg C-24
Under mu1ti-usem E-8
ENTEREND, Command, C-22
ENTERGROUP
Command, D-8
Macro, D-8
Flex-keys. D-8
ENTERMODE, Command, E-4
ENTRY
Command, C-19, D-8
Under multi-user, E-8
Format optfons9 C-19
New record. A-38, B-99 C-70
Entry/Editing
Terminatiom A-38
Under multi-user, E-8
Entry screem Image, A-20v B-l. B-15
ENTRY Section, ENTER Macro. C-19
EQ
Find modé, D-48
IF Comparison mode, D-25
Indicator comparison modep D-21
ERASEFILE. Command, D-55
ERR, Predefined indicator? F-33
ERROR, Command, D-33
Errors
AUTODEF, B-26
Compile timep B-31
Configuration, F-28
Configuration limitatiom F-27
Conversion, Earlier versions of DataF1exp B-52
Data consistencyg F-28
Disk limitation, F-24
Full disk, F-24
Media and Hardware, F-22
Memory 1imitatiom F-25
Mu]tiuserg F-32
Operator, F-21
Set uPg F-31
Types, F-13
Error list
Compilation. F-14
Runtime. F-19
Error messages
Clearing, D-34
Custom, D-33. F-33
Types, F-19
ESCape. Flex-key, A-l9, A-38, B-37
Euro-date optioñ» C-5
Exclamation point, Macro argument markem E-15
Exiting to operating system, D-57
Exporting, Data, D-61
Expressiom C-4
Expression evaluatiom Operators, C-4
Copyright (C) 1984 Data Access Corporation 06/08/84

F-54 INDEX DataFlex 2.0 User's Manual
~F~
Facilities of DataFlex, Diagram A-13
FALSE -IF Result, D-24
FALSE Indicator conditiom D-19
Field
Data, B-21
Index, B-27. C-55
LengtM B-22
Name, A-42b B-26
Overlapping, C-54
Record numberp C-55
Relationships among, C-50
Specifications, C-53
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
Converting datap DataFlex earlier versions,, B-51
Create/Edit Fields, C-60
Create/Edft indexes, C-63
Create definition from .DEF fi1e9 C-67
Create definition from screen image, C-66
Erase data file. C-66
Escaping frQm,p C-56
Print file definition, C-65
Save deffnition/Exit, C-67
Set file inactive, C-66
Set file parameters/namesp C-66
FILELIST» Command, D-56
FILELIST NEXT, Command. D-57
FILELIST PATHNAME, Commanch D-57
Filename
Argumentg C-6
Conventionsp F-3
Database. C-58
Extensionsg F-3
Rootnameg C-57
FILENUMBER, Predefined variable, D-57
Files
*.BAD, B-42, B-43
*.CMD, D-58
*.C0M, D-58
*.DAT, A-6
*.DEFg C-67
*.FD, A-8, B-51
*.FLX, A-6, B-31
*.FRM, B-27, B-51
*.IC, E-20
*.Kx, A-CH B-39
*.PRN, A-8
*.RPTí B-51
*.TAG, A-6, C-61
_______~____~ =
Copyright (C) 1984 Data Access Corporation 06/08/84

DataF1ex 2.0 User's Manual INDEX F-55
=========————————————— ———————————————————
=============—_—————————————————————
.CÓM/CMD, A-34
AUTODEF.COM, B-l, B-25
COMMAND.DEF, E-21
COMP.COM, A-8, B-31
COMP.OVF, A-8
Compilation, F-31
Configuration, A-6
Copying, D-56
Created by READ, B-49
CUSTOMER.DAT, C-72
CUSTOMER.FRM, C-73
CVTFORM.COM, B-51
CVTFRM.COM, A-8
CVTRPT.COM, A-8, B-51
Datm Other languages, D-61
Database, B-25? D-56
Closing, D-62
Definition, C-47, C-72
Importing, B-44
Maximum number of records, A-27, C-58
Opening, 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
FILELIST.CFG, A-5. D-39, D-56
FLEX.CFL, A-8, E-13
FLEX.COM, A-6
FLEXERRS.DAT, D-33, F-33
FLEXERRS.FLX, F-33
FMAC, A-9, E-13
FREL.COM, A-7, B-39
Intermediate COdeg E-20
INVOICE.FRM, C-87
INVT.DAT, C-83
Lockingg E-7
Macro, PACking, E-13
MENU.DAT, A-7
MENU.FLX, A-7
MENUDEF.FLX, B-53
PACK.COM, A-9, E-13
PEOPLE, B-2
Program, A-34
QLJERY.COM, A-41
READ.FLX, B-44
RUN.OVF, A-6
Runtimep F-31
Sample, A-36
SETSCREE.COM. D-39
SYSFILE, D-54
System, D-54
TERMLIST.CFG, A-5
VENDOR.DAT, C-78
Vendor master, A-36
=====—————————————————
Copyright (c) 1984 Data Access Corporation 06/08/84

F-56 INDEX DataFlex 2.0 User's Manual
——————————————
FILES ARGUMENTS AND C0MMANDSy Appendix, F-3
File definition
Changing. F-27
Databaseg C-47
FILE DEFINITION (FILEDEFR C-47
File manipulatiom D-4(L D-55
File numbem Database, A-42
FILL=7 Print format option, D-7
FIND
Command, D-48
Flex-key, A-20, A-36, A-37, B-lO, B-37
Mode, D-48
FINDERR, Predefined indicator, D-249 D-49
Finding, Index, D-48
Finding record, B-lO, C-70
Procedureg D-46
Speed, C-55
FINDREQ, ENTRY Format option, C-19
FLEX, Reindex option, B-42
Flex-key
Assignments printing, A-32
BACK WINDOW, A-37, B-ll. B-37
CALCu1até» A-23, B-37
CLEAR, C-19
clear all, A-jg, a-36. B-ll
CLEAR SPace BACK, A-24, B-36
DELete á4ARacter, A-24, B-36
DELete RECord, A-22, B-37
Down Arrow9 B-36
ESCape. A-l9, A-38, B-37
FIND, A-20. A-36, A-37, B-l0g B-37
'Function definition, E-I
HELP, A-23
INSert MARacter, A-24, B-36
Left arrow. A-24, B-36
NEXT RECord, A-22, A-37, B-lCh B-38
Predefined 1ndicatorY E-l
PREVious RECord, A-22, A-37, B-lCh B-38
RETURN, A-l9, A-37, B-35
Right arrow, A-24. B-36
SAVE RECord. A-22. A-38. B-37
SUPERFINO, A-21, B-38
Up Arrow. B-36
USER, B-37
User-defined, A-24
Flex-keys
Assignments printing. A-33
Configuration, A-28
Description, A-36
EDITOR, B-35
ENTERGROUP Macro, D-8
Summary9 A-18
When activep F-33
—
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual INDEX F-57
FLEXERRS.DAT, D-33, F-33
FLEXERRS.FLXo F-33
FLEX Operating system command, B-33
FL0AT$, Print format option, D-7
Floating, Dollar, B-18
FMAC, A-9
FORCEPUT, ENTRY Format optiom C-19
FORMAT, Command, D-6
Formatting
Image, B-15
Window, B-18
FORMATTING WITH IMAGES, B-15
Format options
ENTRY, C-l9, F-5
Window, B-18. F-5
FORMFEED, Command, C-43
Forms commands, D-I
FOR -FROM -TO -LOOP, Command, D-37
FOUND, Predefined indicator, D-24, D-49
FRee List program, B-39
Indications of need to usep B-43
FREe List uti)1ty, A-7
FREL.COM, A-7
Full disk, Errors, F-24
Function definition, F]ex-KeyD E-l
Function keys
Configuration, A-28
EDITOR. B-35
-G-
GE
Find mode, D-48
IF Comparison mode, D-25
Indicator comparison mQdep D-21
Getting started, A-33
GLOSSARY, F-35
GOSUB, Command, D-30
GOTO, Command, D-29
GOTOXY, Command, D-41
Greater tham Expression, C-4
Groupm Command (list), F-6
GROUP Indicator conjoiner, D-22
GT
Find mode, D-48
IF Comparison mode, D-25
Indicator comparison modm D-21
=""""""""" """""""""
Copyright (C) 1984 Data Access Corporation 06/08/84

F-58 INDEX DataFlex 2.0 User's Manual
-H-
Header section. REPORT Macro. C-32
Height, Terminal, A-29
HELP
Command, E-5
Flex-key, A-23
Pagenamep E-5
HELP Option, PAGE, B-19
High intensity, A-29, D-43
HOW TO WRITE A CONFIGURATION, Chapter, B-29
%I_
IF
Comparisom Modes, D-25
Macro command, E-17
Test, D-24
IFCHANGE, Command, E-9
IFCLASS, Macro command, E-18
IFDEF, Macro commanch E-18
IFSAMG Macro command, E-18
IFTYPE, Macro command, E-18
IF Result
FALSE, D-24
TRUE» D-24
Image .
Entry screen, A-20g B-L B-l5g C-66
From dBASE II, B-45
Formattingp B-15
Pages, B-I5. B-30
Report, B-L B-15
Image section
ENTER Macrop C-18
REPORT Macro, C-32
Importing, Data, B-449 D-61
IN
IF Comparison mode, D-25
Indicator comparison mode, D-21
INCLUDEp Macro command, E-16
INCREMENT, Command, C-14
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, C-83
Number, D-48
On-line, B-39
Indexed Sequential Access Metho6 B-24
———————————
'Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual 'INDEX F-59
—
——————————————————
Indexesp Non-OataFlex data files, B-47
Index1ngp B-39, C-71
Data, B-23
Key, A-37, B-24
REPORT Macro, C-39
Segments, B-24, C-54
Space requirementsp C-55
INDICATE7 Commaríd, D-22
Indicator
Argument, C-7
Command, C-12, D-19
Comparisom Modes, D-21
Condition sett1n> D-20
Conjoiners, D-22
Predefined
FINDERR, D-49
FOUND. D-49
SELECT. C-38
Indlcatorm D-19
Conditions, D-19
Predefined. D-24. D-26, F-4
INKEY, Command, D-43
INPUT. Command, D-40
Input/Output. Devices, D-61
INSert MARacter, Flex-key, A-24g B-36
Installation
DataF1ex, F-31
Program A-33
Termindk A-5. A-25
INSTALLING DATAFLEX, A-25
INTEGER, Command, C-ll
Intermedicate codep Compilatiom E-20
In stringsg D-18
-J-
Julian, Dates, B-l6, C-5
-K-
Key
Commandm E-l
Indexing. A-37, B-24
KEY.keyname, Predefined indicatorj E"l
KEYCHECK. Command, D-42
KEYPRESS Predefined indicator. D-24
KEYPROC, Command, E-2
Key procedures, E-2
———
Copyright (C) 1984 Data Access Corporation 06/08/84

F-60 INDEX DataFlex 2.0 User's Manual
———————————
~L"
Labeb D-29
LASTERR, Predefined variab1ep F-33
LASTIF, Predefined ind1cator9 D-26
LE
Find mode, D-48
IF Comparison mode, D-25
Indicator comparison modep D-21
Lead-in Codem A-28
LEFT, Command, D-ll
Left arrowg F}ex-Key9 A-24,, B-36
LENGTH
Command, D-15
Field, B-22
Record, B-22, C-58
Less tham Expression. C-4
Line 1ength9 Command, B-30
LOCK, Command, E-9
Locking
Fi1esg E-7
Recorch E-7
Logged-in disk dr1ve9 A-34
Looping, Report, C-44
Loops, D-35
LOOP (FOR -FROM -TO), Command, D-37
LOOP (REPEAT), Commancb D-36
Low intensity, A-29, D-43
LT
Find modep D-48
IF Comparison modep D-25
Indicator comparison mode, D-21
-M-
Macro
ENTER, C-15
Sequence of operatiom C-27
Structurep C-17
Under mU1t1-userp E-8
ENTERGROUP, D-8
Operations, E-13
REPORT. C-31
Structure, C-31
Vs. sUbroutinep E-15
Macros
Adding, A-9
Changing? A-9
Copyright (c) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual INDEX F-61
——————————— —————
Macro ccmmand
CHECK, E-18
COMMAND, E-14
ELSE, E-17
ENDCOMMAND, E-14
ENDIF, E-17
IF gl7
IFCLASS, E-18
IFDEF* E-18
IFSAME. E-18
IFTYPE, E-18
INCLUDE, E-16
REPLACE, E-14
SET, E-16
Macro command marker, # Pound sigm E-14
MallMerge, Data. A-46, D-61
MANIPULATING DATA ELEMENTS, Chapter, C-13
MANIPULATING FILES, Chaptem D-55
MANIPULATING RECORDS, Chapterp D-45
MANIPULATING STRINGS) Chapter, D-ll
ManuaL Organization ob A-l
MATCH
IF Comparison modep D-25
Indicator comparison modm D-21
Maximumm Specificatiorm F-9
Maximum line length. Commanch C-21
Maximum number of records, Database files. A-27o C-58
MEMAVAIL, Predefined variable, F-25
Memory* Available, Determining, F-25
Requ1rementsp F-25
Memory 1imitat1om Errorm F-25
Menu
Configuratiom A-35
Default, B-56
Masterg A-34
Sub-menu, B-56
MENU.FLX, A-35
Menu system, A-7, A-35. B-33
Menu creation and maintenance, B-53
MID, Command, D-13
Minus sign on right, Print format option, D-7
Mode, Find, D-48
Modes9 Comparison
IF, D-25
Indicator, D-21
MODIFYING AND EXTENDING DATAFLEX, Chapter. E-13
MOVE. Command, C-13
MOVEINT, Commandg C-13
MOVENUM, Command, C-13
MOVESTR. Command, C-13
Multi-segment, Index, C-83
Copyright (C) 1984 Data Access Corporation 06/08/84

F-62 INDEX DataFlex 2.0 User's Manual
—————————
Multi-User
Commandsg E-7
ENTER Macro under, E-8
Méthod of operation, E-7
Reread, C-59
Write privi1egeg E-8
MULTI-USER FUNCTI0NSg Chapter, E-7
Multi-ljser operation, E-7
Multi-User system option, A-27, E-7
Multiplicatiom Expre5sionr C-4
Mu1tiuser9 Errors. F-32
MULTIUSER, Predefined indicatorj D-24
"N~
NAME
Command, B-lS, D-5
Data e1ementg B-26
E1ement8 B-2L C-7
Field, A-43. B-26, C-7
Windows, D-5
NE
"IF Comparison modep D-25
Indicator comparison modeg D-21
NEWPAGE, Predefined procedure, C-43
NEXT RECord, Flex-key, A-22, A-37g B-lCh B-38
NOENTER, ENTRY Format optiom C-19
NOISY Ocompile time optiom E-20
NOISY lcompile time optiom E-20
NOISY 99 compile time optiom E-20
Non-OataF1ex data fi1es7 Indexes9 B-47
NOPUT, ENTRY Format option, C-19
NOT
IF Test reversing, D-26
Indicator reversing9 D-19
Notational conventionsy A-2
NOT Indicator conjoiner, D-22
NUMBER
Command, C-lO
Indexg D-48
Record, A-38. B-2l. B-24
Numeric
Constantp C-3
Data type. B-22
Variable, C-3
NUMERIC Data type, B-3, B-16
<
Copyright (c) 1984 Data Access Corporation 06/08/84

DataF1ex 2.0 User's Manual INDEX F-63
—————
-O-
ON GQSUB, Command, D-31
ON GOTO, Command, D-30
OPEN, Command, D-47
Operating system
Commands, A-34
Exit to» D-57
Requirements, F-9
OPERATING TUTORIAL, Chapterv A-33
OPERATIONAL ORIENTATION, Chapter, A-5
OPERATOR'S GUIDE, Chapter, A-15
Operators, Expression evaluatiom C-4
Operator abort, REPORT MacroD C-43
Options
Compile tímep B-31
ENTRY Formatting. F-5
Window formattjngD B-18, D-(Jp F-5
Organization of data, B-21
ORGANIZATION OF THIS MANUAL. Chapter, A-l
OR Indicator conjoiner, D-22
OUTCLOSIZ, Command, D-4
OUTFILE, Command, D-4
OUTPUT
Command, B-16, D-5
To devices. D-4
Output destination, REPORT Macro, C-42
Output options, QUERY, A-45
Overlapping fields, C-54
—P—
Packing macro files, E-13
PACK utility, A-9
PAD, Command, D-15
PAGE
Command, B-lCj D-l
HELP Option, B-19
RESIDENT Option, B-19
PAGEBREAK, Predefined indicator, C-43, D-24
PAGEOECK, Command, C-43
PAGEEND, Predefined variab}eg C-41
PAGEFEED, Predefined variable, C-41
PAGENAME, B-2, B-l5. B-30
HELP, E-5
Pagename Identifier, Slash. B-30
Pages, Imagep 8-15. B-30
Page controb REPORT Macro, C-41
Parentheses, Expressiom C-4
Passwords, B-54
PEOPLE.FRM Configuration fi1eg El-7
PEOPLE Entry screen. B-2
Percent sigm Window formatting charactem C-38
—-———————————————————————————————
———————
Copyright (C) 1984 Data Access Corporation 06/08/84

F-64 INDEX DataFlex 2.0 User's Manual
———————
P0INTS=
ENTRY Format option, C-19
Format option, D-6
P0S9 Command, D-14
Positioningp Cursoru Codesn A-31
Post-Entry sectiom ENTER Macro, C-27
Pound sigm Macro command marker, E-14
Pre-ENTER section, ENTER Macrog C-18
Predefined
Arguments, F-4
Indicators, D-24, D-26. F-4
Variables, C-41, F-4
Predefined indicator
ENT$PERMISSIVE. C-28
ERR, F-33
Flex-key,, E-l
KEY.keyname, E-l
LASTIFg D-26
PAGEBREAK. C-43
SEQEOF, D-65
SEQEOL. D-63. D-65
STATUS9 D-27
Predefined procedure
END$0F$REPORT, C-43
END.OF.REPORT, C-43
NEWPAGE, C-43
Predefined variable
FIELDINDEX, E-ll
FILENUMBER, D-57
LASTERR, F-33
MEMAVAIL, F-25
PAGEEND, C-41
PAGEFEED, C-41
RECNUM, C-55
WINDOWINDEX, E-ll
PREVious RECord, Flex-key, A-229 A-37, B-JÁ9 B-38
PRINT, Command, B-l8. C-32, C-38, D-7
Program
QUERY, A-6
REINDEX, A-7
PROGRAMMING TUTORIAL, Chapter, B-l
Prompting, Operator, REPORT Run time, C-39
-Q-
QtjERY9 A-41
Program A-6
Relation to REPORT Macro9 C-31
QUERYING THE DATABASE. Chapterp A-41
QLJERY Program, A-8
Questfonsp Operator runtimep Menu system B-55
QUIET, Reindex optlom B-42
Quotation markp Data delimiter, D-62
QUOTED Report format, A-46
—
—————————————————————————————— —————————
—————————————
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual INDEX F-65
-R-
RANGE=
ENTRY Format option. C-19
Format option, D-6
Re-use of @áCéY B-43
READ
Command, D-62
Files created by, B-49
READLN, Command, D-64
READ'Program, B-44
READ Report format, A-45
READ Utility. A-8
RECNUM
Field nameg E-ll
Predefined variab1ep C-55
Record
Buffer, D-45
Dátáo B-21
Delete, D-52
Duplicate, B-24, B-27o C-55
Length, B-22» C-58
Locking. E-7
Number, A-38. B-2l.' B-24, C-51
Selection, C-55
Records
Duplicate, C-83
Record number
Field, C-55
Recovery, Data9 F-22
REGISTRATION, Command, D-58
Reindex
Indications of need tOp B-39
In submit procedure, B-41
Program, A-7, B-39
RELATE
Command, D-52
REPORT Subtotal section, C-35
Relationships among
Database files, C-48
Field, C-50
RENAME, Commanch D-55
REPEAT -LOOP, Command. D-36
REPEAT -UNTIL, Command, D-35
REPLACE, Macro commanch E-14
Replacements im Configuratiom E-14
Replacements with, Compilation, E-14
Copyright (C) 1984 Data Access Corporation 06/08/84

F-66 INDEX OataFlex 2.0 User's Nlanua1
Repor"L
Image, B-L B-15
LoQp1ngp C-44
Macro,, C-31
Reporting withoútv C-45
Structure. C-31
Multiple copies, C-44
Query9 A-43
Running total, C-38
Subtota17ing, C-34
Tota11ing, C-34
REPORTEND, Command. C-33
REPORTING AND OUTPUT, Chapter, C-31
REPORT Macro
Indexíng$ C-39
Operator abort, C-43
Output destination, C-42
Page controb C-41
Relation to QUERY, C-31
Selection, C-38
REQUIRED, ENTRY Format Qption, C-L9
Requiranents
Memory, F-25
System, F-9
TPA, F-25
REREAD
Commamb E-9
Mujti-User, C-59
Reserved words, F-l
RESERVED WORDS OF DATAFLEX, Appendix, F-l
RESIDENT Option
PAGE, B-19
Report, C-33
RETAIN, ENTRY Format optiom C-19
RETAINALL, ENTRY Format option, C-19
RETURN
Commancb C-2b C-bC D-31
Flex-key. A-l9, A-37, B-35
RIGHT» Commañd» D-12
Right arrow, F1ex-Keyg A-24, B-36
Running, Configuratiom B-8» B-33
Running totañ REP0RT9 C-38
RUNPROGRANb Command, D-58
Runtime
Error list, F-19
Files, F-31
RUNTIME ERRORS AND DIAGNOSIS, Appendix, F-19
Runtime system. A-6. B-33
———————————————————————————————————————————————————————————
Copyright (c) 1984 Data Access Corporation 07/18/84

DataFlex 2.0 User's Manual INDEX F-67
-S-
SAMPLE APPLICATIONS. Chapter, C-69
Sample conffgurations and datap C-69
SAVE
Command, D-51
REPORT Subtotal section, C-35
Under mu1t1-useí> E-8
SAVERECORD, Command, D-51
Save record. A-38
Flex-key, A-22, A-38, B-37
Speed, C-55
Scanning database, A-37
Screen, Control, D-39
SCREENMODE, Command, D-43
SecUrjtyg Data, B-54
Segmentm Indexing. B-24, C-54
SELECT, Predefined jndicatorp C-38
Selection
QUERY, A-44
Recorch C-55
REPORT Macro, C-38
Speed, C-55
Semi-colon command line concatenatom B-30
SEQEOF, Predefined indicator, D-24, D-65
SEQEOL, Predefined indicator, D-24, D-63, D-65
Sequential Input/0utputg Commands, D-61
SET. Macro command, E-16
SETCHANGE, Command, E-lO
SETSCREE.COM. A-25, A-33. D-39
SETSCREEn, A-25, A-33, A-36, D-39
Set up, Errors, F-31
SHOW, Command, D-39
"SHOWLN, Command, D-40
SIGNRT, Print format option, D-7
Sizeg Databasep Increasing, C-58
SKIPFOUND, ENTRY Format option, C-19
Slash
Data window character. B-16
Pagename identifier, B-30
Report section delimiter, C-32
Sort, QUERY, A-44
Source file
Creation, B-29
READ. B-44
Spaces im D-18
Space requirements
Data, A-27, B-22» B-25» C-58
Deleted data, B-43
Indexing, C-55
Space suppression, Window formatting option, B-18
—
Copyright (c) 1984 Data Access Corporation 06/08/84

F-68 INDEX DataF1ex 2.0 User's Manual
——— ———————————
SPECIFICATIONS, F-9
DataFlex, F-9
Fie1ch C-53
Maximumsp F-9
Speed
Finding recordg C-55
Save recordg C-55
Seiectiorg C-55
STATUS, Predefined indicatorg D-27
STRING
Command, C-9
Constantj C-2
Variab]e9 C-2
Strings, D-18
String manipulation, Commands, D-ll
Structure
Application, C-87
Data, B-18
Structured Control, Commandm D-35
Sub-menus. B-56
Subheader section, REPORT Macrog C-32
SUBmit fi1ep Executing DataF1ex from, D-57
Subroutine. D-29
Vs. macrog E-15
SUBTOTAL, Command, 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, E-20
Types, E-20
Syñtáx> Command"~ F-6
SYSDATE, Command, D-58
SYSFILE, D-54
System
Access control, B-54
Capacities, F-9
Command, D-57
Commandsg D-55
Fi1eSg D-54
Requirementm F-9
System checkout, A-33
System options
Auto-return, A-l99 A-26
Multi-User, A-279 E-7
———————— =
Copyright (c) 1984 Data Access Corporation '06/08/84

DataFlex 2.0 User's Manual INDEX F-69
~T~
TABLE OF ASCII CODES, Appendix, F-41
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 in1tializat1on, A-29
Termination
Configuration, D-34
Entry/Editíng, A-38
Termm Definitiorm F-35
Test, IF, D-24
Tota)1ing, Report, C-34
Totals, QUERY, A-44
Total section, REPORT Macro. C-32
TPA, Requirements, F-25
Transporting
Application, C-67
Configuration, C-67
TRIM, Command, D-16
TRUE, IF Result, D-24
TRUE Indicator condition, D-19
Types
Data. B-3, B-22
-U-
UnderscoreD Command name charactem D-61
UNLOCK, Command, E-9
UNTIL (REPEAT), Command, D-35
Updating database, A-38, C-19
UPPERCASE
Commancb 0~17
ENTRY Format option, C-19
Format option, D-6
Up Arrow, Flex-key, B-36
USER, Flex-key, B-37
User-defined, F1ex-Keyp A-24
User-Defined procedure
ENTER.CLEAR. C-24
ENTER.DELETE, C-24
Under mU1ti-userD E-8
ENTER.EDIT. C-24
ENTER.EXIT, C-24
ENTER.SAVE, C-24
Under muiti-userj E-8
USING FUNCTION KEYS, Chapter, E-l
Utilities, B-35
DataF1exg F-33
Copyright (C) 1984 Data Access Corporation 06/08/84

F-70 INDEX DataFlex 2.0 User's Manual
————————————
-y-
Validation
ENTRY Format option, C-19
Format option, D-6
Variable
Date, C-5
Numericg C-3
String, C-2
Variables, Predefined, C-4L F-4
-W-
WHILE -END, Command, D-37
Width, Terminal, A-29
Window
Datap D-l
Format OPtiOnsg B-18
WINDOWINDEX, Predefined variab1e9 E-ll
Windows, A-37, B-l, B-2, B-15
ASCII type7 B-16
DATE type, B-16
Name9 D-5
NUMERIC. typeg B-16
Window formatting
Characterm B-18
Data, B-LB. D-6
OPtiOnSg B-l8, D-6
Window formatting character
%Percent sign, C-38
Percent sigm C-38
WorcL~ Reserved, F-l
WRITE, Command, D-66
WRITELNp Command, D-67
Write privilege, Multi-User, E-8
~Z_
Zero7 Window formatting charactem B-18
ZER0FILE9 Command, D-54
Zero fi1L Window formatting Qptfong B-18
Zero suppressg Window formatting opt1org B-18
Copyright (C) 1984 Data Access Corporation 06/08/84

DataFlex 2.0 User's Manual MANIPULATING RECORDS D-47
._—
OPEN Command
An OPEN command makes all database files associated with afile
"df_fi1ename" (data and key files) available for DataFlex operations.
(See the FILEDEF documentation for information on df_fi1ename).
SpecÍfica11yg when afile is OPENed, the referenced data fi1e9 and all
associated key index files are openedg buffer space is automatica11y
allocated in memory» and upon completion of the OPEN operation, all
files are available for on-line processing.
The OPEN command(s) should be at the beginning of the configuration
and must be executed before the files associated with the df_fi1ename
can be addressed by other commands.
FORMAT:
OPEN f'ile_name_arg {fndex.n}
Where OPEN is the command, "fi1e_name_arg" is the "SHORT
NAME" (created in FILEDEF) of the file to be OPENed, and n
represents the number of an index that may optimally be
loaded into amemory "buffer" to speed sequential access to
records in afile.
EXAMPLE:
OPEN inventory
OPEN personnel index.2
In the second example above, the "index.2" option after the
df_fi1ename "personnel" elects to load the second index for that
database file into amemory buffer.
The optional index buffering only provides aspeed improvement when
the access to records is sequential, as in areport. Random
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
options, subject to tradeoffs. The number of the index is established
in the index definitions as previously created in the FILEDEF func-
tion. If the option is se1ectedp record locations required by FIND
and other accessing operations are read directly from the computer's
active m«nory (RAM) rather than via aseparate (slower) disk access
and file-read operation.
The tradeoff when using record buffering is the sacrifice of aportion
of the computer's RAM that is consumed by this process. The overall
size of your configuration, number of files openéd» RAM capacity of
your computerp and so on, determines how much RAM is available over
and above what is required to carry out the application's basic
functionm and will dictate whether the index-buffering option is
worthwh11e9 or even possible.
————
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
Registration is an easy, simple procedure which permanently marks your copy of
DataFlex as exclusively yours or your company's. It also documents that you have rights
to use DataFlex. When you start the enclosed DataFlex software, it will display the
"TEMPORARY REGISTRATION" legend shown on the reverse side of this document.
After registration, the sign-on will display your chosen name. This is also illustrated on
the reverse side of this document.
First the attached "Limited Use Software License Agreement" must be signed and
returned to Data Access Corporation. We cannot register your license without this
Agreement. The Agreement describes what you may and may not do with your DataFlex
software and its documentation.
If the terms of the agreement are unacceptable to you, DO NOT BREAK THE SEAL on
the envelope containing the disks. Take the envelope, documentation, and these papers
back to your dealer and request arefund.
If, as we hope, all is agreeable, sign and date the Agreement. Turn it over and referring
to the instructions on the back of this page, carefully fill out the "Registration Request".
After you have done this, you may want to make and keep a copy of the Registration
Request and License Agreement for your records. When everything is complete, place
only the Registration Request/License Agreement in the provided return envelope and
mail it back to us. We will get back to you with your registration code.
If both the Registration Request and the License Agreement are not completely filled
out, they will be returned to you without processing your registration request.
With these papers, you will also find asheet of keycap appliqués. There is an appliqué
for each single-key command (Fiex-Key) in DataFlex as well as some others. After you
have installed DataFlex, you will find these appliqués handy for marking the keys you
have 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
The Registration Request on the next page is the way you tell us in what name you W31lt
your copy of DataFlex registered. The registered name should be the owner (a company
or individual) of the license to use DataFlex. Capitalization and punctuation of the
name are up to you. If these factors are important to you, be very careful. Aregistra-
tion can not be changed once it is done.
Please be careful to also enter the correct address. We have to mail your registration
code back to you. In addition, your registered address is used to mail product update
notices, technical bulletins and similar material to you.
After you have run SETSCREE to install DataFlex on your system, DataFlex will sign
on with a screen similar to the one shown below.
default drive=a:
OS: (name of your operating system)
This program licensed to: TEMPORARY REGISTRATXON
S«iaí Number: #### (your seria! number)
2.1/ DataFlex
Copyright (C) 1984, Data Access Corporatioü, Miami Florida
All rights reserved
If your sign-on displays *DEMO VERSION*, company name registration does not apply
and you may ignore the registration procedure. Your dealer will be happy to tíssist you
in acquiring afull-function DataFlex license.
When we receive your filled out Registration Request, we will use the exact name you
entered on the top line to generate aunique access code. This will enable you to replace
the DataFiex TEMPORARY REGISTRATION sign-on with the name from your Regis-
tration Request. You will receive complete instructions for installing your registration
name with your code number. If you had requested registration for "ACME Manufactur-
ing" and your operating system was CP/M and your serial number was 25897, after
installation your sign-on would look like the following.
default drive=a:
os: cp/m single user
This program licensed to: ACME Manufacturing
Serial Number: 25897
2.1/ DataFlex
Copyright (C) 1984, Data Access Corporation, Miami Florida
All rights reserved.

DataFlex Registration Request
ENTER THE EXACT "REGISTRATION NAME" IN THE BOXES BELOW:
LJÁ_I_LJ_LJ_J-J_J j l llI I l!! l ! I I liIIIll! i ! ! l i I I !
Place only one character (letter, space, comma, etc.) in each box. Any character that you
can type on your keyboard is allowed. Do not exceed the number of boxes provided
(leave excess boxes blank). Upper and lower case letters may be used, but each letter
must be distinctly one or the other. For clarity, please place an "X" beneath any letter
that is to be lower case.
The DataFlex serial number can be found on your DataFlex master diskettes. Your
license type is Full Development if you have both aRuntime and aDevelopment disk.
It is Runtime if you have only the Runtime disk.
Please enter your DataFlex serial number here:
License Type: Full Development License Runtime License
NOTE: Demo licenses do not receive Access Codes -contact your dealer.
We will enter your access code here:
(leave blank)
Please complete the following information about your system:
Computer Manufacturer
Model Serial #
Operating System Rev. 8-Bit or 16-Bit
DataFlex Purchased From
Your Name
Your Company
Addressl
Address2
City State/Prov Zip/Postai Code
Country Phone Telex
My computer is: Single User Multi-user #Terminals
Floppy Disk Hard Disk
For what applications do you plan to use DataFlex?
Are you using DataFlex in your own business? (Y/N)
Developing applications for another business? (Y/N)
Do you use an outside consultant/programmer? (Y/N)
PLEASE RETURN THE COMPLETED FORM TO DATA ACCESS CORPORATION. A
COPY OF IT, WITH YOUR ACCESS CODE, WILL BE RETURNED TO YOU UPON
VERIFICATION OF YOUR LICENSE. PLEASE BE CERTAIN TO COMPLETE THE
AGREEMENT ON THE OTHER SIDE. REMEMBER, DEMO LICENSES DO NOT
RECEIVE AN ACCESS CODE.

Limited Use Software License Agreement
Data Access Corporation (DAC), aFlorida, USA corporation, does hereby grant to
LICENSEE apersonal, non-transferable, and non-exclusive license to use the following
computer software programs (singularly or collectively referred to as "software") under
the following terms and conditions.
Software: DataFlex 2.i DataFlex Serial Number:
Solely for use on Computer ,Serial #
(A separate Limited Use Software License Agreement and DataFlex Registration Request
must be executed for each software product licensed.)
l. The software is furnished to LICENSEE for use on the single computer specified
above and may be used only on that computer. LICENSEE and LICENSEE'S employees
and agents will protect the confidentiality of the Software and will not distribute or
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.
2. No warranties with respect to the Software are made by DAC. DAC DOES NOT
WARRANT THAT THE SOFTWARE WILL MEET SPECIFIC REQUIREMENTS OF LI-
CENSEE. DAC SPECIFICALLY DISCLAIMS ANY WARRANTIES OF MER-
CHANTABILITY OR FITNESS FOR APARTICULAR PURPOSE. DAC SPECIFI-
CALLY DENIES ANY LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL
DAMAGES RESULTING FROM THE USE OF THE SOFTWARE.
3. Thií: (ígIee=.e2t, the Éicezse gr: znted h.erezmder, and the SQftw2re, mzy not be
assigned or transferred by the LICENSEE without the prior written consent of DAC
except that LICENSEE may change the instaÉIation location upon notice to DAC and
dealer. Nc) right to reproduce or copy any documentation, in whole or in part, is granted
to LICENSEE.
4. LICENSEE acknowledges that it is receiving only alimited license to use the
Software and related documentation and that DAC retains title to ail Software and
&cumentation. LICENSEE acknowledges that DAC has avaluable proprietary interest
in the Software and documentation and that unauthorized disclosure, transfer, or
copying of the Software is aviolation of Federal law.
LICENSEE Name
Authorized Signature 'Date
Signets typed or printed name

.
mm m ^
D. . 0:
Function Pad Flex-keys'" Cursor Pad Flex-keys""
Back Window Back Space
f"2 -q——
Help! f"1 Print Screen Cursor Up
Supe'"nd :": 4;; d'Z'h""' 4i·-l4: t¢tU·|"ev'ousReco'd
Calculate Delete Record Cursor Left ""Cursor Right
123
f.7 f-8 Cursor Down End lPgDn Next Record
i
Clear Window f"9 f·1o Save Record Insert g" ¿j Delete
Character Character
DataFlex is aRegistered Trademark, and Flex-key is aTrademark of Data Access Corporation.