1 DIX
  DIX[/qualifiers] filename [/qualifiers]

  This is a program to dump/display/edit records in all types of files.

  -You can select records by keyvalue(indexed files) or 
     recordnumber (sequential files).
  -You can display the record-data in raw format (like VMS DUMP) or
     interpreted format. For the interpreted mode you need a description.
     See the help about interpreted_dump.
  -You can dump/display/edit the record data in three modes.
   1. Screen oriented (using SMG) (See help about screen_oriented).
   2. Dump records to a file      (See help about file_oriented).
   3. Interactive mode using powerful scripting possibilities
                                  (See help about interactive).
  
  The program supports INDEXED, RELATIVE, DIRECT ACCESS and SEQUENTIAL files.

  The program can open multiple files and multiple descriptions per file.
  A fieldname in a record can contain a pointer to (a key in) another file, 
  and you can follow that link to the other file.
 
  Files are opened READ-ONLY, unless you specify /MODIFY.

2 PARAMETER

  The filename to be "DIX"ed. The filename can contain wildcards. If
  you specify /MULTI_FILE DIX will open all files.
  If you do not specify /MULTIFILE you will be prompted to select one file.

2 MODES

  Dix can operate in 3 modes, 
  SCREEN_ORIENTED : DIX will display data full screen and lets you modify it
  FILE_ORIENTED   : DIX will behave like DUMP, no interaction possible
  INTERACTIVE     : DIX enter interactive (line) mode. This mode can also
                        be used in BATCH.
  depending on the /SCREEN, /FILE, /INTERACTIVE qualifier 

  The qualifiers /screen, /file and /interative must be entered just after the
  DIX verb.

3 SCREEN_ORIENTED

  If you specify /SCREEN (default), the program will work full screen
  using the SMG routines, and you can look at the data, and possibly
  modify it (see /MODIFY qualifier).

  If you have a description present
   1. You can modify fields (if in modify mode) by entering a right arrow, 
      Enter, or any printable character. You are in fieldmodifying mode until 
      you enter an Enter. After you type Enter DIX checks if the typed data 
      is valid for that field(-type) and restores the original value if not.

   2. For fields that contain field-names, you can also enter a key_getfields
      key (default PF1-G) and modify/enter the fieldvalue through a SMG-menu.

   3. If you type a key_contdis (default F8) DIX will open a popup-display 
      containing information about the description of the current line, and
      update it when you move between lines. If you type key_contdis again
      DIX will remove the display.


   And lots more, see the help (Default PF2 or Help)

 Syntax
  DIX[/SCREEN] filespec[/qualifiers]

3 FILE_ORIENTED

  If you specify /FILE the program will dump the data to a
  file or the terminal (see /OUTPUT qualifier) in either interpreted or 
  raw dump mode.

 Syntax
  DIX/FILE filespec[/qualifiers]


3 INTERACTIVE

  If you specify /INTERACTIVE, DIX will enter interactive mode
  and lets you display/modify fields. This mode works in BATCH too,
  so you can create command-files and use DIX to display/modify fields.
  See also the /INTERACTIVE qualifier.

![Interactive mode]DIX /INTERACTIVE

  Syntax
   DIX/INTER[/qualifiers] [filespec] [/qualifiers] [oneline command]

  Filespec is optional, but if the "oneline command" is given, a filespec 
  must also be entered.
  Dix qualifiers must be entered before the "oneline command"

  Example:

  DIX/INTER SYSUAF/MODIFY @mycommands

  Will execute the commands in mycommands[.dix] and exit.


2 FILETYPE_SUPPORT

  The following file types are supported.

3 SEQUENTIAL
  
  For SEQUENTIAL or RELATIVE files the record selection is based on 
  the /RECORD qualifier.
  If the start record is nn, the first nn-1 records will be skipped, 
  this may take some time. 
  If the record format is fixed, DIX can read the record directly without
  skipping the previous records.

4 /RECORD
  /RECORD=nr
  
  For sequential files, you can specify the starting record
  number. If not specified the program starts at the first record.

3 INDEXED_FILES

  For INDEXED files the record selection is based on the 
  /EQ or /GE or /GT or /LE or /LT and the /KEY qualifier.
  If the key has Ascending attributes, the /EQ, /GE or /GT qualifiers 
  must be used, and if the key is descending, the /EQ, /LE or /LT qualifiers.
  Information about the keytypes can be obtained via the /INFO qualifier.

4 /KEY
  /KEY=nr

  Look for the keyvalue on the specified key. Default is the
  primary key (0).
  If none of the LT,LE,EQ,GE,GT options is specified, the program
  will start with the first record on the specified key.

4 /LT
  /LT=value

  Look for a record with keyvalue LT the specified value.
  This qualifier is valid for descending keys. Information about the
  keytypes can be obtained via the /INFO qualifier.

4 /LE
  /LE=value

  Look for a record with keyvalue LE the specified value.
  This qualifier is valid for descending keys. Information about the
  keytypes can be obtained via the /INFO qualifier.
4 /EQ
  /EQ=value

  Look for a record with keyvalue EQ the specified value.
4 /GE
  /GE=value

  Look for a record with keyvalue GE the specified value.
  This qualifier is valid for ascending keys. Information about the
  keytypes can be obtained via the /INFO qualifier.
4 /GT
  /GT=value

  Look for a record with keyvalue GT the specified value.
  This qualifier is valid for ascending keys. Information about the
  keytypes can be obtained via the /INFO qualifier.

4 Keyvalues

  When specifying a keyvalue with /lt,/le,/eq,/ge,/gt the program
  will check for the keytype (in the file). For binary keytypes
  the program will convert the data from ASCII to binary.
  For string types you can enter binary values via the %DD syntax
  where DD are hexadecimal digits (%% will enter one %).
  See the conversion options below
5 INT2_conversion

  INT2 values can only be specified as integers.

5 INT4_conversion

  INT4 values can be specified in 3 ways
   1. A normal integer.
   2. A number with another RADIX in two formats 'DDDD'R or %Rddddd
       Radix can be X (headecimal), O(Octal) or D(decimal) or
       %Xddd (hexadecimal), %Oddd (octal), %Dddd (decimal)
   3. A Date which will be converted to DATE*4 format.
   4. A VMS Identifier
   5. A UIC e.g. [SYSTEM]
   6. An Ascii string "ABCD"
5 INT8_conversion

  INT8 keyvalues can be specified in 3 ways
   1. One big integer up to 18 characters
   2. Two INT4 values separated by a . (e.g. 10.20, see INT4 conversion)
      (e.g. SYSTEM.1-jan-1991)
   3. A date string( e.g. 1-apr-1991).

2 DISPLAY_MODES

  DIX can work either in RAW dump format or INTERPRETED 
  (see the /DESCRIPTION qualifier).

3 RAW_DUMP
 
  In the RAW dump mode the dump is equal to the VMS DUMP format. 
  It is used if no description file can be found, or if the /RAW
  qualifier is specified.

  The display is split into two parts. 
  The left part is the data (byte,word,longword) in decimal or hexadecimal. 
  The right part is the data in ASCII (if printable).
  
  In RAW dump mode the following qualifiers can be used.

4 /BYTE
  The data will be dumped in bytes. See also the /WORD and /LONG and /UNSIGNED.

4 /WORD
  The data will be dumped in words. See also the /BYTE and /LONG and /UNSIGNED.

4 /LONG
  The data will be dumped in longwords. See also the /BYTE and /WORD and /UNSIGNED.
  This is the default.

4 /UNSIGNED
  The data (if not in HEX mode) will be interpreted as unsigned.

4 /HEX

  Display the data in HEXadecimal (default). See the /DECIMAL qualifier.
4 /DECIMAL
  
  Display the data in DECIMAL. See the /HEX qualifier.

3 INTERPRETED_DUMP
  
  In the interpreted mode, the program will try to display the fields
  of a record. This mode requires a description file (see the /DESCRIPTION)
  This is the default if a description can be found.
  Descriptions can be in files (default 'filename'.DES) or a text library.

  DIX will look for a description file in the same directory as the data file
  DIX will look for a file in the current directory.
  DIX will look for a module in the DIX_DES .TLB file (system_library)
     (see the help for the /SYSTEM_LIBRARY qualifier)
  DIX will look for a module in the DIX_DES_USER .TLB file(user_library)
     (see the help for the /USER_LIBRARY qualifier)
  For details see /DESCRIPTION.
  If no descriptor can be found (or if /RAW is specified), DIX will display
  in RAW mode.
4 /DESCRIPTION
  /DESCRIPTION[=name[,name]]

  Give the name of a record description file(s) or module. 
  The format of description file/module is described in the RECORD_FORMAT help.
  If the /DESCRIPTION qualifier is given without the filename, the program will 
  look for a file with a filename as the input file, but with the extension 
  .DES. DIX also searches the Text library DIX_DES 
  (with default file "IMAGE_DIRECTORY".TLB, so the textlibrary will be searched
  in the same directory as the DIX image, but you can redefine the 
  logical name DIX_DES to any textlibrary) for a module with the name that
  matches the filename of the datafile. A match can be on device, directory,
  name and extension. 
  DIX also supports a userdefined library. DIX searches for the file
  DIX_DES_USER  with default SYS$LOGIN:.TLB.

  Example:
  DIX MYDEV:[MYDIR]MYDATA.MYEXTENSION [/DES] 
  1.  DIX searches for a description file MYDEV:[MYDIR]MYDATA.DES
  2.  DIX searches in the current directory for the file MYDATDA.DES
  3.  DIX searches DIX_DES.TLB for a module that matches the name 
      mydev:[mydir]mydate.myextension. Empty parts of the module name match.
      So a module with the name *MY* , .MYEXTENSION, *:[*]*.* will all match.
  4.  DIX searches DIX_DES_USER.TLB for a module that matches the name 
      mydev:[mydir]mydate.myextension. Empty parts of the module name match.
      So a module with the name *MY* , .MYEXTENSION, *:[*]*.* will all match.
  
  All matches will be loaded and can be used.

5 RECORD_FORMAT

  The description records are in normal ASCII, and can be edited with
  a normal editor. Lines starting with C,c or * are skipped 
  (fortran comment lines) and data after the ! (comment) is skipped. 
  Continuation lines are not like the normal FORTRAN syntax but use the 
  DCL syntax (- at the end of the line)
  Spaces are ignored, except within names and types and between the type
  and its qualifier.

  There are 2 types of lines
  
  -Parameter definition
  -Field Declarations.
  
6 PARAMETER_DEFINITIONS

  With the parameter definition, you can define parameter values,
  that can be used later in other parameter definitions, or in
  field declarations.
  Syntax: 
 
     PARAMETER [(]name=expression[,name=expr] [)]

   The expression is evaluated at read time, so its value cannot
   depend on data in the data-record.

  examples :
  
  PARAMETER VALUE1 = 121
  PARAMETER VALUE2 = (VALUE1*4+12)

  DIX supports the +,-,*,/ and () operators with normal precedence.           
  DIX also supports some integer functions, see extra info 
  in the help about "interactive_commands function"
![functions]DIX INTERACTIVE_COMMAND FUNCTION

  There are some extensions to the operators

  integer*char => string with integer times the char string
   10*"A" => "AAAAAAAAAA"

  char1 - char2 removes the first char2 substring of char1 (if it exists)
  char1 / char2 removes all char2 substring of char1 (if it exists)
  Example
  "ABCDEFABCDE" - "A" = "BCDEFABCDE"
  "ABADAFABADA" / "A" = "BDFBD"
  
6 Field_declaration

  You can use any normal fortran declaration, with some extensions

  General format

  TYPE*(SIZE)[qualifiers] fieldname[(dim1[,dim2[,dim2]])]

  Where size, dim1,dim2,dim3 can be expressions containing 
  -Numbers
  -Parameter values
  -Fieldvalues of previously defined field_names.
  -Operators +,-,*,/ and () with the normal precedence.
  -DIX also supports some integer functions , see extra info 
  in the help about "interactive_commands function"

  Fieldnames are string upto 32 characters. The must start with a 
  letter (a-z), and the following character may contain a letter (a-z),
  a digit (0-9) , a $ or an _.

  
![functions]DIX INTERACT FUNCTION

 Qualifiers can be

  /HEXADECIMAL           Always display data in hexadecimal format
  /BINARY                Always display data in binary format
  /OCTAL                 Always display data in octal format
  /RANGE=min_val:max_val For integer values, limit the range of the value
  /NODISPLAY             Do not display data (can also not be referenced)
  /USER                  The type is a user defined type. See the help about
                         user types
  /UPPERCASE             Force conversion to uppercase on field modification
  /LOWERCASE             Force conversion to lowercase on field modification

  DIX allows you to mark a field as an index into another file
  To do this you need to specify at least one of the following qualifiers

  /FILE=filename         Specifies that this field is a key into file 
  or                     'filename'. Default is the same file.
  /FILE="expression"     If you specify the name in "", it will be 
                         interpreted as a string to be evaluated. In this
                         way you can compute the name.
  /KEY=keynumber         Specifies the keynumber (default=0)
  /RECORD                Specifies that the value is a recordnumber into
                         'filename'
  /MATCH=LT,LE,EQ,GE,GT  Keymatch, Default is EQ search.
  /COMPUTE="computstring" Allows you to do compuation on the fieldcontents
  /IF="ifstring"         If specified the IFstring expression must be TRUE
                         to take this link.
  During the evaluation of the IF, COMPUTE and FILE string the normal
  symbol substitution is active, and so the special symbols
      $FILE       (the current file)
      $DESCRIPTOR (The current descriptor)
      $FIELD      (The contents of the current field)
  can be used (as any other symbol/function)

  See the examples for this
  See also the radix_override help below

  Supported types are

  INTEGER*2,INTEGER*4,INTEGER*8,BYTE or INTEGER   (=*4)
  REAL*4,REAL*8,REAL*16              or REAL      (=*4)
  LOGICAL*1,LOGICAL*2,LOGICAL*4      or LOGICAL   (=*4)
  CHARACTER*NN or CHARACTER*(NN)     or CHARACTER (=*1)

  STRUCTURE,ENDSTRUCTURE    After the structure statement follows a name
                            optionally followed by a dimension (dim1,dim2,dim3)
 
  UNION,ENDUNION
  MAP,ENDMAP                See MAP_SYNTAX below. 

  RANGE,ENDRANGE            See RANGE_SYNTAX below

  POSITION (value)          Set the bit/byte offset to the value. This
                            can be useful in some overlay structures
                            See also the example in RANGE_SYNTAX
 
  UINTEGER*1,2,4,8 [name,name...]     (for names see below)
                          The data type is unsigned integer, NN=1,2,4,8
  UBYTE            [name,name...]     (for names see below)
                          The data type is unsigned byte
  BITS{*NN}        [name,name,,,name...] (for names see below)
                          The data structure is a bit stream, nn<=8 Bytes
  RBITS{*NN}       [name,name,,,name...] (for names see below)
                          The data structure is a bit stream, nn<=8 Bytes
                          This is the same as BITS, but the meaning of each
                          bit is reversed (0 means active).
  INTEGER*1,2,4,8  [name,name...]     (for names see below)
                          The data type is signed integer, NN=1,2,4,8
  DATE*4                  The data structure is an internal date format =
                            #minutes since 1857 e.g. VMSdate/10*1000*1000*60
  DATE*8                  The data structure is a VMS date format
  UIC{*4}                 The data structure is a UIC
  IDENTIFIER{*4}          The data structure is an VMS-identifier
  PROTECTION{*2}          The data structure is a Protection string
  RINTEGER{*4}            The data is a INTEGER*4 with low and high 16 bits 
                           swapped (PDP-11 compatible format)
  FILEID{*6}              The data is a Fileid (filenr,revnr,volnr) 

  DISKMAP                 The data is an ODS-2/5 storage description
  ACL                     The data is a binary ACL description

  String types

   STRING {*NN}            The data is a counted ascii string (count=byte)
   WSTRING{*NN}            The data is a counted ascii string (count=word)
   LSTRING{*NN}            The data is a counted ascii string (count=longword)
   ZSTRING{*NN}            The data is zero terminated string
   HSTRING{*NN}            The data is terminated by any char >127

   If *NN is specified, the strings are variable in a fixed allocation size.
     The allocation is NN  (HSTRING)
                       NN+1(STRING,ZSTRING) 
                       NN+2(WSTRING)  
                       NN+4(LSTRING)

   If *NN is not specified the allocation is variable also. 
   DIX can handle display and modification of variable fields, but only
   if the recordlength can be changed (indexed or relative files and not fixed)

  PAD{*NN}                Round up bit/byte-offset to NN fold. nn=2,4,8 
                           default in bitmode 8 (align to next byte)
                                   else       2 (align to next word)
                           Rounding takes 0..NN-1 bytes/bits.
  The verb ALIGN is a synonym for PAD

  The user can define his own types. See the help about usertypes.
                          
  With On the BITS,(U)INTEGER*(*),LOGICAL*(*) declarations you can append 
    a list of names to the description. 
     There are two formats
     1. [field,field,,field...] A list of fields numbered from 0 up to nn
                                Fields may be omitted, but comma's are
                                significant.
     2. [idx=name,idx=name,...] A list of numbered names, the indexes
                                do not have to be in order.
     See the examples

  Any variable can be followed by a dimension description up to 3 dimensions.
  Dimension are specified as Low:high or high (low=1)
  The sizes and dimensions can expressions with numbers, parameters or 
  other fieldnames in the description. If fieldnames are used, they must 
  appear before the line in which they are referenced.

  BITFIELD
  ENDBITFIELD
  Normally the number after the * will be interpreted as bytes, but
  between a BITFIELD and an ENDBITFIELD the numbers will be interpreted
  as bits. Only (U)INTEGER,BITS,LOGICAL and PAD fields are allowed between
  BITFIELD and ENDBITFIELD. After an ENDBITFIELD the record pointer will 
  be padded to the next byte.

 Example:

  INTEGER*4 value            value contains 4 bytes = 32 bits
  BITFIELD
   integer*4 first_nibble    value contains 4 bits.
   logical*1 first_bit[0=no,1=yes]
                             value contains 1 bit
   PAD 2                     Align to even bit (so this takes 1 bit)
   integer*1 second_bit      value contains 1 bit
  ENDBITFIELD                aligns on byte boundary (so 1 pad bits)
  LOGICAL*1 temp             value contains 1 byte.
  CHARACTER*12/FILE=SYSUAF Username
                             You can follow this link to the file SYSUAF
                             keyvalue the contents of USERNAME, KEY=0
  INTEGER*4/FILE=DATAFILE/RECORD/COMPUTE="'thisfield'+10" index
                             You can follow this link to the file DATAFILE
                             with the recordnumber the contents of 
                             the field index + 10                         
  INTEGER*4/FILE=SYSUAF/KEY=1/IF="'thisfield'>0" identifier
                             Follow the identifier to the SYSUAF file, but
                             only if the identifier is >0 (UIC identifier)

  Field names starting with a % and PAD fields are not displayed (fillers).
7 USERTYPES
  The user can define his own types. The translations between ascii and
  binary must be programmed in the DIX interactive language. 
  This translation script can be defined in the following ways.
  1. In the .des file
     Somehwer in the .DES file there must be a section the contains the
     script code. This section must begin with #TYPE name and end with #ENDTYPE
  2. In a module in the dix_des.tlb (either user or system) library.
     The module name must be USERTYPE_'name'. In this case the 
     #TYPE and #ENDTYPE tags are not necessary.

  This script is called with 4symbols defined
  1. ACTION : a string symbol that defines the action to take, values can be
              SIZE   : Return the size (in bits) of the binary data.
                       (only used in variable length data)
              ASCBIN : Convert from ascii to binary
              BINASC : Convert from binary to ascii
  2. DATA   : A string variable containing the the source data. 
              In case "SIZE" and "BINASC" DATA contains the binary data
              In case "ASCBIN" DATA contains the ascii text.
              In all cases the length of the string is the size in bytes.
  3. BITSIZE: An integer value that contains the size in bits. Normally this
              is 8*length(data), but not for bitfields.
  4. FIELDS : The fields as defined in the declaration statement.

  The script must set the following symbols
  Case "SIZE"   : SIZE  , an integer containing the size in BITS.
  case "ASCBIN" : RESULT, a string variable containing the binary data.
                  SIZE  , an integer value containing the size in BITS.
  case "BINASC" : RESULT, a string variable containing the ascii text.

  Also the script must finish with an EXIT statement that returns the status.
   For BINASC 0 means the text will be suppressed by the /compress qualifier.
              1 means is is not regarded as "suppressable"
   For others 1=oke, 2=error.
             
  Example:
  
  We have a field of bytes. In the des file we have a line like
  ..
  mytype*8/user fieldname
  ..
  in case 1 the must be a section in the .des file starting with 
  #TYPE mytype and ending with #ENDTYPE. If the script is in the .TLB file
  the tags are not necessary (and not allowed).

  Below an example of a script that will work. It will convert a 8 byte 
  string to a sequence like 12,34,56,43,123,0,56,9

  #type   usertype
  if (action = "SIZE") then	!return symbol SIZE (size in bits)
   size = 8*8			!will not be called since the size is
   stat = 1			!fixed at 8 bytes
  endif

  if (action = "BINASC") then	!return symbol RESULT
   nk = f$length(data)
   stat = 0			!assume all bytes are ZERO
   result = ""
   for k=1,nk
    kar = f$extract(k-1,1,data)
    byt = f$extzv(0,8,kar)
    if (byt <> 0) stat = 1	!not all bytes ZERO
    result = result + "," + string(byt)
   endfor
   result = f$extract(1,-1,result)
  endif

  if (action = "ASCBIN") then	!return symbol RESULT and SIZE
   set noon
   result = ""
   k = 0
   stat = 2			!assmume error in conversion
  lp2: part = f$element(k,",",data)
   if (part <> ",") then
    byt = int(part)
    if (even($status)) goto err
    if (byt < 0 | byt > 255) goto err
    result = result + f$char(byt)
    k = k + 1
    goto lp2
   endif
   size   = f$length(result)*8	!return length in bits
   stat = 1			!successful convert
  err:
  endif
  exit 'stat'			!return  conversion result
  #endtype

 
7 RADIX_OVERRIDE

  Normally all fields are displayed in decimal or text.
  If the fieldtype is followed by the a radix qualifier the display 
  (and also the input is in the requested radix)
 
  The following radices are supported
  /HEXADECIMAL
  /OCTAL
  /BINARY 

  example

  INTEGER*4 FIELD         Will be displayed and modified in decimal
  INTEGER*2/BIN DATA      Will be displayed and modified in Binary
  INTEGER*2/OCT DATA      Will be displayed and modified in OCT
  CHARACTER*3/HEX TMP     Will be displayed and modified in HEX

7 RANGE_SYNTAX

  The record can contain one or more RANGES 
  RANGE (min_offset:max_offset)
    field
    field
    ...
  END RANGE

  The () are required syntax.
  The fields start at offset "min_offset" and continue until the offset
  "max_offset". An example is in the ODS2 File headers

	byte		id_offset	! Offset to Ident area
	byte		map_offset	! Offset mapping area
	byte		acl_offset	! Offset to ACL area
	byte		res_offset	! Offset to ACL area
	integer*2	seg_num		! Extension seqment number
        ....
	range (map_offset*2:acl_offset*2-1)
	 diskmap maps(256)		!enough
	end range
        .....
	position (510)
	integer*2/hex checksum

  The DISKMAP entries start at byte offset MAP_OFFSET*2 (MAP_OFFSET is in 
  words) and continues until ACL_OFFSET*2-1.

  The checksum is at fixed location 510 

7 MAP_syntax
  The MAP command has a special syntax. It is included in a UNION statement.

   UNION
    MAP
    END MAP
    MAP
    END MAP
   ..
   END UNION
  If there are no further specifications, DIX will show all mappings.
  You can specify a dependency on a previously defined variable.
  SYNTAX:
  integer*4 sel		!any field will do (dependency field)
   UNION
    MAP  SEL=value  !Display this map if SEL has value "value"
    END MAP
    MAP  SEL=VALUE1 !Display this map if SEL has value "value1"
    END MAP
   ..
   END UNION

  If all maps have a dependency and none of them is used, DIX will always 
  use the last one, unless one of the MAP entries has a depandancy-fieldname
  of *

  Example
  integer*4 sel		!any field will do (dependency field)
   UNION
    MAP  SEL = 0	!case for sel=0
     character*4 valuec
    END MAP
    MAP  SEL = 1        !case for sel=1
     integer*4 value4
    END MAP
    MAP *               !case for all other values of sel
     logical*4 valuel
    END MAP
    MAP  SEL = 2        !case for sel=2
     integer*2 value2(2)
    END MAP
   END UNION
  If SEL has value 0 the character VALUEC is displayed
  If SEL has value 1 the INTEGER*4 VALUE4 is displayed
  If SEL has value 2 the INTEGER*2 VALUE2(2) is displayed
  If SEL has any other value the LOGICAL*4 VALUEL is displayed

7 Examples
 
	   PARAMETER REP_BITS=2
           INTEGER*4 RECNR
           STRUCTURE DATUSR
             DATE*4 DATTIM 	!internal date format #minutes since 1857
             UIC*4 UIC          !standard VMS UIC format (group,member)
           END STRUCTURE
	   INTEGER*2 type -     !1,4,10 will be by name, all others in
              [1=special,4=normal,10=fatal]    !decimal format
	   INTEGER*2 COUNT
           INTEGER*4 RESCHED
           STRUCTURE BITS(REP_BITS)    !2 structures, with both bits*1 flag=1 byte long
             BITS*1 FLAGS [mon,tue,wed,thu,fri,sat,sun]      !the total is 2 bytes
           END STRUCTURE
	   UNION

	    MAP TYPE=Special    !this case is valid if type=1 (special)
             INTEGER*2 time(2)     
	    END MAP

	    MAP *               !this case is valid for any other field value
	     CHARACTER*2 dunnow !
	    ENDMAP		

	    MAP type=normal     !this case is value if type=4 (normal)
             INTEGER*4 time        
	    ENDMAP

	    MAP Type=fatal      !this case is valid if type=10 (fatal)
	    ENDMAP		!No allocation is this type
	   ENDUNION             !total structure length is dependend on type

           WSTRING*60 MESSAGE   !word counted ASCII string with 60 bytes room
	   INTEGER*4 FIELD(1:COUNT)
                                !field has COUNT members


  An example about field_following to another file

  The example is about 3 RMS indexed files that form a simple sourcemodule
  cross_reference system

  The first file (CROSS_REF.CRF_FILE_NAMES) has the following description
  (.CRF_FILE_NAMES in the system or user textlibrary)
          integer*2    file_nr                          !primary key
          character*60 file_name
          integer*2    %filler

  The second file (CROSS_REF.CRF_MOD_NAMES) has the following description
  (.CRF_MOD_NAMES in the system or user textlibrary)
          integer*2    mod_nr                           !primary key
          character*32 mod_name
          integer*2    file_nr/file=.crf_file_names	!link to the filename

  The third file (CROSS_REF.CRF_CROSS) has the following description
  (.CRF_CROSS in the system or user textlibrary)
          integer*2    caller_nr /file=.crf_mod_names   !link to modulename
          integer*2    called_nr /file=.crf_mod_names   !link to modulename

  Now if you open a record in the third file
  $DIX CROSS_REF.CRF_CROSS
  %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REC.CRF_CROSS
  %DIX-I-USINGDES, Using description SYSLIB(.CRF_CROSS)
  DIX> EXA *
   0|CALLER_NR>|738		!the > tells us there is a link present
   2|CALLED_NR>|-262
  DIX> EXA/DES *
   0|CALLER_NR>|738
     Type      :INTEGER*2
     Linenumber:0
     Variable  :False
     Dependency:False
     Link file :.CRF_MOD_NAMES	!and yes there is a link defined
     Link field:0
     Match     :EQ
   2|CALLED_NR>|-262
     Type      :INTEGER*2
     Linenumber:1
     Variable  :False
     Dependency:False
     Link file :.CRF_MOD_NAMES
     Link field:0
     Match     :EQ

  DIX> Follow CALLER_NR		!try to follow this link
  File .CRF_MOD_NAMES not (yes) opened, open it (y/[n]):Y     !do you want to open the file
  %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REF.CRF_MOD_NAMES
  %DIX-I-USINGDES, Using description SYSLIB(.CRF_MOD_NAMES)
  DIX> Exa *
  0|MOD_NR  |738
  2|MOD_NAME|CHECK_ALLOWED_USER
 34|FILE_NR>|66			!and this field has a link defined
  DIX> Follow file_nr
  File .CRF_FILE_NAMES not (yes) opened, open it (y/[n]):y
  %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REF.CRF_FILE_NAMES
  %DIX-I-USINGDES, Using description SYSLIB(.CRF_FILE_NAMES)
  DIX> Exa *
  0|FILE_NR  |66
  2|FILE_NAME|REM_SERVER_CHECK_ACCESS

  DIX> Back			!now backtrace
  %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REF.CRF_MOD_NAMES
  %DIX-I-USINGDES, Using description SYSLIB(.CRF_MOD_NAMES)
  DIX> Exa *
  0|MOD_NR  |738
  2|MOD_NAME|CHECK_ALLOWED_USER
 34|FILE_NR>|66                 
  DIX> Back			!and again a backtrace
  %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REC.CRF_CROSS
  %DIX-I-USINGDES, Using description SYSLIB(.CRF_CROSS)
  DIX> EXA *
   0|CALLER_NR>|738             !the > tells us the is a link present
   2|CALLED_NR>|-262

  As you see, you can jump around an look at the recordstructures and
 links

  Another example is the .DIR description

  integer*2 verslim [32767=None]		!version limit
  bits*1 flags                                  !flag byte
  string name                                   !bytecounted string (variable)
  pad*2						!align to word boundary
  structure v(64)				!n*version,fileid
    integer*2 version
    fileid    fileid/file=[000000]indexf.sys/record-
       /comp="f$getd($file,""blnr"")+int(f$extr(1,-1,f$elem(0,"","",$FIELD)))"
  end structure 
  
  The fileid has a link to the corresponding indexf.sys with a record number
  equal to the first number in the fileid (layout = (filenr,revnr,volume))
  + the record number in indexf.sys of the fileheader with fileid 0.

  $ dix somedir.dir/int
  %DIX-I-USINGFIL, Using file USER50:[STUBBF.PROGRAMS.DIX]SOMEDIR.DIR;1/NOMOD
  %DIX-I-USINGDES, Using description DSA50:[STUBBF.PROGRAMS.DIX]DIX_DES.TLB;54(.DIR)
  DIX>exa *
   0|VERSLIM     |NONE
   2|FLAGS       |
   3|NAME        |Q.Q
   8|V(1).VERSION|1
  10|V(1).FILEID>|(63474,3,0)
  DIX>foll v(1).fileid		!follow link to fileheader
  File [000000]INDEXF.SYS not (yet) opened, open it (y/[n]):y
  %DIX-I-USINGFIL, Using file USER50:[000000]INDEXF.SYS;1/NOMOD
  %DIX-I-USINGDES, Using description DSA50:[STUBBF.PROGRAMS.DIX]DIX_DES.TLB;54(INDEXF)
  DIX>exa *
    0|ID_OFFSET          |40
    ...
    8|FILE_ID            |(63474,3,0)
    ...
   66|BACKL_FID         >|(62674,1,0)
   80|FNAM               |Q.Q;1
    ...
  DIX>Follow backl_fid		!follow link to parent directory
    0|ID_OFFSET          |40
   ...
    8|FILE_ID            |(62674,1,0)
   ...
   66|BACKL_FID         >|(44986,1,0)
   ...
   80|FNAM               |SOMEDIR.DIR;1
   ...
  DIX>back		!back to the fileheader
  DIX>exa *
    0|ID_OFFSET          |40
    ...
    8|FILE_ID            |(63474,3,0)
    ...
   66|BACKL_FID         >|(62674,1,0)
   80|FNAM               |Q.Q;1
    ...
  DIX>back		!back to the entry in the somedir.dir file  
  %DIX-I-USINGFIL, Using file USER50:[STUBBF.PROGRAMS.DIX]SOMEDIR.DIR;1/NOMOD
  %DIX-I-USINGDES, Using description DSA50:[STUBBF.PROGRAMS.DIX]DIX_DES.TLB;54(.DIR)
  DIX>exa *
   0|VERSLIM     |NONE
   2|FLAGS       |
   3|NAME        |Q.Q
   8|V(1).VERSION|1
  10|V(1).FILEID>|(63474,3,0)

2 Qualifiers
/BLOCKED
  /BLOCKED[=blocksize]

  If the /BLOCK qualifier is specified, the file is accessed via BLOCK IO.
  The data transfer is done via a multiple(blocksize) of 512 bytes, and 
  no recordstructure is assumed. This method can destroy file/record
  integrity and should be used only if you know what you are doing.
  Blocksize is default 1 (/BLOCKED), and can have a value 1..63.
  It can be useful for files with undefined recordtype (as the DUMP file).

/COMPRESS

  Default DIX will display all fields. If you specified /COMPRESS,
  "empty" fields will not be displayed. 
  For text data "empty" means all blank (spaces, binary %X20)
  For binary data "empty" means all zero's (binary %X00)
/COUNT
  /COUNT[=number]

  If the /COUNT qualifier is given, the program will dump "number"
  records . If number is omitted, DIX will default to /COUNT=1
  if a record is specified via the /LT,../GT or the /RECORD qualifier and
  to /COUNT=0 (all records) otherwise.
  This will only work in FILE_ORIENTED mode.

/DECIMAL
  If the /DECIMAL qualifier is given, the program will display the data
  in decimal. The /DECIMAL and the /HEX mode are exclusive.

/DEFINE

  /DEFINE=(definition[,definition...])
  In /INTERACTIVE mode only

  A definition can be
  1. name       : this will deliver an integer symbol with the value 1
  2. name=value : Dix will try to convert value to integer. If this
                  succeeds an integer symbol will be defined. If this
                  fails a character symbol will be defined.
  See also the /script qualifier

/DISPLAY
   /DISPLAY=(displayitem[,displayitem...])

  Valid with /FILE only. This qualifier defines which parts are printed.
  Valid displayitems are
  RECNR   : Print the record number
  RECSIZE : Print the record size
  VFC     : Print the VFC part of the record (If the file contains vfc_data)
  DATA    : Print the data part of the record
  ALL     : Print all parts

  Default is /DISPLAY=(RECNR,RECSIZE,DATA)
    
/FILE
  DIX will dump the record(s) like VMS dump, or if a description is given
  is description format. If you do not specify /COUNT DIX will output
  all records of the file.

/HEX
  
  If the /HEX qualifier is given, the program will display the data
  in Hexadecimal.
  In interpreted mode the CHARACTER*(*) fields will be dumped in
  ascending order separated by spaces. All other fields will be dumped
  in descending byte order (the VMS standard).
  Default /HEX in raw dump mode.
  Default /NOHEX (=/DECIMAL) in interpreted mode.
  The /DECIMAL and the /HEX mode are exclusive.


/INFO

  The /INFO qualifier will display information about the file(s), including
  information about the keys of an indexed file.
  This information includes name,position,size and type of keys.
  Example:
  $DIX/INFO SYSUAF
  Keyinformation on file SYS$COMMON:[SYSEXE]SYSUAF.DAT;1
  File
   Organization : Indexed
   Record format: Variable
   Creation   date  : 24-MAR-2000 14:47:46.41
   Expiration date  : <none specified>
   Backup     date  : 20-APR-2003 18:12:43.19
   Revision   date  : 21-APR-2003 09:40:36.09
   File id          : (17,1,0)
   File owner       : [1,1] = [1,1]
  Record
   Record attribute : NoBlockspan,NONE
   Max record size  :       1412
   Longest record   :          0
  Allocation
   EOF block        :         49 (FFB =    0)
   Allocated blocks :         48
   Area Allocation bucketsize extension
      0         48     3        10
  Keyinformation
                             ..INDEX.. ..DATA...
    Nr Type     Pos Siz Area  Bkt Area  Bkt Keyname
                              Nr   siz  Nr   siz
     0 STG        4  32    0    3    0    3
     1 BIN4      36   4    0    3    0    3
     2 BIN8      36   8    0    3    0    3
     3 BIN8      44   8    0    3    0    3
  
  Descending keys would have a D before the type.

/INTERACTIVE

  Enters INTERACTIVE mode. This is a commandline mode that allows you to
  enter commands at the prompt. This mode us useful for DCL procedures.
  See the INTERACTIVE_COMMANDS help for possible commands. 
  This mode also supports (limited) scripting commands (IF, GOTO etc).

  Example:

  $ DIX SYSUAF/EQ=SYSTEM/INTERACTIVE
  Processing file :SYS$COMMON:[SYSEXE]SYSUAF.DAT;1/NOMOD
  Using description:DSA0:[PROGRAMS.DIX]DIX_DES.TLB;9(SYSUAF)
  DIX>disp *pwd*
  340.0|UAF$Q_PWD(1)      |22B619B5
  344.0|UAF$Q_PWD(2)      |E19FAE22
  348.0|UAF$Q_PWD2(1)     |00000000
  352.0|UAF$Q_PWD2(2)     |00000000
  362.0|UAF$B_PWD_LENGTH  |8
  372.0|UAF$Q_PWD_LIFETIME|30 00:00:00.00
  380.0|UAF$Q_PWD_DATE    |17-MAY-2002 18:34:12.00
  388.0|UAF$Q_PWD2_DATE   |17-NOV-1858 00:00:00.00
  DIX>EXIT

  You can type HELP at the prompt to obtain online help.

/MODIFY

  If the /MODIFY qualifier is specified, you are allowed to modify
  /delete/insert records, Either in raw mode (BYTE_OFFSET=VALUE) or
  in interpreted mode (file_name=value). If /MODIFY is present
  /INTERACTIVE is assumed.

/MULTI_FILE

  Normally DIX will open only one file. If you specify more than
  one file (via wildcard or list), the program will prompt you which
  file to use. If you specify /MULTI_FILE, DIX will open all files
  and lets you switch between them.

/NUMBER
  /[no]Number
  /NUMBER=DECIMAL  (default for interpreted mode)
  /NUMBER=HEX      

  If the /NONUMBER qualifier is given, the program will not display the 
  byte offsets of the data. Default is /NUMBER(=decimal)

/OUTPUT
  /OUTPUT=Filename

  Give an alternative output file. This qualifier will only be used if you
  specify the /FILE qualifier. Default is the terminal.
  If you specified /WIDE the width will be 132.

/RAW

  If DIX can find a descriptor, DIX will use it. If you specify /RAW
  DIX will display in RAW mode even if it can find e description.


/RFA
  If you leave the program DIX will define a symbol DIXRFA containing
  the filename and RFA of the current record. If you start DIX at a
  later moment with the same file and the /RFA qualifier, DIX will return 
  to the same record as before.
  Example
  $DIX/INTER SYSUAF/EQ=SYSTEM
  Dix>EXA *        Will display all data of the SYSTEM record
  Dix>READ         Will read the next record from the sysuaf
  Dix>Exit         Leave DIX
  $DIX/RFA SYSUAF  Will return you to the record in sysuaf following
                   the SYSTEM record.
  
/SCREEN
  /SCREEN

  If the /SCREEN qualifier is given, the program will display a 
  record, (either interpreted or raw) and lets you specify
  editing(only in /MODIFY mode) or display commands . You can
   1. Alter display formats (raw/interpreted)
   2. Modify description files
   3. Create description files
   4. Modify/insert/delete records (only in modify mode)

   Press the PF2/HELP key for info in screen mode.
/SCRIPT
  /SCRIPT=filename

  If interactive mode, if you enter /script=file, DIX will take commands
  from that file (defaultfilename=.DIX), and return to DCL.
  See also the /define qualifier
  If you use the "oneline command" on the command line, /SCRIPT is ignored.
  You can use the "oneline command" to replace the /SCRIPT by entering
  DIX/INTER filespec @filename

/SEARCH
 /SEARCH=(string[,string...])
  Only in /FILE mode.
  Search all records of the file for "string(s)". The search is 
  case-insensitive. String(s) will be interpreted as a wildcard and must 
  occur somewhere in the record.
  Example:

  $ DIX SYSUAF/SEARCH=SYS$SYSDEVICE/window=(position=100,size=100)
  Will deliver all records containing sys$sysdevice ! in pos 100:199

  See also /WINDOW

/SELECT
  /SELECT=(name[,name..])
 In the /FILE mode, DIX will print all fields to a file. If you specify
 /SELECT, DIX will display only fields with a name that matches one of
 the name(s) of the /SELECT. Wildcards (* and %) can be used.

 Examples:

  DIX SYSUAF/EQ=SYSTEM/FILE              will display all the known fields.
  DIX SYSUAF/EQ=SYSTEM/FILE/SELEC=*PWD*  will display only the fields
                                             with PWD in the name.
  DIX SYSUAF/EQ=SYSTEM/FILE/SELEC=UAF$P* will display only the fields
                                             beginning with UAF$P
  The select is case insensitive.

/STARTUP
  /STARTUP=filename
  /STARTUP=DIX_INI   Default

  Process commands from a startup file. The default filename is SYS$LOGIN:.INI 
  See the topic about the startup_file about allowed commands.

/STRICT
  /STRICT=(mode[,...])
  Sets the STRICT level for DIX.
   TYPING      : Once a symbol is created, you cannot change the type anymore
                 In the example above you can de 1. but not 2.
   DECLARATION : All symbols have to be declared before usage
                 This also disallows calling subroutines or @ files
                   and not having the sume number of arguments 
                   given and declared.
   LOCAL       : Even with /DECLARATION, symbols from an outer level
                 can be used. With /LOCAL this is not allowed.

/SYMBOL
  /SYMBOL=symbolname
  
  If you specify /SYMBOL and DIX operates in /FILE mode, the
  result is printed to the output file, and symbols are defined for
  each fieldname.
  for example
  $ dix  sysuaf/FILE/eq=system/select=*pwd*/symb=test
    will display
  %Recordsize = 644
  340.0|UAF$Q_PWD(1)          |22B619B5
  344.0|UAF$Q_PWD(2)          |E19FAE22
  348.0|UAF$Q_PWD2(1)         |00000000
  352.0|UAF$Q_PWD2(2)         |00000000
  362.0|UAF$B_PWD_LENGTH      |8
  372.0|UAF$Q_PWD_LIFETIME    |30 00:00:00.00
  380.0|UAF$Q_PWD_DATE        |17-MAY-2002 18:34:12.00
  388.0|UAF$Q_PWD2_DATE       |17-NOV-1858 00:00:00.00
    But also the following symbols will be set
  $show symbol test*
  TESTUAF$B_PWD_LENGTH = "8"
  TESTUAF$Q_PWD(1) = "22B619B5"
  TESTUAF$Q_PWD(2) = "E19FAE22"
  TESTUAF$Q_PWD2(1) = "00000000"
  TESTUAF$Q_PWD2(2) = "00000000"
  TESTUAF$Q_PWD2_DATE = "17-NOV-1858 00:00:00.00"
  TESTUAF$Q_PWD_DATE = "17-MAY-2002 18:34:12.00"
  TESTUAF$Q_PWD_LIFETIME = "30 00:00:00.00"

  This makes it easy to use DIX in command procedures.

/USER_LIBRARY
  
  /USER_LIBRARY=usertlbfile
  /USER_LIBRARY=DIX_DES_USER (default)

  If you specify /USER_LIBRARY (default), DIX will use this .TLB file
  for extra description records. 
  The default filespecification is SYS$LOGIN:.TLB
/SYSTEM_LIBRARY
  
  /SYSTEM_LIBRARY=systemtlbfile
  /SYSTEM_LIBRARY=DIX_DES (default)

  If you specify /SYSTEM_LIBRARY (default), DIX will use this .TLB file
  for systemwide description records. 
  The default filespecification is dix-image-directory:.TLB

/WINDOW

 /WINDOW=(position=number,size=number)

  Narrow the part of the record where the searchstring must match.
  See also the example in the /SEARCH qualifier.
  Position starts at byte 0.

2 STARTUP_FILE
  When DIX is started DIX will try to open a startupfile and process
  commands in it. THe name of file is entered with the /STARTUP
  qualifier and is default DIX_INI with a default filespec of SYS$LOGIN:.INI

  In this file the following commands are allowed
3 DEFINE
   Used to define keys
   Keys can be defined for screen mode or for interactive mode.
4 DEFINE/KEY
 
  DEFINE/KEY keyname string[/qualifiers]
   
   Define keys for the INTERACTIVE mode of DIX.

   See also the RTL SCreen Management (SMG) manual about the possible
   keys.
5 Qualifiers
/SET_STATE
  /SET_STATE=name
  
  DEFINE/KEY keyname string /SET_STATE=NAME.

  Sets the key driver to state NAME.

/IF_STATE
  /IF_STATE=name

  DEFINE/KEY keyname string /IF_STATE=NAME
  
  If the user enters "keyname", the string "string" will only be returned
  if a previous key has put the key driver in the "NAME" state.
  
/TERMINATE
 
  After the /TERMINATE, the result will be given to DIX.

/ECHO

  Echo the translated strings

/LOCK_STATE

 DEFINE/KEY keyname string/SET_STATE=NAME/LOCK
  
  Normally the state is removed after the typing of the next key.
  If you define the key (and the SET_STATE) with the /LOCK, the state
  will remain "NAME" until another state is entered.

4 DEFINE/SKEY
   DEFINE/KEY skey function [/qualifiers]

   Define a key combination for the screen mode of DIX.
   skey     : the keyboard key : Almost all keys can be used for keydefinitions.
   function : the DIX function 
   See the help about DIX_functions for allowed functions

5 qualifiers
/SET_STATE
  /SET_STATE=name

  The parameter "" must be present but the contents are not used.
  SMGKEY will set a new state (GOLD and BLUE are used by default, but you
  may redefine the states if you redefine all keys)
  Statenames may not contain a - (hyphen)

  example
  DEFINE/SKEY PF1/SET=GOLD ""
  DEFINE/SKEY UPPERCASE_A/IF_STATE=GOLD key_print

  If the user enters PF1-A, the function key_print is executed.
 
  For a list of allowed functions, see the help about KEY_MAPPING

/IF_STATE
 /IF_STATE=NAME
  
   Specifies a state that must be in effect for the key definition 
   to work. The state name is an alphanumeric string. States are 
   established with the /SET_STATE qualifier
   Statenames may not contain a - (hyphen)

  DEFINE/SKEY PF1/SET=GOLD ""
  DEFINE/SKEY F20/IF_STATE=GOLD key_print
  DEFINE/SKEY F20 key_swap_dis

  If the user enters PF1-F20, the function key_print is executed.
  It ths user enters F20, the function  key_swap_dis is executed.

  For a list of allowed functions, see the help about KEY_MAPPING

3 DELETE
  
  DELETE/SKEY/ALL Delete all (default)screenkeydefinitions
  DELETE/SKEY skey [/STATE=NAME]
                  Delete the key definition for skey (possibly with state NAME)

3 SET
   Various set options
4 EDITOR
  SET EDITOR which
  Define your editor for editting description records
  Possible options are
   EDT      Use EDIT/EDT
   INTERNAL Use an internal editor (simple but fast)
   TPU      Use EDIT/TPU


4 MESSAGE
  Set the message display wanted
  /[NO]FACILITY  Sets/clears the facility part
  /[NO]IDENT     Sets/clears the Ident part
  /[NO]SEVERITY  Sets/clears the severity part
  /[NO]TEXT      Sets/clears the text part
  /ALL           Sets all parts
  /NONE          Clear all pars

4 PROMPT
  Change the default prompt.

  SET PROMPT string
   If the string contains a # sign, this # will be replaced by _level
   if the commandfile depth is >1
   The default prompt is DIX#>, which will be
     DIX>   at level 1
     DIX_1> at level 2 etc.

4 STRICT

  SET STRICT [qualifiers]

  Normally DIX is not very strict in the symbol handling.
  You can define new symbols by typing
  1. a=10 (define the symbol a , type integer, value 10)
  and then say
  2. a="SKLFG" (redefine a to type character, value "SKLFG"

  DIX has two levels of more strict behaviour
  /TYPING      : Once a symbol is created, you cannot change the type anymore
                 In the example above you can de 1. but not 2.
  /DECLARATION : All symbols have to be declared before usage
                 This also disallows calling subroutines or @ files
                   and not having the sume number of arguments 
                   given and declared.
  /LOCAL       : Even with /DECLARATION, symbols from an outer level
                 can be used. With /LOCAL this is not allowed.
   Example

   SET STRICT/LOCAL
   INTEGER a=10,b=20
   CALL test 20,b
   EXIT
   TEST: SUBROUTINE loc1,loc2/symbol
         SHOW SYMB A   		!A is undefined with /LOCAL       
         SHOW SYMB loc1         !has the value of 10
         loc1= 20               !this changed loc1.
         LOC2=20		!this changes loc2 AND b, so output variables can be used.
         ENDSUBROUTINE 

2 INTERACTIVE_COMMANDS

 If you specify /INTERACTIVE the program will enter 
 commandline mode.
 It will prompt you for commands. Lines can be continuated with a -
 on the last position of the line (like DCL).
 
 Blanks are not significant, except in symbol names, verbs and strings.
 Dix is NOT case sensitive, except within strings.

 Dix has a powerful set of commands to enable scripting inside a command file.

 See the @file_and_commands_in_file help topic.

3 @file_and_commands_in_file
  Format
   @filename[/output=filename] [expression[,expression...]

  Take the commands from a command file. The default filespec is
  'this_directory'.dix

  The expressions will be available in the subroutine as local symbols
  with the names Pn (As DCL) or any name the ENTRY statement gives them.
  There is no limit to the number of arguments.
  There is also a symbol $NRARGS that contains the number of arguments.
  See also the help about the ENTRY command.


 The file is read into memory before any statement is executed. At this
 point all loop-structures are checked for correct overlap (f.e. 
  FOR
   IF
   ENDFOR
  ENDIF
 is not acccepted.

 Inside this file you can use the following extra commands.

4 CALL

  Call label [expression[,expression...]
  Call to a subroutine with optional parameters
  There is no limit to the number of arguments.

  See help about SUBROUTINE statement
 
  The parameters will be local symbols for the SUBROUTINE, see the help
  about symbols.

4 CYCLE
  Skip the rest of the for, repeat, while, loop block and resume execution
  at the corresponding ENDxxx statement to start the next iteration. 
  This command does not exit the current block (as the LEAVE command).

  Example

  nrec = 0
  REPEAT
    read	       		!read next record
    if (fieldname=5) cycle      !if a fieldname = 5, skip the rest	
    fieldname = fieldname+1	!update the fieldname
    UPDATE              	!and write out to the file
    nrec = nrec + 1		!and count	
  UNTIL nrec=10			!when 10 processed stop

4 DECLARATIONS
  
   Syntax

    'type' name[=value][,name[=value]...]

   where
    type  : REAL, CHARACTER, LOGICAL ,INTEGER or DATE
    name  : The name of the local symbol
    value : An expression that returns a value of the correct type 


4 ENTRY
  ENTRY parametername[qualifiers][,parametername[qualifiers]...]

   Declare names for parameters on @ed files.
   must be the first command in the file

   If a call is make to a command file, the (optional) parameters are 
   evaluated, and the resulting value is placed in the (local) symbol
   with the name "parametername" or Pn if there are more parameters
   then parameternames.

   Qualifiers can be
   /REAL
   /INTEGER
   /DATE
   /CHARACTER
   /LOGICAL      The expression given at the @ line must match the
                 type given to this symbol
   /SYMBOL
   If the parametername has a /SYMBOL qualifier, the parameter will be
   an alias to the original expression parameter (which must be a symbol)
   so that modifications to the parameter will be done to the symbol.
   This is a way to let the @file return output values.

   If DIX is in STRICT/DECLARATIONS mode, the number of defined and
   actual parameters must be equal.

  Example
 
  integer x=10
  @mysub 10*4,"TExt",x,41

  and the file mysub.dix contains the following lines

  entry count/integer,name,xparam/symbol
  ...
  ...
  exit

  In the file "mysub" there will be 5 symbols defined
  COUNT  : integer with the value 40 (the expression MUST be integer).
  NAME   : character with the value "TExt"
  XPARAM : Integer with the value 10
           and modifications are done to the X symbol is the calling file.
  P4     : integer with the value 41
  $NRARGS: Integer with the value 4 (4 arguments)

  If there are more parameternames then parameters, the parametername
  will be defined as a character string with the value "" (empty).
  If there are more parameters than parameternames, the symbols
  P* are defined with the same type as the parameter.

  Both possibilities are not allowed with the STRICT/DECLARATION mode.  

4 IF
  Syntax
  The IF command is present in 2 formats
  1. IF (logical expression) command
      If the expression evaluates to true, execute command.
  2. IF (logical expression) THEN
     [ELSE]
     ENDIF
       If the expression evaluates to true, execute the IF part
       else execute the (optional) ELSE part

  See the help about expressions
![dix inter expression]help about expressions
  See also the help about the LEAVE command

4 FOR_ENDFOR
  FOR symbol=first,last[,increment]
  ENDFOR
  first,last and increment must be integer. 
  last can be < first, but then increment must be negative.

  The normal FOR construct. 
  The local Symbol is initialized with 'first', and checked against 'last'
  If first <= last (and increment is >0) or
     first >= last (and increment is <0) 

  The expressions first,last and increment are evaluated only once, at
  the FOR command.

  the statements up to the ENDFOR will be executed, and then
  increment will be added to first and the check repeated.
  If the condition does not match, the statement following
  ENDFOR will be executed.
  See the help about expressions
  After the for loop finishes, the symbol is no longer defined.
  It is not allowed to change the value of the FOR variable in
  the FOR loop (attempts are signalled and ignored).

  See also the help about the LEAVE and the CYCLE command 

![dix inter expression]help about expressions

4 GOTO

 Syntax: Goto Label

  Goto the line with this label. If the label cannot be found, 
  DIX will close this command file (and possibly its parent) until
  the input comes from a terminal or (in BATCH) exit DIX.
  The label must be visible from the current context level, so for
  example "LAB" will not be found, because "LAB" is in the repeat/until
  structure, and you cannot jump into a loop structure.

  x=1
  repeat
   lab : x=x+1
  until x>5
  goto lab

4 GOSUB
  
  Syntax: GOSUB label

  Goto the line with this label. If the label cannot be found, 
  DIX will close this command file (and possibly its parent) until
  the input comes from a terminal or (in BATCH) exit DIX.
  The return address will be stacked, and the RETURN command returns
  you to the next line.
  The maximum depth is 10.
  The label must be visible from the current context level, so for
  example "LAB" will not be found, because "LAB" is in the repeat/until
  structure, and you cannot jump into a loop structure.

  x=1
  repeat
   lab : x=x+1
  until x>5
  gosub lab

4 Labels
 Each line can be preceded by a label 
  The label can be any string terminated by a :
  Labelnames can have upto 32 chararacters. The first must be
  a-z, and the remaining a-z 0-9 $ or _.

  Example

  This_label12 : statement  
4 LEAVE
  
  Leave the current block (IF,FOR,REPEAT, WHILE) and
  start with the statement just after this block.
  The LEAVE command can only be executed within a block.

4 LOCAL

  syntax : LOCAL symbolname[,symbolname...]]

  Declare local symbols in blocks. See the help about symbols.
  This command is replaced by the declarations command.
  See the help about declarations

4 LOOP_TESTLOOP_ENDLOOP
 
  The more general form of the while/endwhile and the repeat/until

  LOOP
    [statement1(s) ]
  TESTLOOP logical_expression
    [statement2(s) ]
  ENDLOOP

  The loop/endloop is a block of statements. The TESTLOOP decides
  if the loop is exited. If the logical_expression evaluates to false, 
  the loop is exited.

  Example
   
  $DIX/INT SYSUAF
  SET NOON
  NREC=0
  LOOP
    NEXT RECORD
  TESTLOOP LOGICAL($STATUS)
    SAY "USername = ",uaf$t_username
    NREC = NREC + 1
  ENDLOOP
  SAY "#Records = ",nrec
  EXIT

  See also the help about the LEAVE and the CYCLE command 

4 ON

  On option command

  Option can be 

  Warning
  Error
  Severe
  Control_c
 
  And can be abbreviated to one letter
  if an error occurs, DIX will execute 'command' for the errorlevel or
  a lower level. 

  Example

  ON error goto label_error.
  Any error and severe will jump to label_error. Warnings will be ignored.
  
4 RETURN
  Will return from a previous GOSUB.

  Return without an open GOSUB is NOT signalled as an error. DCL does not
  signal it, and so does DIX.

4 REPEAT_UNTIL

  syntax : REPEAT 
            statement
            statement
            ...
           UNTIL logicalexpression

 Repeat the statements as log as "logicalexpression" evaluates to true.
 See also the examples

  See also the help about the LEAVE and the CYCLE command

4 SUBROUTINE_ENDSUBROUTINE

  Format
  label:  SUBROUTINE [parametername[/qualifiers][,parametername[/qualifiers]..]]

   Defines the beginning of a subroutine in a command procedure. The
   SUBROUTINE command must be the first executable statement in a
   subroutine. The subroutine must be terminated with an ENDSUBROUTINE.
   If a call is make to a subroutine, the (optional) parameters are 
   evaluated, and the resulting value is placed in the (local) symbol
   with the name "parametername" or Pn if there are more parameters
   then parameternames.

   Qualifiers can be
   /REAL
   /INTEGER
   /DATE
   /CHARACTER
   /LOGICAL      The expression given at the @ line must match the
                 type given to this symbol
   /SYMBOL
   If the parametername has a /SYMBOL qualifier, the parameter will be
   an alias to the original expression parameter (which must be a symbol)
   so that modifications to the parameter will be done to the symbol.
   This is a way to let the @file return output values.

   If DIX is in STRICT/DECLARATIONS mode, the number of defined and
   actual parameters must be equal.

  Example
 
  integer x=10
  Call mysub 10*4,"TExt",x,4


  mysub: subroutine count,name/character,xparam/symbol
  ...
  ...
  endsubroutine

  In the subroutine "mysub" there will be 5 symbols defined
  COUNT  : integer with the value 40
  NAME   : character with the value "TExt" (must be a charcter expression)
  XPARAM : Integer with the value 10
           and modifications are done to the X symbol
  P3     : integer with the value 4
  $NRARGS: Integer with the value 3 (3 arguments)

  If there are more parameternames then parameters, the parametername
  will be defined as a character string with the value "" (empty)
  
4 WHILE_ENDWHILE

  syntax : WHILE logicalexpression
            statement
            statement
            ...
           ENDWHILE

 Repeat the statements as log as "logicalexpression" evaluates to true.
 See also the examples

  See also the help about the LEAVE and the CYCLE command

4 Examples

  k = 1				!define symbol k value 1
  Loop: k = k + 1                  !label + increment of symbol
  Examine field_'k'		!exam with symbol substitution
  IF (2*(k+10) < 20) goto loop	!test for repeat

  This following script will increment BYTLM by 1000 for all users with
  a name that matches *A*, and have a bytlm of >=50000 and a jtquota >4000
  (not a very useful example, but is shows the possibilities)
  
	nmod = 0
	nfnd = 0
	on error goto done
   loop:
	nfnd = nfnd + 1
	if (f$matchwild(uaf$t_username,"*A*")) goto next
	echo "Found user ''uaf$t_username'"
	if (uaf$l_bytlm < 50000 | uaf$l_jtquota <= 4000 ) goto next
	deposit uaf$l_bytlm='uaf$l_bytlm + 1000'
	nmod = nmod + 1
	update/quiet
	echo "Updated ''uaf$t_username' to ''uaf$l_bytlm'"
   next:	
	read
	goto loop
   done:
	echo "Found ''nfnd' users , modified ''nmod' users"

 Example for while constructs
  a = 10
  while a>0
   b = 2
   repeat 
    say "a = ''a' b = ''b'"
    b = b - 1
   until b=0
   a = a-1
  endwhile

 Example for a FOR contruct

 FOR k=10,1,-2
  say "The value of K = ''k'"
 ENDFOR
 will deliver the output
  The value of K = 10
  The value of K = 8
  The value of K = 6
  The value of K = 4
  The value of K = 2
  
  Example for a repeat construct

  k = 10
  REPEAT
    say "The value of K = ''k'"
    k = k -2
  UNTIL k<=1
    
  Delivers the same output as the FOR example

  K = 10
  WHILE k<=1
    say "The value of K = ''k'"
    k = k -2
  ENDWHILE
   
  Delivers the same output as the FOR example

3 ADD

  ADD DESCRIPTION name[,name...]

  Add new descriptions to the current file. See also the remove command.
  example 

  Add description extension.dir

  Will add the .dir description to the current file

3 BACK

  Syntax BACK [/LOG]
  This command allows you to return to the file from which you 
  followed a link to this file. Up to 10 jumps are saved in a history
  buffer.
  See also the FOLLOW command

3 CLOSE
   CLOSE[/qualifiers]       close the current file
   CLOSE[/qualifiers] mask  close file with tag=mask or filename matches mask
                            mask can contain wildcards

  Will close the file(s) that match 'mask'. If the current file is closed
  the first file in the list will become the current file.

4 qualifiers
/ERROR
  /ERROR=label

  If the CLOSE results in an error, DIX will jump to the label.
  If the /ERROR qualifier is not specified, DIX will look for the ON condition.

3 CREATE
 
  Create something

  CREATE DESCRIPTION new_description	!create new description record
  CREATE 				!create new record in the file

4 CREATE

  CREATE

  Create a new record. The record will be filled with default data
   - binary null for non-text fields
   - Spaces for text fields
  and then allow you to modify this record, and eventually write it out
  via the Update command.

4 CREATE_DESCRIPTION
  
  CREATE DESCRIPTION

  Create a new description. This can be in the system_library(if you have
  write access), the user_library or in a file.
  If you specify /SYSTEM_LIBRARY , the new description will be placed in
  the system_library
  If you specify /USER_LIBRARY , the new description will be placed in
  the user_library
  If you specify /FILE or nothing, the new description will be in the
  file in the current directory.
 
3 CUT
   CUT[/qualifiers] [TAG]

  Save current record values to save area (clipboard) or to a symbol.
  TAG is optional. If not specified the current file is used, otherwise
  the file specified by 'TAG' is used.

  Qualifiers can be
  /SYMBOL=symbolname  	save the data to a symbol
  You can use the PASTE command to restore the record from this save-area 
  or symbol.

3 DEFINE
   Used to define keys
   Keys can be defined for screen mode or for interactive mode.
4 DEFINE/KEY
 
  DEFINE/KEY keyname string[/qualifiers]
   
   Define keys for the INTERACTIVE mode of DIX.

   See also the RTL SCreen Management (SMG) manual about the possible
   keys.
5 Qualifiers
/SET_STATE
  /SET_STATE=name
  
  DEFINE/KEY keyname string /SET_STATE=NAME.

  Sets the key driver to state NAME.

/IF_STATE
  /IF_STATE=name

  DEFINE/KEY keyname string /IF_STATE=NAME
  
  If the user enters "keyname", the string "string" will only be returned
  if a previous key has put the key driver in the "NAME" state.
  
/TERMINATE
 
  After the /TERMINATE, the result will be given to DIX.

/ECHO

  Echo the translated strings

/LOCK_STATE

 DEFINE/KEY keyname string/SET_STATE=NAME/LOCK
  
  Normally the state is removed after the typing of the next key.
  If you define the key (and the SET_STATE) with the /LOCK, the state
  will remain "NAME" until another state is entered.

4 DEFINE/SKEY
   DEFINE/KEY skey function [/qualifiers]

   Define a key combination for the screen mode of DIX.
   skey     : the keyboard key : Almost all keys can be used for keydefinitions.
   function : the DIX function 
   See the help about DIX_functions for allowed functions

5 qualifiers
/SET_STATE
  /SET_STATE=name

  The parameter "" must be present but the contents are not used.
  SMGKEY will set a new state (GOLD and BLUE are used by default, but you
  may redefine the states if you redefine all keys)
  Statenames may not contain a - (hyphen)

  example
  DEFINE/SKEY PF1/SET=GOLD ""
  DEFINE/SKEY UPPERCASE_A/IF_STATE=GOLD key_print

  If the user enters PF1-A, the function key_print is executed.
 
  For a list of allowed functions, see the help about KEY_MAPPING

/IF_STATE
 /IF_STATE=NAME
  
   Specifies a state that must be in effect for the key definition 
   to work. The state name is an alphanumeric string. States are 
   established with the /SET_STATE qualifier
   Statenames may not contain a - (hyphen)

  DEFINE/SKEY PF1/SET=GOLD ""
  DEFINE/SKEY F20/IF_STATE=GOLD key_print
  DEFINE/SKEY F20 key_swap_dis

  If the user enters PF1-F20, the function key_print is executed.
  It ths user enters F20, the function  key_swap_dis is executed.

  For a list of allowed functions, see the help about KEY_MAPPING

3 DELETE
  
  DELETE/KEY name[/state=name]
                  Delete SMG key definitions for interactive mode

  DELETE/SKEY/ALL Delete all (default)keydefinitions for screen mode
  DELETE/SKEY skey [/STATE=NAME] 
                  Delete the key definition for skey (possibly with state NAME)

  DELETE/SYMBOL/LOG    Delete symbol
  DELETE/SYMBOL/LOCAL  Only delete local symbol

  DELETE/RECORD        Delete the current record (if the file id indexed or
                       relative and you have /MODIFY)

3 DEPOSIT 

   DEPOSIT fieldname=value.
   DEPOSIT offset=value
  
  Modify a field to the given value.                

  DEPOSIT fieldname = value
  DEPOSIT/RAW offset[.bit_offset] = value
  DEPOSIT/VFC Deposit data in VFC buffer or record
 
  The entered data is first 'unsymbolized' (see substitution)
  and then translated to the field definition, and deposited in the
  data-record.

4 Qualifiers
/RAW
 Display data in raw (non description) mode. In this mode the qualifiers
  /WORD, /BYTE, /LONG, /HEX are significant. Default is the /LONG.
  Offset can be specified as byte_offset[.bit_offset]
  
/WORD

  Display data in words. Valid only in /RAW mode.
/BYTE

  Display data in bytes.  Valid only in /RAW mode.
/LONG

  Display data in longwords. This is the default in /RAW mode.
  Valid only in /RAW mode.
/UNSIGNED
  Display integers as unsigned. Not used for /HEX.

/BITS
  /BITS=number_of_bits
  For field_mode you can set any bitsize up to 32. Valid only in /RAW mode.

/HEX

  Interpret the value in HEX mode.

3 DISPLAY
  Display is a synonym for EXAMINE

3 ECHO

  ECHO[/qualifier] modify record xyz

  Display a text to the output file. This can be useful in batch-jobs.
  One qualifier is supported 
    /CONSOLE  : Print the output to the terminal regardless of the 
                /output setting.

3 EDIT
   EDIT DESCRIPTION
  
   Edit the description with the current defined .

3 EXAMINE

 EXAMINE[/qualifiers] [fieldmask]
 EXAMINE/RAW offset
 EXAMINE/VFC                      Examine VFC buffer data

   Display all fields with the name matching 'fieldmask' . Default
   all names match.
   The qualifiers MUST be entered before the fieldmask or the offset

 In the RAW mode, the data starting from byte 'offset' will be displayed.

4 QUALIFIERS
/OUTPUT
 /OUTPUT=filename
  Print the output to a file.

/SCREEN
 /SCREEN
 /NOSCREEN (Default)
  Display the data in an SMG window, that allows you to scroll through it.
  See also SET PAGED SCREEN

/PAGED
 If the output is printed to the terminal, the output is printer
  per page, and the user must type a return to continue

/ORIGINAL
 Do not display the data from the current (possibly modified) data in memory
 but use the original contents of this record.
/SAVE_AREA
 Do not display the data from the current (possibly modified) data in memory
 but use the save area (see also CUT and PASTE).

/DESCRIPTION

 Display the description info after the field value.
/RAW
 Display data in raw (non description) mode. In this mode the qualifiers
  /WORD, /BYTE, /LONG, /HEX are significant. Default is the /LONG.
  
/WORD

  Display data in words. Valid only in /RAW mode.
/BYTE

  Display data in bytes.  Valid only in /RAW mode.
/LONG

  Display data in longwords. This is the default for RAW mode.
  Valid only in /RAW mode.
/UNSIGNED
  Display integers as unsigned. Not used for /HEX.
/HEX

  DIsplay the data in HEX. Default is decimal.
  If this qualifiers is specified in /RAW mode, the data is displayed in HEX.
  This qualifier can also be used in /NORAW mode (description mode). The
  data will be displayed in HEX. See also the /NUMBER qualifier

/NUMBER
 /NONUMBER

  /NUMBER=DECIMAL  (default)
  /NUMBER=HEX      

 Display byte offsets for each field. This is the default.

/COMPRESS
  /NOCOMPRESS

 Do not display empty fields (spaces for text, and nulls for binary).
  Default is /NOCOMPRESS. 
 This command is valid only in /NORAW mode.
/SEARCH
  /SEARCH=searchstring

  Display only those fields of which the contents contain 'searchstring'
  See also the /UNIX qualifier

/UNIX
  The searchstring is interpreted as UNIX wildcard string. Default is VMS.

     VMS  : *     : Matches all substrings (0 or more chars)
            %     : Matches exactly one char
     UNIX : *     : matches all substrings (0 or meer chars)
            %     : matches exactly 1 char
            [abc] : Matches a "a" or a "b" or a "c"
            [-abc]: Matches anything except a,b,c
            [a-z] : Matches all letters (a-z)
            [-a-z]: Matches anything except letters
            'a    : Char "a" is not longer a special char ([*%' etc)
            ~     : If in front of the searchstring , the searchstring must be in the
                    beginning of the line, if at the end of the searchstring,
                    the searchstring must be at the end of the line
            !     : Matches one or more whitespace chars

/RECNUMBER
  Display the record number (only for sequential files)
  If fieldmask is not specified, only the recordnumber will be displayed
/RECORD_LENGTH
  Display the record length
  If fieldmask is not specified, only the recordlength will be displayed

/MARK
  /MARK  Default
  If you specify /MARK (default), DIX will display fieldnames, that are in
  the current key of an indexed file, in bold/reverse.
3 EVALUATE

  Evaluate expression
 
  Evaluate expression. An expression can contain integers, reals, 
  character strings,field values and parameters.

  See the help about expressions
![dix inter expres]Help about expressions

  Dix supports some functions, see the help about functions
  in "interactive_Commands functions"
![function]dix inter functions
4 qualifiers
/hex
  Display the result in HEX.
3 EXIT

  Leave DIX.

3 Expressions

  Expressions can use the following operators
  Arithmetic :  +,_,/,* 
  Logical    : & (and) | (or) operator.
  Comparison : <,<=,=,>=,> or <>
  
  Priority : Comparison (highest)
             &,|
             *,/
             +.-        (lowest)
  
  Brackets can be used to change priority of the operator.
  The operands can be 

  1. Numbers (integer or real) 
      Integers can be specified as just numbers
      or 'dddd'R with R=D(ecimal),H(ex),O(ctal),B(inary)
      or %Rdddd  with R as above.
  2. character strings. They start and end with a "
  3. Logical constants (true or false)
  4. Symbols (with their types)
  5. Parameters
  6. Special functions. See the help about functions
![dix inter function]Help about functions
  7. Fields of the record. It a field type in not logical,
                           integer or real, it will translated
                           to text.
     The full syntax of the fieldname is
     filetag\descriptiontag\fieldname. The filetag defaults to the
                                       currentfile.
                                       The descriptiontag defaults to the
                                       current description of the selected file.
     If there is only one tag, it is regarded as a filetag, so
      name\fieldname seaches for field "fieldname" in the current description 
      of the file with tag "name".
     If there is no tag, the search will be for the fieldname in the current
      description of the current file.
    
  The operators have the normal meaning with some extensions
  for operations on character strings
  1. integer*character   will result in a string that contains
                         integer times the source
                         e.g. 10*"A" => "AAAAAAAAAA"
                              5*"AB" => "ABABABABAB"
  2. character/character will remove all occurrences of the second
                         string from the first
                         e.g. "ABABABAB"/"A"   => "BBBB"
                              "ABABCABAB"/"AB" => "C"
  3. date1-date2         The result must be a delta time, so 
                         date2 must be >date1, or date2 must be a delta time
                         and the result must bne a delta time.
  4. date1+date2         Date1 or date2 (or both) must be delta times

3 FIND

  FIND string [/qualifiers]
  FIND

  Search the file for a string, or continue search with the same string.

  If you specify /REWIND, the search will start from the first record.
3 FOLLOW 
 
   FOLLOW[/LOG][/automatic] fieldname

   If the fielddefinition in the description file contains info about
   a link to another file (/FILE,/KEY,/RECORD,/COMPUTE) 
   you can follow this link to another file. 
   If that file is not already opened in DIX and you specified /automatic,
   DIX will try to open the file. If you do not specify /AUTOMATIC, you will
   be asked if you want to open the file.
   If the file can be opened and the record can be found, DIX will display the
   new record. If the file cannot be opened or the record cannot be found
   DIX will signal the error, and you stay in the current file/record.

   See the help about DIX DISPLAY INTER/DESCR RECORD_FORMAT FIELD_DECL
   See also the BACK command
![DIX DISPLAY INTER/DESCR RECORD_FORMAT FIELD_DECL]Help about /file

3 FUNCTIONS
  Dix supports some function during the evaluation of the input.

  Functions are defined with up to 10 arguments. The functionnames can 
  be abbreviated to the point described in the help about the function.
  More info about these functions is in the deeper topics.

  arithmetic functions

             arg1     Arg2      Arg3  Arg4 Output
  AND         Int      Int                 Int : Anded value
  OR          Int      Int                 Int : Ored  value
  NOT         Log                          Log : Reverse logical value
  EVEN        Int                          Log : True if arg1 is even
  ODD        Int                          Log : True if arg1 is odd
  LSHIFT      Int      Int                 Int : arg1 shift arg2 to left
  RSHIFT      Int      Int                 int : arg1 shift arg2 to right
  MOD         Int      Int                 Int : mod(arg1,arg2)
  MAX       Int/real Int/real  Int/real    same: max value (up to 10 args)
  MIN       int/real Int/real  Int/real    same: min value (up to 10 args)

  Conversion functions

  INT      Int/real/char                   Int : Converted to int
  LOGICAL  Int                             Log : Converted to Logical
  NINT     Int/real/char                   Int : Nearest integer
  REAL      Int/real                       Real: converted to real
  STRING   Int/Real/char                   Char: Converted to char

  Lexical funtions

  F$CHAR      int                          char: make a string of 1 char
  F$CHECKSUM  int     int        char char Int : The checksum (4 args)
  F$COLLAPSE  char                         char: remove all spaces
  F$DATE      int     String               date: Create a date symbol
  F$EDIT    String    String               char: Like DCL 
  F$ELEMENT   int      char      char      char: Return the n'th element
                                                 if n <0 return the last+1+'n'
                                                 element
  F$ENUMERATE int     char                 char: Returns filenames
  F$EXISTS    char                         char: True or false for symbols
  F$EXTRACT   Int      Int      Char       char: Like DCL F$EXTRACT
                                                 if int<0 return data from the
                                                 end of the string
  F$FEXISTS   char                         char: True or False for fields
  F$FAO       char    allsorts             char: F$FAO of DCL
  F$FIELD     char    char                 char: return info about a field
  F$FTYPE     char                         char: The type of the field
  F$GETDVI    char    char                 various : See f$getdvi help
  F$ENVIRON   char                         various
  F$EXTV      int    int       any         int : Extract some bits (sign ext) from p3
  F$EXTZV     int    int       any         int : Extract some bits (zero ext) from p3
  F$FILE      char                         chr/int: Attributes of the file
  F$ICHAR     char                         Int : Return integer val of string of 1 length
  F$INSV      int    int      int    any   any : Insert bits in arg4
  F$LOCASE    char                         Char: Return lowercase string
  F$LOCATE    char    char     Char  char  Int : Find char2 in char1
  F$MATCHWILD char    char     Char  char  log : Check if arg1 matches wild in 
  F$MESSAGE   int                          char: The message text of operand
  F$LENGTH    char                         Int : Length of string
  F$RANDOM   int/real                      Int/real : A random value
  F$TIME    String     Time                Char: See help about f$time 
  F$TRIM      char                         Char: Delete trailing spaces
  F$TRNLNM    char    various              char/int: Like DCL
  F$TYPE      char                         char: The type of the symbol
  F$UPCASE    char                         Char: return uppercase string

  Data dependend functions

  %DATA       None                         Char: A string with the record contents
  %LOC        char                         Int : The location of the field in the data
  %BLOC       char                         Int : The bitlocation of the field in the data
  %RECORDSIZE None                         Int : The current recordsize
4 AND

  AND (Value1,value2) delivers the ANDed value

  All arguments are integer
  result is integer
4 OR

  OR (Value1,value2) delivers the ORed value

  All arguments are integer
  result is integer
4 NOT

  NOT (Value1) delivers the begated value

  All arguments are logical
  result is logical
4 ODD

  ODD (Value1) delivers true if value1 is ODD

  Argument is integer
  result is logical
4 EVEN

  EVEN (Value1) delivers true if value1 is EVEN
  Argument is integer
  result is logical

4 LSHIFT

  LSHIFT (Value1,value2) delivers value1 left shifted by value2
  Can be abbreviated to LSHI
  All arguments are integer
  Result is integer
4 RSHIFT

  RSHIFT (Value1,value2) delivers value1 right shifted by value2
  Can be abbreviated to RSHI

  All arguments are integer
  Result is integer
4 MOD

  MOD (Value1,value2) delivers value1 MOD value2
                                             
  All arguments are integer or real. 
  The result will be integer if all elements are integer, or real 
  if one of them is real.
4 MAX

  MAX (Value1,value2[,value3]) delivers MAX of value1,2,3 (max 10 args)

  All arguments are integer or real. 
  The result will be integer if all elements are integer, or real if 
  one of them is real.
4 MIN

  MIN (Value1,value2[,value3]) delivers MIN of value1,2,3 (max 10 args)

  All arguments are integer
  The result will be integer if all elements are integer, or real if 
  one of them is real.
4 REAL

  REAL(integer) will return a real value
 
  Argument is integer, return value is real
4 LOGICAL

  Converts the integer to a logical (low bit)
  Argument is integer, return value is logical
4 INT

  INT(real) will return an int value, truncated

  Argument is real, return value is integer
4 NINT

  NINT(real) will return an int value rounded

  Argument is real, return value is integer
4 STRING

  STRING(int/real) will return a string value

  Argument is int or real, return value is string

4 F$CHAR
  F$CHAR(integer) 
  Result is an character string with length 1 with the ascii-value of
  the argument.

4 F$CHECKSUM

   F$CHECKUM(bpos,epos,[type],[alg],[filetag])
   Can be abbreviated to F$CHEC

   bpos : int : starting position in data record (in bytes). The first
                byte in the buffer = 0
   epos : int : end position in the databuffer
   type : char: Optional, BYTE or WORD or LONGWORD, default is byte. 
                The size of the data elements
   alg  : char: Optional, XOR or SUM, default is SUM. The algorithm of 
                the checksum
   tag  : char  Optional file tag, default is current file

  example: the indexf file has a checksum at the end of the record
           it is the "SUM" of the previous 255 words.
  des record
   ...
   ...
   integer*2 checksum (at offset 510)
  end record
  Can be computed with
    F$CHECKSUM(0,509,"WORD")
  or even more sophisticated 
    F$CHECKSUM(0,%LOC("CHECKSUM")-1,"WORD")
4 F$COLLAPSE

  F$COLLAPSE(string) will remove all blanks
  Can be abbreviated to F$COLL

  Input and result are character

4 F$DATE
  Syntax
   
   F$DATE(value[,what])

  Value can be
  1. a string containing a valid VMS date-time
  2. an integer or real and then "what" decides what this value means
     "what" can then be Weeks,days,hours,minutes,seconds,hundredth

   F$DATE returns a symbol of type DATE

  examples

  DIX>A = F$DATE("TODAY")
  DIX>SHO SYMB A
  A == "23-OCT-2003 12:23:51.09"

  DIX>A = F$DATE(1.3,"HOURS")
  DIX>SHOW SYMB A
  A == "0 01:17:59.99"

4 F$EDIT

   F$EDIT(string,"WHAT[,WHAT..]")
   Argument 1 : string  : The string to be edited
   Argument 2 : string  : The control string containing
                          COM[press]	replace all multiple blanks/tabs by one
                          COL[lapse]    Remove all blanks
                          T[rim]        Remove trailing blanks
                          UP[percase]   Make all chars uppercase
                          L[owercase]	Make all chars lowercase
                          UN[comment]	Remove comment "!" char
   If the string contains "", then the part within "" is untouched.

   Result : string : The edited string 
4 F$ELEMENT

   F$ELEMENT(number,char,string)
   Can be abbreviated to F$ELEM

  Return the 'number'th part of string "string" separated by "char"
  If number<0 the result will be the last but 'number'th part
  The first element of the string has number 0.
  Example
  
  F$ELEMENT( 2,"|",A|B|C|D|E") returns C
  F$ELEMENT(-2,"|",A|B|C|D|E") returns D

  arg1 is integer
  arg2 is character (only first char used)
  arg3 is character
  Result is character
4 F$ENUMERATE
   F$ENUMERATE(index[,mask])

  index : Integer  : the index'th match is returned
  mask  : Character: Pattern match for the name
                       Supports * and %.

  Returns the next fieldname that matches "mask"

  Example
   DIX>index = 1
   DIX>loop:value =F$ENUMERATE(index,"BYT")
   DIX>if (value <> "") then
   DIX>  say "Found name ",value
   DIX>  index = index + 1
   DIX>  goto loop
   DIX>endif
  
4 F$EXISTS
  F$EXISTS("name")
  Can be abbreviated to F$EXIS 
  Deliver true if name is an existing symbol

4 F$FAO
  F$FAO(controlstring[,parameter[,paramter...]])

  Like the DCL F$FAO, format a string
  controlstring : char
  parameter     : either integer, character or data.
  Output        : String

4 F$EXTRACT

  F$EXTRACT(bpos,nkar,string)
  Can be abbreviated to F$EXTR

  Extract part of the string (like DCL F$EXTRACT)
  If bpos is <0 the bpos will be taken from the end of the string
  The first char of the string is at position 0.

  Examples
  F$EXTRACT(2,3,"ABCDEF")   => CDE
  F$EXTRACT(-2,1,"ABCDEF")  => E

  arg1 is int
  arg2 is int
  arg3 is character
  result is character

4 F$EXTV
   F$EXTV(pos,size,base)

   Extract some bits (sign extended) from a source
   pos  (integer): the position from the base
   size (integer): Max number of bits (no more than 32)
   base (any)    : Source
   The result is an integer

4 F$EXTZV
   F$EXTZV(pos,size,base)

   Extract some bits (zero extended) from a source
   pos  (integer): the position from the base
   size (integer): Max number of bits (no more than 32)
   base (any)    : Source
   The result is an integer

4 F$FEXISTS
  F$FEXISTS("name")
  Can be abbreviated to F$FEXI
  Deliver true if name is an existing field

4 F$FIELD

  F$FIELD(fieldname,what)

  Return info about a fieldname

  what can be
  EXISTS    : Return true or false whether the fieldname exists
  SIZE      : Returns the size (IN BITS) of the field
  OFFSET    : Return the byte offset
  BITOFFSET : Return the bit offset 
  TYPE      : The type of the field
  FIELD     : Return true if the field is in a bit-range.

4 F$FTYPE
  F$FTYPE("name")
  Can be abbreviated to F$FTYP
  Deliver the type of an existing field
    many possibilities (see the help about file types)

  This statement looks like the DCL F$TYPE, but it's argument must be
  a string between quotes.

4 F$GETDVI

  Result = F$GETDVI(device,what)
  Device : char string containing the device name
  what   : The item you want
  
  Result is depending on the what
  What     Resulttype  
  MAXBLOCK  Integer   The size of the disk
  MAXFILES  Integer   Maximum number of files
  EXISTS    Logical   If the device exists TRUE else FALSE
  BLNRFILE  Integer   The record number of the fileheaderentry of the file
                      with fileid 0 in INDEXF.SYS. The record number in 
                      INDEXF.SYS of a file with fileid (12345,5,6) = 
                      F$GETDVI("disk","BLNRFILE") + 12345 
                      You muset have READ access to the index file.
4 F$ENVIRONMENT
  F$ENVIRONMENT("What")

  Report some environment info

  What        Type   Meaning
  DEPTH       Int    Command procedure depth
  PROCEDURE   Char   Name of command procedure
  PROMPT      char   The current Prompt string
  INTERACTIVE Log    Interactive mode
  MESSAGE     Char   The curtent message mode
  ON_SEVERITY Char   The current on level
  ON_ACTION   Char   The current on action

4 F$FILE

  F$FILE("arg"[,index])
  Return info about the 'indexth' file. If index is not specified
  the current file is used. Index is either a number of a string that
  will be matched against the tag of the file.

  arg         Meaning          Result Value
  ORG         Fileorganization Char   IDX REL SEQ BLK(blockmode)
  NOK         Numberofkeys     Int    Number of keys (0 for nonindexed files)
  KEY         Currentkey       Int    Current key    (0 for nonindexed files)
  NAME        Filename         Char   Filename

  DESCRIPTION Description info
  For the description info two more arguments are allowed
  F$FILE("DESCRIPTION",[fileindex],[what],[desindex])
   what     : What information is returned
              NAME : The full name of the description
              TAG  : The tag of the description
   desIndex : The index of the description (default=current). 
              Desindex is either a number, or a string that will be matched 
              agains the tag of the description

  Examples 

  $dix/int sysuaf/des=(sysuaf,.dir),alpha.dir/des=(.dir,profile)/mul
  %DIX-I-USINGFIL, Using file SYS$COMMON:[SYSEXE]SYSUAF.DAT;1/NOMOD
  %DIX-I-USINGDES, Using description DSA0:[STUBBE.PROGRAMS.DIX]DIX_DES.TLB;88(SYSU
  DIX>sh file/all/des
  C TAG      Type    Filename                                       Size
  * SYSUAF   IDX     SYS$COMMON:[SYSEXE]SYSUAF.DAT;1                  48
   * SYSUAF  Descr   SYSLIB(SYSUAF)
     DIR     Descr   SYSLIB(.DIR)
    ALPHA    SEQ     SYS$SYSDEVICE:[STUBBE.PROGRAMS.DIX]ALPHA.DIR;1   15
   * DIR     Descr   SYSLIB(.DIR)
     PROFILE Descr   SYSLIB(PROFILE)
  * means the current file
  DIX>say f$file("NAME")	  !returns the current file name
  SYS$COMMON:[SYSEXE]SYSUAF.DAT;1
  DIX>say f$file("NAME",2) or
      say f$file("NAME","ALPHA")  !both return the name of the second file
  SYS$SYSDEVICE:[STUBBE.PROGRAMS.DIX]ALPHA.DIR;1
  DIX>

4 F$DESCRIPTION
  F$DESCRIPTION(index)
  
  Return info about the loaded descriptions
  Index is a symbol,of type integer
  Return value is the name of the loaded description (char)

4 F$ICHAR
  F$ICHAR(character) 
  Can be abbreviated to F$ICHA
  The argument must be exactly one character. 
  Result is an integer with the ascii-value of the argument.

4 F$INSV

    F$INSV(source,pos,size,base)
  Insert bits from source into base and return the 
  changed value (base is unchanged)
   source (integer) : the source of the bits
   pos  (integer)   : the position from the base
   size (integer)   : Max number of bits (no more than 32)
   base (any)       : Target
   The result is a the same type as base.

 Example
  k = 15
  newval = f$insv(15,4,4,k)
  Returns the value (type integer like k) of 255

4 F$LOCASE

  F$LOCASE(STRING) Result is a string with all letters (a-z) lowercased.
  Can be abbreviated to F$LOCAS

  argument and result is character
4 F$LOCATE

  F$LOCATE(sourcestring,substring[,algorithm][,case])
  Can be abbreviated to F$LOCAT

  Find a substring in a string
   Algorithm can be VMS or UNIX
     VMS  : *     : Matches all substrings (0 or more chars)
            %     : Matches exactly one char
     UNIX : *     : matches all substrings (0 or meer chars)
            %     : matches exactly 1 char
            [abc] : Matches a "a" or a "b" or a "c"
            [-abc]: Matches anything except a,b,c
            [a-z] : Matches all letters (a-z)
            [-a-z]: Matches anything except letters
            'a    : Char "a" is not longer a special char ([*%' etc)
            ~     : If in front of the searchstring , the searchstring must be in the
                    beginning of the line, if at the end of the searchstring,
                    the searchstring must be at the end of the line
            !     : Matches one or more whitespace chars
  Case can be CASE_SENSITIVE or NOCASE_SENSITIVE

  sourcestring, substring and algorithm are strings
  Result is integer. The first position is 0.
                     If substring is not found F$LENGTH(sorucestring) is returned


4 F$MATCHWILD

   F$MATCHWILD(Candidatestring,patternstring[,algorithm][,case])
   Can be abbreviated to F$MATCH
   Algorithm can be VMS or UNIX
     VMS  : *     : Matches all substrings (0 or more chars)
            %     : Matches exactly one char
     UNIX : *     : matches all substrings (0 or meer chars)
            %     : matches exactly 1 char
            [abc] : Matches a "a" or a "b" or a "c"
            [-abc]: Matches anything except a,b,c
            [a-z] : Matches all letters (a-z)
            [-a-z]: Matches anything except letters
            'a    : Char "a" is not longer a special char ([*%' etc)
            ~     : If in front of the searchstring , the searchstring must be in the
                    beginning of the line, if at the end of the searchstring,
                    the searchstring must be at the end of the line
            !     : Matches one or more whitespace chars

  Case can be CASE_SENSITIVE or NOCASE_SENSITIVE

   If candidatestring matches patternstring

  arguments are character, return value is logical

4 F$MESSAGE
   F$MESSAGE(integer[,fields])
   Can be abbreviated to F$MESS

   Returns the message text from the integer
   The fields parameter is optional and selects the specific parts
   of the message. 
   The value is a bitmask
   bit 0 [1]: Text part
   bit 1 [2]: Identification
   bit 2 [4]: Severity
   bit 3 [8]: Facility

   The value must be between 0 and 15.
 
4 F$LENGTH

  F$LENGTH(string) will return the length of the string (including blanks)
  Can be abbreviated to F$LENG

  argument is character, result is integer
4 F$RANDOM
   F$RANDOM([argument])
   Return a random number

   Argument : integer : Return an integer value 0..argument-1
              Real    : Return a real value 0<=result<argument
   If argument is not specified it is defaulted as 1.0

4 F$TIME

  The argument selects the part of the date/time to select.
  Syntax
   F$TIME([what[,time])

  Time can be either a string containg a valid vms date-time 
  or a date type symbol. It time is not specified, the current date/time
  is used.

  Return value is character for

  F$TIME()           Date/time
  F$TIME("DATE")     The date
  F$TIME("TIME")     The time
  F$TIME("MONTHASC") The name of the month

  Return value is integer for
  F$TIME("YEAR")     The year
  F$TIME("MONTH")    The month 
  F$TIME("DAY")      The day
  F$TIME("HOUR")     The hour
  F$TIME("MINUTE")   The minute
  F$TIME("SECOND")   The seconds
  F$TIME("HUNDREDTH")The hundredth
  

4 F$TRIM
  F$TRIM(string) will remove all trailing blanks
  Argument and result are character
  
4 F$TRNLNM
   Translates a logical name and returns the equivalence name string
   or the requested attributes of the logical name specified.
   Format

     F$TRNLNM(logical-name [,table] [,index] [,mode] [,case] [,item])
   See the DCL help about this function

4 F$TYPE
  F$TYPE("name")
  Deliver the symbol type of an existing symbol
    (integer/real/character/logical)

  This statement looks like the DCL F$TYPE, but it's argument must be
  a string between quotes.

4 F$UPCASE

  F$UPCASE(STRING)  Result is a string with all letters (a-z) upcased.
  Can be abbreviated to F$UPCA

  argument and result is character
   
 
4 %BLOC
  
  %BLOC("fieldname")  
  Gives the offset of a field in the datarecord in bits.
  
  Example
  des record for sysuaf
    ...
    ...
    integer*2 uaf$w_logfails
    ...
  end record  
   %BLOC("UAF$W_LOGFAILS") will return 2848 (8*356)
 
4 %DATA
   %DATA([tag])
 
   Returns a string value containg the current record.
   This value can be saved in a symbol to perform a CUT/PASTE
   function. 
   The optional tag parameter is the tag of the file. Default is
   the current file

   Example
 
   DIX>a = %DATA()	 !Save the current record contents
   DIX>.. modify record  !do a log modifications
   DIX>PASTE/SYMBOL=a    !Returns the record to its previous state

4 %LOC
  
  %LOC("fieldname")  
  Gives the offset of a field in the datarecord in bytes.
  
  Example
  des record for sysuaf
    ...
    ...
    integer*2 uaf$w_logfails
    ...
  end record  
   %LOC("UAF$W_LOGFAILS") will return 356

4 %RECORDSIZE
  
  %RECORDSIZE([what],[tag])
 
  Return the recordsize of the data in what
  If what is
    "DATA"  Databuffer
    "SAVE"  Save buffer
    "VFC"   VFC buffer
    Default is databuffer
  tag is the optional filetag, default is the current file

3 GOMARK
 
  GOMARK markname

  Return to a previous mark set by MARK.

3 HELP

  Display help, you are doing it now.

3 INQUIRE
  
  INQUIRE symbol [promptstring] [/qualifiers]
  Lets the user give a value to a symbol (like the DCL inquire)
  promptstring is default Data
  Qualifiers can be
  /PUNCTATION (default) append a colon and a space to promptstring
 
  The string will be evaluated, and the symbol will be defined with the result.

3 MARK

  MARK markname

  Place a marker on this record. You can return to this record via the 
  RETURN command. THe default markname is DIXMARK 

  example

  MARK this_rec

  command
  command
  ...
 
  GOMARK this_rec		!return to the record of the MARK
3 NEXT

  Via the NEXT command you can select the NEXT file or description.

  NEXT FILE        :  Select next file
  NEXT DESCRIPTION :  Select next description of the current file.
  NEXT [RECORD]    :  Select the  next record of the current file
  NEXT RECORD Tag  :  Select the  next record of file with tag 'tag'

3 OPEN
 
  Open more files.
  The open command has two syntaxes
  
  1.  OPEN[/qualifiers] file[/qualifiers]
  2.  OPEN[/qualifiers] tag file[/qualifiers]

  Tag is a symbol that can be used to reference the file to.
  Most file commands use the current file, but if you specify a tag
  you can execute the command for a non-current file. DIX will append
  a sequence number to the tag if it is not unique.
  If you do not specify a tag, DIX will assume tag FILE, and append
  a sequence number to make it unique.

  example

  $DIX/INTERACTIVE
  DIX> OPEN vaxdir vax.dir    	!open the file vax.dir and make it current
  DIX> OPEN alphadir alpha.dir	!open the file alpha.dir, but VAX.dir will
                                !remain the current
  DIX> NEXT RECORD alphadir     !read the next record of alpha.dir, but
                                !vax.dir will remina the current file
  DIX> SELECT alphadir          !now alpha.dir is the current
  DIX> CLOSE vaxdir             !close vax.dir
  DIX> CLOSE                    !close the current file (alpha.dir)

4 Qualifiers
/BLOCKED
  /BLOCKED[=blocksize]

  If the /BLOCK qualifier is specified, the file is accessed via BLOCK IO.
  The data transfer is done via a multiple(blocksize) of 512 bytes, and 
  no recordstructure is assumed. This method can destroy file/record
  integrity and should be used only if you know what you are doing.
  Blocksize is default 1 (/BLOCKED), and can have a value 1..63.
  It can be useful for files with undefined recordtype (as the DUMP file).
/LOG

  Display a message when opening the file.

/MODIFY

  If the /MODIFY qualifier is specified, you are allowed to modify
  /delete/insert records, Either in raw mode (BYTE_OFFSET=VALUE) or
  in interpreted mode (file_name=value). If /MODIFY is present
  /INTERACTIVE is assumed.

/DESCRIPTION
  /DESCRIPTION[=name[,name]]
  Give the name of a record description file(s) or module. 
  For more help see the DIX /DESCRIPTION help
![DIX DESCRIPTION]Dix /description help
/ERROR
  /ERROR=label

  If the OPEN results in an error, DIX will jump to the label.
  If the /ERROR qualifier is not specified, DIX will look for the ON condition.
3 PASTE
  PASTE[/qualifiers] [TAG]

  Restore current record values from save area(clipboard) or from a 
  symbol, where it is placed with the CUT command.

  Qualifiers can be
  /SYMBOL=expression  Read the data from an expression. This expression
                      must return a value of the type char.

  Normally you would use this command with
  PASTE/SYMBOL=symbolname, where the symbol was previously filled with
  CUT/SYMBOL=symbolname.

  TAG is optional. If not specified the current file is used, otherwise
  the file specified by 'TAG' is used.

3 PREVIOUS 

  Via the PREVIOUS command you can select the PREVIOUS file or description.

  PREVIOUS FILE        :  Select PREVIOUS file

  PREVIOUS DESCRIPTION :  Select PREVIOUS description of the current file.

  PREVIOUS [Record]     : Select the previous record. This is not supported for
                          indexed/relative files.
  PREVIOUS Record tag   : Select the previous record for file with tag 'tag'
                          This is not supported for indexed/relative files.

3 READ

  READ [/qualifiers]                     read from the current file
  READ [/qualifiers] tag [/qualifiers]   Read from file tag

 Via the READ command, you can select a record.
 For indexed files, the selection is via the /KEY,/EQ,/GE,/GT,/LE,/LT
 qualifiers.
 For all other files, the selection is via the /RECORDNUMBER qualifier
 If for an indexed file neither /EQ,/GE,/GT,/LE,/LT or, for 
 a sequential file /RECORD, is not given, DIX performs a sequential read.

4 QUALIFIERS 
/RECORDNUMBER

  /RECORDNUMBER=number
  
  Select the record to be manipulated. For direct access files or relative
  files, the record can be read direct. For sequential files, the record
  will be found by rewinding and skipping 'number'-1 records.
 
/KEY
  /KEY=nr

  Look for the keyvalue on the specified key. Default is the
  primary key (0).
/LT
  /LT=value

  Look for a record with keyvalue LT the specified value.
  If none of the LT,LE,EQ,GE,GT options is specified, the program
  will start with the first record on the specified key.

/LE
  /LE=value

  Look for a record with keyvalue LE the specified value.
  If none of the LT,LE,EQ,GE,GT options is specified, the program
  will start with the first record on the specified key.
/EQ
  /EQ=value

  Look for a record with keyvalue EQ the specified value.
  If none of the LT,LE,EQ,GE,GT options is specified, the program
  will start with the first record on the specified key.
  This qualifier is not allowed for direct access files.
/GE
  /GE=value

  Look for a record with keyvalue GE the specified value.
  If none of the LT,LE,EQ,GE,GT options is specified, the program
  will start with the first record on the specified key.
  This qualifier is not allowed for direct access files.
/GT
  /GT=value

  Look for a record with keyvalue GT the specified value.
  If none of the LT,LE,EQ,GE,GT options is specified, the program
  will start with the first record on the specified key.
  This qualifier is not allowed for direct access files.

/ERROR
  /ERROR=label

  If the READ results in an error (or an EOF_OF_FILE and /END
  is not specified), DIX will jump to the label.
  If the /ERROR qualifier is not specified, DIX will look for the ON condition.

/END
  /END=label

  If the READ results in an EOF_OF_FILE and , DIX will jump to the label.
  If the /END is not specified, and an END_OF_FILE occurs, DIX will jump
  to the label in the /ERROR statement (if it is specified).
  If neither qualifier is specified, DIX will look for the ON condition.
/TRANSLATE
  /TRANSLATE   Default
  /NOTRANSLATE
  If a read is done with a /KEY=string, the string is checked for the
  occurrence of %DD where DD is a valid HEX number. In this way you
  can enter binary numbers in a string. %% is translated to one %.
  This behaviour is the default, but can be disabled by /NOTRANSLATE

3 REMOVE 

  Remove description mask  
  Remove all descriptions that match 'mask'. After this the first
  description is made the current one (if one is left).
  The descriptions are not deleted, only the link to the current file.

4 qualifiers
/SYSTEM_LIBRARY
  Remove only the description(s) from the system library
/USER_LIBRARY
  Remove only the description(s) from the user library
/FILE
  Remove only the description(s_ from file(s)

3 REWIND
    REWIND                      current file
    REWIND /KEY=keynumber	current file, Indexed file only
    REWIND tag                  file with tag "tag"
    REWIND tag /key=keynumber   file with tab "tag", indexed file only

  Rewind the file and read the first record . For indexed files you can 
  specify the key to rewind on.

3 SEARCH

  SEARCH[/qualifiers] searchmask

  Search data in record (not a record search).
  Display those fields that contain the sear-string
  
4 qualifiers
/RAW
 Display data in raw (non description) mode. In this mode the qualifiers
  /WORD, /BYTE, /LONG, /HEX are significant. Default is the /LONG.
  Offset can be specified as byte_offset[.bit_offset]
  
/WORD

  Display data in words. Valid only in /RAW mode.
/BYTE

  Display data in bytes.  Valid only in /RAW mode.
/LONG

  Display data in longwords. This is the default in /RAW mode.
  Valid only in /RAW mode.

/UNSIGNED
  Display integers as unsigned. Not used for /HEX.
/HEX

  Interpret the value in HEX mode.
/COMPRESS

  Do not display fields with "empty" values (0 for binaries and space for text)
/OUTPUT
 /OUTPUT=Filename

  Print the output to a file.
/SCREEN
 /SCREEN
 /NOSCREEN (Default)
  Display the data in an SMG window, that allows you to scroll through it.
  See also SET PAGED SCREEN
/PAGED
 If the output is printed to the terminal, the output is printer
  per page, and the user must type a return to continue
  
3 SELECT
  SELECT thing name

  SELECT FILE name
  Make the first file that matches 'name' to the filename or that has a tag
  'name' the current file
 
  SELECT DESCRIPTION name
  Make the first DESCRIPTION that matches 'name' the current description for
  the current file

3 SET
  
  Set some things

 
4 DISPLAY
  Set default display parameters
  These setting can be overruled by qualifiers in the EXAMINE command.
 
   Syntax : SET DISPLAY par[,par...]

  Where par can be
  
  [NO]HEX       : Set or clear HEX display mode
  [NO]OFFSET    : Set or clear display offsets
  [NO]HEXOFFSET : Set or clear HEX display of offsets
  [NO]COMPRESS  : Set or clear compress mode
  BYTE          : display raw data in byte mode
  WORD          : display raw data in word mode
  LONGWORD      : display raw data in longword mode
  UNSIGNED      : display raw data (if not in hex mode) as unsigned integers.

4 EDITOR
  SET EDITOR which
  Define your editor for editting description records
  Possible options are
   EDT      Use EDIT/EDT
   INTERNAL Use an internal editor (simple but fast)
   TPU      Use EDIT/TPU

4 MESSAGE
 
  Change the way dix displays error messasges

5 qualifiers
/FACILITY
  /FACILITY
  /NOFACILITY

  Set or clear the facility part
/IDENT

  /IDENT
  /NOIDENT

  Set or clear the ident part
/SEVERITY
  /SEVERITY
  /NOSEVERITY

  Set or clear the severity part

/TEXT
  /TEXT
  /NOTEXT

  Set or clear the text part
/NONE
  Clear all message flags
/ALL
  Set all message flags

4 ON

  SET ON
  SET NOON
 
   Like DCL, the SET NOON ignores errors, and let the user check these
   errors by examining $STATUS.

4 PAGED_MODE
   SET PAGED NO
   SET PAGED YES
   SET PAGED SCREEN

   Set/clear the paged mode for output. Page_mode screen will display
   the text in a window to allow easy scrolling (Uses SMG)


4 PROMPT
  Change the default prompt.

  SET PROMPT string
   If the string contains a # sign, this # will be replaced by _level
   if the commandfile depth is >1
   The default prompt is DIX#>, which will be
     DIX>   at level 1
     DIX_1> at level 2 etc.

 
4 SCREEN_MODE

   Change mode to full-screen mode.

4 STRICT

  Normally DIX is not very strict in the symbol handling.
  You can define new symbols by typing
  1. a=10 (define the symbol a , type integer, value 10)
  and then say
  2. a="SKLFG" (redefine a to type character, value "SKLFG"

  DIX has two levels of more strict behaviour
  /TYPING :      Once a symbol is created, you cannot change the type anymore
                 In the example above you can do 1. but not 2.
  /DECLARATIONS: All symbols have to be declared before usage
                 This also disallows calling subroutines or @ files
                   and not having the same number of arguments 
                   defined and declared.
4 TERMINAL
 
   SET terminal /line_editing
   SET terminal /noline_editing

   Enable/disable line editing. In line_editing mode the function keys
   f6-f14 cannot be used for key definitions.

4 VERIFY
 
  Set verify  	Set verify mode on
  Set noverify  Clear verify mode

  In verify mode all lines read from the command procedure are echo'd to
  the terminal.
3 SHOW

  Show all kind of things.

  SHOW File[/all][/full][/description]
                          Show file information
   
  SHOW Description        Show current description from internal datastructure
  SHOW Description/SOURCE Show current description from source file/module
  SHOW Description/EXPAN  Show current expanded description 
  SHOW Parameter          Show parameters

  SHOW Symbols		  Show defined symbols
  SHOW Display            Show default display parameters (HEX,Number,raw etc)
  SHOW Terminal           Show the terminal setting /[NO]LINE_EDITING

  SHOW Message            Show the current message settings
  SHOW Paged              Show the current paged mode

  SHOW version            Show the current version of DIX

4 description

  Show the description information
5 qualifiers
/all
  show description/all
 
  Display a list of descriptions of the current file. The current 
  description is signaled by an * in the first column.

/expanded
  show description/expanded

  Show the expanded desciptors for this record.
  You can use /FULL to display more info.  
/loaded
  show description/loaded 
  
  Show all loaded descriptors.

/full
  show description/full
 
  Show all info about the description. See the /source qualifier.
/source

  Show the original source of the description, instead of the
  interpreted one.

/paged
  Display the data per page (on terminal only)

/output
  /output=filename
  Print the output to the file "filename"
/SCREEN
 /SCREEN
 /NOSCREEN (Default)
  Display the data in an SMG window, that allows you to scroll through it.
  See also SET PAGED SCREEN
4 DISPLAY_MODE

  SHOW DISPLAY_MODE

  Show the current setting of the display mode.
4 EDITOR

  SHOW EDITOR

  Show the current setting of the editor type.

4 FILE

  Show file [/qualifiers]
 
  Show the file information

5 qualifiers
/all
  show file/all
 
  Display a list of all opened files. The current file
  is signaled by an * in the first column.
/full
  show file/full
 
  Show all info about the file(s).
/paged
  Display the data per page (on terminal only)

4 KEYS

  SHOW KEYS[/STATE=state]
  Display the (interactivemode) key definitions
   [with state="state"]
4 PAGE_MODE

  SHOW PAGE_MODE

  Show the current setting of the paging mode.
  
4 PARAMETERS

  Show parameters [mask] [/hex]

  Show all parameters

4 SKEYS

  Show the key definitions for the screen mode.

4 symbols

  Show symbols [mask] /hex

  Display all defined symbols [in hex]

  Show symbols/statistics[/full[/all]] 
  Show statistical information about the symbol table
4 STRICT

  SHOW STRICT

  Show the current setting of the strictsetting.

4 TERMINAL

  SHOW TERMINAL

  Show the current setting of the terminal settings.
3 SPAWN
  SPAWN [Commandline]

  Create a subprocess, and execute  'commandline'. If commandline is not
  present, you can enter commands interactively until you type LOGOUT.

3 SUBSTITUTIONS

  DIX will try to do symbol-substitution.
  If a line contains a name enclosed in ''s, DIX will substitute the symbol
  by its value. If the symbol is not found, DIX will substitute an empty 
  string.

  In a String enclosed by "" the first ' must be a double one (as in DCL).
  Together with the IF and GOTO you have some scripting capabilities
  Example

  cnt = 0
  Loop:
  examine field_'cnt'
  cnt = cnt + 1
  if (cnt < 10) goto loop

  Will display field_1 up to field_10  

3 SYMBOLS

  You can define symbols.
  Syntax
  symbolname = expression
  Symbolname can have upto 32 chararacters. The first must be
  a-z, and the remaining a-z 0-9 $ or _.

  DIX will do symbol-substitutions with the ' character. (See SUBSTITUTIONS)


  Dix will define four/five predefined symbols.

  $STATUS      Containing the status of the last command
  $SEVERITY    Containing the severity status of the last command
  $FILE        Containing the current file (can be empty)
  $DESCRIPTION Containing the current descriptor (can be empty)
  Inside a SUBROUTINE or @'ed' file there is one more symbol
  $NRARGS      Containing the number of arguments

  Symbols can have five types

  Logical
  Integer
  Character
  Real
  Date

  If you create a symbol without declaring it, the symbol is globally
  visable, except the arguments to a call or @.
  You can declare symbols at any @file level and within any loopstructure
  (FOR/ENDFOR,WHILE/ENDWHILE etc.)
  The symbols are local to that level (and all levels included) and will
  be deleted when the level (@file or loopstructure) exits.

  If a local symbol has the same name as a global symbol, the global symbol
  will be inaccessible.

  Symbol declaration can be done with the 
  INTEGER,REAL,CHARACTER,LOGICAL and DATE command.

  The setting of the STRICT mode has influence on which symbols are seen
  f.e. with strict/local, symbols from outer levels are NOT seen. This
  forces you to declare all symbols before using them.
  See the help about the SET STRICT command

  Example
 
  a = 10
  k = 12
  for k=1,10		!K is also a local symbol in the for block
   integer a=40		!declare an integer local symbol a (with value 40)
   a = 20		!a(local) has the value 20
   say "a=''a'"         !a has the value 20   
   say "k=''k'"         !will have the value 1..10
  endfor
  say "a=''a'"          !a still has the value 10   
  say "k=''k'"          !k still has the value 12

3 TRUNCATE

  TRUNCATE newreclength		set recl for current file
  TRUNCATE tag newreclength	set recl for fiel with tag "tag"

  Set new recordsize. Allowed only for Indexed and relative files, if they
  do not have the recordattribute FIXED.

3 UNDO
  UNDO         Undo changed for current file
  UNDO tag     Undo changed for file with tag "TAG"

  Undo all changes made to the current record.

3 UPDATE

  UPDATE [tag]

  Save changed record to file. If no parameter is specified, the current
  file is updated, else the file with tag "tag"
	
3 WAIT
  
  WAIT expression

  Wait for a specific time, the expression can be integer or real
  and will be interpreted as seconds.

2 KEY_MAPPING
  Dix uses key mapping. In the Screenmode (SMG)Keys are mapped to 
  dix_functions. DIX has a default map, but you can override it in 
  the startup_file.

  As you can see below, this mapping is not very nice so you can adapt this
  mapping to your own needs. See the help about the STARTUP file

3 DIX_functions

  Dix has the following functions
  Move functions
   key_up          one line up
   key_down        one line down
   key_left        one pos left
   key_right       one pos right
   key_prev        screen up
   key_next        screen down
   key_top         first line
   key_bot         last line
   key_set_forw    set forward mode on find
   key_set_backw   set backward mode on find
   key_page        page command either forw or backward depending on mode

   key_find        search in display for text string
   key_find1       Ask search string and the key_find
   key_binasc      toggle ascci/bin display in raw_mode
   key_do          save changes to record
   key_save        Save to save area
   key_restore     Restore record from save area
   key_contdis     continously display description
   key_getfields   get data through menu for bit-fields
   key_viewvfc     View/modify vfc data
   key_help        display help

  Field modify functions
   key_enter       enter and terminate input in field input
   key_first       goto first char in line in field input
   key_last        goto last char in line
   key_erase       erase input field
   key_delete      delete character on input
   key_toggle      toggle insert/overstrike

  General
   key_cancel      cancel (search) action
   key_dispall     display all descriptions of the data
   key_editdes     edit description file
   key_prev_field  previous field on input
   key_fileinfo    file (RMS) info
   key_print       print display to file
   key_select      select a field from the (file of description) list
   key_swap_num    Toggle offset display (none/hex/decimal)
   key_byte        Display data in bytes (raw mode)
   key_word        Display data in words (raw mode)
   key_long        Display data in longwords (raw mode)
   key_compres     Toggle compres mode (do not display "empty" fields)
   key_hexdec      Toggle hex/decimal display
   key_newreclen   Set record length
   key_viewdes     View description from file
   key_repaint     repaint screen
   key_viewdesc    View description in memory
   key_swap_dis    toggle description/raw mode
   key_abort       Abort changed to record
   key_remove      Delete current record (idx /rel file only)
   key_nextdes     Next description file
   key_prevdes     Prev description file
   key_dirdes      Directory description file
   key_ask_key     Ask for new key in the current file
   key_next_rec    Next record in the file
   key_prev_rec    Previous record
   key_put         Insert new record
   key_find_rec    Find data in in file (search)
   key_find_rec1   find data in file , but ask for search string first
   key_next_file   next file (if in multi_file mode)
   key_prev_file   previous file(if in multi_file mode)
   key_dir_file    dir file  (if in multi_file mode)
   key_exit        Exit program
   key_rfa_restore return to previous set rfa
   key_modechange  toggle screen/interactive
   key_follow_link Follow the link to another file
   key_back_link   Retrun to the original file after a key_Follow_link
   key_ch_width    Toggle screen width between 80 and 132 characters

3 Default keymapping
  The default keymapping is :

  define/skey pf1/set_state=GOLD ""
  define/skey pf4/set_state=BLUE ""
  define/skey up          key_up   
  define/skey down        key_down 
  define/skey left        key_left 
  define/skey right       key_right
  define/skey prev_screen key_prev 
  define/skey up          key_prev       /IF_STATE=GOLD 
  define/skey next_screen key_next 
  define/skey down        key_next       /IF_STATE=GOLD 
  define/skey prev_screen key_top        /IF_STATE=GOLD 
  define/skey next_screen key_bot        /IF_STATE=GOLD 
  define/skey kp8         key_page
  define/skey pf3         key_find 
  define/skey pf3         key_find1      /IF_STATE=GOLD 
  define/skey ht          key_binasc
  define/skey f8          key_contdis
  define/skey f9          key_save
  define/skey do          key_do   
  define/skey help        key_help
  define/skey pf2         key_help
  define/skey ctrla       key_toggle
  define/skey f14         key_toggle
  define/skey f14         key_modechange /IF_STATE=GOLD 
  define/skey ctrle       key_last
  define/skey ctrlh       key_first
  define/skey f12         key_first
  define/skey cr          key_enter
  define/skey enter       key_enter
  define/skey ctrlx       key_erase
  define/skey f13         key_erase
  define/skey lf          key_erase
  define/skey ctrlc       key_cancel
  define/skey kp4         key_set_forw
  define/skey kp4         key_set_forw   /IF_STATE=GOLD 
  define/skey kp5         key_set_backw
  define/skey kp5         key_set_backw  /IF_STATE=GOLD 
  define/skey select      key_select
  define/skey uppercase_s key_dispall    /IF_STATE=GOLD 
  define/skey delete      key_delete
  define/skey uppercase_e key_editdes    /IF_STATE=GOLD 
  define/skey uppercase_f key_fileinfo   /IF_STATE=GOLD 
  define/skey uppercase_z key_follow_link/IF_STATE=GOLD 
  define/skey uppercase_z key_back_link  /IF_STATE=BLUE 
  define/skey ctrlr       key_repaint
  define/skey ctrlw       key_repaint
  define/skey uppercase_g key_getfields  /IF_STATE=GOLD 
  define/skey uppercase_p key_print      /IF_STATE=GOLD 
  define/skey uppercase_y key_viewvfc    /IF_STATE=GOLD 
  define/skey uppercase_o key_swap_num   /IF_STATE=GOLD 
  define/skey f20         key_swap_num
  define/skey uppercase_b key_byte       /IF_STATE=GOLD 
  define/skey uppercase_w key_word       /IF_STATE=GOLD 
  define/skey uppercase_w key_ch_width   /IF_STATE=BLUE
  define/skey uppercase_l key_long       /IF_STATE=GOLD 
  define/skey uppercase_c key_compres    /IF_STATE=GOLD 
  define/skey uppercase_h key_hexdec     /IF_STATE=GOLD 
  define/skey uppercase_t key_newreclen  /IF_STATE=GOLD 
  define/skey uppercase_v key_viewdes    /IF_STATE=GOLD 
  define/skey uppercase_v key_viewdesc   /IF_STATE=BLUE 
  define/skey ctrlw       key_repaint    /IF_STATE=GOLD 
  define/skey ctrlr       key_repaint    /IF_STATE=GOLD 
  define/skey uppercase_a key_swap_dis   /IF_STATE=GOLD 
  define/skey f19         key_swap_dis
  define/skey do          key_abort      /IF_STATE=GOLD 
  define/skey remove      key_remove
  define/skey uppercase_r key_remove     /IF_STATE=GOLD 
  define/skey uppercase_x key_nextdes    /IF_STATE=GOLD 
  define/skey uppercase_x key_prevdes    /IF_STATE=BLUE 
  define/skey uppercase_d key_dirdes     /IF_STATE=GOLD 
  define/skey f9          key_restore    /IF_STATE=GOLD 
  define/skey f17         key_ask_key
  define/skey uppercase_k key_ask_key    /IF_STATE=GOLD 
  define/skey f18         key_next_rec
  define/skey f18         key_prev_rec   /IF_STATE=GOLD 
  define/skey uppercase_n key_next_rec   /IF_STATE=GOLD 
  define/skey uppercase_n key_prev_rec   /IF_STATE=BLUE 
  define/skey insert_here key_put
  define/skey uppercase_i key_put        /IF_STATE=GOLD 
  define/skey find        key_find_rec
  define/skey find        key_find_rec1  /IF_STATE=GOLD 
  define/skey uppercase_j key_next_file  /IF_STATE=GOLD 
  define/skey uppercase_j key_prev_file  /IF_STATE=BLUE 
  define/skey uppercase_q key_dir_file   /IF_STATE=GOLD 
  define/skey f10         key_exit
  define/skey ctrlz       key_exit
2 DIX_parameters

  The following limits apply to DIX.

  Number of open files          : Unlimited*
  Number of descriptions/file   : Unlimited*

  Interactive mode
   Number of commmandfile levels : 65536
   Number of if/for/while levels : 32767
   Symbolnames                   : 32 characters
   Labelname length              : 32 characters
   Follow history                : 16

  Screen mode
   Number of screen key definitions : 200

  Descriptions
   Fieldnames           : 32 characters/level
   Total name length    :512
   Number of dimensions :  3 
   Structure levels     : 10
   Union levels         :  4

  *Unlimited means : limited by process quota, not DIX.
