This document contains the instructions for operating the DATAdesign program,
creating and maintaining databases.
This is the part of the DATAdesign package that makes everything happen. Without it DATAdesign would not exist.
There are however some details which are important to everyone. To be able to use DATAdesign the DATAdesign Engine has to be loaded. This should not pose a problem since the engine is part of ProWesS.The DATAdesign engine creates a special job called 'DATAdesign files' in which all the information is stored.
There is an 'ENGINE_INIT' command which allows you to re-initialise the engine. This may be necessary should you accidentally remove the 'DATAdesign files' job. You should, however, endeavour not to delete this job since it contains all the files which are accessed, so if you do remove this job you will actually remove all files as well. This may cause problems for any jobs which were accessing these files, and therefore all jobs which were using a DATAdesign file will also be removed.
Actually even the DATAdesign.engine thing will be removed, but it can be re-initialised, as we have stated, with the 'ENGINE_INIT' command.
Always use a backup.
We want to stress the fact that you must first make a backup from the master disk and use the backup for loading and configuring.
The current version of DATAdesign (version 4) is supplied to new users without the DATAdesign engine. This Program is part of the ProWesS package so you will need to have this package in order to use DATAdesign. If you have installed the ProWesS package as part of your usual setup then you only have to use the utilities button on your system and indicate the 'Install files on flp1_' instruction. This will install DATAdesign and copy the file to a directory as instructed.
Users of older versions of DATAdesign who are upgrading their copies to version 4 can simply substitute the new program into their boot file as it was before.
ERT HOT_THING ('D','DATAdesign') ERT HOT_THING ('z','DATADesign';'WIN1_DATA_Dbases_adbk_ddf')The first line will allow you to press < ALT-D > to get a blank version of DATAdesign ready to load a file. The second line will allow you to press < ALT-z > and get a copy of DATAdesign with the file WIN1_DATA_Dbases_adbk_ddf already loaded. The advantage of this is that there is only one copy of the DATdesign code loaded into memory and it's execution is noticeably faster. You can set up as many of these hotkeys as you have files.
This can be done with the following boot file.(This boot file will not work if you have a JM QL. In that case use the boot file as supplied on disk). Please note that the lengths of some of the files may be different from those stated here because those files may have been updated after this manual was written.
100 base=RESPR(11684) : LBYTES flp1_hot_rext,base : CALL base 110 base=RESPR(14534) : LBYTES flp1_ptr_gen,base : CALL base 120 base=RESPR(10360) : LBYTES flp1_wman,base : CALL base 130 base=RESPR(22432) : LBYTES flp1_menu_rext,base : CALL base 140 base=RESPR(31408) : LBYTES flp1_engine_rext,base : CALL base 150 HOT_GO : REMark just to make sure you can still use alt-enter 160 ENGINE_INIT : REMark initialise the DATAdesign engine 170 EXEC flp1_DATAdesign
Users with Toolkit 2 can substitute the 'base=RESPR(n): LBYTES.. 'lines for LRESPR and those of you who use SMSQ/E need only load the 2Menu-rext, Engine_rext and DATAdesign program files.
You Can, of course, include these lines in your normal boot file. If all the resident extensions are loaded, then you can run DATAdesign with a line like:
EXEC flp1_DATAdesign
Toolkit 2 also offers you the opportunity to start DATAdesign with a file already loaded. This can be done with a line like:
EXEC flp1_DATAdesign;'flp1_example'
If no device is specified, then the DATA default device will be searched. You should not specify the '_ddf' extension.
If you have QPAC 2 then you can also define a hotkey and/or create a button with these lines.
ERT HOT_RES('d','flp1_DATAdesign') BT_EXEC 'DATAdesign'
DATAdesign is a standard "Pointer Environment" program, so everything can be done in a way familiar to users of that system. If you are not familiar with the Pointer Environment there is a special section in this document to explain it.
In all sub-windows all items which activate another subwindow can be recognised because they end in '..'
.In this manual keys which should be pressed are always shown like this [key]. When you are required to press two keys at the same time, it will be displayed like this [key1-key2]. On the other hand, if we say [key1]-[key2] then you should first press[key1] and then [key2].
The first line of DATAdesign contains the following items from left to right:
DATAdesign will recall the size and position on the screen when the file is next re-loaded
and it will show the file in the that way.
A 'DO' on this item will toggle between the maximum and minimum sizes for the program window.
See Section 5 'The Menus', For a further description of the menus available or refer directly to the sections detailed below
The last item on this bar is a box which displays the name of the file which is loaded into DATAdesign at the time. This is the actual file name stripped of its extension and of any path names that may be before it.(ie. 'flp1_data_private_Address_ddf' would appear as 'Address')
Indicating this item will give you some information about the current file and current record.
The 'Help' icon calls the ProWesS Reader which will display this manual. You have to configure the Datadesign to tell it where the help file is in your system and you have to have loaded ProWesS and have the reader available as described in the ProWesS manual.
The Load File Icon is a dual function item:
A 'HIT' on the item will activate the 'Load File' command.
A 'DO' on the item will activate 'Merge File' command.If there
is no file already loaded then it will have the same effect as a 'HIT'.
Full descriptions of these actions can be found in Section 5.1.1 : Load File and Section 5.1.2 : Merge File.
The Save File Icon is a dual function item:
A 'HIT' on the item will activate the 'Save File' command.
A 'DO' on the item will activate the 'Save with a new Filename' command.
If there is a file already existing in the chosen name then it will give the opportunity to
either Overwrite, Abort or Retry.
Full descriptions of these actions can be found in Section 5.1.4 : Save File and Section 5.1.6 : Save with a new Filename
This sub-window allows you to print your records. It is made in a way that that should allow you to print labels and lists easily. For more complex jobs, a dedicated printing program should be written. PROGS have a separate program, pfDATA for printing databases in a more refined way. This program also allows you to insert graphics produced by their drawing program, LINEdesign.
The print window will start printing when you indicate the [print] item.
This command will always print all the fields which can at that moment be edited in the edit-window. So selecting which fields to print can be done with 'Display'.
This menu also gives the user the choice of the following options to control the printed output
This window allows you to search for a string or numerical value in the database.
You can choose to search in selected fields or in all fields (with the given type).
There is an window in which you can enter the value or string which should be searched for.
When you indicate 'integer', the value will be searched in both 'short' and 'long' fields, unless the value will not fit in a short.
The search will commence when the 'DO' item is indicated.
You can then continue the search by indicating the Again Icon or pressing [F9].
If you press [ESC] while in this window, then you can immediately search starting from the next or previous record by indicating the Again Icon or pressing [F9].
This item can be used to repeat a search command.
This icon gives access to the 'Next Record' command in the
This icon gives access to the 'Previous Record' command in the
To keep your database up to date you will occasionally (or often) have to delete a record, and this command allows you to delete the current record. The recordID of the record deleted will not be reused and the recordIDs of all of the other records in the file will remain unchanged.
This command creates a new record ready to have data entered into it. It is functionally equal to the [CONTROL-E]-[F4] key sequence when in edit mode.
The fourth window is the fieldcontents window, which is also called edit window. This part is actually used to input or edit all the data in the file. Typing in this window is quite similar to using a wordprocessor or editor. But here are some differences. If a line is wider than can be visualised, then part of the line will pan in the left margin while typing. When editing another line, the first part will be visible. This panning will only occur in the line you are editing. When typing you can use all printable characters and controlkeys. These are described in full in section 7.2.
The fifth part of the DATAdesign screen is the fieldname window. This window is used to show the names of the fields. It can also be used to delete a field or to change the name of a field. This can be done by a hit or a do on the fieldname you want to change or delete. You can then change the name. If you delete the name, then the field will be deleted. Please note that a name which is exactly sixteen characters long can't be edited this way.
This command allows you to load a new file. This file can be selected with either the File Select window, or with the Read String window from the Menu Extensions. The Read String window will only appear when the window size of the main program is too small to support the File Select window
DATAdesign always attempts to load or save three medium files.
This command allows you to merge two files together. You just have to select the file to be merged from the File Select Window.If the main window is too small to support the File Select Window then a Read String window will appear. In order to get the File Select Window in these circumstances you have to go back to the main program and 'DO' the 'Resize Icon' in the Top Window. You will then have access to the File Select Window.
Both of these menus are part of the Menu Extensions
.The fields which have identical names (case dependant) will be put in the same place. Other fields will be added. If there are fields in the two files with identical names and different field types, one of the files may actually display garbage. The fields to be merged should not be longer than 8k.
This command allows you to remove the file you are working on so you can create a new one.
This command saves the current file, and the medium-file with the window information, and if the file is sorted or filtered, also a file with all the index information. The files will automatically be overwritten if they already existed.
This command saves the current file, and the medium-file with the window information, and if the file is sorted or filtered, also a file with all the index information. The files will automatically be overwritten if they previously existed. When the file save is completed the program will remove itself from memory in the normal way.
Functionally the same as ''Save file'', except that you can now change the filename and device. Please also read the section on filenames.
If the medium-file already existed, a request is made whether you want to overwrite or not.
You can make a backup of your file with this command. Just edit the filename 2 (you should actually only change the device), and a backup will be made.
When your file is memory based, this allows you to save the file to another device (or name) without the internal filedevice changing.
When your file is disk-based, this is the only way you can make a backup without releasing the file (i.e. making sure all jobs which use it stop doing so). It does however require you to keep the medium with the file in place, so you will have to backup to another device (or to the same disk).
Backup of a file only makes a copy of the root file, the index file and the file with the window details are not backed up with this command.
This icon will activate the The Print Menu described in Section 4.3.7
This command can be used to go to the first record in the file. This will be the first visible record which is not locked by another job which accesses the same file.
In a sorted file this will be the first record that satisfies the sort criteria. In an unsorted file this will be the first record that was entered into the database.
This command can be used to go to the last record in the file. This will be the last visible record which is not locked by another job which accesses the same file.
In a sorted file this will be the last record that satisfies the sort criteria. In an unsorted file this will be the last record that was entered into the database.
Please note that this record will always be followed by an empty record which can be used to create a new one.
This command activates the Search Menu that is called up by The Search Icon, and is described fully in Section 4.3.6.
Please note that the searching occurs without indexes because this is more flexible. On the other hand it is also slower. There is another kind of search available which does use index information. This can be found in the Commands Menu under the heading Index Find.
This window allows you to replace a string or numerical value in the database.
You can choose to search in selected fields or in all fields (with the given type).
There is an window in which you can enter the value or string which should be searched for
and one beneath it in which the replacement can be entered
When you indicate 'integer', the value will be searched in both 'short' and 'long' fields, unless the value will not fit in a short.
The search and replace will commence when the 'DO' item is indicated.
You can then continue the search and replace by indicating the Again Icon or pressing [f9].
If you press [ESC] while in this window, then you can immediately search and replace starting from the next or previous record by indicating Again Icon or pressing [f9].
Please note that the searching occurs without indexes because this is more flexible. On the other hand it is also slower.
Replace can only replace one occurrence of a string or numerical value per record. If you want more occurrences to be replaced, then you should start again from the start of the file.
This command allows you to select which records in the file should be visible, and which not. There are up to ten filter levels. You always edit the level which is indicated in the top scrollable window. Near the bottom there is another scrollable window which indicates the field this level works on, or that only previous levels are taken into account (if any).
Each level which is evaluated has a levelstatus (true or false). These statuses are combined by taking the first value, and then:
When the field is a text field, then you can also specify whether the comparing of characters should be done case dependant or not.
This window allows you to sort all the visible records in the file. If sort is switched off, records will be in the order of creation (this is actually not always true, but this is so unlikely that it is a safe generalisation, for more info, read the documentation in the Application Programming Interface.
There are up to ten sort levels. Only when two records are the same (as far as sort is concerned) in all previous sort levels, will the next level be taken into consideration.
You can also indicate the place. For numerical fields, this is the number of the item in the field which is sorted. If the item doesn't exist, then the record will be placed at the end of the file. When the field you want to sort is a text field, then this indicates the character which is used for sorting.
The above changes take effect when the 'DO' item is indicated. Indicating 'QUIT' will abort any changes made and return to the main window.
This command gives you another way to search in a DATAdesign file.
It has the advantage of being blindingly fast, always, no matter how long your file
is. Naturally, there are some disadvantages as well. This command can only be
invoked if the file is sorted, and you can only search according to the first
sort level. This means that it only searches a given place in a given field.
When indicated the user is presented with a box in which to enter the search key. The search key should be of the same type as the field in the first sort level. When you press enter the requested record is displayed, or a 'not found' reported.
Please keep in mind that this command needs an exact match. If the field was sorted case dependant, then the search is case dependant. If the field was sorted as text, then the first eight characters of the given string must match. If the string you search for is not eight characters long, then the search key should also be shorter than eight characters.
Please also keep in mind that a field which is sorted by character is always case dependant.
This command will clear the mark status of all records to zero. This will have no effect on records which are edited by another job.
This command allows you to get an overview of the file you are editing. All the visible fields are (partly) displayed in the window. The window can be scrolled and panned. Panning will change the fields which are displayed, and scrolling will change the records. Note that scrolling is a bit slow because the data has to be retrieved from the file.
The window can be split (only horizontal) to show two different sets of fields.
You can immediately jump to a record with a 'DO' on one of its fields.
Can be used to leave the program. If you have changed anything since the last time you saved, there will be a confirmation request (Item Select from the Menu Extensions).
This menu gives access to commands which all relate to fields within DATAdesign Records.
When you want to add a new field to your file, you just have to call this command, and enter the name of the new field. The type can be indicated by the first letter of the fieldname. Fieldnames will be truncated to 16 characters, and an error will be reported if a field with the same name already exists.
The fieldname has to be typed in a Read String window from the Menu Extensions.
After a while some fields in your database may become redundant, and you may want to delete them. That is exactly what this command does. There is however one problem. You can only erase a field in a file if this is the only job which has access to that file, as we can't delete a field in a record which is being edited by another job. If no fields can be removed, an error will be reported.
To use this command, just indicate the fields you want to delete in the scrollable box. This command will take effect when the 'DO' item at the head of the menu is indicated
This command can be used to clear the contents a some fields. This will be done in all records which can be accessed, so not in the records which are locked because another job is editing it.
This menu gives access to commands that relate to Records within DATAdesign files .
This command will create a blank record in the file and present it ready for data to be entered. It is described fully in Section 4.3.11.
This command will delete the current record from the database. It is described fully in Section 4.3.10 : Delete Record Icon
In some cases you need to add a new record to the file which is almost the same as another record which already exists. In these cases this command comes in handy. Just execute it on the record with the similarity, then you can make the changes you need. It will actually create a new record with the same contents as the previously current one. This then becomes the current record.
If you don't want this second record, you can always revert with Undo/Truncate
.If you have made if faulty change to your record or to the mark status, then you can restore the original values of both with this command.
All records always contain a 'MEMO' field. This is an 'invisible' field, as it can never be displayed in the edit-window. It is always a text field which can contain some additional notes. This command allows you to edit these notes.
You just have to indicate the records you want to clear.
This command can be used to stuff the current record. The record will be stuffed as displayed in the edit window, that is only visible fields and in the same order.
If you stuff by line, then all lines will be placed in the stuffer buffer in reverse order, so you can recall them (in the correct order) with a sequence of [alt-space] and [shift-alt-space] keypresses.
If you stuff as block then the entire record can be recalled by only one [alt-space] keypress.
The last alternative is to store it in the Scrap, this is part of the Menu Extensions, and the record can be used in QD, LINEdesign and any other program that uses these extensions. Users who write their own programs with the QMenu extensions can also access the scrap item, making this a very powerful option.
This command can be used to browse through the file. The effect is the same whether it is accessed from the Commands Menu or the Icon Bar. If the file is sorted then the record displayed will be the next in the sort order. If the file has not been sorted or the sort has been turned off from the Sort File option in the Commands Menu then the record displayed will be the one with the next highest RecordID
It can also be used to
Please note that 'next' will display an empty record when you were on the last record. This empty record can then be used to fill in a new one. If you indicate 'previous' when on the first record, then no other record will be displayed.
This command can be used to browse through the file. The effect is the same whether it is accessed from the Commands Menu or the Icon Bar. If the file is sorted then the record displayed will be the previous in the sort order. If the file has not been sorted or the sort has been turned off from the Sort File option in the Commands Menu then the record displayed will be the one with the next lowest recordID
It can also be used to:
Unlike the Next command this never presents you with a blank record
This command can be used to define which fields should be visible in the edit-window, and in which order.
All you have to do is indicate the fields you want viewed in the edit-window in the order you want them. Then press [ESC]]. Now only your selection of fields will be visible.
If you indicate 'all' in this window, then all the fields will be selected in the order in which they are displayed in the window.
When you want to create a record in an empty database, you first have to define the fieldnames. This can be done by first starting DATAdesign with no file loaded and then going to the field contents window and typing in the names of the fields, each on a different line.
The type of the field will be defined by the first letter or character. If this is a special character, then the field will get a type accordingly, and the character will be removed from the fieldname. If the character was not recognised as denoting a fieldtype , then you will get a character field (and the first letter is not removed).
Fieldnames can be no longer than sixteen character (they will be truncated), and no two fields with the same name are accepted (only the first one will be created).
When you have completed the list of fields then press [F4] or [F5], the fieldnames will be moved into the fieldname window and you can start adding some records.
Don't worry if you have forgotten a field, you can always add (or delete) it later.
The records themselves can be put in the file by (again) pressing [F4] or [F5]. This will also give you the next record in the file. When you start creating a new file, the next record will always be an empty one. However, when you are modifying a sorted file, the next record will be the record which is just after the one you just entered.
If you are entering a series of records you should either press [CONTROL-K] or indicate the New Record Icon in the Icon Bar for a 'New Record'.DATAdesign commands can be activated in three different ways all of which are available at any time while the program is loaded and active.
The following CONTROL keys can be used at any point during the operation of DATAdesign. Explanations ending in ''..' are those which will lead into another sub-menu or window.
Note that [CONTROL-C] is normally used as key to switch jobs. This takes precedence
and thus the mark status is normally not cleared when using this keypress.
If, however, your system is not configured to use [CONTROL-c] in this way you can clear the mark
status by using this keypress.
You can get into edit-mode by a hit or do on the window, or by pressing [e]. Getting out of edit-mode can be done by going up on the first line, going down on the last line of the record or pressing [ESC].
See also the list of general control keys above for the shortcut keys used in the rest of the program