APPLICATIONSDIVERS ★ DATAFLEX|Your Computer) ★

DataFlexApplications Divers
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

DATAFLEX isn't really what you'd call a dBase II competitor. It is at the same time both too elegantly simple, and too complex and powerful, to be considered alongside the Ashton-Tate product.

In fact, Dataplex isn't a database package at all if you consider dBase the ‘popular' definition of the term.

For example, it doesn't allow you to just fire it up and inspect/manipulate your data with interactive, direct commands.

According to Data Access Corporation, the people behind DataFlex, the package is ‘Application Development Software' rather than just a database manager. And they're right: DataFlex is an extremely powerful development tool that is ideal for programmers developing their own software packages.

However, a few little extras thrown in with the DataFlex package to make the development programmer's life that little bit easier also turn it into an easy-to-drive data handler for the less expert.

These extras - like pre-written macros to handle data entry and reporting, plus 'auto-pilot' file definition and program creation give the newcomer instant access to the sort of power that would require an in-house programmer in the case of dBase.

If you cut your programming teeth on dBase II, you'll hate DataFlex -for a little while. Eventually you'll hate
yourself, for failing to discover DataFlex sooner.

The initial problem will be the fact that you'll approach DataFlex from the wrong angle. Your preconceived notions about how to get results from database packages will cause you to dive in at DataFlex's ‘deep end', writing reams of code that make full use of the extensive language.

It will all be a waste of effort, as DataFlex requires a fresh approach. The simple bits at the front of the manual - the ones you moved straight past on your way to the ‘advanced' sections are all you need for most applications.

It's hard to come to grips with at first, but the basic, auto-pilot-produced programs are more powerful than those 10 or 20 times the length - you were used to writing in dBase. Until this realisation dawns on you, you will be uncomfortable with DataFlex; afterwards you'll love it.

Data Access Corporation has at least two distributors in Australia: Intelligence Australia, in Sydney, and Australian Microcomputer Solutions, in Geelong. We've found both of them dedicated to the product, and both are doing good jobs of supporting and promoting it.

Power, at a Price The power of DataFlex doesn't come cheap; the single-user version for eight-bit machines is almost $1000, and the price climbs to around $1800 for a multi-user 16-bit version.

While figures like that might be reasonable for such a powerful development system, the fact that runtime versions (the basic package which allows you to run pre-configured applications, without being able to create new files or develop your own data entry/edit modules) range from $500 to $1000 is a worry; it puts DataFlex out of the ‘mass-market' class that micros have created and suggests it could only be used to develop high-cost vertical market applications or custom packages for individual contracts.

On anything but custom, one-off systems, the developer would have to think long and hard about giving Data Access $500 to $1000 out of every sale made when development tools like Digital Research's Access Manager and Display Manager (which involve no runtime licensing fees) are available for high-level languages like CB-80/86, PL/I, and Pascal/MT + (DataFlex, incidentally, is written in MT + ).

Admittedly DataFlex would make most jobs easier, but whether it would make a job $10,000 easier the extra cost involved in selling between 10 and 20 copies of your application - is questionable.

Overall, I feel Data Access Corporation's pricing strategies are a little (maybe even a lot) out of touch with the micro market if you evaluate DataFlex purely as a development system.

Taken as an end-user product, the steep pricing is more realistic - there is little, if anything, on the market to match its power, its multi-user capabilities, or its support for a wide range of operating systems.

You can get DataFlex for CP/M, CP/M-86, MP/M-86, MS-DOS, PC-DOS, TurboDOS, Novell Sharenet, PC-Net, 3COM, DMS Hi-Net, Molecular N-Star, Televideo MmmOST, Action DPC/OS, Omninet, Network, and IBM PC with Corvus - a useful selection both for the applications developer and for the user who might need an upgrade path.

DataFlex has impressive specifications (where differences exist between 8- and 16-bit systems, the 8-bit figures are in brackets): each ‘system' can have 125 data files (you could have other systems on different disks), of up to 65,535 records each and 255 fields per record; each file can have nine indexes (four) plus one ‘ad hoc' index, of up to six (four) elements each; record size is limited by available memory, but should be more than 4000 bytes, while the number of data files which can be open at once is also memory-limited to at least 10 (five) plus associated indexes; maximum program size is 32,000 lines, and you can have up to 32,000 variables, depending again on available memory. Memory requirement for eight-bit systems is 52 Kbytes, for 16-bit systems 100 Kbytes.

Instant Applications

It's pretty easy to put DataFlex to work immediately you get it out of the wrapping. Just by following the steps in the introductory section of the manual (the latest one is a significant improvement) you can have a working system up and running the same day.

You don't even have to formally create or define your data file structure - just draw your data entry screen using the supplied editor or your favourite word processor. You start the ‘page' off with a slash, followed by a screen name, and then put your prompts wherever you like, followed by underline characters where you would like data to be entered.

If a field will contain numbers, you signify that by putting a dot in place of one of the underlines (at the end if you don't want decimals, or in the position you would like the decimal point). If it will be a date field (DataFlex has a special Date data type; it stores dates as Julian numbers, allowing direct date calculations), you draw it with the slashes between day, month, and year.

You end the screen design with a slash and an asterisk, and that's just about it - you ‘feed' the screen file to Autodef, which asks you a series of questions and then creates the necessary file, indexes, and DataFlex entry configuration (they're called configurations, not programs, in this system) for you.

For example, I drew the screen in Figure 1, and when I ran Autodef it put the design up in front of me and went through the fields one by one, asking me what I would like to call them, and then asked me which fields I would like as index keys.

It then created the data file, the necessary indexes, and the data entry/editing program ready for compilation. Figure 2 shows the file definition Autodef came up with.

There are a couple of points worth noting in this file definition. The first is the figure for the maximum number of records - it asks you how many records you will have and, if you like, it can pre-initialise the disk space for them. This option can be used to ensure your data doesn't spread all over the disk as the file grows. The number isn't a limit - it can be changed at any time.

Note also the last two columns before the field names you can define here the relationships between files (you have to use Filedef to do this - Autodef can't manage it), and from then on DataFlex ‘knows' them and will automatically bring related records to the screen for you when needed. It is this automatic handling of related files which makes DataFlex so easy to use in complex applications.

All key fields in DataFlex indexes must be unique, which is why the indexes in this sample are specified as having field 0 as their second element - if you tell Autodef you may be entering duplicate data, it will include the record number (field 0) in the index.

Something you can't do with Autodef, but can add later with Filedef, is include ‘overlap' fields fields which don't take up file space, but instead point to combinations of other fields. This feature is particularly useful as it can be used to eliminate any limitation on the number of elements in an index.

The last thing Autodef does is to produce the source code for your data maintenance program, ready for the DataFlex compiler. Figure 3 shows what it looks like.

Unbelievably simple, right? Well, it's not as simple as it looks - the line ‘ENTER MAILLIST' invokes the ENTER macro, which is 60 lines worth of programming: the bit that follows is just a subroutine called by the macro, which is why it is followed by a RETURN statement.

As far as the user is concerned, however, it is unbelievably simple. If you run that .FRM file through the compiler, and then execute the resulting .FLX file, your screen design appears in front of you ready for data entry. If you want to edit an existing record, you just place the cursor in one of the key field windows, type the name or other detail you are looking for (or part of it), and hit the FIND key.

You can also hit the FIND key on an empty field to get the first record, and use the NEXT and PREVIOUS keys to step through the records.

The nice thing about these keys -flexkeys as they are called - is that you can define them yourself during installation if you don't like the defaults. You can use this feature to set DataFlex up to operate with the same editing keys as your word processor, for example, or to make use of your terminal's function keys.

Once you've done so, using the SETSCREE.CMD/.COM installation utility, you can print the current definitions for both key assignment and terminal configuration to a file or the printer for future reference.

The flexkeys can all be 'trapped' by your programs, and their behaviour modified (or even disabled) to give you complete control over data entry.

Adding Bells and Whistles

The Autodef-produced data entry program is fairly basic, but with little work you can take the ENTER macro a lot further before you need to think about adding any serious programming of your own.

Each ‘ENTRY' command line can be followed by a number of options, single or combined, including: automatic ‘find' of a record matching entered data, skipping a window if a previous field's FIND has filled it, forced find (that is, data matching a current record must be entered, and the record found, before proceeding), upper case conversion of entered data, mandatory entry (no skipping to the next field), range and validity checks, and specifying windows as display-only, so that information in those fields cannot be changed.

Values in windows (on-screen fields) can be calculated from other windows, and the order of entry can be changed by naming the windows explicitly (mailscreen.1 is the first field, and so on) instead of using the AUTOPAGE command, which works through the fields sequentially.

Multiple related files can be accessed simultaneously by simply OPENing all the required files, including them on the ENTRY command line, and using their field names in the appropriate places on the screen.

For example, Figure 4 shows a multi-file data entry screen that takes full advantage of DataFtex's relational capabilities. It is part of a test system being run by an associated magazine group in this office, handling advertising bookings from common advertisers across a range of titles.

The details are kept in three files the advertisers file (the information is used hundreds of times, but only has to be entered once), the magazines file (same here), and the bookings file (which need carry only the information relating to the individual booking, plus a couple of small fields which point to each booking's related records in the other two files).

In this case, the operator enters a magazine number, and the magazine name is found and placed in the next field. Then an account number is entered, and the advertiser's full details are brought to the screen. None of this name and address-type data is duplicated in the bookings file, yet as far as the operator is concerned it might as well be - since any time the booking is referenced, the extra information is automatically provided by DataFlex as long as the screen design requires it.

Moreover, the information required to identify the relationship (such as account number and magazine number) is saved in the appropriate fields in the bookings file record automatically, even though this program makes no mention of doing so! DataFlex knows, through the file definition, that the relationship is based on these fields, so it moves the information brought to the screen from the related files into the bookings file record without ever having to be told to do so by the programmer

In this particular module, the RETAIN options allow multiple similar bookings to be entered for an advertiser without having to retype the common details - the operator only changes the altered fields, then hits the SAVE key. The form can be cleared for an all-new booking by hitting the CLEAR key twice.

A Hint of the Power to Come

The fact that a large, quite complex system like this can be handled by such apparently simply programs (this is one of the most ‘complicated' -the others in the system are straight single-file maintenance screens and similarly straightforward reports) is testimony to DataFlex's elegant, easy-to-use power.

More significantly, the fact that there is a large and powerful programming language ready for those who need to venture further indicates that DataFlex should be able to handle just about any project one could dream up.

The DataFlex language has 15 command ‘groups', several of which simply don't exist in other database systems. Of the groups that are common to other systems, the DataFlex command set seems noticeably richer.

For example, the DataFlex ‘system group' supports file copies, renaming files, erasing files, directory listings, running an operating system-level program, obtaining the date and time from the operating system, and issuing operating system function calls.

The structured control group includes BEGIN...END, FOR...FROM...TO, REPEAT...LOOP, REPEAT...UNTIL, and WHILE...END -you're lucky to get as much as that in many ‘real' languages, let alone other database systems.

Direct console I/O commands include clearscreen, clearxy, gotoxy, inkey, input, keycheck, show and showln - all of which are ‘extras' for special applications, as normal screen handling is automated by the ‘forms' commands. These include accept, autopage, blankform, clearform, display, format, name (allows naming of individual windows if you prefer that to addressing them by screen-name.window-number), outfile (to redirect output to screen, printer or named file), outclose, output (sends the current screen to output device), page and print.

The ‘control group' - commands further to the structured control group above - includes commands such as error [number] (prints that number error message from user-expandable FLEXERRS.DAT file on last screen line, clearwarning (clears error fine), chain (another .FLX configuration), abort, debug, goto, gosub, on...goto, on...gosub, and return. The return statement can act as a normal subroutine return, or if specified can return to a labelled routine.

Sequential I/O commands include direct_input, direct_output (plus associated close commands), read, readln, write and writeln. String-handling commands are extensive, and include cmdline (returns the command line tail passed by the operating system when the program was first fired up), append (string concatenation), ASCII (string to number), character (number to string), left, mid and right (like BASIC's LEFT$, MID$ and RIGHT$), length (of a string), pad (either fills a string with blanks to target length or, if target length is shorter, cuts it to length), pos (finds the position of one string in another), trim and uppercase.

There are several other groups of commands, for element processing (calculate, increment, moveint, movenum, movestr), multi-user commands (despool, ifchange, lock, unlock, reread), commands for use with the enter and report macros, database commands (attach, clear, delete, find, open, relate, save, saverecord, zerofile), key processing commands, and type definitions (date, integer, number, string, indicator).

Logical Indicators

Indicators are heavily used in DataFlex configurations to control program flow. They are, in fact, logical variables they evaluate as either true or false.

If an indicator (or combinations of indicators) is included in square brackets at the start of a program line, the line will only be executed if the indicator is true.

For example:

INDICATOR OWES_MONEY , COUNTING
INDICATE OWES MONEY AS CUBTOMER, BALANCE GT 0 (OWES_MONEY) GOSUB CHECK_CREREDIT_LIMIT
//dummy example
[COUNTING) REPEAT
INCREMENT COUNTER
MOVE COUNTER TO WINDOW.13
[NOT KEY.ESCAPE] LOOP

In this case, the OWES_MONEY indicator is set to true if the balance field in the customer file is greater than 0, otherwise it is set to false.

The counting example is a dummy which simply serves to illustrate how indicators can be used to decide whether we enter a control structure like begin/end or repeat/loop - and whether or not we exit it. KEY.ESCAPE is one of 38 indicators DataFlex sets internally under certain circumstances; others include FOUND, FINDERR, SEQEOF, ERR, MULTIUSER (to ! assist developers in producing 1 operating system independent configurations - they can ensure certain commands happen only under multiuser versions), SELECT, KEYPRESS and LASTIF.

DataFlex uses LASTIF internally in its interpretation of IF statements. For example, a program line like:

IF balanck_due gt 0 then gosub CREDIT_CHECK

would be converted to the following by the compiler:

INDICATE LASTIF AS BALANCE_DUE GT 0
[LASTIF] GOSUB CREDIT_CHECK

Getting The Data Out

Reporting in DataFlex is as elegantly simple as entering data - and, thanks to its use of the same forms concepts as the entry methods, is substantially more powerful than any database report generator I've seen.

There are two ways to produce reports: directly with QUERY.CMD(.COM), or from within a DataFlex configuration, using the REPORT macro.

Query is a particularly easy way to produce ad-hoc reports. It prompts you all the way, putting the field names on the screen for you to select from, allowing you to make the report selective, then offering a choice of indexes and a choice of subtotal breakpoints. Once it has the spec sorted out, it will let you write the report to the printer or to a file.

If you tell it to write to a file it will give you a choice of output formats. You can produce it as a standard report, output it in delimited format for importing into another database or language, or write a report configuration which can be compiled for permanent use.

If you ask it to write a report configuration, it does so using the REPORT macro format which you can then edit as required. The only problem with Query is that it will only operate on a single file - however, the report macro will operate on multiple related files so the usual process is to generate the basic format with query, then to add to it before compiling.

REPORT uses a form design format, like ENTER, so you can make multi-line, multi-file reports in a matter of minutes. Figure 5 shows a simple example REPORT configuration produced in a few seconds with Query.

The basic report has three sections - header, body, and total. It can include several breakpoints with their own subtotal format if desired.
Because the program lines simply PRINT to the data fields in the form design before each is output, you can adjust the appearance just by moving the fields around with the editor, just as if you were doing a screen design.

DataFlex ‘knows' about keeping track of the various subtotals and totals (it's all in the macro), and simply outputs the header at the top of each page, then loops through the BODY routine until the page is full, a subtotal break is reached, or the data is exhausted, at which stage it prints the TOTAL form.

You can send the report to the console by specifying CON: on the command line invoking the report, or to a file by putting a filename on the command line. Otherwise, it defaults to printer output.

DataFlex Utilities - by DataFlex

Many of the useful utilities which come with DataFlex are themselves DataFlex ‘configurations'. For example, the brilliant menu system is a Flex program which stores its menus in a database file.

Each record has nine menu selection lines available, with a description (the bit which appears on the menu screen), a field listing the action to be taken when that option is selected and, optionally, password and ‘question' fields.

If a password is specified, you'll have to know it to be able to run

that selection. The optional questions allow you to obtain further details from the operator - they provide a prompt for the operator (for example, asking which device to send a report to) and accept a response, adding it to the command line in the ‘action' field before passing it through for execution.

Each menu has a header, and a default menu number to return to if the operator hits the RETURN key instead of making a selection (you can make the current menu the default if you need to). If you want to chain to another menu from any of the menu selections, you simply put the command MENU (along with the menu number) in the ‘action' field.

Another DataFlex configuration, MENUDEF, allows you to set up and maintain your own custom menus quickly and easily.

The READ configuration, also written in DataFlex, is a good example of the use of the language's direct I/O statements. It is a fully-prompted program devoted to reading data from text files of various formats into DataFlex databases - it doesn't actually do the READ, but generates Flex programs to do the job as required.

Machine-level utilities include programs to convert DataFlex 1.6 programs and reports to the much-changed 2.0 format (2.0d and 2.0e were the versions used for this review, incidentally), the editor, the compiler, and a reindexing program which also allows the creation of ad hoc indexes as well as providing for occasional rebuilding of on-line indexes and regular rebuilding of ‘batch' indexes.

A utility program called FREL checks data integrity and puts deleted records back on the free list for reuse.

An Expandable Language

DataFlex allows you to define your own commands and macros, either individually within applications or universally, by including them in the system file FLEX.CFL, which is read by the compiler each time it does its job.

The contents of FLEX.CFL are provided in source code form in a file called FMAC, which is where you can add commands if you want them available universally. A utility called PACK compiles FMAC to produce FLEX.CFL.

If you're really serious about using DataFlex for development, you can buy the Pascal Libraries for around $2000.

The Ultimate Solution?

So far I've spent a lot of time telling you how good I think DataFlex is, but there are a few things I don't like.

The first is simply a petty annoyance: every program and utility in the suite automatically chains to the main program on completion, whether you want it to or not. I'd prefer to have to specify that specifically, rather than having it forced onto me all the time.

My next concern is more basic, and relates to the concept of the program rather than an individual item of behaviour. DataFlex revolves around having a record in its buffer -either FOUND, or entered. If you want to operate on an existing record, it has to be FOUND, which precludes the use of any command which operates over a range of records.

In dBase, for example, I can issue commands like DELETE NEXT 50 (records), or REPLACE ALL DATE WITH TOMORROW FOR DATE = TODAY - most dBase commands accept a scope in this fashion. I miss that with DataFlex; such operations require a program which will loop its way through the file.

The lack of any method of getting direct access to your data files is also frustrating. If you want to edit a file's contents in any way, you need a program to do it - even if it's a super-simple entry macro like the first example above. Similarly, if you want to test any DataFlex command to see how it behaves, you have to write it into a program, a time-consuming task if you don't understand the syntax and botch it a few times ...

This isn't really a criticism, I suppose it's just a side-effect of the fact DataFlex is more like a traditional development language than most database packages.

What is worthy of criticism, I feel, is the manual. What's there is, in the latest version, clear and concise -there just isn't enough of it. It's like the first half of a top-class manual:
what it needs now is a reference section, which goes through each of the commands in alphabetical order with a detailed explanation of syntax and usage, and which shows examples in a range of applications.

Whenever I used DataFlex, I found myself continually hunting back and forth between the index and the body of the manual. The explanations of the commands are divided into their groups - a good way to introduce them to new users, but hardly a good quick-reference format.

dBase II gets a lot of criticism for its documentation, but I find its manual far more useful now that I am familiar with the program. Whenever I want to check the syntax or use of a command, I go straight to it in the alphabetically arranged reference section, the second half of the manual.

As I said, what is there is good. The new manual, provided just in time for this review by Australian Microcomputer Solutions of Geelong, seems a lot better organised, and a lot clearer in its introductory tutorial, than the previous version. And the company seems serious about continuing to improve it - a note in the front offers a ‘reward' for suggestions on how to improve the documentation, a commendable approach.

Will it be the Winner?

Is DataFlex going to ‘win' the great database search? It's certainly a front runner, but it's too early to say for sure. Database packages are still piling up on my desk, each with apparently valid claim to the title of dBase's successor.

I'll reserve judgement until we've worked our way through them all, but I will say this: if there's an easier way of getting a complex, multi-file database application up and running, I've yet to see it. And its multi-user capabilities, which are also provided ‘automatically' in normal use, put it a step ahead of the others at the start line.

Once you overcome the initial (selfinduced) problems with DataFlex, come to understand its simple elegance and ultimate power, and approach it correctly, it is a pleasure to work with. It really is ‘Application Development Software' that is easv to use - and worth using ...

YR

★ PUBLISHER(S): ???
★ YEAR: 1985
★ CONFIG: CP/M Plus
★ LANGUAGE:
★ LiCENCE: COMMERCIALE
★ AUTHOR(S): ???

★ AMSTRAD CPC ★ DOWNLOAD ★

Adverts/Publicités:
» DataFlex  v2.0    ENGLISHDATE: 2022-07-14
DL: 51
TYPE: image
SiZE: 176Ko
NOTE: w1206*h1623

» DataFlex  v2.1    (Now  for  DOS  3.1)  ENGLISHDATE: 2022-07-15
DL: 56
TYPE: image
SiZE: 296Ko
NOTE: w1556*h2129

» DataFlex  v2.1    ENGLISHDATE: 2022-07-14
DL: 44
TYPE: image
SiZE: 270Ko
NOTE: w1191*h1596

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » DATA Disk Formatter
» Applications » Secured System Database (Your Computer)
» Applications » Multidata (CPC Amstrad International)
» Applications » Data-Pro (Computer Schau)
» Applications » CPC-Datagenerator (Computer Technik)
» Applications » Database (Amstrad Computer User)
Je participe au site:
» Vous avez des infos personnel, des fichiers que nous ne possédons pas concernent ce programme ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop
Page créée en 221 millisecondes et consultée 636 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.