Files: EDA specific (system files)

This section contains information on how to read and write files in EDA. First there is an important distinction to be made between two sort of files: This first section will discuss the most important type of EDA specific files, i.e. the files you will normally use to keep your data for further analyses. The following section then discusses the various forms of raw data files. The last two sections finally will describe two lesser types of EDA specific files (they have been tentative facilities in previous EDA version).

EDA System files

EDA system files and WA archives are used to store whole WA with all documentation and EDA features attached to it. As we already said before there is a distinction between system specific files (computers with the same operating systems) and portable files (import/export to different computers). This distinction is not important when reading a file (EDA uses exactly the same commands to read either of them); only when writing a portable file you need to choose an option on the same command used to write a normal EDA system file.

Command overview

This section provides a short overview on how to read and write EDA work areas. The information given here will be sufficient for a basic use of these commands. Further sections will provide full coverage of all available options, as well as more details on these commands.

EDA work areas may be saved permanently to and restored from WA archives. An archive or library is a collection of saved work areas. [Note that if work area archives are not active at your installation some commands marked by a star in the list below will not work; here we assume that they are active.]

Saved workareas have a name and a short descriptor (the syntactical rules are the same as for variable names and descriptors). The following commands require a WA area name, i.e. the syntax is always GET <waname>, e.g. GET DEMO.

GET        read a work area from an archive
APPEND     append data to the current work area
PUT        save to current work area to a file
REPLACE    replace a work area in an archive
DROP       remove a saved work area from an archive
GET <waname> is used to read a saved work area into your WA. Note that the current contents of the WA are lost, i.e. replaced by the contents form the saved work area. The GET command has additional options, where you can read only some variables from the file, instead of reading all of them.

APPEND <waname>, e.g. APPEND TEST1 will add the contents of the saved WA TEST1 to the current work area. If the current WA is empty, the command does exactly the same as GET TEST1.

PUT <waname> saves the current work area, i.e. you may later retrieve it by saying GET MYDATA if you have saved it by a PUT MYDATA. Note that MYDATA must not exist. If it exists EDA will issue an error message (telling you that you should DROP the work area before a PUT command or use the REPLACE command).

REPLACE replaces an existing archive entry with the current contents of the work area.

DROP <waname> removes a saved WA from your archive.

The DIR and DICT command produce information on saved work areas (archives).

DIR        show a list of all saved work areas
DICT       show the contents of a saved work area
DIR show the names of all saved WAs you may read using a GET command. If you enter DIR alone all WAs will be shown. There are options selecting only some WAs, e.g. DIR "A*" will show all WAs starting with the letter A.

DICT <waname> shows the contents of a saved work area, without reading it into the current WA.

Help for old friends (EDA versions prior to 2.0)

Users of previous versions of EDA should read this first. If you are new to EDA just skip this section.

Version 2.0 of EDA introduces the WA archives. Several new commands have been introduced, but the old commands still work. Now GET is used to access a WA and PUT to save a WA. In fact GET and PUT are in fact the old *READ EDA and *WRITE EDA commands (which still work, but are no longer documented as such.) If you are using EDA as you did before, i.e. WA archives are not installed; then PUT/GET work like *WRITE EDA and *READ EDA, only that the file is closed after the command.

The *READ EDA/*WRITE EDA commands offer a possibility to store more than one WA in a file. This was of course a way of offering "collections of work areas". This is less useful with the WA archives, as there is a superior way of managing collections. Therefore all options referring to files containing multiple work areas are only available through the *READ/*WRITE EDA commands; in this respect PUT/GET are not synonyms. If archives are implemented you can used *READ/*WRITE EDA as before; nothing is changed.

Therefore you have the following possible situations:

(1) WA archives are not active: PUT/GET are synonyms for *WRITE EDA/*READ EDA, only that the file is always closed after the command and multiple WAs in a file are not supported.

(2) WA archives are active: Either you switch to the new facilities (its worthwhile and easier to use) or you work as before (ignore PUT GET and the other commands related to WA archives) and continue to use *READ/*WRITE EDA.

You may also, if you do not want to see anything about archives (even if archives are installed for you), disactivate the feature by setting SET WAARCHIVES OFF.

If you would like to enter your existing files into a WA directory please refer to the PUT command (CATALOG option). Note that you can insert a name for each WA in a file containing several work areas by indicating a work area number.

Files and Work area archives (Important!)

Depending on how EDA is installed for you the following commands may operate differently. There are two possibilities:

(1) WA archives are installed. WA archives are collections of EDA files (work areas). EDA maintains a directory for each archive (or library). You may examine the contents of these archives with various commands. The advantage of this option is that you need not to know where these WAs are physically located on your system and you need not worry about other system specifics (file names). You just use the EDA specific name and the program will do the rest, i.e. all operations follow EDA specific rules.

(2) WA are not installed. In order to read and write EDA work areas you will use a file name following the rules of how to specify them on you system, i.e. if the file is located somewhere else than in your default directory you will have to specify (and remember) longer names.

In order to find out how EDA is installed use the

STAT WAARCHIVES

command or try e.g. the DIR command which needs WA archives in order to work. If they are active EDA will either show you archives you may use or just say that you do not have any WA (because you did not save any). If archives are not implemented, the message

<901> command not active

will appear on your screen.

WA Archives

Work area archives are collections (libraries, directories) of WA saved in an EDA specific form. WAs in archives are easily manipulated without requiring any knowledge of the computers file system. In fact the WA archive facility adds a specific EDA file system on top of the systems own file system.

WA directory names, as well as WA names are up to 8 character long (the difference between lower case and upper case letters is not meaningful). A user may have access to any number of directories, depending on the list of directories found in his/her profile. The DIR command may be used to see what directories you may currently access.

There are basically two type of WA archives (1) Library archives, i.e. archives the user may read, but never modify (i.e. do a PUT on that archive) (2) User archives, i.e. the user's personal WA directory. Library archives are in most cases shared by a number of user. User archives are private, and usually no other user will access them.

(*) On most computers the files belonging to a WA archive will be stored in a separate subdirectory. If you need to have more information on the files and the archives (namely external file names and the like) refer to the DIR FULL command in this section.

How to specify WA names

The description of the commands in the following sections requires to specify WA names (<waname> constructs). This section will tell you how to specify such references.

Remember from the previous sections that WA names and WA directories are up to 8 characters long; upper and lower case are not distinguished. Normally the first letter of the name should not be a number nor any EDA special character (normally means that you may not conform to that rule, but you will need to specify those names within double quotes all the time, even when this is not needed).

<waname> is defined as

waname ::= [<dirnam>:]<waname>
Where <dirnam> is the directory name and <wname> the WA name. Whenever <dirnam> is not present the first name matching wname will be used (i.e. the first directory searched). <dirnam> is usually required only when there is a wname with the same in two different archives. An exception is the DIR command, where you may use <dirnam>: alone in order to look at the contents of only one specific directory (see DIR).

The syntax of the commands below show the <waname> reference in quotes, i.e. a syntactical concept called a name string. If the <waname> is used without the <dirnam> section, i.e. <wnam> alone you may omit the double quotes in most cases, as long as the name is the first parameter on the command line (which you usually will do anyway.

GET: Read an EDA archive



GET
    GET waname
    GET "waname"  [<option>]

<option> [{NO}DOC] [APPEND{=var#} {MATCH} {ALL}}] [SETTIE=tie#]

| TIE=tie# | VARS=(vs[,ve]) | PICK [ANY] [A$] | QUERY

Special usage: (*)

GET EXTERNAL ["filename"] [<option>]

The GET command reads an EDA WA stored in an file and makes it into the current WA. Usually this WA has been saved with the PUT command.

The first form of the command is used to access a WA archive. (See above for details on WA archives). The name of the WA is mandatory. If no other option is present <waname> is placed into the WA, i.e. the current contents of the WA are replaced by the contents of <waname>.

All options below apply also to the APPEND command.

NODOCUMENT
The [NO]DOCUMENT option controls whether the documents stored with the WA are read (made available) or not. Initially documents are read automatically, unless SET NODOC ON option is used to tell EDA not to read the documents automatically. NODOC is used to override the NODOC OFF (default) setting, whereas DOCUMENT is used to override NODOC ON. Note that this option should be used whenever you do not intend to use documents: as documents are stored in a temporary file this may on occasions avoid problems with insufficient disk space, especially if there is a large amount of documentation.

Important: You should be warned however: not reading documents means that the current WA is considered without documents, i.e. if you save the current WA it will be saved without documents. Consider the worst case where the current WA replaces the previous version of the saved WA (GET NODOC followed by a PUT with the same name), i.e. the documents will be lost. [In fact documents are kept on a scratch file; NODOC inhibits the creation of that scratch file].

APPEND option
The APPEND option allows to append data to the current work area, i.e. has the same effect as the APPEND command.

If APPEND is used the appended variables will be stored into free locations in the current WA. This usually means that the variables are added after the variables already residing in the current WA. Things are in fact a bit more complicated. Remember that variables in a WA need not be contiguous, i.e. you might have a WA with variables 1-4 and 6-10, i.e. location 5 is not occupied. The first variable appended is inserted into the first free location, i.e. 5 in our example, the 2nd into the 2nd (i.e. 11) and so on. If this is not what you intend, you should first PACK your work area or use the APPEND=var# form of the option; then e.g. APPEND=13 will start appending at location 13, i.e the first variable copied will be var #13, the second 14 etc. If there are not enough free locations to hold all variables to be appended, a warning will be issued and EDA reports the number of variables copied.

IMPORTANT: A GET command without APPEND defines new case identifiers, a new GVAR and will add additional information and/or execute automatic macros. With the APPEND option active, only the variables are read, no casids, nor GVARS, nor any other information.

(APPEND) MATCH
When appending variables to the current WA, it is assumed that the observations in the new variables are in the same sequence as the variables already in the WA (or that the sequence does not matter as these are different data sets).

The MATCH option matches the new variables with the variables in the WA, i.e. it reads only observations existing in the current WA and stores them in the same sequence as the current variables. This matching process is based on the casids. By default casids must match exactly (respecting upper and lower case); the ALL option is used to ignore upper/lower case differences; e.g. without ALL "ZH" and "Zh" are considered different, with ALL they are identical.

SETTIE
SETTIE=tie# sets the (list) ties for all variables read to tie#, instead of using the ties stored with each variable. This option is useful especially when you create a new WA from various other WAs (GET/APPEND sequences and you need a way of knowing where the variables are from. This option is also helpful when you are selecting variables using the TIE= selection option, but would like to change the table tie after reading.

Variable selection options
Several selection subcommands are available to make a selection of the variables to read into the WA. All selection option turn the APPEND option on, i.e. the current WA is not cleared before performing the operation. [You may of course also append to an empty WA].

The VARS= option specifies a range, i.e. VARS=(20,30) will read variables 20 through 30 form the saved WA. Note that the numbers refer to the sequential position in the external file. You may also use the form VARS=v, where only a single variable will be read. Note that the range is specified using a comma VARS=(20,30). There is a potential pitfall if you do not use a comma but a hyphen, i.e. 20-30 is a simple expression calling for evaluation, i.e. 20 minus 30, result -10, i.e. a single value, causing an error in this example as the result is negative.

The PICK option will perform a search operation on labels and/or descriptors. You will be asked to enter a search criterion. Unless ANY is specified, only the labels will be searched. You may use wild card specification in that case. If ANY is present, the label and the descriptors will be searched to locate any matching string. Then wild cards are not permitted. (*) To facilitate the use of PICK in macros and the like, there is a way to avoid being prompted for the string to search. A$ means that the string is to be taken from the string variable A$, which has been defined previously using the SET A$ command.

The TIE=tie# reads only variables belonging to variable bundle (list) tie#; this options requires of course defined ties in the saved WA.

QUERY asks for each variable whether you want to read it or to skip it. For each variable a prompt appears on the screen (it includes the label and the descriptor for each variable). You may then answer Y[es] if you want to read that variable, N[o] if you do not want that variable; G[o] if you want to stop the query, i.e. continue reading the rest of the variables without asking or Q[uit], i.e. stop reading variables.

GET EXTERNAL
The second form of the GET command, i.e. the GET EXTERNAL command is used to read in a file, which is not stored in a WA directory. [Note also that if the WA archive option is disabled GET and GET EXTERNAL are identical commands, i.e. EXTERNAL is not required].

Most users will need this command in two situations: (1) You receive an EDA file from another user or (2) you transfer a file from a different computer to your computer.

In this case you will have to specify a file name (corresponding to the file name conventions used on your system), but without the EDA specific suffix (See the chapter on "Running EDA" for more details.) If no file is given EDA attempts to read the generic file name EDAIN.

See the chapter on running EDA for details on suffixes to distinguish between binary and symbolic files. In general the user need not be aware of the distinction, as long as these files are handled exclusively from within EDA. (.ES and .EB suffixes).

APPEND: append to a WA



APPEND
    APPEND "waname"  [<opt1]>

<opt1> [APPEND{=var#} [MATCH {ALL}] [SETTIE=tie#] [{NO}DOC]

| TIE=tie# | VARS=(vs[,ve]) | PICK [ANY] [A$] | QUERY

APPEND EXTERNAL ["filename"] [<opt1>] [<opt2>]

<opt2> ::= | [WA=wa#] |

The APPEND command is similar to the GET command, except that the APPEND command does not clear the WA before reading in the new variables, i.e. it adds (appends) the contents of the file to the current work area. In fact it does the same as the GET command with the APPEND option. Therefore all the options are explained with the GET command.

PUT and REPLACE: Save a WA to an archive



PUT

Basic form
PUT waname PUT "waname" <option>

<option> [NODESCRIPTOR] [{NO}DOC] [MACRO {AUTOexecute}] [MAP] [NOCOMPACT]

Advanced options (*)
PUT "waname" CATALOG [WA=num] [A$][Z$]

PUT EXTERNAL ["filename"] <option> [F=flen] [Decimals=#ndec] PUT EXPORT ["filename"] <option> [COMPATIBLE] [F=flen] [Des=#ndec]

PUT writes the current WA into a file, where it can be retrieved later with the GET command. The two forms of the command apply to WA archives and to external files. [Note that the WA archive option may be turned off, see above].
Basic command
The first form of the command saves the current WA into a WA archive. The name of the WA must be given. The name of the current WA is changed to the name given on the PUT command.

Normally a message invites you to enter an up to 48 characters long text describing the WA you are saving. The descriptor will be listed on a DIR listing and displayed whenever the WA is read. The prompt shows the current descriptor (if a descriptor is defined). If you would like to keep that descriptor you just type <return>. The NODESCRIPTOR option suppresses the query for a header (descriptive information) for the WA to be saved.

If you want to replace an entry in the archive with the modified version the current work area, you should use the REPLACE command documented below.

Saving documents, macros and maps
[NO]DOC controls writing of documents to the output file. The default operation depends on the setting of the NODOC PUT switch (which defaults to OFF, i.e. documents are written). The [NO]DOC option on PUT is then used to override the settings of that switch for the current PUT command only.

The MACRO option allows to save the currently active macro on the EDA file being written. Whenever this WA is read in by a GET command, the macro saved will be stored as the current macro. If the AUTOEXECUTE option is specified the macro saved becomes the current macro and after reading is complete the macro will be automatically executed. This option is useful e.g. in cases where some specific operation is required on the data (including possibly a dialogue with the user). Restriction: The PUT MACRO option is not available, whenever the command is issued from within a macro (because the macro is being executed). This restriction only applies to long macros executed with EXECUTE or RUN, but not line macros.

The MAP option is used to save the currently active user map (see the MAP command). On subsequent accesses of the WA, this map automatically become the active map.

NOCOMPACT (*)
Files written by PUT and PUT EXTERNAL (but not PUT EXPORT), i.e. binary files compact documents in order to save disk space. As this feature has been introduced with version 2.3 earlier version are not able to read correctly these files. When you are running different EDA versions (let's say in a PC environment), the NOCOMPACT option is useful to create non-compacted documents, i.e. files readable by previous versions. NOCOMPACT is also useful to created uncompacted documents when sending files to someone using an earlier version of EDA on the same computer type (make sure to understand that we are not talking about portable EDA files as created by PUT EXPORT and used on different operating systems).

NOCOMPACT enables you to read the documents with earlier versions; but there will be a message when the file is read that the user of the older version should consider upgrade, as version 2.3 offers additional features and some information in the files will be skipped (this information generates the "consider upgrade" message (not pertaining to documents).

PUT EXTERNAL (*)
The second command format writes the current WA to a file explicitly specified on the command line according to the rules governing file names on your system. PUT EXTERNAL does not use the EDA directory system, i.e. no reference will be written into an EDA libary and these files will not show on a DIR listing.

In most situations this option will be used when you need to write an EDA file you would like to transport to a different computer. If the computer uses the same operating system as yours no additional options are required; if however you need to use the file on a different operating system (e.g. you would like to use a work area you have created on a PC with EDA on a VAX computer) the PUT EXPORT command should be used.

Make sure to understand that you need to write an EDA specific file, i.e. a file only EDA can read. If you need to export data to a different program you should refer to the next section in this chapter (*WRITE command).

If no file name is given, the WA is written to the generic file name EDAOUT.

See below for an explanation of the F and D options (PUT EXPORT)

PUT EXPORT
PUT EXPORT is similar to PUT EXTERNAL, but writes this file as a symbolic (formatted) files, i.e. a file readable by a text editor or a similar program. As the command name says this is mainly intended for porting EDA files to different operating systems. Make sure to understand that the file is meant to be used by EDA on a different computer system, and not to export EDA data to some other software package (like spreadsheets or databases). You do not need to use PUT EXPORT in order to use a file on a computer system using the same operating system as yours (e.g. from one PC to another); use PUT EXTERNAL instead.

F=field with, D=decimals: these options have two consequences for exportable files and only one for non-exportable files.

EDA needs some information on how to display data values. These informations are determined automatically but may be modified by the user. F=width indicates the field width used to display a data value and D=decimals indicates the number of decimals to be shown (see the SET command). F= is automatically set in order to fit the largest data value in a WA, D= defaults to 2. If F/D are not specified with PUT, then the current values are used; the F/D options are used to change these values when PUTting the WA, i.e. when the WA is read by GET these values will be used.

With EXPORT these values are also used to determine how the variables are to be written to the file (i.e. to build the data format). This format must be large enough to fit the largest number in the WA. (When you are using this option, you must be sure what you are doing otherwise the resulting file might not be readable). The D option is then used to control the precision of the data saved; e.g. when using D=1 only decimal will be saved, i.e. if more decimals have been entered they will be lost.

The two file types are distinguished by a suffix to the file name. The user need not be aware of that distinction, as long as files are handled from within EDA. See the section on file assignment for more details.

COMPATIBLE option: (New users: ignore this!) If you intend to read the export file on older EDA versions (or if you are not sure if the targer version is at least 2.1) you should use the compatible option. (For (default) unformatted files this option is meaningless). See the section on changes and incompatibilities for additional details.

PUT CATALOG (*)
PUT CATALOG is used to CATALOG a workarea stored in an external file without a reference in the WA directory. This is an advanced option. In order to understand the purpose of this command you have to remember that using WA archives implies two things (1) a directory where information about the exact location of the file (among other informations) are kept and (2) a file, known to the operating system under a different name (usually longer)). Normally the user need not know about (2) as (s)he needs only use wanames. With this command the external file MUST exist. Normally EDA invites you to enter the external file name from your keyboard. Within macros this might not be wanted; therefore the A$ or the Z$ option may be used to tell EDA that file name is in the A$ or the Z$ string variable. In most macros this will be A$; however Z$ is useful whenever the preceding command defines a Z$ with the information you want. Remember that Z$ may not be defined explicitly, it is always an implicit result of a command.

The WA=number option is used to "catalogue" a WA which is not in the first position of the external file. See the PUT EXTERNAL command for more details. This option is mainly supplied to facilitate the transition of old-style system files (i.e. when archives did not exist). Note that when using this command to catalogue EDA checks whether the file exists, but does not check whether you supplied a WA number beyond the true number of WA in the particular file.

In some instances it may occur that you wish to add a file (e.g. a file which has been saved with the EXTERNAL option, or a file given to you by a friend etc.) to your directory, in order to forget about its system specific information (e.g. the file may reside in your friends disk space with a very long path name to type). The CATALOG option is intended for such an instance, i.e. instead of writing the current WA into a file it only writes a directory entry. The CATALOG option will prompt for the name of the external file, i.e. where the file is located. Indicate the full file name.

REPLACE: Replace a WA in an archive



REPLACE
   REPLACE waname
   REPLACE "waname" <option> [NOASK]

<option> [DESCRIPTOR] [{NO}DOC] [MACRO {AUTOexecute}] [MAP] [NOCOMPACT]

The REPLACE command replaces a WA in an archive by the contents of the current work area. REPLACE only works if a entry "waname" exists in the archive.

With the exception of the DESCRIPTOR and the NOASK option, all options are identical to the PUT command. See put for a full explanation. Below you will find a short description.

DESCRIPTOR: REPLACE does not normally ask for a descriptor for the WA you are saving as it is meant to replace an already existing one. The DESCRIPTOR option, when present, will ask for a new descriptor for the WA. (In this respect REPLACE and PUT have opposite default values, with PUT you need the NODESCRIPTOR option to avoid a prompt for a descriptor).

Options available with REPLACE:

NOASK         Do not ask whether it is ok to replace
{NO}DOC       Control saving of documents
MACRO         Save the current macro
MAP           Save the current map (obsolete)
NOCOMPACT     Do not compact documents on binary files
REPLACE vs DROP & PUT
[For advanced users] There is a subtle difference between REPLACE and DROP followed by a PUT command. Together with the information on the WA to be saved the directory entry may contain additional information or instructions (links to other files, messages, command sequences). When you PUT a work area this directory entry will be created; the REPLACE command however copies the contents of the old entry. For this reason you should use REPLACE when you are updating or otherwise modify a data set, and DROP followed by PUT if what you want to do is replacing an entry by something entirely new.

The DICT command



DICT
DICT "WAname"

DICT "WAname" [PRINT | WRITE]
              [TIES=tie# | VARS=(st,end)] [PICK [ANY] {A$}]

DICT EXTERNAL "fnam" [PRINT | WRITE]

The DICT command shows variable information (dictionnary information) of a WA stored in an archive or in an external file.

DICT does not alter the current WA, i.e. DICT displays the information found in a file.

The information shown is similar to the DESCRIBE command, i.e. the command showing the information on variables in the current WA. Make sure to understand the difference between the DICT and the DESCRIBE commands: DESCRIBE is for the current WA and DICT for a WA outside in a file. Of cours if you GET a WA the DESCRIBE command and the DICT command show the same information, UNLESS you have modified the current WA.

Options
The output from the DICT command is displayed on the screen. Depending upon the setting of the PDOC switch (See SET PDOC) this information is also written to the print file. By default PDOC is set to ON, i.e. printing is active. Note however default settings can be different, depending upon your user profile or the system profile.

The PRINT option is then used to override a PDOC OFF setting, i.e. requesting PRINT. Note that a print file has to be active, otherwise nothing will be printed.

WRITE is used to write dictionnary information to the RAWOUT file. This is useful when you intend to produce files containing lists of your variables. See the DIR command for additional information on how this could be useful. WRITE requires an open RAWOUT file. (See SET RAWOUT)

The TIES=, VARS= and PICK options are use to select the variables you want to display. Their meaning is the same as on the GET command. See there for more details.

The EXTERNAL form is used to look at dictionnary information in a file not stored in a WA archive. Most users will use this command to look at files not yet stored in a WA archive; files they may have received from other users or transmitted from a different computer. [If WA archives are not active at your location, then DICT and DICT EXTERNAL are the same].

See also the DIR DICT option, which is useful if you want to see dictionnary information from several WA.

The DIR command

Syntax:

DIR ["name"] [SEARCH] | [SHORT | FULL {ALL}] [CHECK] [WRITE|PRINT]

DIR "name" DICT [WRITE | PRINT] [FULL] <select>

The DIR command (Directory) is used to list the entries in the WA directories, i.e. it is used to find out which WAs are available to you with the GET command.

Note: This command does not work if WA directories have not been installed in your version. Contact the EDA administrator.

Options: (see below for details)

"name" WA name, WA name with wild cards, directory name SEARCH searches also descriptive text SHORT short WA listing FULL long WA listing FULL ALL FULL and more CHECK Check directory integrity WRITE write to file (for macro users) PRINT display and print (overrite PDOC switch) DICT shows also variable information

Without any option this command will produce a list of all WA currently accessible by a GET command, i.e. all work areas in all active WA libraries. Below you will find comment sample output from DIR.
>DIR
Directory:SHARE   (L)
WORLD1   World handbook I
WORLD2   World handbook II
Directory:SPO3    (L)
CH1900   Swiss aggregate data 1900
CH1910   Swiss aggregate date 1910
Directory:USER    (U)
EXA1
M2       matrix from Rummel p 136
Two types of informations are supplied: (1) a number of work ares (2) and three directories.

The line

WORLD1 World handbook I

shows the name of the WA: WORLD1 (i.e. you will have to give that name on the GET command) and a short descriptive text hopefully explaining the contents of the work area.

The directory lines show that currently there are three different WA directories in which WAs to be read are searched for: SHARE, SPO3 and USER. The first two are of the type L, i.e. "library": this means that you may only read these WAs, but you are not allowed to modify either the directory contents itself nor the WAs referred to. They typically contain data used by all users or a group of them; they are created and modified by a user called the "administrator"; this might be the person installing EDA, or the teacher of your seminar or maybe yourself (...). The last directory, called USER is type U, i.e. it is your personal directory where you may do whatever you want (including delete a WA). In our example a PUT command will modify the directory USER. However your will not be allowed to PUT "SPO3:MYWA".

Note also that if you do a PUT "WORLD1" no problem arises with the WA in the library SHARE as EDA will not attempt to modify it. It will simply write it to the USER directory. However when reading this last WA saved you will have to say GET "USER:WORLD1" as a GET "WORLD1" will load the WA found in SHARE.

Note that the sequence of the WA appearing on the sample listings exactly reflects the search sequence of EDA.

Additional specifications:
"name"
"name" is a work area name. If a "name" is present EDA will only look for a WA "name", instead of listing all work areas found in the directories. as specified on GET or PUT (with or without a directory reference). (See the section on WA archives for the rules on how to write a WA name). You may also specify a wild card reference (see glossary ) for a group of work areas to be located. E.g.: DIR "A*" will show all WAs starting with the letter A, disregarding all other characters. It is also possible to ask for all work areas in one of the directoiries, e.g. DIR "USER:" EDA then only lists the entries in the directoy "user".
SHORT
SHORT suppresses the descriptive text, i.e. only the WA names will appear (Several on the same line).
SEARCH
Normally "name" with or without wild cards refers only to the WA name. The SEARCH option will also search any string specified within the descriptive text displayed, thus giving a more flexible way of searching through the descriptive text [of course as long as descriptors are used and contain meaningful information].
PRINT
is used to override the current setting of the PDOC switch (printing of documentary information). If PDOC is ON (initial default), i.e. documentary information is displayed and printed (if a print file is active) (i.e. documentary commands are treated the same way as normal analysis commands) the PRINT option is not useful. IF PDOC is OFF however PRINT is used to ask for printed output in addition to the screen display.
DICT
The DICT options (compare to the DICT command) lists in addition to the WA name and descriptor the labels and descriptors of the variables in the workarea(s) listed, as well as other informations (Casids, GVARS, number of cases). The output is similar to the DESCRIBE command. With DICT a "name" is mandatory (to avoid frustration and too much unwanted output; <name> may however contain wild card characters (including DIR "*" DICT).
DICT <select>
The <select> options (TIES=, VAR= and PICK) are used to show only a selection of variables, instead of all variables in the file. These options can be found with the GET command. They have the same meaning, except that the variables are not read into the WA.
BEWARE
(this is not important when you use EDA in a straight way). DIR only lists system files found in the EDA directories, i.e. a catalog managed by EDA itself. I.e. it might be possible that your disk contains files (e.g. copied from a friend or saved with the EXTERNAL option on the PUT command) EDA does not know about (EDA does not check disks, but looks up its file catalogs). See PUT CATALOG to add files to the EDA file catalog.
Advanced options
All other options are advanced options, useful only in specific circumstances (checking disk related problems; macro programming).
FULL
shows all entries stored with a WA name, except the reference to the external file (which will only be shown if you add the ALL parameter). See DED for details on the meaning of the directory entries.
CHECK
checks whether the file referred to by the directory entry really exists. This is usefule because EDA uses its own directory system which is added to the computer's own file system. The EDA file system however has no control on what the user does with the files outside EDA, i.e. (s)he may delete a file referred to by a directory entry without updating that entry within EDA. CHECK then may be used to diagnose any problems. Use this option with care on directory entries residing on removable media (diskettes).
WRITE
instead of showing the directories on the screen the directory names (names only) are written to RAWOUT a name per line. This requires that you open a file with the SET RAWOUT command. FULL has a different meaning for WRITE: full writes (a single line for each entry) : the work area name, the directory name and the descriptor. This option is useful if you want to produce lists of you work areas. You might then want to sort them or do some other processing (the EDA toolbox contains a number of useful tools).
DICT WRITE
WRITE used together with DICT produces the following output: Each line contains the WA name in the first 8 columns, followed by the WA name and descriptor. This option is very useful if you intend to produce a listing of all variables in a collection of work areas and sort or cross-reference the output.

As an example let us produce a sorted variable list of all variables in all WA directories available to you.

>SET RAWOUT "MYLIST"
>DIR "*" DICT WRITE  /D
>SET RAWOUT CLOSE
The first line tells EDA to open a rawout file called MYLIST. The last line closes it. The DIR command line asks for all entries using the wildcard symbol (you might do the same e.g. for one of the directories only, e.g. "USER:*"). The WRITE option writes the output to the MYLIST file. The /D global option inhibits any screen output (DIR DICT WRITE shows the WA it processes on the screen).

The result of this is a file containing a list of all variables (labels and descriptors), one on each line, preceeded by the WA name, where this variable can be found. Often you would like to sort this list on variable labels or maybe on descriptors. This can easily be done with the SORT tool (toolbox).

The file produced will look like: (of course without the column indicators):

         1         2         3        4          5
12345678901234567890123456789012345678901234567890

AVRIL87 :# 1 I702225 Emprise etrangere AVRIL87 :# 2 I741249 Emprise etrangere AVRIL87 :# 3 I791307 Initiative nucleaire AVRIL87 :# 4 I811316 Etre solidaire

Variable labels are located in column 19-26. The shortest way of doing just that sort would then be to type:
   )SORT MYLIST  MYLIST1 \ (19,8)
The ) means that you do not wish to enter the toolbox (use it in immediate mode). You specify your input file and an output file. The syntax after the \ symbol defines the sort field, located in column 19 and 8 columns wide.

You could also use the SORT dialog, i.e. type )SORT (or enter the toolbox by typing tool, then type SORT) and answer the questions.

For additional modifications/selections you might use the CP (COPY) tool, where you can ask for a copy of selected items (lines). You might want to edit the lines e.g. to remove fields or add fields (to create some macro) using the MOD tool. The DIR CHECK verifies that all directory entries point to an existing file. If the file does not exist a message is issued. If all files could be found $1 is zero (this should be the normal situation).

The DROP command



DROP
   DROP "name" [NOASK]

Advanced option (**) DROP "name" [NOASK] [CATALOG]

Removes a WA from a WA library, i.e. the directory entry and the file containing the data is distroyed.

Unless NOASK is present the user is asked to confirm the removal of the WA.

Note that the DROP command does not alter the current work area, even if the WA you are dropping has been read into the current work area.

If you want to replace an entry by a new version you have prepared in the current WA it is not necessary to DROP the entry first as the PUT command will ask you to confirm the replacement of the already existing entry in the directory.

In case of trouble:
DROP requires WA directories to be active. If this is not the case you will be told, that the command is not active.

Remember that EDA manages its own file system for WA files. The DROP command runs into trouble if someone (maybe yourself) removed a file using a operating system command outside EDA. EDA will then find a entry in its catalog, but the file belonging to this entry no longer exists. EDA then will tell you about this problem and you are asked whether you want to remove the directory entry.

As a general rule, remove any file you have saved with the PUT with DROP. Do not use any operating system command (unless of course you know more about the inner workings of EDA). For normal users this should never be a problem, because this kind of files are in most cases placed in some directory and have special file name extensions (often .EB or .ES).

DROP CATALOG (*)
DROP CATALOG remove only the directory entry, i.e. does not destroy the associated file.

This command should only be used by a knowledgeable user. It is useful in two situations: (1) For some reason or another the external file does no longer exist and you wish to remove the directory entry. (2) You need to remove the directory entry but wish to keep the external file (i.e. EDA will no longer know that it exists and a DIR command will no longer show it).

DED: Directory entry editor (*)



DED
Interactive editing

DED "name" [NOASK] [FORCE] [SILENT]

Command line options DED [FILE {WA | WAM}] [SILENT] [FORCE] DED PROTECT | UNPROTECT

WA directories must be active for this command to work.

NOTE: This is an advanced option, reserved for knowledgeable users. If used without knowing what you are doing, the command is potentially dangerous, as you may delete vital information on files.

There a basically two ways of using DED: (1) Enter the DED editor to interactively change, add or delete lines of an entry (2) Use a command line option to produce some effect (specific options). This command is normally used to modify directory entries for a WA saved in an EDA directory. It is also possible to create new entries into the directory; but then you will need to supply all records you will need on your own. Use this with care.

DED interactive editor
If on calling DED an entry does not exist the user is asked to confirm that (s)he really wants to create a new directory entry. Default is not to do so.

The NOASK option supresses the confirmation whether you want to create a new entry or stop.

DED is a small editor with its own command set. The following commands are available: (All commands are single letter commands):

   ? or H  Short syntax reminder
   W       Write: Save modificationsa and exit DED
   Q       Quit:  exit DED without saving modifications
   L       List   List all lines in the item
   C<d>    Change descriptor
   T<t>    Changes the entry type
   P       Protection toggle

num Set current position to line <num>

The current line must be define for:

I txt Insert <txt> as a new line after the current line R txt Replace current line with <txt> E Edit current line (use cled syntax) D Delete current line

Whenever a WA is saved a three record long entry is created. The editor is used to add more entries. All entries start with a letter identifying the type of record. The rest of a line is specific to each record.

You cannot edit the first and last record, because they are vital for the directory. You should not modify any F record, unless you really know what you are doing]

Command line form
FILE creates or replaces an entry from a file with fixed name DEDINPT. The file is deleted automatically after normal termination. This option is intended for other commands setting up directory entries or for macro programmers. The first line of the file is treated as header (descriptor) for the entry to create. If the WA option is present, the entry type ($ record) is set to WA, i.e. this implies that the file contains an F-record; WAM sets the type to multilingual WA.

PROTECT/UNPROTECT protects/unprotects directory entries, i.e. protected entries cannot be dropped or replaced. These two options change the protection, without entering DED.

Common options
SILENT operates DED in silent mode (no messages) and is intended for a call to DED from a command file. FORCE By default DED refuses all operations except UNPROTECT on existing entries. FORCE overrides the protection.
Directory entries
A number of other records can be added to a directory entry, providing a way of customizing WA access in particular situations. The various entries are fully described in a technical on-line document: HELP "FMT:DIRENT".

*READ EDA/*WRITE EDA (*)

        ***************************************************************
        * New users should not read this section, as it describes     *
        * old-style commands and features, use GET and PUT instead    *
        *                                                             *
        * These commands are considered obsolescent.                  *
        ***************************************************************
Before reading on you should be familiar with the section entitled "Help for old friends" at the beginning of this chapter.

The PUT/GET command share many options with the *READ/*WRITE EDA commands. This section will only explain options not described with PUT and GET, namely this section deals with the special options dealing with multiple WAs in the same file which are not available with PUT and GET (and not needed there).

Note that *READ/*WRITE EDA do not close automatically the input/output file. It has to be done explicitely with the CLOSE option or through the specification of a file name on subsequent *READ/*WRITE EDA commands.

*READ EDA


   *READ EDA ["file"] [WA=wa#] [APPEND{=var#}] [SETTIE=tie#]
              [TIE=tie# | VARS=(vs,ve) | PICK | QUERY]
   *READ EDA CONTENTS
   *READ EDA CLOSE
   *READ EDA REWIND

*READ EDA reads an EDA WA stored in an file and makes it into the current WA.

Most options are described with the GET command. Below you will only find an explanation of specific options to the *READ EDA command, namely commands implementing access to files containing more that one WA.

If no file name is given EDA attempts to read the generic file name EDAIN.

A file connected with *READ EDA remains connected, i.e. a subsequent *READ EDA will take place on the same file, unless you specify a new file name on the command line; then the first file is disconnected.

In order to access a specific WA in such a file you may use the WA=wa# option, e.g. WA=3 will read in the 3rd WA. Note that the WA=wanumber is the same as BLOCK=b#, which is an obsolete option kept for compatibility.

*READ EDA CLOSE : closes the connection to a file explicitly.

*READ EDA RWIND repositions the input file before the first block. This is done also implicitly, if a block cannot be found; the file is then repositioned at the beginning.

*READ EDA CONTENTS gives a list of the WAs on the connected file. Note that when this is used, the file is repositioned at the start of the file, i.e. a subsequent GET not specifying a WA number will read the first WA on the file.

See the chapter on running EDA for details on suffixes to distinguish between binary and symbolic files. In general the user need not be aware of the distinction, as long as these files are handled exclusively from within EDA. (.ES and .EB suffixes).

*WRITE EDA


   *WRITE EDA ["file"] [EXPORT {COMPATIBLE} [F=flen] [D=ndec]
              [{NO}DOC] [MACRO {AUTO} [MAP]
              [NOCOMPACT] [NODESCRIPTOR]

*WRITE EDA CLOSE

*WRITE EDA writes the current WA into a file (defaults to EDAOUT).

All options are explained with the PUT command.

Several *WRITE EDA operations can be done on the same file. The files remain connected, unless the user disconnects it by the *WRITE EDA CLOSE command, or a file name is present on the command line; then the previous file connection will be closed.