previous

DIX INTERACTIVE_COMMANDS SHOW SUBSTITUTION


  Show the current setting of the symbol substitution

   VERB        : Try to substitute the verb (like DCL does)
   SYMBOLS     : Try to substitute 'text' to the value. If the expression
                  fails, DIX will signal an error if /SYMBOL=SIGNAL, and
                  will quietly remove the '' if /SYMBOL=QUIET
   DESCRIPTION : Try to substitute 'text' to the value. If the expression
                  fails, DIX will signal an error if /DESCRIP=SIGNAL, and
                  will quietly remove the '' if /DESCRIP=QUIET
                  Symbol substitution will be done during the read of the
                  description. Future expansion of this description will not
                  change the symbolvalue. You can reread the description
                  via the REREAD DESCRIPTION MASK

DIX INTERACTIVE_COMMANDS SHOW symbols


  show symbol/scope  Show current setting of symbol scoping

  Show symbols[/hex][/decimal][/octal][/binary][/all] -
      [/all_levels][/nospecials] mask

  The qualifiers must be specified before the mask

  Display all defined symbols [in hex, decimal, octal or binary]
  The default is decimal display, but the $STATUS symbol will be displayed
   in hexadecimal by default (and may be overruled)

  If the symbol has dimensions, DIX will only display the individual
  elements if you specify /all also.

  The /nospecials will suppress the display of the built-in symbols

  The /all will display all symbols and is equivalent to a mask of *

  The /all_levels will display the symbol definition at all levels

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

DIX INTERACTIVE_COMMANDS SHOW SYSTEM


   show system [/qualifiers]

   Qualifiers can be
   /process=mask        select on processnames
   /user=mask           Select on users
   /interactive         Select only interactive processes
   /batch               Select only batch processes
   /network             Select only network processes
   /other               Select only other processes
   /subprocess          Show subprocesses
   /state=(state..)     Select on process states (cur,hib etc..)
   /multithread         Show multithread processes
   /continuous=n        Repeat the display every n seconds until you hit ^c
                          n is default 1
   /[no]header          Display a header  default
   /[no]trailer         Display a trailer line , default
   /output=file         Output to file, default sys$output
   /[no]screen          [do not] Use screen mode if possible
   /sort=(sort_item,sort_item...)  Sort on fields and set sort order
            Sort_item can be
                pid          Sort on process id
                name         Sort on process name
                state        Sort on state
                priority     Sort on priority
                io           Sort on IO
                cpu          Sort on cputime
                pagefaults   Sort on pagefaults
                memory       Sort on memory usage
                forward      The next item will be sorted in ascending order
                reverse      The next item will be sorted in desending order
         example : /sort=(state,reverse,name) sort on state and descending name

   If continuous is specified, and the output file is a terminal,
     DIX will display in screenmode, type Help or F2 for possible commands there
   If you do not want the screenmode, even is the output is a terminal
     use /noscreen

DIX INTERACTIVE_COMMANDS SHOW TERMINAL


  SHOW TERMINAL

  Show the current setting of the terminal settings.

DIX INTERACTIVE_COMMANDS SHOW TIME


   Show time                  Show date and time
   show time/date             Show date only
   show time/time             Show time only
   show time/boot             Show the boot date/time instead of the current
   show time/uptime           Show uptime (current-boot)

   Show the current,boot,uptime and/or time

DIX INTERACTIVE_COMMANDS SHOW TYPE


  Show types [mask] [/hex] [/name_only] [/statistics]

  Show all types (fieldnames for symbols)
    (description and global)

DIX INTERACTIVE_COMMANDS SHOW VERSION


   Show version [/all]

   Display the current DIX version
   Show the versions and creation dates of all DIX modules

DIX INTERACTIVE_COMMANDS SHOW VALUES


  Show values [mask] [/hex] [/name_only] [/statistics]

  Show all values (modifiable parameters)
    (description and global)

DIX INTERACTIVE_COMMANDS SORT


  A simplified sort command. Only one key is allowed

  $ sort inputfile outputfile [/qualifiers]

  Inputfile : The file to be sorted
  Outputfile: The file to receive the sorted data

  Qualifiers
  /stable        : Keep input records in order on equal keyvalue
  /[NO]duplicates: [dis]Allow multiple records with equal keys
  /STATISTICS    : Show a statistics block

  /KEY=(kval[,kval...])
  And kval is
   position=nn   Start position of the key (first byte is 1), default is 1
   size=nn       Size of key, for character data default the whole record
   Binary        Key is integer, size must be 1,2,4(Default),8,16
   Character     Key is character string (Default)
   signed        Key is signed integer data (Default)
   Unsigned      Key is unsigned integer data, size must be 1,2,4(Default),8,16
   Ascending     Sort in ascending key value (Default)
   Descending    Sort in descending key value
   F_floating    Key is an F-Floating datatype, size must be 0 or 4
   D_floating    Key is an D-Floating datatype, size must be 0 or 4
   G_floating    Key is an G-Floating datatype, size must be 0 or 8
   H_floating    Key is an H-Floating datatype, size must be 0 or 16
   S_floating    Key is an S-Floating datatype, size must be 0 or 4
   T_floating    Key is an T-Floating datatype, size must be 0 or 8

DIX INTERACTIVE_COMMANDS SPAWN

  SPAWN[/dix_symbol[=text][/echo][/output=file][/page]-
       [/privileges=current|authorized][/screen] [Commandline]

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

  If /dix_symbol is present and has a value:
   If the output contains "text", the reset of the line will be
   used for a symbol assignment. This allows you to transfer data from the
   command procedure to DIX.
   the value of /dix_symbol is default #DIX#

  Suppose the procedure myproc.com contains the following commands

  $ node = f$getsyi("nodename")
  $ write sys$output "#DIX#node=""''node'"""
  $ exit

  DIX> spaw @myproc
  #DIX#node="DIXDEV"           !suppose the node name is DIXDEV
  DIX> show symb node
  %DIX-W-NOSUCHSYM, No such symbol NODE

  DIX> spaw/dix_symbol @myproc
  #DIX#node="DIXDEV"            !suppose the node name is DIXDEV
  DIX> show symb node           !now the text node="DIXDEV" has been processed
  NODE="DIXDEV"                 !to define symbol node

  If /noecho is added, the line containing the definition is not printed

  DIX> spaw/dix_symbol/noecho @myproc
  DIX> show symb node           !now the text node="DIXDEV" has been processed
  NODE="DIXDEV"                 !to define symbol node

  If the /privileges value is current or /privileges is not specified, the
   subprocess authorized privileges are taken from the current privileges.
  If the /privileges=authorized is specified, the subprocess authorized
   privileges are equal to the authorized privileges.

DIX INTERACTIVE_COMMANDS 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).

  Example:

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

  Will display field_1 up to field_10

  Symbol substitution can be turned on or off with the
  "set substitution /[no]verb/[no]symbols" command

DIX INTERACTIVE_COMMANDS SWITCH_CASE_ENDSWITCH


DIX INTERACTIVE_COMMANDS SWITCH_CASE_ENDSWITCH SWITCH_SYNTAX


  Syntax

   SWITCH[/FALL_THROUGH] expression [fieldnames]
     CASE value1                !if fieldnames present you may use a name
       statement(s)
     CASE value2[,value3...]      !multiple values are allowed
       statement
       statement
     CASE
       statement(s)
    ENDSWITCH

    The case statement has 5 more qualifiers
      /LT, /LE, /EQ, /GE, /GT    (/eq is default)
      but then the datatype of expression (and valuen) must be int, real or char
      if /eq is present (or no qualifiers set) valuen can also be a range
      as lowval:highval

  The first match is used, following matches will not be found.
   Expression and value must be a valid (scalar) expression, and the
   types and sizes must match

  If no value is specified after the CASE (or if the text is *), this
   will be the default case.
   If the switch is defined with a fieldname, you may also use one of
   the names
  If /FALL_THROUGH is specified, all cases after the selected
   one are used (but not the default case). If /FALL_THROUGH
   is specified, and no case matches, the default case IS used
   and then all the following cases.

  The /fall_through can also be used in the case statement. If the
     /fall_through is already specified on the switch it is ignored.
  If the switch has no /fall_through and the case has, the following
     case statement will also be executed (and that one can also have a
     /fall_through)

DIX INTERACTIVE_COMMANDS SWITCH_CASE_ENDSWITCH Examples


  SWITCH expression
    case value1
      statement1
    case value2/fall
      statement2
    case value3/fall
    case value4/fall
      statement3
   endswitch

   If expression is value1, only statement statement1 is executed
   If expression is value2, only statement statement2 and statement3 are executed
   If expression is value3 or value4, statement3 is executed

  If /FALL_THROUGH is not set, only the first match is
   found, so if multiple cases match the SWITCH value, only
   the first is used. This also applies to the default case

   Example (using the #MESSAGE command, but you could also use
            any data type):

   SWITCH SELECTOR*2
    CASE 10
     #message "value=10"
    CASE 20
     #message "value=20"
    CASE
     #Message "The default case"
    CASE 40
     #message "Value=40"
   ENDSWITCH

  Selectorvalue Result
   10           The text "value=20" is printed
   11           The text "The default case" is printed

   SWITCH/FALL SELECTOR*2
    CASE 10
     #message "value=10"
    CASE 20
     #message "value=20"
    CASE
     #Message "The default case"
    CASE 40
     #message "Value=40"
   ENDSWITCH

  Selectorvalue Result
   10           The text "value=20","value=40" are printed (not the default case)
   11           The text "The default case" and "value=40" are printed

  Example with fieldnames:

   parameter names=",PROD,TEST,DEVELOP"   !1=prod,2=rest,3=develop
   integer*4 phase [#names]               !use the parameter for fieldnames
   switch expression [#names]             !use the parameter for the switch too
   case prod                              !the text prod is found in names
    #message "It is prod"
   case test
    #message "It is test"
   case develop
    #message "It is develop"
   case 10
    #message "It is case 10"
   endswitch

 Examples with the compare qualifier in the case:

  Now case expression can only be int or real or char.
   The case statements can contain the /gt, /ge, /le, /lt qualifiers
    and the case values can contain ranges low:high

  switch expression
   case /gt value1    !case taken if expression is > value1
    #message "value > "
   case /lt value2    !case taken is expression is < value2
    #message "value < "
   case               !default case (must be equal of course)
    #message "value = "
  end switch

  switch expression
   case v1:v2,v3,v4        !ranges only for /eq
    #message "between v1 and v2, or v3 or v4"
   case
    #message "otherwise"
  endswitch

DIX INTERACTIVE_COMMANDS SYMBOLS


  You can define symbols.
  Syntax

  symbolname =[=] expression
  symbolname :=[=] stringvalue

  Symbols can have dimensions, see the help about
      [DIX interactive] symbols tables"

  There are 4 types of symbols

   -normal     : Symbols of any type with up to 3 dimensions
   -indexed    : Symbols of any type with up to 3 dimensions, indexed by a
                  key value (of any type)
   -description: Symbols that contain file data. These symbols are described
                  by a description. The description can be variable.
   -Structures : Symbols that contain fields of possible different type.
                  described by a structure definition. The structure definition
                  is fixed.

  Symbols can be defined at all levels (@files) and at level 0 (global)

  Symbol names can have up to 32 characters and are by default
  not case sensitive, unless DIX is set to case sensitive mode.
  See the help about "set case"
  The first must be a-z or _, and the remaining a-z 0-9 or $ .
   The name may not be TRUE, FALSE, or start with $, % or F$

  DIX will define a number of predefined symbols. See the help about
   predefined_symbols

  Normal symbols can have all types.
  On a few you can do some computation

  They can be declared and used in expressions
    Logical    True/false
    Integer    Signed values of 4/8 bytes long
    Character  Strings up to 65535 characters
    Real       Real (native) format of 4/8/16 bytes
    Date       The OpenVMS date structure (8 bytes)
    Decimal    Fixed decimal string

  Other types can be filled from field values
   so if field_access is a field with type ACL
     access=field_access
   or can be created via the #type[*size]"value" syntax like
     access=#ACE"(id=system,acc=r)"

   Both will create symbol "access" with type ACE, and contents
     the specified ACL value.
   The symbols of the "other types" can only be printed
     (or converted to string via the STRING function)
     No other operators are allowed

   If you reference a symbol (use it) DIX will use the symbol at the
    deepest level. So if a symbol is defined at level 1 and at level 3,
    and we are at level 5, DIX will use the value of level 3.

   If you set a symbol, and DIX is in normal (not dcl_compat) mode,
    DIX will locate the symbol of the deepest level.
    If it is not defined, DIX will define the symbol at the current level.
    So if a symbol is defined at level 3, DIX will change the value at level 3.
    If there is no symbol present, and we are at level 5, DIX will make a
    new symbol at level 5. If you then return to level 4, the symbol will
    be deleted.

    But if DIX is in DCL compatible mode setting the symbol is always done
     at the current level, So in the previous example the symbol will be
     defined at level 5

   If you use the assignment with a double ==, DIX will always change/set
    the symbol at level 0 (global)

  You can declare symbols at any @file level and within any loop structure
   (FOR/ENDFOR,WHILE/ENDWHILE etc.)
   The symbols are local to that level (and all deeper levels included) and will
   be deleted when the level (@file or loop structure) exits.

  Symbol declaration at any level (including the current) can be done with the
    INTEGER,REAL,CHARACTER,LOGICAL,DATE and DECIMAL command,
    or more general with the DECLARE name/type

  See the help about [DIX/HELP] interactive declarations

  The setting of the STRICT mode influences the way symbols are seen.
  I.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 [DIX/HELP] interactive 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

DIX INTERACTIVE_COMMANDS SYMBOLS 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 description (can be empty)
  %OVERFLOW     The last overflow result
  $DIX_VERSION  The ASCII version of DIX (e.g. 8.4)
  $ARCHITECTURE The architecture VAX ALPHA or IA64

  Inside a SUBROUTINE or @'ed' file the following symbols are defined

  $NRARGS      Containing the number of arguments
  $Pn          Containing the 'n'th parameter

  During the evaluation of descriptions three more symbols are defined
  %OFFSET        The current byte-offset in the data record
  %BIT_OFFSET    The current bit-offset in the record
  $PREVIOUSFIELD The value of the previous field converted to ASCII (type=character)
  $PREVIOUSFLD   The value of the previous field (any type)

  During the execution of a DO nn statement the symbol $DOINDEX will
   contain the value of the loopindex (1..nn)

  If a file is open, you can use the
  %RECID       The current keyvalue/record number for the current file

DIX INTERACTIVE_COMMANDS SYMBOLS symbol_substitution


  DIX will do symbol-substitutions with the ' character. (See SUBSTITUTIONS)
  DIX will also try to do symbol-substitution on the verb (like DCL)
      so a symbol exa*mine:=exa/display
      and a later usage like
         exa *user*            ! will translate into
         exa/display *user*

  Symbol substitution for verbs is default ON for commands entered from
  the terminal, and default OFF for command procedures. If verb substitution
  is OFF for the command procedures, DIX can pre-compile the commands in the
  file and make the execution much faster (up to 5 times). If verb substitution
  is ON for command procedures, DIX has to compile each command from the
  file the moment is executed, since the symbol may have changed value.

  Symbol substitution can be turned on or off with the
  "set substitution /[no]verb/[no]symbols[=signal|quiet]/descr[=SIGNAL|QUIET]"
  command and for the command procedures with the @procedure/[no]verbs

DIX INTERACTIVE_COMMANDS SYMBOLS SUBFIELDS

  For all values containing multiple data,
    RBITS,BITS,CHARACTER,xSTRING,(U)INTEGER,BYTEARRAY,COMPLEX,
    UIC,(U)DATE,DELTATIME,CPU,PROTECTION,FILEID,RFA,BKTRFA,RAD50,ACL

  DIX will normally display all data on one line, and
  lets you examine/modify the whole structure in one time.

  Sometimes it may be useful to specify a specific subfield of the whole
  structure. Below is a table of transformation

  Subfields can be used with the
    a. examine command (fieldnames)
        This will display a multiple line display with each subfield
        on a separate line.
    b. Evaluation of fieldnames/symbols.
        This will deliver a table containing the subfield values

  For the following type you can only specify a bit/bytenumber

   CHARACTER,xSTRING  Byte-size character 1..len(string)
   BYTEARRAY          Byte-size byte      1..len(bytearray)
   (U)INTEGER         One-bit integer     0..#bits-1
   RAD50              Byte-size character 1..3
   ACL                The ACE in the ACL

  For the following types you can specify a list of bit values via the
  fieldnames construct [name1,name2,name1]

   RBITS              LOGICAL
   BITS               LOGICAL

  The following fields have predefined subfields

   U(DATE)            Integer  YEAR,MONTH,DAY,HOUR,MINUTE,SECOND,HUNDREDTH
   DELTATIME,CPU      Integer  DAY,HOUR,MINUTE,SECOND,HUNDREDTH
   PROTECTION         Integer  SYSTEM,GROUP,OWNER,WORLD
   FILEID             Integer  FILENR,REVISION,VOLUME
   RFA                Integer  BLOCK,OFFSET
   BKTRFA             Integer  RECID,BUCKET
   PRIVILEGE[*8]      Logical  The normal 39 privilege names
   PRIVILEGE[*4]      Logical  The 12 privileges in the audit log
   COMPLEX            Real     REAL,IMAG

   You may specify a list of either
     a. subfield name masks (between "")
        If the name mask does not contain a wildcard (* or %), DIX will
         match the beginning of the keyword, this may match more than one name.
        If the name mask does contain a wildcard, DIX will select all names
         matching the wildcard.
   or
     a. element numbers
     b. ranges like 1:4
     c. ranges with stride like 1:5:2 or 5:1:-2

   Suppose you have define the following fields

   RBITS*7 UAF$B_PRIMEDAYS -    !value=[t,t,t,t,t,f,f]
          [MONDAY,TUESDAY,WEDNEDSAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY]
   CHARACTER*32 UAF$T_ACCOUNT   !value=TACV

   You can now specify

   UAF$B_PRIMEDAYS{"*T*"} to reference the three one-rlog values
      514.1|UAF$B_PRIMEDAYS{TUESDAY} |True
      514.3|UAF$B_PRIMEDAYS{THURSDAY}|True
      514.5|UAF$B_PRIMEDAYS{SATURDAY}|False

   UAF$T_ACCOUNT{3:5,1}
      54.0|UAF$T_ACCOUNT{3}|C
      55.0|UAF$T_ACCOUNT{4}|V
      56.0|UAF$T_ACCOUNT{5}|
      54.0|UAF$T_ACCOUNT{1}|T

  But also "TEST"{*} will deliver a table of 4 characters
      and 10{*} will deliver a table of 32 bits (if integersize=4)

  The syntax between the {} is
    "*XYZ*": A mask. This only works on fields with fieldnames defined
    "AB"   : Match all names beginning with AB
    "*"    : All elements with a fieldname
    *      : All elements
    4-5    : Element 4..5
    4-*    : Element 4..end_of_field
    *-4    : Element begin_of_field..4
    12     : Element 12 only
    1:5:2  : Element 1,3 and 5.
    5:1:-2 : Element 5,3 and 1

  Subfields can be used on fields (you may use the field value names)
  or normal symbol values

DIX INTERACTIVE_COMMANDS SYMBOLS description_SYMBOLS


  You can declare a symbol to contain a structured datatype.
  You need a description for that. The description can be loaded via the
   OPEN statement (if the file has a description available), or via
  a specific LOAD /description NAME command

  Examples:
  $ DIX/INT SYSUAF  !edit SYSUAF, this makes the SYSUAF description available
  DIX> decl/DESCR=SYSUAF symb_sysuaf !make a new symbol of type SYSUAF, but
                                     !with all data fields 0
  DIX> symb_sysuaf = sysuaf          !copy data from the current record to
                                     !the symbol
  DIX> say symb_sysuaf.uaf$t_Username
  VMSUSER
  DIX> say symb_sysuaf.uaf$q_priv
  CMKRNL,CMEXEC,SYSNAM,GRPNAM,ALLSPOOL,IMPERSONATE,DIAGNOSE,LOG_IO,NOACNT,SETPRV,T
  MPMBX,WORLD,NETMBX,VOLPRO

  DIX> sh symb/all/full symb_sysuaf
  SYMB_SYSUAF=86 descriptions,76 expanded
   SYMB_SYSUAF.UAF$B_RTYPE=0
   SYMB_SYSUAF.UAF$B_VERSION=0
   SYMB_SYSUAF.UAF$W_USRDATOFF=0
   ....
   SYMB_SYSUAF.UAF$W_ACCOUNTS=0
   SYMB_SYSUAF.UAF$R_DEF_CLASS=0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
   SYMB_SYSUAF.USER_DATA=
   DIX> say symb_sysuaf.UAF$L_DFWSCNT
   2000
   DIX> symb_sysuaf.UAF$L_DFWSCNT = 1000
   1000

  you can also load a description and use that as source
   $ DIX/INT
   DIX> LOAD/DESCR SYSUAF          !explicit load SYSUAF description
  And you can use the same statements as above except the
   DIX> symb_sysuaf = sysuaf       !since SYSUAF is not opened.

  Description symbols may have dimensions

  $ DIX/INT SYSUAF
  DIX> decl/des=sysuaf mys(3)=sysuaf  !create a table of 3 elements
                                      !all of them filled with the
                                      !the current record of SYSUAF
  DIX> read/eq="SYSMAINT"       !read the sysmaint record
  DIX> mys(1) = sysuaf          !save it in mys(1)
  DIX> ne re                    !read the next record
  DIX> mys(2) = sysuaf          !save if in mys(2)
  DIX> ne re                    !read the next record
  DIX> mys(3) = sysuaf          !and save it in mys(3)
  DIX> say mys(1).uaf$t_username
  SYSMAINT
  DIX> say mys(2).uaf$t_username
  SYSTEM
  DIX> say mys(3).uaf$t_username
  SYSTEST
  DIX> say mys(1:3).uaf$t_username
  [SYSMAINT                        ,SYSTEM                          ,SYSTEST                         ]

DIX INTERACTIVE_COMMANDS SYMBOLS indexed_SYMBOLS


  You can define a symbol to be indexed by ANY other type.
  You must declare the symbol first. Indexed symbols cannot have dimensions.

   DECLARE/INDEX=CHARACTER[/sort] COUNT/DATE
   Or
   DECLARE/INDEX COUNT/DATE                ! The index is defaulted to character

   DECLARE/INDEX=ACE[/sort] ACECOUNT/INTEGER
   DECLARE/INDEX=INTEGER[/sort] INTCOUNT/ACE

  For the basic types you can also declare an indexed symbol via

   INTEGER/INDEX=CHARACTER[/sort][/case_blind] COUNT

  the /sort tells DIX to keep a sorted list, otherwise the list is
    filled in the order as new (index values are defined.
  The /case_blind tells DIX to uppercase the key before processing

 Suppose we have declared the following

   DECLARE/INDEX=CHARACTER COUNT/DATE

  Defines a symbol COUNT that is indexed by a string (character) and
  contains a numeric variable. After declaring the symbol has no values yet.

  You can assign/update values

   count("today")=1
   count("today")=count("today") + 1
   count("tomorrow") = 2

   The argument must be either the correct index type, or a character string
    that can be converted to the correct index type

  Examples for ACE association type (don't ask if it is useful):

   aclcount(#ACE"(id=system,acc=r)") = 1   !argument type is ACE
   aclcount("(id=system,acc=r)")     = 1   !argument type is character, but
                                           !can be converted to an ACE

  You can reference this value

   show symb /fu count
   say count("today")
   x=count("*")

   show symb /fu aclcount
   x=aclcount(*)

   Indices that have no value yet cannot be referenced, EXCEPT for the
      symbol(idx)=symbol(idx)+value
      symbol(idx)=symbol(idx)-value
      symbol(idx)+=1
      symbol(idx)-=1
      symbol(idx)++
      symbol(idx)--
    type of assignment

   So
    DIX> integer/type=char count
    DIX> say count("a")
    %DIX-W-NOINDEXVAL, No index values matching
    %DIX-E-INVELEM, Invalid element "COUNT("a")"
    DIX> count("a")=count("a")+1
       Or DIX> count("a")+=1
       or DIX> count("a")++
    DIX> say count("a")
    1
    DIX>

   Example for counting words in a file:
    DIX> a=f$read("release_notes.txt",,,"White")
                                          !read all lines and split in words
    DIX> show symbol/full a
    A(Character,Level=1.0)=table(474,18)  !a table of 474 lines with 18 words
    DIX> integer/index=char count          !declare an index symbol
    DIX> for x in a                        !go for all elements in a
    FOR_DIX> count(x)++                     !update a count
    FOR_DIX> end for
    DIX> show symb/fu/all count                !show the result
    COUNT(Fixed-Integer,Level=1.0,index=CHARACTER)=index list of 1327 values
    COUNT("")=4754
    COUNT(""")=4
    COUNT(""A":"Z"")=1
    COUNT(""ABCABC"/"C"")=1
    COUNT(""ABCD"{*}")=1
    COUNT(""DIX/help")=1
    COUNT(""FOR")=1
    COUNT(""GOTO"")=1
    COUNT(""Yes"")=1
    ....
    COUNT("wrong.")=2
    COUNT("you")=17
    COUNT("your")=1
    COUNT("|")=7

DIX INTERACTIVE_COMMANDS SYMBOLS STRUCTURED_Symbols


   Structured symbols are defined by a structure definition.
   This definition must be loaded (LOAD/STRUCT) before a symbol can be defined.
   A structure definition can contain datafields (of any datattype) and
   references to a deeper structure. Unlike description types, the whole
   structure must be fixed (in number of elements), and no control statements
   can be used (as in a description).

   Examples:
    Suppose we have a file DEF_MAIN.STRUCT with the following contents
      integer*4 jan
      character*40 mystr
      real*16 real16val
      integer extra_int
      integer*4 extra2(2,3)

    We can load this structure in memory
    DIX> LOAD/STRUCT DEF_MAIN
    And the declare a symbol of this type
    DIX> DECL/STRUCT=DEF_MAIN myval
    DIX> SHOW SYMB mystr/full/all
    MYVAL(Fixed,Struct=DEF_MAIN,Level=1.0)=10 values
    MYVAL.INDEX(INTEGER*4)=0
    MYVAL.MYSTR(CHARACTER*40)=
    MYVAL.REAL16VAL(REAL_X*16)=0.0
    MYVAL.EXTRA_INT(INTEGER*4)=0
    MYVAL.EXTRA2(1,1)(INTEGER*4)=0
    MYVAL.EXTRA2(2,1)(INTEGER*4)=0
    MYVAL.EXTRA2(1,2)(INTEGER*4)=0
    MYVAL.EXTRA2(2,2)(INTEGER*4)=0
    MYVAL.EXTRA2(1,3)(INTEGER*4)=0
    MYVAL.EXTRA2(2,3)(INTEGER*4)=0

    You can now assign/reference each sub field with the fieldname,
          just like a normal symbol.
    DIX> say myval.extra2
    [[0,0][0,0][0,0]]
    DIX> myval.extra2(1,2)=12
    DIX> say myval.extra2
    [[0,0][12,0][0,0]]
    DIX> myval.extra2(1,*)=34
    DIX> say myval.extra2
    [[34,0][34,0][34,0]]

    Structures may be nested, so suppose there is another file
    DEEP_DEF.STRUCT with the following
      integer*4 i4val
      record /Def_main/ mystruct
      real*4 real4val
    DIX> load/struc deep_def
    DIX> decl/struct=deep_def another
    DIX> show symbol /all another
    ANOTHER=12 values
    ANOTHER.I4VAL=0
    ANOTHER.MYSTRUCT.INDEX=0
    ANOTHER.MYSTRUCT.MYSTR=
    ANOTHER.MYSTRUCT.REAL16VAL=0.0
    ANOTHER.MYSTRUCT.EXTRA_INT=0
    ANOTHER.MYSTRUCT.EXTRA2(1,1)=0
    ANOTHER.MYSTRUCT.EXTRA2(2,1)=0
    ANOTHER.MYSTRUCT.EXTRA2(1,2)=0
    ANOTHER.MYSTRUCT.EXTRA2(2,2)=0
    ANOTHER.MYSTRUCT.EXTRA2(1,3)=0
    ANOTHER.MYSTRUCT.EXTRA2(2,3)=0
    ANOTHER.REAL4VAL=0.0

    As above, You can now assign/reference each sub field with the fieldname,
     just like a normal symbol. You can also reference/assign a complete
     deeper structure
    DIX> say ANOTHER.MYSTRUCT
    [0,,0.0,0,[[0,0][0,0][0,0]]]
    DIX> say/named ANOTHER.MYSTRUCT  !include the fieldnames
    [INDEX=0,MYSTR=,REAL16VAL=0.0,EXTRA_INT=0,[[EXTRA2(1,1)=0,EXTRA2(2,1)=0]
    [EXTRA2(1,2)=0,EXTRA2(2,2)=0][EXTRA2(1,3)=0,EXTRA2(2,3)=0]]]

    DIX> new=another.mystruct
    DIX> show symb new/fu/all
    MYVAL(Fixed,Struct=DEF_MAIN,Level=1.0)=10 values
    NEW.INDEX(INTEGER*4)=0
    NEW.MYSTR(CHARACTER*40)=
    NEW.REAL16VAL(REAL_X*16)=0.0
    NEW.EXTRA_INT(INTEGER*4)=0
    NEW.EXTRA2(1,1)(INTEGER*4)=0
    NEW.EXTRA2(2,1)(INTEGER*4)=0
    NEW.EXTRA2(1,2)(INTEGER*4)=0
    NEW.EXTRA2(2,2)(INTEGER*4)=0
    NEW.EXTRA2(1,3)(INTEGER*4)=0
    NEW.EXTRA2(2,3)(INTEGER*4)=0

    DIX> NEW.MYSTR="String data"
    And assign it into the bigger structure again
    DIX> another.mystruct = new
    DIX> say another
    [0,String data,0.0,0,[[0,0][0,0][0,0]]]

DIX INTERACTIVE_COMMANDS SYMBOLS TABLES


  Symbols can have dimensions (up to 3).
  They can explicitly declared or directly assigned
  Symbols can also be indexed by any other type. See the help about
    DIX symbols associative

  declare table(dim1[,dim2[,dim3]]) [/type[=initial value]]
  a=[[1,2][3,4][5,6]]             Will create a table a(3,2) of integers
  str=["test","test1"]            Will create a table str(2) of strings
  tab3=[[[0,0][0,0]][[0,0][0,0]]] Will create a table tab3(2,2,2) of integers

  dim*         : [low:]high[:increment]   e.g. 10, 1:10, 1:10:3
  type         : Any supported symbol type
  initial value: The initial value (default=0 or "")

  Suppose we have done a
  DIX> declare a(10,10)
  You can assign individual elements like: a[1,2]=10
                 or ranges like:           a[1:5:2,*]=12

  If you do a "show symb a"
  DIX will respond with a= table(10,10)
  DIX will display all elements of the table if you specify the /all
   (the /all must be before the symbolname mask)

  Examples:

  DIX> declare a(4:6,5:10)
  DIX> a(3,1) = 10
  %DIX-W-OUTRANGE, Symbol A index 2 out of range, got 1, expected 5:10:1
  DIX> A(*,5) = 12
  DIX> sh symb a
  A= table(4:6,5:10)
  DIX> sh symb/all a
  A(4,5)=12
  A(4,6)=0
  ....
  A(4,10)=0
  A(5,5)=12
  A(5,6)=0
  ...
  A(6,5)=12
  ...
  A(6,10)=0

  Table assignment
  If we have a table a(4,4,4) we can copy the table to a new one

  x=a              Copy the whole table  to x (4,4,4)

  x=a(*,2,2)       Copy elements 1,2,2 and 2,2,2 to a one
                   dimensional table x(4)
                   If a dimension has only contains one element,
                   it is not counted as a dimension, so you
                   will only have one dimension left, unless
                   you specify the increment with a * (see below)

  x=a(1:2,*,4)     Copy elements 1,1,4, 1,2,4 1,3,4 1,4,4 and
                             2,1,4, 2,2,4 2,3,4 2,4,4
                   to a two dimensional table x(2,4)

  x=a(1:2,*,4:4:*) If you specify a wildcard for the increment
                   with only one value, this dimension will
                   be used, even if it is only one element long
                   So this delivers a table x(2,4,1)

  Expressions can deliver tables
  DIX> say [2,2]
  [2,2]                Return the whole table

  And if an expression returns a table, you can specify which
  element you want to use
   syntax:  (expression)(dims)
   The () around the expression are required.

  DIX> say [2,3,4](3)
  4                    Return element 3 of table [2,3,4]
  DIX> say [[1,2][3,4]](1,*)
  [1,3]                Return (1,*) of [[1,2][3,4]]

  The +,-,* and / operator can be used with tables
   but the tables must be compatible.
   All dimensions must either have the same number of elements
   or one (or both) have only 1. One of the tables may also be a scalar

   so if table a is declared as integer a(2,3,4)
      and table b             as integer b(2) or
                                 integer b(2,3) or
                                 integer b(1,3) or
                                 integer b(2,3,4)
      a+b will work
  but if table b is defined as integer b(3)
      a+b will generate an error (DIFFSHAPE)

DIX INTERACTIVE_COMMANDS TIME


  If you prefix a command with the TIME verb, DIX will output a
  ctrl_t like line after the command. This is a one-shot
  set stat/usage. You cannot abbreviate this command.

  DIX> time sh symb        !execute the command, and then display the usage
  $ARCHITECTURE="ALPHA"
  $DESCRIPTION=""
  $FILE=""
  $NRARGS=0
  $SEVERITY=0
  $STATUS=080187C8
  %OVERFLOW=False
   ELAPSED:    0 00:00:00.00  CPU: 0:00:00.01  BUFIO: 7  DIRIO: 0  FAULTS: 0

DIX INTERACTIVE_COMMANDS TYPE


   TYPE filemask[/qualifiers]

  Filemask is a mask of files to print

  If you specify the filemask as module@[library] or as [library](module),
   DIX will read the module "module" from the (.TLB or .MLB) file "library".
   Both module and library may contain wildcards.
   If no library is specified, DIX will search SYS$LIBRARY:STARLET.MLB
   and SYS$LIBRARY:FORSYSDEF.TLB (if present) by default.

  Type one or more files/modules
   type *.txt        !type all .txt files
   type $acc*@*.tlb  !type all modules matching $ACC* in all
                     !libraries matching SYS$SHARE:*.TLB

  Supported qualifiers are
   The record selection criteria
     /HEAD=n            Type the first n lines
     /TAIL=n            Type the last n lines
     /records=(start=n,end=n)
      The n's can be negative, meaning n from the end of the file

   The columns selection qualifiers
     /COL=(start=n,end=n)
      The n's can be negative, meaning n from the end of the record
     /COL=(field=n[,separator=option])
      The line in fields, and the n' field
      Option can be
         SLASH,COLON,SEMICOLON,SPACE,TAB,BAR,CHARACTER=number
            Split the line by the above named character
      If separator is not present, WHITESPACE is assumed, in this case
         the separator is one or more space/tab

   /FAST              Use the Fast I/O routines. If the file is locked, DIX
                       will switch to /fast automatically.
   /screen            Use screen mode to display
   /paged             Wait after each screen full of text
   /output=filename   Type to a file
   /number            Include a line number for each printed line
   /info=start        Print a line with the filename before each printed file/module
   /info=end          Print a line at the end with #lines, #bytes printed
   /info=both         Print both of the above
   /info              Will be seen as /info=start

DIX INTERACTIVE_COMMANDS TRUNCATE


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

  Set new record size. The newreclength may be larger than the
  original one. Allowed only for Indexed and relative files, if they
  do not have the recordattribute FIXED.
  Newrecordlength must be an integer value (not an expression)
  You CAN use expressions and then let DIX convert the value to text

   Example:
      DIX> newreclength=expression  !compute the new value (must be integer)
      DIX> truncate 'newreclength'

DIX INTERACTIVE_COMMANDS UNDO

  UNDO [/LAST_DEPOSIT]         Undo changed for current file
  UNDO [/LAST_DEPOSIT] tag     Undo changed for file with tag "TAG"

  Undo all changes made to the current record.
  If you specify /LAST_DEPOSIT, only the changes made in the last DEPOSIT
  will be undone. See the DEPOSIT command for more detail

DIX INTERACTIVE_COMMANDS UPDATE


  UPDATE [tag] [/cancel] [/error=label] [/quiet]

  Save changed record to file. If no parameter is specified, the current
   file is updated, else the file with tag "tag"
  If an error occurs you may jump to label 'label', but the buffer
   will still contain changed data, so if try to read another record
   DIX will ask again if you want the buffer.
  If you specify the /cancel (and you have an error), DIX will cancel
   the "dirty" bit, so the next read will not ask you for the update

  The /quiet suppresses the message that the record has been updated

DIX INTERACTIVE_COMMANDS VERB


  VERB allows you to make use of CLD files in DIX.

  Verb has three variants

    VERB/COMPILE[/symbol=symbolname] cldfile

     Parse cldfile to a symbol
      This symbol can be used later by the PARSE statement
      and the lexical functions F$DCL_GET_VALUE and F$DCL_PRESENT
      and the "VERB[/symbol=symbolname] mask" statement
      "Symbolname" is used to store the compiled CLD info and has a
       default value of DEFAULT_CLDTABLE

     This is the same as DIX>set command cldfile

    VERB/DISPATCH[/SYMBOL=symbolname] parameter1,paremeter2...

     If the CLD file has been parsed and the verb/syntax contains
     a routine clause, VERB/DISPATCH will execute a CALL to the
     label specified in the verb/syntax definition.
     The parameters can be specified as on the CALL command.
     See the help there.
      "Symbolname" has a default value of DEFAULT_CLDTABLE
     If the VERB or SYNTAX does not have routine clause, or if the routine
     cannot be found, DIX will issue an error

    VERB[/SYMBOL=symbol][/ADDRESS=number][/DIX][/DCL][/image=filename] verbmask

      Display the source of defined verb(s).
      verbmask is a (possible wildcarded) verb. It may be followed by a
      /qualifier (also wildcarded) to select a specific qualifier/syntax only

      If /DIX is specified, DIX will display the verbs of its
       own command table.

      If /DCL is specified, DIX will display the verbs of the DCL CLD table
       DIX will try to locate the cld table in p1 space, but if that fails
       you must define the address, see below

      If /image is specified, DIX will load the image (default filename
         SYS$SYSTEM:.EXE) in memory and tries to locate the CLD table

      You can also specify VERB/ADDRESS=nnnn. nnnn must be the address
       of a CLD table in memory. If you specify the address of the
       DCL Tables in memory, DIX will display the verbs defined by DCL.
       You can find the address via
         $ ANALYZE/SYSTEM
         SDA> SHOW SYMBOL CTL$AG_CLITABLE
       I could have linked DIX to find this symbol, but that would
       have made DIX very OpenVMS version dependent.
       See also the help about "set clitable"

      If you do not specify /address or /DIX or /DCL or /file, DIX will assume
      a table has been loaded via the verb/compile. The default symbol
      is DEFAULT_CLDTABLE, but it may be changed via the /SYMBOL=symbolname
      This symbol must have been filled via the
        "verb/compile[/symbol=symbolname] cldfile" command

    You can use the following qualifiers
      /depth=n    !n=1..max display upto a certain depth, so less detail
      /verbonly   !display only the verbs

DIX INTERACTIVE_COMMANDS VERB Examples


  Example on using dcl_present/get_value:

      DIX> VERB/COMPILE/SYMBOL=mytable sys$update:acc.cld  !compile acc.cld
      DIX> PARSE/SYMBOL=mytable ACC/FULL x.dat  !parse the command using the table
      DIX> say f$dcl_present("FULL",mytable)   !see if /full is specified
      DIX> say f$dcl_get_value("input",mytable)   !get the value of the first param

 Example about showing CLD definitions:

      DIX> VERB/DIX COMPILE            !show the syntax of the DIX command COMPILE
      DIX> VERB/SYMBOL=mytable *        !show the source of the ACC.CLD file
      DIX> VERB/DCL COPY/FTP           !show the syntax for copy/ftp only

      $ ANALYZE/SYS
      SDA> show symb CTL$AG_CLITABLE        !find DCL Tables in P1 space
      CTL$AG_CLITABLE = 00000000.7FFCD810 :  7AEF35FF.7AE40000
      $ DIX
      DIX> VERB/ADDRESS=%X7AE40000 COPY    !show the DCL copy command

   
  Example on VERB/DISPATCH:

  VERB/COMPILE sys$input                !compile the data to DEFAULT_CLDTABLE
  DECK
      define verb test
       qualifier show, syntax=show_test
       qualifier since,syntax=since_test
       parameter p1
      Define syntax show_test
       routine show_test_routine        !the routine to be called
       parameter p1
       qualifier date
      Define syntax since_test
       routine since_test_routine       !the routine to be called
       parameter p1
       qualifier before,value(type=$datetime)
  EOD
    PARSE test/show/date p1        !parse from the table stored in DEFAULT_CLDT
    VERB/DISPATCH 23,"Today"       !will call show_test_routine with 2
                                   !arguments : integer 23 and string today
    if even($STATUS) then SAY "Unexpected place" !should not happen
    PARSE test/since mypar/bef=1-jan-2010
    VERB/DISPATCH 45,"I want to test" !will call the since_test_routine
                                      !with 2 arguments, integer 45
                                      !and string "I want to test"
    EXIT

!
    SHOW_TEST_ROUTINE: SUBROUTINE arg1,arg2
    say "In show test, arg1=",arg1," arg2=",arg2
    say F$DCL_PRESENT("DATE")
    ENDSUBROUTINE

!
    SINCE_TEST_ROUTINE: SUBROUTINE arg1,arg2
    say "In since test, arg1=",arg1," arg2=",arg2
    say F$DCL_GET_VALUE("BEFORE")
    ENDSUBROUTINE

  Generates the following output

  In show test, arg1=23 arg2=Today
  134320585
  In since test, arg1=45 arg2=I want to test
   1-JAN-2010 00:00:00.00

DIX INTERACTIVE_COMMANDS VERIFY

  verify indexedfile [qualifiers]

  Check all buckets of an indexed file for corruption.

  Supported qualifiers are
   /verbose=n       : n=0..4 Output more info during the check
   /output=filename : Print errors to file
  For more help see the modes verify help

![DIX MODES verify]DIX modes verify

DIX INTERACTIVE_COMMANDS WAIT


  WAIT expression

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

DIX INTERACTIVE_COMMANDS WHILE_ENDWHILE


  syntax : WHILE [logicalexpression]
            statement
            statement
            ...
           ENDWHILE

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

  See also the help about the LEAVE and the CYCLE command

  If you type the command from the terminal (instead from a command file)
  DIX will prompt you for more lines until the ENDWHILE command is found,
  and then will execute the commands.

 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

DIX INTERACTIVE_COMMANDS WRITE


  In DIX mode the write statement has 4 formats

   WRITE/RECORD input_file output_file
     Write the contents of the current record of 'input_file'
     to 'output_file'
     input_file and output_file are the tags of an opened file

   WRITE/RECORD output_file
     Write the contents of the current record of the current file
     to 'output_file'
     output_file is the tag of an opened file

   WRITE filetag filename [/append]

   WRITE filename [/append]
     Write the current record to the file "filename". If /append is
     given, the record will be appended to an existing file.
     In this case the output_file will be opened/closed

  In DCL mode, the write statement has the following format

   WRITE file expression[,expression...]
    The /record is allowed, but ignored. DIX can use long records anyway.

  Qualifiers supported are
   /ERR=label: Go to label if error
   /APPEND   : See above
   /COUNT=nn : Copy nn records (or END_OF_FILE reached)
   /ALL      : Copy all records from input file
   /format=formattype  : What to do with unprintable data
               passall : Pass unchanged to the file
               dot     : Replace by .
               hex     : Replace by %NNX
               dump    : Replace by <ESC> etc...

    /format=dot is default if write to terminal
    /format=passall is default if write to file

  Example (case 1):

  DIX>   open input inputfile.dat
  DIX>   open output outputfile.dat/modify/create
  DIX> loop: write/record input output
  DIX>   read input/end=done
  DIX>   goto loop
  DIX> done: close input
  DIX>   close output

  Example (case 2):

  DIX>   open input inputfile.dat
  DIX>   open output outputfile.dat/modify/create
  DIX> loop: write/record output
  DIX>   read input/end=done
  DIX>   goto loop
  DIX> done: close input
  DIX>   close output

  Example (case 3):

  DIX>   open input inputfile.dat
  DIX>   first = true
  DIX> loop: if (first) then
  DIX>     write outputfile.dat
  DIX>   else
  DIX>     write outputfile.dat/append
  DIX>   endif
  DIX>   first = false
  DIX>   read input/end=done
  DIX>   goto loop
  DIX> done: close input
  DIX>   close output

DIX KEY_MAPPING

  DIX uses key mapping. In the Screen mode (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 [DIX/HELP] "/STARTUP"

DIX KEY_MAPPING DIX_functions


  DIX has the following functions
  Move functions
   key_up          One line up
   key_down        One line down
   key_left        One position left
   key_right       One position 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 forward or backward depending on mode

   key_find        Search in display for text string
   key_find1       Ask search string and the key_find
   key_next_window Toggle ASCII/binary display in raw_mode
   key_prev_window Toggle ASCII/binary 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     Continuously 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 compress mode (do not display "empty" fields)
   key_displ_hex   Hexadecimal data display
   key_displ_oct   Octal data display
   key_displ_bin   Binary data display
   key_displ_dec   Decimal data display
   key_nexdec_offs Toggle offset display hex/decimal
   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_swap_signed Toggle signed/unsigned for decimal numbers
   key_abort       Abort changed to record
   key_remove      Delete current record (idx /rel file only)
   key_nextdes     Next description file
   key_prevdes     Previous description file
   key_dirdes      Directory description file
   key_dispsubf    Display all subfields
   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 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   Return to the original file after a key_Follow_link
   key_ch_width    Toggle screen width between 80 and 132 characters
   key_menu        Display a menu and let user choose

  Editing key
   key_delete_line      Delete line
   key_delete_word      Delete word
   key_delete_char      Delete char
   key_undelete_line    Undelete line
   key_undelete_word    Undelete word
   key_undelete_char    Undelete char
   key_next_line        Goto the beginning of the next line

DIX KEY_MAPPING Default key mapping

  The default key mapping is :

  define/skey pf1/set_state=GOLD ""
  define/skey pf4/set_state=BLUE ""
  define/skey pf4         key_delete_line               /context=edit
  define/skey pf4         key_undelete_line/IF_STATE=GOLD /context=edit
  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_next_window
  define/skey ht          key_prev_window/IF_STATE=GOLD
  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 delete      key_delete
  define/skey uppercase_a key_dispall    /IF_STATE=BLUE
  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 uppercase_m key_menu       /IF_STATE=GOLD
  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_s key_swap_signed/IF_STATE=GOLD
  define/skey uppercase_s key_dispsubf   /IF_STATE=BLUE
  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_displ_hex  /IF_STATE=BLUE
  define/skey uppercase_o key_displ_oct  /IF_STATE=BLUE
  define/skey uppercase_b key_displ_bin  /IF_STATE=BLUE
  define/skey uppercase_d key_displ_dec  /IF_STATE=BLUE
  define/skey uppercase_h key_hexdec_offs/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
  define/skey PF4         key_delete_line
  define/skey PF4         key_delete_line/IF_STATE=GOLD
  define/skey MINUS       key_delete_word
  define/skey MINUS       key_undelete_word/IF_STATE=GOLD
  define/skey COMMA       key_delete_char
  define/skey COMMA       key_undelete_char/IF_STATE=GOLD

DIX DIX_parameters


  The following limits apply to DIX.

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

  Interactive mode
   Number of commandfile levels  : 65535
   Number of if/for/while levels : 32767
   Symbol names                  : 32 characters
   Label name 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 that it is limited by process quota, not DIX.

DIX Example scripts

 These scripts are some of the scripts used for regression testing on DIX
 Some of them will only work with test datafiles, so may not work
 standalone, but these scripts may give you some idea about the
 possibilities of DIX

DIX Example scripts ANALYZE

  Check for the DIX/ANALYZE function

  $ DIX/ANA/DISP=(DATA) SYSUAF.ORG

DIX Example scripts ASSIGN


  Check for assignments

  $ DIX/INTER SYSUAF.WORK/MOD
  !
  !Check assignments
  !
  exa UAF$Q_parent_id*
  dep UAF$Q_parent_id(*)=10
  exa UAF$Q_parent_id*
  UAF$Q_parent_id = 20
  exa UAF$Q_parent_id*
  UAF$Q_parent_id = [20,30]
  exa UAF$Q_parent_id*
  UAF$Q_parent_id(2) = 21
  exa UAF$Q_parent_id*
  !
  decla/int a(3,3)
  eva/table a
  a=20
  eva/table a
  a(1,*)=10
  eva/table a
  a(*,*)= 40
  eva/table a

DIX Example scripts BUCKET


  Check for the $bucket description

  $ DIX/INT SYSUAF.ORG/BLOCK=3/REC=4/DES=$BUCKET
  exa
  read/rec=7
  exa
  read/rec=10
  exa

DIX Example scripts CALL_GOSUB

  $ DIX/INTERACTIVE
  !
  ! Testing gosub routines
  !
   examine *mem*
   echo "to gosub test "
   @gosub
   echo "return from gosub_test"
   examine *mem*
   exit

   And the file gosub.dix contains

   OPEN mysysuaf PROGRAMS_TOP:[DIX.REGRES]SYSUAF.ORG
   k=0
   read/eq=stubbf mysysuaf
  lp12: k=k+1
   examine mysysuaf\UAF$Q_PWD('k')
   if (k<2)goto lp12
   gosub process_1
   CLOSE mysysuaf
   exit
  process_1:
   echo "In process_1"
   gosub process_2
   echo "back In process_1"
   return
  process_2:
   echo "In process_2"
   gosub process_3
   echo "back In process_2"
   return
  process_3:
   echo "In process_3"
   sel file mysysuaf
   exa uaf$*username
   return

DIX Example scripts CALL_TEST


  Testing calls

  $ DIX/INTERACTIVE
  set stri/typ/decl
  integer a=10
  call jan 2,a,3*a
  set stri/notyp/nodecl
  exit
  jan: subroutine var1/int,var2/int/symbol,var3/int
  show symb/ful
  echo "normal echo"
  echo/console "Echo to console"
  endsubroutine

DIX Example scripts COMMANDS


  General (interactive) commands

  $ DIX/INT
  set noon
  open sysu sysuaf.org
  !
  ! Description commands
  !
  add description .dir,$line
  show file/des
  remove descr *dir*
  show file/des
  prev des
  next des
  next des
  next des
  prev des
  sel descr sysu
  sel descr $line
  sel descr xyz
  rem des *
  show des/loaded
  close /err=cls_unexp
  close/err=cls_exp
  cls_unexp: say "Unexpected close error, status=",$STATUS
  cls_Exp:
  !
  open sysu sysuaf.org
  open pend pending.org
  next file
  next file
  prev file
  prev file
  prev file
  sel file sysu
  sel file pend
  sel file xyz
  close *
  !
  ! Try prev/next record
  !
  open sysu sysuaf.org
  find aa
  search tcp
  exa *user*
  rewind
  next rec sysu
  exa *user*
  next rec
  exa *user*
  prev rec sysu
  exa *user*
  prev rec
  exa *user*
  read/ge="VPM$SERVER"
  mark mymark
  exa *user*
  read sysu
  next rec/end=eof_exp
  say "Unexpected not EOF"
  eof_exp:
  gomark mymark
  exam *user*
  close sysu
  !
  ! try to copy to file
  !
  open sysu sysuaf.org
  show file/fdl/out=temp.fdl
  crea/ file x.x/fdl=temp.fdl
  read sysu
  read sysu
  read sysu/ge="TCP"
  open out x.x/modify
  write/record sysu out/all/log
  close out
  open mytag x.x/fast
  anal mytag
  close mytag
  spawn delete x.x;/log
  spawn delete temp.fdl;/log
  close sysu
  !
  open sysu sysuaf.org
  grep user exa *
  close sysu
  !
  dire/size *.org
  character var_char="Test"
  integer var_int=10
  logical var_log=true
  date var_date=#DATE"1-JAN-2007"
  real var_real=-1.3e+12
  decimal var_dec=#DECI"12310"
  show symb/fu var*
  declare qi/int=1,qr/real=1.3,qd/date=#date"1-JAN-2007" ,ql/log=false,qde=#DECI"12"
  show symb/fu q*
  delet/symb q*
  !
  do 4 show stat
  !show time
  wait 0.5
  !show time
  wait 1
  !show time
  !
  open sysu sysuaf.work
  dump /count=2
  cut
  set file/mod
  dep uaf$w_accounts=10
  paste
  close sysu

DIX Example scripts COMMANDS CVT_HELP_TO_HTML

  The following script converts a help file or help library to a
  number of .HTML files that can be viewed by a web browser

  This script can be called from DCL and also from DIX via the
  DIX> @cvt_help_to_html/dcl parameter command. This demonstrates that
  DIX can run normal DCL files
   $    if p1 .eqs. "?"
   $     then
   $       typ sys$input

    Convert a OpenVMS help library (or a help file) to
     a .HTML file
    Parameters:
      p1: The name of the help library (or help file)
      p2: The name of the .HTML file (default p1-filename.html)

   $      goto done
   $     endif
   $!
   $! Definitions Settings
   $!
   $    max_file_size = 500     !max size of data file
   $    def_file_type = ".HTML"
   $!
   $! Parse input, p1 : filename (.HLP or .HLB)
   $!
   $    inp_fnam = p1
   $    if inp_fnam .eqs. "" then inquire inp_fnam "Help library/file"
   $    fnam = f$parse(inp_fnam,".HLB")
   $!
   $
   $    if f$search(fnam) .eqs. ""
   $     then
   $      fnam = f$parse(inp_fnam,".HLP")
   $      if f$search(fnam) .eqs. ""
   $       then
   $        write sys$output "Could not find file ",fnam
   $        goto done
   $      endif
   $     endif
   $    bd = f$parse(fnam,,,"NAME")
   $!
   $! PArse p2, location to store results
   $!
   $    outnam = p2
   $    if p1 .eqs. "" .and. p2 .eqs. "" then Inquire outnam "Outputfile [''bd'.HTML]"
   $    dnam = bd + def_file_type
   $    outnam = f$parse(outnam,dnam)
   $    write sys$output "Converting ",fnam
   $!
   $    on control_y then goto abort
   $    on error then goto abort
   $!
   $!  See if the input file is a .HLB (help library) or a .HLP file (help text)
   $!
   $    ex = f$edit(f$parse(fnam,,,"TYPE"),"UPCASE")
   $    if ex .eqs. ".HLB"
   $     then
   $!
   $! Extract the contents to a temp file
   $!
   $      tmpnam = f$unique() + ".TMP;0"
   $      write sys$output "Extracting text from help library ",fnam
   $      libr/extr=*/out='tmpnam' 'fnam'
   $      fnam = tmpnam
   $     else
   $      tmpnam = ""
   $     endif
   $!
   $!
   $    open/read lun 'fnam'
   $!
   $    max_depth      = 9                 !no more than 9 levels
   $    gosub make_main
   $!
   $! Restart after end of wlev level
   $!
   $    seen_slash     = 0                 !not in / mode
   $    nr             = 0                 !topic index
   $    totline        = ""                !topic header line
   $    cur_len_0      = 0                 !current header length
   $    cur_lev        = 0                 !current level
   $    low_limit_size = max_file_size*460 !90% of size
   $    hig_limit_size = max_file_size*614 !120% of size
   $    old_outnam_dat = ""                !previous filename
   $    fidx           = 0                 !file index
   $    max_lev        = 0
   $    old_line       = ""
   $    old_ilev       = 1
   $!
   $! Create main file (with frames) and index file
   $!
   $    gosub init_hdr
   $!
   $! Main loop : Keep reading
   $!
   $10: read lun line/end=eof
   $    kar = f$extract(0,1,line)                       !see if new topic
   $    if kar .eqs. "/" then goto slash        !found a / topic
   $    if kar .ges. "1" .and. kar .les. "9"
   $     then
   $      if f$extract(1,1,line) .eqs. " " then goto level   !found a number topic
   $     endif
   $!
   $! Include the text as is
   $!
   $    gosub cvt_line
   $    write out line
   $    nbyts = nbyts +f$length(line) + 1       !one for the LF
   $    goto 10
   $!
   $! Found a slash topic, the first will increase the level
   $!
   $slash:
   $    if .not. seen_slash then ilev = ilev + 1
   $    seen_slash = 1
   $    goto gotit
   $!
   $! Found a number topic 1..9
   $!
   $level:      ilev = f$integer(kar)
   $    seen_slash = 0
   $!
   $! Skip the leading digit (and following spaces)
   $!
   $    line = f$extr(2,-1,line)
   $gotit:
   $    line = f$edit(line,"TRIM")
   $    gosub cvt_line
   $    if old_line .nes. "" then write out "</pre>"
   $!
   $! Limit the files in size
   $! If new level 1 and size> 90%, make new
   $! If new level>1 and size>110%, make new
   $!
   $    if nbyts .lt. low_limit_size                   then goto keep_gooing
   $    if nbyts .lt. hig_limit_size .and. ilev .gt. 1 then goto keep_gooing
   $!
   $! File has gotten too big, close and open a new one
   $!
   $    old_fidx = fidx
   $    fidx = fidx + 1
   $    old_outnam_dat = outnam_dat
   $    outnam_dat = body + "_DATA_''fidx'" + file_type
   $!
   $    gosub exit_hdr          !finish off this file
   $    gosub init_hdr          !create new file
   $!
   $keep_gooing:
   $    nr = nr + 1
   $    tag_'ilev' = nr
   $    gosub add_index
   $!
   $    if ilev .gt. max_lev then max_lev = ilev
   $    if max_lev .gt. max_depth then max_lev = max_depth
   $!
   $    write out "<a name=""''nr'"">"
   $    if ilev .le. cur_lev
   $     then
   $      idx = ilev-1
   $      nk = cur_len_'idx'
   $         totline = f$extract(0,nk,totline)
   $     endif
   $    totline = totline + line + " "
   $    cur_len_'ilev' = f$length(totline)
   $    cur_lev = ilev
   $    wnr = out_nr_'ilev'
   $    onam = outnam_idx_'ilev'
   $    add_line = "<a href=""''onam'#''wnr'"" target=""index"">''totline'</a> "
   $    write out "<h3 Align=center>",add_line,"</h3>"
   $    write out "<pre>"
   $    goto 10
   $!
   $! Found EOF
   $!
   $eof:        close lun
   $!
   $!
   $    ilev = 0
   $    gosub add_index
   $!
   $    old_fidx = fidx
   $    fidx = -1
   $    gosub exit_hdr
   $!
   $    gosub make_top_idx
   $!
   $! Finish off the index file
   $!
   $    k = 1
   $lp_dep7:
   $    if k .le. max_depth
   $     then
   $      write out_idx_'k' "</pre>"
   $      write out_idx_'k' "</body>"
   $      write out_idx_'k' "</html>"
   $      close out_idx_'k'
   $      fn = outnam_idx_'k'
   $      if k .gt. max_lev then delete 'fn';
   $      k = k+1
   $      goto lp_dep7
   $     endif
   $!
   $!
   $dn1:        if tmpnam .nes. "" then delete/noconfirm 'tmpnam'
   $done:       exit
   $!
   $! ^Y or error
   $!
   $abort:      set noon
   $    if f$trnlnm("out")     .nes. "" then close out
   $    if f$trnlnm("out_idx") .nes. "" then close out_idx
   $    k = 1
   $lp_dep5:
   $    if k .le. max_depth
   $     then
   $      if f$trnlnm("out_idx_''k'") .nes. "" then close out_idx_'k'
   $      k = k + 1
   $      goto lp_dep5
   $     endif
   $    if f$trnlnm("lun")     .nes. "" then close lun
   $    write sys$output "Aborting"
   $    goto dn1
   $!
   $add_index:
   $!
   $    if old_line .eqs. "" then got skip_34
   $    kar = ""
   $    indent = f$fao("!#AS",(old_ilev-1)*2," ")
   $    if ilev .gt. old_ilev then kar = "+"
   $    dep = old_ilev
   $lp_dep3:
   $    if dep .le. max_depth
   $     then
   $      out_nr_'dep' = out_nr_'dep' + 1
   $      wnr = out_nr_'dep'
   $      idx_line ="<a name=""''wnr'"">"
   $      if kar .eqs. "+"
   $       then
   $        idx1 = dep + 1
   $        onam = outnam_idx_'idx1'
   $        wnr = out_nr_'dep' + 1
   $        add_line = "<a href=""''onam'#''wnr'"" target=""index"">+</a> "
   $       else
   $        if kar .eqs. "-"
   $         then
   $          idx1 = dep -  1
   $          onam = outnam_idx_'idx1'
   $          wnr = out_nr_'dep'
   $          add_line = "<a href=""''onam'#''wnr'"" target=""index"">-</a> "
   $         else
   $          add_line = "  "
   $         endif
   $       endif
   $      write out_idx_'dep' idx_line,indent,add_line,"<a href=""",outnam_dat,-
                  "#''old_nr'"" target=""data"">",old_line,"</a>"
   $      if kar .nes. "" then kar = "-"
   $      dep = dep + 1
   $      goto lp_dep3
   $     endif
   $skip_34:
   $    old_line = line
   $    old_ilev = ilev
   $    old_nr   = nr
   $    return
   $!
   $! Convert a text line, make sure no special chars in line
   $!
   $cvt_line:
   $    kar1 = "&"
   $    kar2 = "&AMP;"
   $    gosub subst     !subst & by &amp
   $    kar1 = "<"
   $    kar2 = "&LT;"
   $    gosub subst     !subst < by &lt
   $    kar1 = ">"
   $    kar2 = "&GT;"
   $    gosub subst     !subst > by &gt
   $    return
   $!
   $! Replace all occurrences of kar1 by kar2
   $!
   $subst:      bpos = 0
   $lp_s:       pos = f$locate(kar1,f$extract(bpos,-1,line))
   $       if pos .ne. f$length(line) - bpos
   $        then
   $         pos  = pos + bpos
   $         line = f$extract(0,pos,line) + kar2 + -
                    f$extract(pos+f$leng(kar1),-1,line)
   $         bpos  = pos + f$length(kar2)
   $         goto lp_s
   $        endif
   $    return
   $!
   $! Create the main and the index file
   $!
   $make_main:
   $    dirnam      = f$parse(outnam,,,"DEVICE") + -
                         f$parse(outnam,,,"DIRECTORY")
   $    body        = f$parse(outnam,,,"NAME")
   $    file_type   = f$parse(outnam,,,"type")
   $    outnam_main = body           + file_type
   $    outnam_idx_top  = body + "_IDX_TOP"  + file_type
   $!
   $! Make up to 9 levels
   $!
   $    k = 1
   $lp_hd:      outnam_idx_'k'  = body + "_IDX_''k'"  + file_type
   $    k = k+1
   $    if k .le. max_depth then goto lp_hd
   $!
   $    outnam_dat      = body + "_DATA" + file_type
   $!
   $! Create the main file (containing the frames)
   $!
   $    fn = dirnam + outnam_main
   $    tag = " to"
   $    gosub create_file
   $    open/append out 'fn'
   $    write out "<html>"
   $    write out "<head>"
   $    write out "<title>"
   $    write out "Help about ''bd'"
   $    write out "</title>"
   $    write out "<frameset cols=""30%,*"">"
   $    write out " <frameset rows=""20,*"">"
   $    write out "  <frame src=""",outnam_idx_top,""" name=""index_top"" scrolling=""NO"" marginheight=0>"
   $    write out "  <frame src=""",outnam_idx_1,""" name=""index"">"
   $    write out " </frameset>"
   $    write out " <frame src=""",outnam_dat,""" name=""data"">"
   $    write out "</frameset>"
   $    write out "</html>"
   $    close out
   $!
   $! Create the index file (in the left frame) up to 9 pieces
   $!
   $    k = 1
   $lp_dep2:
   $    filename_outidx_'k' = dirnam + outnam_idx_'k'
   $    fn = filename_outidx_'k'
   $    tag = "and"
   $    gosub create_file
   $    open/append out_idx_'k' 'fn'
   $    write out_idx_'k' "<html>"
   $    write out_idx_'k' "<body>"
   $    write out_idx_'k' "<pre>"
   $    out_nr_'k' = 0  !each level has a link field
   $    k = k + 1
   $    if k .le. max_depth then goto lp_dep2
   $    outnam = outnam_dat
   $    return
   $!
   $make_top_idx:
   $    fn = dirnam + outnam_idx_top
   $    tag = "and"
   $    gosub create_file
   $    open/append out_idx 'fn'
   $    write out_idx "<html>"
   $    write out_idx "<body>"
   $    k = 1
   $lp_dep4:
   $    if k .le. max_lev
   $     then
   $      fn4 = outnam_idx_'k'
   $      write out_Idx "<a href=""",fn4,""" target = ""index""> ''k' </a>"
   $      k = k + 1
   $      goto lp_dep4
   $     endif
   $    write out_idx "</html>"
   $    write out_idx "</body>"
   $    close out_idx
   $    say "Maximum depth = ",max_lev
   $    return
   $!
   $! Init a new output (data) file
   $!
   $init_hdr:
   $    fn = dirnam + outnam_dat
   $    gosub create_file
   $    open/append out 'fn'
   $    write out "<html>"
   $    write out "<head>"
   $    write out "<title>Help about ''bd'"
   $    write out "</title>"
   $    write out "<body>"
   $       write out "<a name=""top_''fidx'"">"
   $    write out "<center>"
   $    if fidx .eq. 0
   $     then
   $      write out "<h1>",bd,"</h1>"
   $     else
   $         write out "<a href=""",old_outnam_dat,-
                "#bottom_''old_fidx'""target=""data"">previous</a>"
   $     endif
   $    write out "</center>"
   $    nbyts = 0
   $    return
   $!
   $! Finish a data file
   $!
   $exit_hdr:
   $    if fidx .ge. 0
   $     then
   $      write out "<center>"
   $         write out "<a href=""",outnam_dat, -
              "#top_''fidx'"" target=""data"">next</a>"
   $      write out "</center>"
   $         write out "<a name=""bottom_''old_fidx'"">"
   $     endif
   $    write out "</body>"
   $    write out "</html>"
   $    close out
   $    return
   $!
   $! Create a new data file(in stream_lf format)
   $!
   $create_file:
   $    write sys$output "      ",tag," ",fn
   $    create/fdl=sys$input 'fn'
   record
     format stream_lf
   $    return

DIX Example scripts COPY_TEXT


  Copy fields

  $ DIX/INTER
  open mysysuaf programs_top:[dix.regres]sysuaf.work/modify
  open mypend programs_top:[dix.regres]pending.org
  sel file mysysuaf
  read/eq="STUBBF" 
  pwd1 = UAF$Q_PWD(1)
  pwd2 = UAF$Q_PWD(2)
  read/eq="JANSEN"/err=notf
  displ *pwd*
  dep uaf$q_pwd(1) = %D'pwd1'
  dep uaf$q_pwd(2) = %D'pwd2'
  displ *pwd*
  undo
  displ *pwd*
  next file
  read/eq="JANSEN"/err=notf       !should deliver
  displ *pwd*
  dep uaf$q_pwd(1) = %D'pwd1'
  dep uaf$q_pwd(2) = %D'pwd2'
  displ *pwd*
  undo
  notf:
  close mysysuaf
  close mypend

DIX Example scripts CSV


  Check the DIX/CSV command

  $ DIX/FILE SYSUAF.ORG/CSV=(SEP=CHAR=124,HEADER) TCPIP

DIX Example scripts CVT_HELP_TO_HTML

  This procedure converts .HLP/.HLB files to a list of .HTML files
  that can be viewed via a web browser. This procedure can be run from DIX using

  DIX> @CVT_HELP_TO_HTML/dcl helpfile.hlp
  DIX> @CVT_HELP_TO_HTML/dcl=fall helpfile.hlb  !.HLB files needs libr/extr
                                                !as a fallback command

  Of course it can also be run from DCL via @CVT_HELP_TO_HTML
  This demonstrates the DCL compatibility of DIX

  $     if p1 .eqs. "?
  $      then
  $        typ sys$input

   Convert a OpenVMS help library (or a help file) to
    a .HTML file
   Parameters:
     p1: The name of the help library (or help file)
     p2: The name of the .HTML file (default p1-filename.html)

  $       goto done
  $      endif
  $!
  $! Definitions Settings
  $!
  $     max_file_size = 500     !max size of data file
  $     def_file_type = ".HTML"
  $!
  $! Parse input, p1 : filename (.HLP or .HLB)
  $!
  $     inp_fnam = p1
  $     if inp_fnam .eqs. "" then inquire inp_fnam "Help library/file"
  $     fnam = f$parse(inp_fnam,".HLB")
  $!
  $
  $     if f$search(fnam) .eqs. ""
  $      then
  $       fnam = f$parse(inp_fnam,".HLP")
  $       if f$search(fnam) .eqs. ""
  $        then
  $         write sys$output "Could not find file ",fnam
  $         goto done
  $       endif
  $      endif
  $     bd = f$parse(fnam,,,"NAME")
  $!
  $! Parse p2, location to store results
  $!
  $     outnam = p2
  $     if p1 .eqs. "" .and. p2 .eqs. "" then Inquire outnam "Outputfile [''bd'.HTML]"
  $     dnam = bd + def_file_type
  $     outnam = f$parse(outnam,dnam)
  $     write sys$output "Converting ",fnam
  $!
  $     on control_y then goto abort
  $     on error then goto abort
  $!
  $!  See if the input file is a .HLB (help library) or a .HLP file (help text)
  $!
  $     ex = f$edit(f$parse(fnam,,,"TYPE"),"UPCASE")
  $     if ex .eqs. ".HLB"
  $      then
  $!
  $! Extract the contents to a temp file
  $!
  $       tmpnam = f$unique() + ".TMP;0"
  $       write sys$output "Extracting text from help library ",fnam
  $       libr/extr=*/out='tmpnam' 'fnam'
  $       fnam = tmpnam
  $      else
  $       tmpnam = ""
  $      endif
  $!
  $!
  $     open/read lun 'fnam'
  $!
  $     max_depth      = 9                 !no more han 9 levels
  $     gosub make_main
  $!
  $! Restart after end of wlev level
  $!
  $     seen_slash     = 0                 !not in / mode
  $     nr             = 0                 !topic index
  $     totline        = ""                !topic header line
  $     cur_len_0      = 0                 !current header length
  $     cur_lev        = 0                 !current level
  $     low_limit_size = max_file_size*460 !90% of size
  $     hig_limit_size = max_file_size*614 !120% of size
  $     old_outnam_dat = ""                !previous filename
  $     fidx           = 0                 !file index
  $     max_lev        = 0
  $!
  $! Create main file (with frames) and index file
  $!
  $     gosub init_hdr
  $!
  $! Main loop : Keep reading
  $!
  $10:  read lun line/end=eof
  $     kar = f$extract(0,1,line)                       !see if new topic
  $     if kar .eqs. "/" then goto slash        !found a / topic
  $     if kar .ges. "1" .and. kar .les. "9"
  $      then
  $       if f$extract(1,1,line) .eqs. " " then goto level   !found a number topic
  $      endif
  $!
  $! Include the text as is
  $!
  $     gosub cvt_line
  $     write out line
  $     nbyts = nbyts +f$length(line) + 1       !one for the LF
  $     goto 10
  $!
  $! Found a slash topic, the first will increase the level
  $!
  $slash:
  $     if .not. seen_slash then ilev = ilev + 1
  $     seen_slash = 1
  $     goto gotit
  $!
  $! Found a number topic 1..9
  $!
  $level:       ilev = f$integer(kar)
  $     seen_slash = 0
  $!
  $! Skip the leading digit (and following spaces)
  $!
  $     line = f$extr(2,-1,line)
  $gotit:
  $     line = f$edit(line,"TRIM")
  $     gosub cvt_line
  $     write out "</pre>"
  $!
  $! Limit the files in size
  $! If new level 1 and size> 90%, make new
  $! If new level>1 and size>110%, make new
  $!
  $     if nbyts .lt. low_limit_size                   then goto keep_gooing
  $     if nbyts .lt. hig_limit_size .and. ilev .gt. 1 then goto keep_gooing
  $!
  $! File has gotten too big, close and open a new one
  $!
  $     old_fidx = fidx
  $     fidx = fidx + 1
  $     old_outnam_dat = outnam_dat
  $     outnam_dat = body + "_DATA_''fidx'" + file_type
  $!
  $     gosub exit_hdr          !finish off this file
  $     gosub init_hdr          !create new file
  $!
  $keep_gooing:
  $     nr = nr + 1
  $     tag_'ilev' = nr
  $     if old_line .nes. ""
  $      then
  $       gosub add_index
  $      endif
  $!
  $     if ilev .gt. max_lev then max_lev = ilev
  $     if max_lev .gt. max_depth then max_lev = max_depth
  $!
  $     write out "<a name=""''nr'"">"
  $     if ilev .le. cur_lev
  $      then
  $       idx = ilev-1
  $       nk = cur_len_'idx'
  $         totline = f$extract(0,nk,totline)
  $      endif
  $     totline = totline + line + " "
  $     cur_len_'ilev' = f$length(totline)
  $     cur_lev = ilev
  $     write out "<h3 Align=center>",totline,"</h3>"
  $     write out "<pre>"
  $     goto 10
  $!
  $! Found EOF
  $!
  $eof: close lun
  $!
  $!
  $     ilev = 0
  $     gosub add_index
  $!
  $     old_fidx = fidx
  $     fidx = -1
  $     gosub exit_hdr
  $!
  $! Finish off the index file
  $!
  $     k = 1
  $lp_dep7:
  $     if k .le. max_depth
  $      then
  $       write out_idx_'k' "</pre>"
  $       write out_idx_'k' "</body>"
  $       write out_idx_'k' "</html>"
  $       close out_idx_'k'
  $       fn = outnam_idx_'k'
  $       if k .gt. max_lev then delete 'fn'
  $       k = k+1
  $       goto lp_dep7
  $      endif
  $!
  $     gosub make_top_idx
  $!
  $dn1: if tmpnam .nes. "" then delete/noconfirm 'tmpnam'
  $done:        exit
  $!
  $! ^Y or error
  $!
  $abort:       if f$trnlnm("out")     .nes. "" then close out
  $     if f$trnlnm("out_idx") .nes. "" then close out_idx
  $     k = 1
  $lp_dep5:
  $     if k .le. max_depth
  $      then
  $       if f$trnlnm("out_idx_''k'") .nes. "" then close out_idx_'k'
  $       goto lp_dep5
  $      endif
  $     if f$trnlnm("lun")     .nes. "" then close lun
  $     write sys$output "Aborting"
  $     goto dn1
  $!
  $add_index:
  $!
  $!
  $!
  $     indent = f$fao("!#AS",(old_ilev-1)*2," ")
  $     kar = "  "
  $     if ilev .gt. old_ilev then kar = "+ "
  $     dep = 1
  $lp_dep3:
  $     if dep .le. max_depth
  $      then
  $       if old_ilev .le. dep
  $        then
  $         if old_ilev .eq. dep then kar = "- "
  $         write out_idx_'dep' "<a name=""''old_nr'"">"
  $         write out_idx_'dep' indent,kar,"<a href=""",outnam_dat,-
                 "#''old_nr'"" target=""data"">",old_line,"</a>"
  $        endif
  $       dep = dep + 1
  $       goto lp_dep3
  $      endif
  $     old_line = line
  $     old_ilev = ilev
  $     old_nr   = nr
  $     return
  $!
  $! Convert a text line,, make sure no special chars in line
  $!
  $cvt_line:
  $     kar1 = "&"
  $     kar2 = "&AMP;"
  $     gosub subst     !subst & by &amp
  $     kar1 = "<"
  $     kar2 = "&LT;"
  $     gosub subst     !subst < by &lt
  $     kar1 = ">"
  $     kar2 = "&GT;"
  $     gosub subst     !subst > by &gt
  $     return
  $!
  $! Replace all occurrences of kar1 by kar2
  $!
  $subst:       bpos = 0
  $lp_s:        pos = f$locate(kar1,f$extract(bpos,-1,line))
  $       if pos .ne. f$length(line) - bpos
  $        then
  $         pos  = pos + bpos
  $         line = f$extract(0,pos,line) + kar2 + -
                   f$extract(pos+f$leng(kar1),-1,line)
  $         bpos  = pos + f$length(kar2)
  $         goto lp_s
  $        endif
  $     return
  $!
  $! Create the main and the index file
  $!
  $make_main:
  $     dirnam      = f$parse(outnam,,,"DEVICE") + -
                        f$parse(outnam,,,"DIRECTORY")
  $     body        = f$parse(outnam,,,"NAME")
  $     file_type   = f$parse(outnam,,,"type")
  $     outnam_main = body           + file_type
  $     outnam_idx_top  = body + "_IDX_TOP"  + file_type
  $!
  $! Make up to 9 levels
  $!
  $     k = 1
  $lp_hd:       outnam_idx_'k'  = body + "_IDX_''k'"  + file_type
  $     k = k+1
  $     if k .le. max_depth then goto lp_hd
  $!
  $     outnam_dat      = body + "_DATA" + file_type
  $!
  $! Create the main file (containing the frames)
  $!
  $     fn = dirnam + outnam_main
  $     tag = " to"
  $     gosub create_file
  $     open/append out 'fn'
  $     write out "<html>"
  $     write out "<head>"
  $     write out "<title>"
  $     write out "Help about ''bd'"
  $     write out "</title>"
  $     write out "<frameset cols=""30%,*"">"
  $     write out "  <frameset rows=""20,*"">"
  $     write out "  <frame src=""",outnam_idx_top,""" name=""index_top"" scrolling=""NO"" marginheight=0>"
  $     write out "  <frame src=""",outnam_idx_1,""" name=""index"">"
  $     write out " <frameset>
  $     write out "<frame src=""",outnam_dat,""" name=""data"">"
  $     write out "</frameset>"
  $     write out "</html>"
  $     close out
  $!
  $! Create the index file (in the left frame) up to 9 pieces
  $!
  $     k = 1
  $lp_dep2:
  $     fn = dirnam + outnam_idx_'k'
  $     tag = "and"
  $     gosub create_file
  $     open/append out_idx_'k' 'fn'
  $     write out_idx_'k' "<html>"
  $     write out_idx_'k' "<body>"
  $     write out_idx_'k' "<pre>"
  $     k = k + 1
  $     if k .le. max_depth then goto lp_dep2
  $     outnam = outnam_dat
  $     return
  $!
  $make_top_idx:
  $     fn = dirnam + outnam_idx_top
  $     tag = "and"
  $     gosub create_file
  $     open/append out_idx 'fn'
  $     write out_idx "<html>"
  $     write out_idx "<body>"
  $     k = 1
  $lp_dep4:
  $     if k .le. max_lev
  $      then
  $       fn4 = out_idx_'k'
  $       write out_Idx "<a href="",fn4,"" target = ""index""> 1 </a>"
  $       k = k + 1
  $       goto lp_dep4
  $      endif
  $     write out_idx "</html>"
  $     write out_idx "</body>"
  $     close out_idx
  $     say "Maximum depth = ",max_lev
  $     return
  $!
  $! Init a new output (data) file
  $!
  $init_hdr:
  $     fn = dirnam + outnam_dat
  $     gosub create_file
  $     open/append out 'fn'
  $     write out "<html>
  $     write out "<head>"
  $     write out "<title>Help about ''bd'"
  $     write out "</title>"
  $     write out "<body>"
  $       write out "<a name=""top_''fidx'"">"
  $     write out "<center>"
  $     if fidx .eq. 0
  $      then
  $       write out "<h1>",bd,"</h1>"
  $      else
  $         write out "<a href=""",old_outnam_dat,-
               "#bottom_''old_fidx'""target=""data"">previous</a>"
  $      endif
  $     write out "</center>"
  $     nbyts = 0
  $     return
  $!
  $! Finish a data file
  $!
  $exit_hdr:
  $     if fidx .ge. 0
  $      then
  $       write out "<center>"
  $         write out "<a href=""",outnam_dat, -
             "#top_''fidx'"" target=""data"">next</a>"
  $       write out "</center>"
  $         write out "<a name=""bottom_''old_fidx'"">"
  $      endif
  $     write out "</body>"
  $     write out "</html>"
  $     close out
  $     return
  $!
  $! Create a new data file(in stream_lf format)
  $!
  $create_file:
  $     write sys$output "      ",tag," ",fn
  $     create/fdl=sys$input 'fn'
  record
    format stream_lf
  $     return

DIX Example scripts ENUM


  Check for enumeration of symbols/parameters

  $ DIX/INT
  set noon
  i=1
  loop
   symb = f$enum(i,,"SYM")
  testloop symb <> ""
   say symb
   i=i+1
  endloop
  !
  i=1
  load forsysdef/mod=$lbrdef
  loop
   par = f$enum(i,"LBR$*","PAR")
  testloop par <> ""
   say par," = ",'par'
   i=i+1
  endloop

DIX Example scripts ERROR

  $ DIX/INT
  open sysuaf.org
  echo "in error"
  on error goto verder
  read/eq="asfglkj"
  verder:
  set on
  @file_not_present
  echo "uic c"

  And the file file_not_present.dix does not exist

DIX Example scripts EXTRACT_MLB


  This script can extract a module from STARLET.MLB and convert it
  to a Fortran (or DIX) definition file
  This script can be run from DCL or under DIX via the
  DIX> EXTRACT_MLB.COM/DCL[/output=fnam.ext] parameter

  $     debug = p2 .nes. ""
  $     leadin = "      "
  $     module = p1
  $     if module .eqs. "" then inquire Module "Module name"
  $     if f$type($DIX_VERSION) .eqs. ""
  $      then
  $!
  $! Not under DIX
  $!
  $       libr/extr='module'/out=x.txt sys$share:starlet.mlb
  $       if .not. $STATUS then goto done
  $       open/read lun x.txt
  $       do_delete = 1
  $      else
  $!
  $! Under DIX we can open the module directly
  $!
  $       open/read/err=abort lun sys$share:starlet.mlb('module')
  $       do_delete = 0
  $      endif
  $     modnam = ""
  $     say:=write sys$output
  $10:  read lun line/end=done
  $     gosub split
  $     if kar .eqs. "K"
  $      then
  $       say leadin,"INTEGER*4  ''name'"
  $       say leadin,"PARAMETER (''name'=''offs')"
  $       goto 10
  $      endif
  $     if kar .eqs. "M"
  $      then
  $       say leadin,"INTEGER*4  ''name'"
  $       toffs = toffs - "<" - "^X" - ">"
  $       toffs = "'" + toffs + "'X"
  $       say leadin,"PARAMETER (''name'=''toffs')"
  $       goto 10
  $      endif
  $     if status .ne. 1 then goto 10
  $     if kar .eqs. "S"
  $      then
  $       oline = line
  $       otag  = tag
  $       wsize = offs
  $20:    read lun line/end=done
  $       gosub split
  $       if status .ne. 1 then goto 20
  $       if tag .eqs. otag
  $        then
  $!
  $! We need to process the previous line
  $!
  $         gosub process
  $        else
  $         if modnam .nes. "" then gosub finish
  $         modnam = otag
  $         modsize = wsize
  $         say leadin,"STRUCTURE /''modnam'/  !size ''modsize'"
  $         leadin = "        "
  $         ifil = 0
  $         offset = 0
  $        endif
  $!      set nover
  $      endif
  $     wsize = 0
  $     gosub process
  $!
  $     goto 10
  $done:  close lun
  $     if modnam .nes. "" then gosub finish
  $!
  $abort:       if do_delete then delete x.txt;
  $     exit
  $!
  $finish:
  $     if offset .ne. modsize
  $      then
  $         nb = modsize - offset
  $       say leadin,"BYTE FILLER_''ifil'(''nb')"
  $      endif
  $     leadin = "      "
  $     say leadin,"END STRUCTURE"
  $     return
  $!
  $process:
  $     if debug then say "    found line ",line
  $     nsize = 0
  $     is_int=1
  $     if kar .eqs. "B" then nsize = 1
  $     if kar .eqs. "W" then nsize = 2
  $     if kar .eqs. "L" then nsize = 4
  $     if kar .eqs. "A" then nsize = 4
  $     if kar .eqs. "Q" then nsize = 8
  $     if kar .eqs. "PS" then nsize = 4
  $     if kar .eqs. "PQ" then nsize = 8
  $     if kar .eqs. "PQ" then nsize = 8
  $     if kar .eqs. "T"
  $      then
  $       nsize = wsize
  $       is_int=0
  $      endif
  $     if nsize .ne. 0
  $      then
  $
  $       if offs .lt. offset then goto dn_pr
  $       if offs .ne. offset
  $        then
  $         ifil = ifil + 1
  $         nb = offs-offset
  $         say leadin,"BYTE FILLER_''ifil'(''nb')"
  $         offset = offs
  $        endif
  $!
  $       add_size = nsize
  $       if is_int
  $        then
  $         if wsize .ne. 0
  $          then
  $           nrep = wsize/nsize
  $           rep = "(''nrep')"
  $           add_size = wsize
  $          else
  $           rep = ""
  $          endif
  $         if nsize .eq. 1
  $          then
  $           def = "BYTE "
  $          else
  $           def = "INTEGER*''nsize' "
  $          endif
  $        else
  $         def = "CHARACTER*(''nsize')"
  $         rep = ""
  $        endif
  $       def = def + name + rep
  $       if f$length(def) .lt. 16 then def = f$fao("!16AS",def)
  $       say leadin,def,"      !Offset ''offs'"
  $       offset = offset + add_size
  $      endif
  $dn_pr:       return
  $split:
  $!
  $!
  $! Split line in parts
  $!  if correct line  status=1
  $!
  $!  $EQU    DSC64$S_DSCDEF64        16
  $!  results in
  $!     name = DSC$S_DSCDEF64
  $!       kar  = S
  $!       size = 16  (integer)
  $!       tag =  DSCDEF64
  $!
  $     kar = ""
  $     status = 0
  $     line = f$edit(line,"UNCOMMENT,COMPRESS,TRIM,UPCASE")
  $     tag = f$element(0," ",line)
  $     if tag .nes. "$EQU" then goto dn_split
  $!
  $     name = f$element(1," ",line)
  $     pos = f$locate("$",name)
  $     if pos .eq. f$length(name) then goto dn_split
  $     if f$extract(pos+1,1,name) .eqs. "_"
  $      then
  $       kar = "K"
  $      else
  $!
  $       if f$extract(pos+2,1,name) .eqs. "_"
  $        then
  $         kar  = f$extract(pos+1,1,name)
  $         tag = f$extract(pos+3,-1,name)
  $        else
  $         if f$extract(pos+3,1,name) .nes. "_" then goto dn_split
  $         kar  = f$extract(pos+1,2,name)
  $         tag = f$extract(pos+4,-1,name)
  $        endif
  $      endif
  $     toffs = f$element(2," ",line)
  $     offs  = f$integer(toffs)
  $!
  $     status = 1
  $dn_split:
  $     return

DIX Example scripts EXAMINE_BITS


  exa/bits

  $ DIX/INTER SYSUAF.WORK/MOD
  for flag in ["hex","oct","bin"]
   exa/hex/raw 0
   for k=1,64
    exam /'flag'/bits='k' 4.2
    xtest < exam /'flag'/bits='k' 4.2
    deposit /'flag'/bits='k' 'xtest'
    exam /'flag'/bits='k' 4.2
   end for
   exa/hex/raw 0
  end for

DIX Example scripts FEATURES_LIM_EXIT

  $ DIX/INTER
  ! Check for the limit/exit statement
  !
  open  mypend pending.org
  open  myuaf sysuaf.org
  show file/all/des
  read/ge="MAIL 01C" mypend
  examine mypend\*
  close mypend

DIX Example scripts FILE_SEARCH


  Search options

  $ DIX/FILE SYSUAF.ORG TCPIP *SNMP*/MAT=MAT/WILD=STAND/FIELD=*USER*

DIX Example scripts FILE_LIMIT

  $ DIX/INT
  open lun sysuaf.org/limit=(value=borgman,key=0)
  read lun
  exa *user*
  read lun
  exa *user*
  read lun
  exa *user*
  set file lun /nolimit
  read lun
  exa *user*
  set file lun /limit=(value=CHKPWD,key=0)
  read lun
  exa *user*
  read lun/err=notfnd
  say "Should not come here"
  goto done
  notfnd:
  error = $STATUS
  say "Correct error label"
  say "status = ",f$message(error)
  done:

DIX Example scripts FOR

  $ DIX/INT
  k = 20
  @for_sub 40,k
  sho symb k
  @for_sub

   And the file for_sub.dix contains

  entry jan,piet/symb
  show symb jan
  show symb piet
  integer k = 10
  integer a=10
  for k=1,11,2
   integer a
   if (k>5) leave
   a=k
   echo "k = ''k' ''a'"
  endfor
  for k=1,11,2
   integer a
   if (k>5) cycle
   a=k
   echo "k = ''k' ''a'"
  endfor
  say "k=''k'"
  sh symb *
  for k=11,1,-2
   echo "k = ''k'"
  endfor
  say "k=''k'"
  piet=k

DIX Example scripts FUNCTIONS


  interactive mode functions

  $ DIX/INT
  open sysuaf.org
  say and(15,3)
  say or(8,3)
  say not(4)
  say not(false)
  say even(2)
  say odd(2)
  say lshift(2,4)
  say lshift(%x7fffffff,4)
  say rshift(8,1)
  say rshift(%xffffffff,4)
  say mod(11,5)
  say max(3,6,9,10.9)
  say max(3,6,9,10.9,12)
  say min(3,6,9,1.9)
  say min(3,6,9,10.9)
  say real(4)
  say string(12)
  say logi(22)
  say int(12.73)
  say nint(12.73)
  say hex(12)
  say btest(12,3)
  say btest(12,4)
  say ibset(12,4)
  say ibset(12,3)
  say ibclr(12,4)
  say ibclr(12,3)
  say filecount()
  say f$mode()
  say f$decima(12,"-",3)
  say f$decimal(12.4)
  say f$radix(137,36)
  say f$add("12","23",6)
  say f$add("12","23",-6)
  say f$sub("12","23",6)
  say f$sub("12","23",-6)
  say f$mul("12","23")
  say f$divi("12","23",,4)
  say f$extzv(2,2,%x89)
  say f$extv(2,2,%x89)
  say f$insv(12,2,2,1)
  say f$envi("depth")
  say f$getdvi("sys$sysdevice","exists")
  say f$edit(" aldfklfa ","uppercase,collapse")
  say f$fao("!12AS = !12UL","X",12)
  say f$fis("TESTSTRING","SR")
  say f$fis("TESTSTRING","s","CASE")
  say f$fnis("AAATESTSTRING","A")
  say f$fnis("AAATESTSTRING","a","CASE")
  say f$date("12-OCT-2006")
  say f$date(1.3,"HOURS")
  say f$time("YEAR","23-OCT-2006")
  say f$check(0,644)
  say f$enum(2,"*BYT*")
  say f$trim("  asdlkj  ")
  say f$left("  asdlkj  ")
  say f$right("  asdlkj  ")
  say f$collapse("  asdlkj  ")
  say f$length(" af l ")
  say f$trnlnm("SYS$SYSTEM","LNM$SYSTEM")
  say f$descr(1)
  say f$file("NOK")
  say f$file("KLENGTH",,2)
  say f$file("KSPOS",,1,1)
  say f$element(3,"|","A|B|C|D|E|F")
  say f$element(-1,"|","A|B|C|D|E|F")
  say f$extract(2,2,"ABCDEF")
  say f$extract(-1,2,"ABCDEF")
  say f$messa(12)
  say f$match("AXY","*Y")
  say f$match("AXY","*Y%~","EXTEN")
  say f$upcase("AjAkAk")
  say f$lowcase("AjAkAk")
  say f$locate("A","ABCABCABC","A")
  say f$locate("*X*","ABCXBCABC","*X*","STAND")
  say f$locate("C~","ABCXBCABC","EXTEN")
  say f$locate("c~","ABCXBCABC","EXTEN","NOCASE")
  say f$char(65)
  mysymb = "jan"
  say f$exists("mysymb")
  say f$type("mysymb")
  say f$fexists("Uaf$L_UIC")
  say f$verify()
  say f$ichar("A")
  a=%DATA("DATA")
  sh symb a
  say f$key(0,"PRESENT")
  say f$key(1,"VBNDATA","SYSUAF")
  say f$area(0,"EXTENSION","SYSUAF")
  say %recordnumber()
  say %recordsize()
  say %loc("UAF$L_UIC")
  say %bloc("UAF$L_UIC")
  say %bloc("UAF$B_PRIMEDAYS{"tuesday"}")
  say %bloc(UAF$B_PRIMEDAYS{"tuesday"})
  say UAF$B_PRIMEDAYS{"tuesday"}

DIX Example scripts IF


  If statement

  $ DIX/INT
  x=0
  if (x=0) then
   say "x=0"
   goto tst
  else
   say "x<>0"
  endif
  tst:
  x=3
  if (x=0) then
   say "x=0"
  else
   say "x<>0"
  endif
  if (x>0) say "jopied"
  if (x>0) then
   say "X again > 0"
  endif
  x=0
  if (x>0) then
   say "X again > 0"
  endif
  !
  a=10
  if a>100
  then say "a>10"
   say "na then"
  else say "a<=10"
   say "na else"
  endif
  a=101
  if a>100
  then say "a>10"
   say "na then"
  else say "a<=10"
   say "na else"
  endif

DIX Example scripts INFO


  FILE/INFO command

  $ DIX/INFO/FULL SYSUAF.ORG

DIX Example scripts KEYS


  define/key

  $ DIX/INTER
  !
  define/key f20 "show time"
  define/key f19/if="test" "show vi"
  show keys
  show keys/state=test
  dele/key f20
  show keys
  del/key f19
  del/key f19/state=test
  show keys
  exit

DIX Example scripts LOCKED


  Locked file access

  $ DIX/INTER
  open sys1 sysuaf.work/modify
  read sys1 /eq="STUBBF"
  open sys2 sysuaf.work/modify
  read sys2 /eq="STUBBF"
  ne fi
  sh file
  exam/tag *bytlm*
  dep uaf$l_pbytlm=5000
  update/err=should
  echo "***error-Unexpected "
  should:close sys1
  exam/tag *bytlm*
  update/err=should2/canc
  echo "***error-Unexpected "
  should2:read sys2 /eq="STUBBF" 
  close sys2
  exam/tag *bytlm*

DIX Example scripts LOOP

  $ DIX/INT
  integer a=10
  loop
   a=a + 1
   test a<16
   say "New value of a=",a
  endloop

DIX Example scripts LOOP_TEST


  all kind of loop statements

  $ DIX/INTER
  goto jan
  jan:

  for k=1,5
   say -
   "FOR:the value of k = ",k
  call test
  endfor

  k = 1
  while (k<=6)
   say "WHILE:the value of k = ",k
   k = k + 1

  endwhile
  k=1
  repeat
   say "REPEAT:the value of k = ",k
   k = k + 1
  until k=6

  test: subroutine
   say "In subroutine"
   l = 1
   repeat
    say "REPEAT:the value of l = ",l
    l = l + 1
   until l=6

  endsubroutine

  k = 1
  loop
   say "LOOP:the value of k = ",k
  testloop k<=6
   k = k + 1
  endloop

  for k=1,4
   say "FOR:the value of k = ",k
   if (k>2) goto done
  endfor

  done:
  say "Test completed"

DIX Example scripts MODIFY

  $ DIX/INTER
  open haay programs_top:[dix.regres]sysuaf.work/modify
  sel file haay
  say "This proc = ",f$envir("PROCEDURE")
  read/eq="STUBBF"
  exa *dev*
  deposit uaf$t_defdev="Testdisk"
  Update
  read /eq="STUBBF1"/err=not_found
  echo "Unexpected position"
  not_found:
  echo "status from read = ''$STATUS'"
  read/eq="SYSTEM"
  exa *de*
  read/eq="STUBBF"
  exa *dev*
  close haay

DIX Example scripts MOVE

  $ DIX/INTER
        cnt= 0
        open file1 sysuaf.org
        open file2 x.x /create/modify /des=newdes_move.des
  lp:   crea/ record file2
        move file1 file2/log
        cnt=cnt+1
        file2\cnt = cnt
        update file2
        read file1/end=done
        if cnt<4 goto lp
  done:
        dump file2/rewind
        close file2
        close file1
        spawn delete x.x;

DIX Example scripts MULTIPLE_FILES_DES


  Test for multiple files/descriptions

  $ DIX/INT
  open sysuaf sysuaf.org
  sel file sysuaf
  open pend pending.org
  next file
  open pend partition.org
  add des profile
  prev file
  say "First file=", f$file("NAME",2)
  tag = f$file("TAG",2)
  k = 1
  lp1:xx = f$file("des",tag,"name",k)
  if (xx <> "") then
   say "Descriptor ''k' is = ",xx
   k = k + 1
   desc = xx
   goto lp1
  endif
  show file/all/des
  desc = f$file("des",tag,"name",1)
  fn1 = tag+"\"+desc+"\"
  !
  say "Second file = ",f$file("name",3)
  tag = f$file("TAG",3)
  k = 1
  lp2:xx = f$file("des",tag,"name",k)
  if (xx <> "") then
   say "Descriptor ''k' is = ",xx
   desc = xx
   k = k + 1
   goto lp2
  endif
  !
  fd1 = fn1+"uaf$w_fillm"
  say "examine ",fd1
  exa 'fd1'
  desc = f$file("des",3,"tag",1)
  fn2 = tag+"\"+desc+"\"
  fd2 = fn2 + "total_attr_size"
  desc = f$file("des",3,"tag",2)
  fn3 = tag+"\"+desc+"\"
  fd3 = fn3 + "a1naam"
  say "examine ",fd2
  exa 'fd2'
  exa 'fd3'
  exa uaf$w_fillm
  next file
  exa 'fd1'
  exa 'fd2'
  exa 'fd3'
  exa total_attr_size
  next des
  exa 'fd1'
  exa 'fd2'
  exa 'fd3'
  exa a1naam
  close 'tag'
  close sysuaf

DIX Example scripts NUMOPER


  type assignments

  $ DIX/INT
  !
  ! Try i*4/8 /i4
  !
  v1=#inte*4"10"
  v2=#inte*4"1234567"
  v21=#inte*4"5"
  gosub test_all
  !
  v1=#inte*8"10"
  v2=#inte*4"1234567"
  v21=#inte*4"5"
  gosub test_all
  !
  ! Try*4/8 with i8
  !
  v1=#inte*4"10"
  v2=#inte*8"12345678912"
  v21=#inte*8"5"
  gosub test_all
  !
  v1=#inte*8"10"
  v2=#inte*8"12345678912"
  v21=#inte*8"5"
  gosub test_all
  !
  ! try real*4/8/16 with all real*4
  !!
  v1=#real*4"10.0"
  v2=#real*4"12345678912.0"
  v21=#real*4"5"
  gosub test_all
  !
  v1=#real*8"10.0"
  v2=#real*4"12345678912"
  v21=#real*4"5"
  gosub test_all
  !
  v1=#real*16"10.0"
  v2=#real*4"12345678912"
  v21=#real*4"5"
  gosub test_all
  !
  ! try real*4/8/16 with all real*8
  !
  v1=#real*4"10.0"
  v2=#real*8"12345678912"
  v21=#real*8"5"
  gosub test_all
  !
  v1=#real*8"10.0"
  v2=#real*8"12345678912"
  v21=#real*8"5"
  gosub test_all
  !
  v1=#real*16"10.0"
  v2=#real*8"12345678912"
  v21=#real*8"5"
  gosub test_all
  !
  ! try real*4/8/16 with all real*16
  !!!
  v1=#real*4"10.0"
  v2=#real*16"12345678912"
  v21=#real*16"5"
  gosub test_all
  !
  v1=#real*8"10.0"
  v2=#real*16"12345678912"
  v21=#real*16"5"
  gosub test_all
  !
  v1=#real*16"10.0"
  v2=#real*16"12345678912"
  v21=#real*16"5"
  gosub test_all
  !
  exit

  test_all:
  show symb/fu v*
  q=v1+v2
  show symb/fu q
  q=v1-v2
  show symb/fu q
  q=v1*v2
  show symb/fu q
  q=v1/v2
  show symb/fu q
  q=v1**v21
  show symb/fu q
  !
  q=v2+v1
  show symb/fu q
  q=v2-v1
  show symb/fu q
  q=v2*v1
  show symb/fu q
  q=v2/v1
  show symb/fu q
  q=v21**v1
  show symb/fu q
  return

DIX Example scripts OVERFLOW


  Test overflow function

  $ DIX/INTER
  !
  !Check assignments
  !
  set noon
  big = 10000000
  say big*big
  say "overflow seen = ",%overflow
  say big*big*big
  say "overflow seen = ",%overflow
  !
  set overflow dis
  say big*big
  say "overflow seen = ",%overflow
  say big*big*big
  say "overflow seen = ",%overflow
  !
  on overflow goto seen_ov1
  say big*big*big
  ECHO "** error, Unexpected1"
  goto jmp1
  seen_ov1:say "overflow1 seen = ",%overflow
  jmp1:
  !
  on overflow goto seen_ov2
  set over enab
  say big*big*big
  ECHO "** error, Unexpected2 "
  goto jmp2
  seen_ov2:say "overflow2 seen ",%overflow
  jmp2:
  !
  on overflow goto seen_ov3
  set over enab
  say big+big
  say "Oke ",%overflow
  goto jmp3
  seen_ov3:echo "** error, Seen overflow3"
  jmp3:
  !
  on overflow goto seen_ov4
  set over disa
  say big+big
  say "Oke ",%overflow
  goto jmp4
  seen_ov3:echo "** error, Seen overflow4"
  jmp4:
  !
  set over disa
  on overflow say "Seen overflow ",%overflow
  say big*big
  say "oke ",%overflow
  !
  set over ena
  on overflow say "Seen overflow ",%overflow
  say big*big
  say "oke ",%overflow
  !
  on overflow
  say big*big
  say "oke ",%overflow

  say big+big
  say "All test done ",%overflow

DIX Example scripts REALS


  Check for reals (native and non-native)

  $ DIX/INTER REALS.WORK/MODIFY
  exa
  real_f = real_x*10
  real_s = real_x*100
  real_g = real_x*1000
  real_d = real_x*10000
  real_t = real_x*100000
  real_h = real_x*1000000
  real_x = real_x*10000000
  exa
  undo
  real_f = real_h/10
  real_s = real_h/100
  real_g = real_h/1000
  real_d = real_h/10000
  real_t = real_h/100000
  real_h = real_h/1000000
  real_x = real_h/10000000
  exa
  undo
  a=real_f
  sh symb/full a
  a=real_s
  sh symb/full a
  a=real_g
  sh symb/full a
  a=real_d
  sh symb/full a
  a=real_t
  sh symb/full a
  a=real_h
  sh symb/full a
  a=real_x
  sh symb/full a

DIX Example scripts REDIR


  Output redirection to symbol

  $ DIX/INTER
  show symb
  #<show symb
  #test<show symb
  show symb/fu/all test
  #test2<show symb
  show symb/fu/all test2
  #test<show symb
  show symb/fu/all test

DIX Example scripts SORT_READ


  Test for f$sort

  $ DIX/INTER
  a=f$read("sort_read.dix")
  show symb /fu a
  say/tab/vert a
  b = f$sort(a)
  show symb /fu b
  say/tab/vert b
  b = f$sort(a,,"REV")
  show symb /fu b
  say/tab/vert b
  a=[[[1,2,3][4,5,6][7,8,9]][[19,18,17][56,55,54][53,52,51]][[21,22,23][24,25,26][27,28,29]]]
  say/tab a
  say/tab f$sort(a)
  say/tab f$sort(a,[2,1])
  say/tab f$sort(a,[1,2])

DIX Example scripts SUBFIELDS


  Test subfields

  $ DIX/INTER SYSUAF.WORK/MODIFY
  exam *prime*{*}
  exam *prim*{1:2}
  exam *prim*{*:2}
  exam *prim*{1:*}
  exam *prim*{*:*}
  exam *prim*{*}
  deposit *prim*{*}=false
  deposit *prim*{"*f*"}=true
  exa *prim*{*}
  deposit *prim*{*}=true
  undo/last
  exa *prim*{*}
  !
  say uaf$q_priv{"*"}
  say uaf$q_priv{*}
  uaf$q_priv{1:4}=true
  say uaf$q_priv{0:5}
  uaf$q_priv{1:4}=false
  say uaf$q_priv{0:5}
  exit

DIX Example scripts SUBROUTINE


 Test call

  $ DIX/INT
  call jan 10,20
  say "just before 2nd time subr jan"
  call jan 20,20
  say "just after second time"
  jan: subroutine a,b
  sh symb a
  if(a>12) exit
  sh symb b
  endsubroutine
  say "just after subr"

DIX Example scripts SYMBOL_TABLE


   Define symbols/tables

  $ DIX/INT
  set ver
  declar a(4:10:3,5:6)
  sh symb /all a
  a(4,*) = 12
  sh symb /all a
  sh symb a(*,*)
  a(5,5)=1
  a(4,4)=1

DIX Example scripts SYSUAF_UPD


  test field update

  $ DIX/INTER
  !
        open programs_top:[dix.regres]sysuaf.work/mod
        show file/all
        sel file sysuaf
  !
        cut
        deposit uaf$w_account=10
        paste
  !
        nmod = 0
        nfnd = 0
        on error goto done
        read /GE="TEST_DIX"
        deposit uaf$l_bytlm=50000
        update/quiet
        read /GE="TEST_DIX"
  loop:
        nfnd = nfnd + 1
        echo "Found user ''uaf$t_username'"
        if (f$matchwild(uaf$t_username,"*TEST_DIX*")) goto next
        if (uaf$l_bytlm < 50000) 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:
        next record
        goto loop
  done:
        echo "status = ''$STATUS'"
        echo "Found ''nfnd' users, modified ''nmod' users"
        close sysuaf

DIX Example scripts SYSUAF_OLD_USER


  Make a list of users not logged in for a number of days

        nday = p1
        if nday = 0 then inquire nday "How many days"
        check_date = f$cvtime("-''nday' 0:00:0","BINARY")
        say "Check for users not logged in since ",check_date
        open sysuaf
        n_users = 0
        n_old   = 0
  loop: last_date = max(UAF$Q_LASTLOGIN_I,UAF$Q_LASTLOGIN_N)

        if last_date < check_date then
          say "User ",UAF$T_USERNAME," last logged in at ",last_date
          n_old = n_old + 1
        endif
        next record /end=done
        goto loop
  done: close sysuaf
        say "Found ''n_users' users, ''n_old' have not logged in for ''nday' days"
        exit

DIX Example scripts SYSUAF_UPD_USER


  test for user define field type

  $ DIX/INTER
  !
        open programs_top:[dix.regres]sysuaf.work/mod/desc=sysuaf_user.des
        exami *lastlogin*
        depo uaf$q_lastlogin_n=0,0,0,0,0,0,0,10
        exami *lastlogin*
        undo
        trunc 40
        exa
        trunc 644
        exa
        exit

  And the file sysuaf_user.des contains

  BYTE         UAF$B_RTYPE       !  UAF-record type
  ....
  mytype*8/user UAF$Q_LASTLOGIN_N
  bits*8       UAF$Q_PRIV -
  [CMKRNL,CMEXEC,SYSNAM,GRPNAM,ALLSPOOL,IMPERSONATE,DIAGNOSE,LOG_IO,GROUP,NOACNT,PRMCEB,PRMMBX,PSWAPM,SETPRI,SETPRV,TMPMBX,-
  WORLD,MOUNT,OPER,EXQUOTA,NETMBX,VOLPRO,PHY_IO,BUGCHK,PRMGBL,SYSGBL,PFNMAP,SHMEM,SYSPRV,BYPASS,SYSLCK,SHARE,UPGRADE,DOWNGRADE,-
  GRPPRV,READALL,IMPORT,AUDIT,SECURITY,,,ACNT,,,,ALTPRI]
  ..
  !here starts the user_defined field type
  symbol no
  #type mytype
   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 (is 8*8 bits)
   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                    !assume 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

DIX Example scripts TABLES


  Table tests

  $ DIX/INT
  a=[[[1,2][3,4]][[5,6][9,10]]]
  sho symb/a  a
  a(1,*,1)=301
  show symb/all a
  c=a(2,*,1)
  sh symb /al c

DIX Example scripts TABLE_APPEND


  Testing table append function

  $ DIX/INT
  a1=[[1,2,3][4,5,6]]
  b1=[[11,12,13][14,15,16]]
  b11=[[11][14]]
  say f$append(a1,b1)
  say f$append(a1,b11)
  !
  a2=[1,2,3]
  b2=[14,15,16]
  b21=11
  say f$append(a2,b2)
  say f$append(a2,b21)
  !
  say f$appe(1,[2,3],5)
  say f$appe(1,[2,3],5,[7,8])
  !
  ! This one should fail
  !
  say f$append(a2,b1)
  exit

DIX Example scripts TEST_DATES


 Test all kinds of dates

  $ DIX/INT
  cpu=#cpu"10 10:00:00.00"
  del=#delta"10 10:00:00.00"
  tim=#date"1-JAN-2008 10:00:00.00"
  tim4=#date*4"1-JAN-2008 10:00:00.00"
  udat=#udate"1-JAN-2008 10:00:00.00"
  sh symb/fu cpu
  sh symb/fu del
  sh symb/fu tim
  sh symb/fu tim4
  sh symb/fu udat
  ! adds
  ; a=tim+cpu ; show symb/fu a
  ; a=tim+del ; show symb/fu a
  ; a=tim4+cpu ; show symb/fu a
  ; a=tim4+del ; show symb/fu a
  ; a=udat+cpu ; show symb/fu a
  ; a=udat+del ; show symb/fu a
  ; a=cpu+cpu ; show symb/fu a
  ; a=cpu+del ; show symb/fu a
  ; a=del+tim ; show symb/fu a
  ; a=del+tim4 ; show symb/fu a
  ; a=del+cpu ; show symb/fu a
  ; a=del+del ; show symb/fu a
  ; a=del+udat ; show symb/fu a
  !subs
  ; a=tim-cpu ; show symb/fu a
  ; a=tim-del ; show symb/fu a
  ; a=tim4-cpu ; show symb/fu a
  ; a=tim4-del ; show symb/fu a
  ; a=udat-cpu ; show symb/fu a
  ; a=udat-del ; show symb/fu a
  ; a=cpu-cpu ; show symb/fu a
  ; a=cpu-del ; show symb/fu a
  ; a=udat-cpu ; show symb/fu a
  ; a=udat-del ; show symb/fu a
  ; a=del-cpu ; show symb/fu a
  ; a=del-del ; show symb/fu a
  ;
  ; a=del*2 ; show symb/fu a
  ; a=cpu*2 ; show symb/fu a
  ; a=2*del ; show symb/fu a
  ; a=2*cpu ; show symb/fu a
  ; a=del/2 ; show symb/fu a
  ; a=cpu/2 ; show symb/fu a

DIX Example scripts TEST_READ


  Test read function

  $ DIX/INTERACT
  open programs_top:[dix.regres]sysuaf.org
  sel file sysuaf
  read/eq=stubbf/err=notf
  exa *
  exam/all *name*

  read/eq=jans78/err=notf
  goto weg
  notf:echo "record not found"
  close /log

DIX Example scripts TEST_SUBFIELD


  Test subfields

  $ DIX/INT
  set noon
  open test_subfield.work/des=sys$input/mod
  deck                  !inline description
   integer*4 int_val
   uinteger*4 uint_val
   bits*4 bit_val
   rbits*4 rbit_val
   date*4 date4_val
   date date_val
   udate udate_val
   cpu cpu_val
   deltatime delta_val
   privilege priv_val
   bytearr*20 bytearr_val
   character*20 char_val
   protection prot_val
   fileid fileid_val
   rfa rfa_val
   bktrfa*6 bkrtra6_val
   bktrfa*5 bkrtra5_val
   bktrfa*4 bkrtra4_val
   byte %fill(644)
  eod
  exa *
  exa *{*}
  value_int_val = int_val
  value_uint_val =  uint_val
  value_bit_val =  bit_val
  value_rbit_val =  rbit_val
  value_date4_val =  date4_val
  value_date_val = date_val
  value_udate_val = udate_val
  value_cpu_val = cpu_val
  value_delta_val = delta_val
  value_priv_val = priv_val
  value_bytearr_val = bytearr_val
  value_char_val = char_val
  value_prot_val = prot_val
  value_fileid_val = fileid_val
  value_rfa_val = rfa_val
  value_bkrtra6_val = bkrtra6_val
  value_bkrtra5_val = bkrtra5_val
  value_bkrtra4_val = bkrtra4_val
  !
  say value_int_val
  say value_int_val{*}
  say int_val
  say int_val{*}
  say value_uint_val
  say value_uint_val{*}
  say uint_val
  say uint_val{*}
  say value_bit_val
  say value_bit_val{*}
  say bit_val
  say bit_val{*}
  say value_rbit_val
  say value_rbit_val{*}
  say rbit_val
  say rbit_val{*}
  say value_date4_val
  say value_date4_val{*}
  say date4_val
  say date4_val{*}
  say value_date_val
  say value_date_val{*}
  say date_val
  say date_val{*}
  say value_udate_val
  say value_udate_val{*}
  say udate_val
  say udate_val{*}
  say value_cpu_val
  say value_cpu_val{*}
  say cpu_val
  say cpu_val{*}
  say value_delta_val
  say value_delta_val{*}
  say delta_val
  say delta_val{*}
  say value_priv_val
  say value_priv_val{*}
  say priv_val
  say priv_val{*}
  say value_bytearr_val
  say value_bytearr_val{*}
  say value_char_val
  say value_char_val{*}
  say bytearr_val
  say bytearr_val{*}
  say value_prot_val
  say value_prot_val{*}
  say prot_val
  say prot_val{*}
  say value_fileid_val
  say value_fileid_val{*}
  say fileid_val
  say fileid_val{*}
  say value_rfa_val
  say value_rfa_val{*}
  say rfa_val
  say rfa_val{*}
  say value_bkrtra6_val
  say value_bkrtra6_val{*}
  say bkrtra6_val
  say bkrtra6_val{*}
  say value_bkrtra5_val
  say value_bkrtra5_val{*}
  say bkrtra5_val
  say bkrtra5_val{*}
  say value_bkrtra4_val
  say value_bkrtra4_val{*}
  say bkrtra4_val
  say bkrtra4_val{*}
  !
  ! Int/bit
  !
  nam = "int_val"
  val = 1
  idx = 2
  gosub test
  nam = "uint_val"
  gosub test
  nam = "bit_val"
  gosub test
  nam =  "rbit_val"
  gosub test
  nam = "priv_val"
  gosub test
  !
  ! Date test
  !
  nam =  "date4_val"
  gosub test
  nam = "date_val"
  gosub test
  nam = "udate_val"
  gosub test
  nam = "cpu_val"
  gosub test
  nam = "delta_val"
  gosub test
  !
  !
  !
  nam = "bytearr_val"
  gosub test
  !
  ! Special cases
  !
  nam = "prot_val"
  gosub test
  nam = "fileid_val"
  gosub test
  nam = "rfa_val"
  gosub test
  nam = "bkrtra6_val"
  gosub test
  nam = "bkrtra5_val"
  gosub test
  nam = "bkrtra4_val"
  gosub test
  !
  ! Character type
  !
  nam = "char_val"
  val = "x"
  gosub test
  !
  ! Extra tests
  !
  value_int_val{1:2}=[1,0]
  say/hex value_int_val
  value_int_val{7:10}=1
  say/hex value_int_val
  value_int_val{10:7}=0
  say/hex value_int_val
  value_int_val{1:10:2}=1
  say/hex value_int_val
  value_int_val{10:1:-2}=0
  say/hex value_int_val
  !
  exit
  test:
  say/hex value_'nam'
  say value_'nam'
  value_'nam'{'idx'}=val
  say/hex value_'nam'
  say value_'nam'
  !
  exa/hex 'nam'
  exa 'nam'
  dep 'nam'{'idx'}='val'
  exa/hex 'nam'
  exa 'nam'
  return

DIX Example scripts TYPES


  test types

  $ DIX/INT
  add type days="0=sun,1=mon,2=tue,3=wed,4=thu,5=fri,6=sat"
  integer/type=#days r=wed
  sh symb /fu r
  r=sat
  say r
  sh symb /fu r
  r=4
  sh symb r
  r=40
  sh symb r

DIX Example scripts VIEW


  Test views

  $ DIX/INT DIX.CRF_CROSS/VIEW=CROSS.VIEW/MOD
  examin
  deposit mod_name=dox
  examin
  undo
  examin

  And the file cross.view contains

  field caller_nr
  follow caller_nr
  gosub do_it
  field/readonly called_nr
  follow/read called_nr
  gosub do_het
  exit

  do_it:
    field mod_name
    follow/read file_nr
    field file_name
    back
    back
  return

DIX Example scripts VIEW_LINE


  Views in file mode

  $ DIX/FILE/COUNT=1 DIX.CRF_CROSS/FOLL=(BEGIN,SKIP)/CSV=HEADER

DIX Example scripts VIEW_LINE1


  Views in file mode (CSV output)

  $ DIX/FILE/COUNT=1 DIX.CRF_CROSS/FOLL=(FIELD)/CSV=HEADER

DIX Example scripts WHILE


 Test of the WHILE

  $ DIX/INTER
  x = 2
  loop:
  a= 3
  while a>0
   b = 2
   repeat
    say "a= ''a' b = ''b'"
    b = b - 1
   until b=0
   show symb a
   a= a-1
   show symb a
  endwhile
  x = x-1
  show symb x
  if (x>0) goto loop
  if (x=0) then
   say "x=0"
  else
   say "x<>0"
  endif
  x=3
  if (x=0) then
   say "x=0"
  else
   say "x<>0"
  endif

DIX Example scripts INDEX_SYMBOLS

  a=f$read("release_notes.txt",,,"White")       !read the file and split
  sh symb/fu a                                  !will be a 2 dim table
  integer/index=char/sort count                 !declare an index symbol
  for x in a                                    !increment for all elements in a
   count(x)++
  end for
  show symb/fu count  !is a table indexed by a string
                      !counting how often "text" occurs
  say count("the")
  say count("and")
  count("the")+= + 1
  say count("the")
  count("the")=count("and") + 1
  say count("the")
  delete/symb count
  !
  declare/index=date present/log        !another example (index=date)
  present(#DATE"1-JAN-2008")=true
  present(#DATE"1-JAN-2009:12:12:13.12")=true
  present(#DATE"1-JAN-2020")=false
  show symbo/fu/all present
  say "the value of 2008 = ",present(#DATE"1-JAN-2008")
  say "the value of 2012 = ",present(#DATE"1-JAN-2012")

DIX Example scripts DCL_COMPAT_SCRIPT


  A script to read a make file and create a Fortran include file
  with names/versions/creation dates

 $ DIX/INT
 DIX> @SYS$INPUT/DCL    !execute in DCL mode
  $     version_inc_file = "x.x"  !output file
  $     open/read fi dix.version  !read the version file
  $     read fi version
  $     close fi
  $     open/read lun dix.make    !open the make file
  $     cnt_inc = 0
  $     cnt_src = 0
  $     max_len = 0
  $     def_ext = ".FOR"
  $
  $10:  read lun line/end=done
  $     line = f$edit(line,"UPCASE,COLLAPSE,UNCOMMENT")
  $     if line .eqs. "" then goto 10
  $     if f$extract(0,1,line) .eqs. ":"        !make options
  $      then
  $       if f$extract(1,3,line) .eqs. "INC"      !include file?
  $        then
  $         ipos = f$locate("=",line)           !the line contains , separated
  $         names = f$extract(ipos+1,-1,line)     !include files
  $         k12 = 0
  $lpf1:    name = f$element(k12,",",names)
  $         if name .nes. ","
  $          then
  $           gosub add_inc                     !add one more include file
  $           k12 = k12 + 1
  $           goto lpf1
  $          endif
  $        endif
  $      else
  $       idx = 0
  $       name = f$element(idx,",",line)        !normal file line
  $       name = f$element(0,"/",name)          !source[/quals][,include files]
  $       gosub add_src                         !first line is source
  $15:    idx = idx + 1                         !now test all includefiles
  $       name = f$element(idx,",",line)
  $       if name .nes. ","
  $        then
  $         gosub add_inc
  $         goto 15
  $        endif
  $      endif
  $     goto 10
  $done:
  $     close lun
  $     gosub print                             !start printing
  $     return
  $add_inc:
  $     nm = "inc"
  $     goto add_file
  $add_src:
  $     nm = "src"                              !source can have _'architecture'
  $     ipos = f$locate("'ARCHITECTURE'",name)
  $     if ipos .ne. f$length(name)
  $      then
  $       nam1 = f$extract(0,ipos,name)         !try all 3 architectures
  $       name = nam1 + "VAX"
  $       gosub add_file
  $       name = nam1 + "ALPHA"
  $       gosub add_file
  $       name = nam1 + "IA64"
  $      endif
  $     ipos = f$locate("'ARCHITECTURE_",name)  !or 'architecture_xyz
  $     if ipos .ne. f$length(name)             !file_vax and file_not_vax
  $      then
  $       nam1 = f$extract(0,ipos,name)
  $       nam2 = f$extract(ipos+14,-1,name)     !get the arch name
  $       nam2 = f$element(0,"'",nam2)          !add source with _not_arch
  $       name = nam1 + "NOT_"+nam2
  $       gosub add_file
  $       name = nam1 +nam2                     !and one with _arch
  $      endif
  $add_file:
  $!
  $! Add the default extension
  $!
  $     if f$locate(".",name) .eq. f$length(name) then name = name + def_ext
  $     fn1 = f$search(name)                   !see if the file exists
  $     if name .eqs. version_inc_file         !for the versionfile itself
  $      then
  $       dt = f$time()                        !get now
  $      else
  $       dt = ""                              !else leave it open
  $      endif
  $     name = name + f$parse(fn1,,,"VERSION")
  $     k = 1
  $ lp1:                                       !see if we already have it
  $     if k .le. cnt_'nm'
  $      then
  $       if name_'nm'_'k' .eqs. name then goto dn1
  $       k = k + 1
  $       goto lp1
  $      endif                                 !no, we have one more
  $     cnt_'nm' = cnt_'nm' + 1
  $     k = cnt_'nm'                           !add the name to the list
  $     name_'nm'_'k' = name
  $     if dt .eqs. "" then dt = f$file(name,"CDT")  !get creation date
  $     date_'nm'_'k' = dt
  $     if f$length(name) .gt. max_len then max_len = f$length(name)
  $dn1: return
  $!
  $print:
  $     max_len = max_len
  $!
  $     open/write out 'version_inc_file'      !create output file
  $     write out "     character*(*) dix_version"
  $     write out "     parameter    (dix_version = '",version,"')"
  $     write out "     character*(*) dix_creation_date"
  $     write out "     parameter    (dix_creation_date = '",f$time(),"')"
  $!
  $     ntot = cnt_inc + cnt_src                !so many lines
  $     write out "     INTEGER N_MODULES"
  $     write ouT "     PARAMETER (N_MODULES = ''ntot')"
  $     write out "     INTEGER MAX_LEN_MODULES"
  $     write ouT "     PARAMETER (MAX_LEN_MODULES = ''max_len')"
  $     write out "     CHARACTER*(''max_len') MODULE_NAMES(''ntot')"
  $     write out "     CHARACTER*(23) MODULE_DATES(''ntot')"
  $     nm = "inc"
  $     gosub print_them                        !print include files
  $     nm = "src"
  $     gosub print_them                        !print the source files
  $     close out
  $     return
  $print_them:
  $!
  $! Find the smallest
  $!
  $lp2: small_nam = "~" !Large value
  $     idx_nam = 0
  $     k = 1
  $lp21:
  $     if k .le. cnt_'nm'
  $      then
  $       nam = name_'nm'_'k'                   !get the name
  $       if nam .nes. ""                       !if not empty (already processed)
  $        then
  $         if nam .lts. small_nam
  $          then
  $           small_nam = nam                   !new small name
  $           idx_nam = k                       !and remember the index
  $          endif
  $        endif
  $       k=k+1
  $       goto lp21
  $      endif
  $     if idx_nam .ne. 0
  $      then
  $       nam = name_'nm'_'idx_nam'             !we have the smallest name
  $       write out "   DATA MODULE_NAMES(''idx') /'" + nam + "'/"
  $       nam = date_'nm'_'idx_nam'
  $       write out "   DATA MODULE_DATES(''idx') /'" + nam + "'/"
  $       name_'nm'_'idx_nam' = ""              !and clear it
  $       idx = idx + 1
  $       goto lp2
  $      endif
  $     return

 The same script can be done much faster using sorted indexed symbols
 This means we are not interested if a name comes twice, and this
 also takes care of the sorting

  $     version_inc_file = "x.x"
  $     open/read fi dix.version                !get the version
  $     read fi version
  $     close fi
  $     open/read lun dix.make                  !open make file
  $     def_ext = ".FOR"
  $     integer*4/index=character/sorted list_inc !create sorted indexed symbol
  $     integer*4/index=character/sorted list_src !for include files / sources
  $     max_len = 0
  $10:  read lun line/end=done
  $     line = f$edit(line,"UPCASE,COLLAPSE,UNCOMMENT")
  $     if line .eqs. "" then goto 10
  $     if f$extract(0,1,line) .eqs. ":"
  $      then
  $       if f$extract(1,3,line) .eqs. "INC"
  $        then
  $         ipos = f$locate("=",line)
  $            names = f$extract(ipos+1,-1,line)
  $           k12 = 0
  $lpf1:      name = f$element(k12,",",names)
  $           if name .nes. ","
  $            then
  $             gosub add_inc
  $             k12 = k12 + 1
  $             goto lpf1
  $            endif
  $          endif
  $      else
  $       idx = 0
  $       name = f$element(idx,",",line)
  $       name = f$element(0,"/",name)
  $       gosub add_src
  $15:    idx = idx + 1
  $       name = f$element(idx,",",line)
  $       if name .nes. ","
  $        then
  $         gosub add_inc
  $         goto 15
  $        endif
  $      endif
  $     goto 10
  $done:
  $     close lun
  $     gosub print
  $     return
  $add_inc:
  $     nm = "inc"
  $     goto add_file
  $add_src:
  $     nm = "src"
  $     ipos = f$locate("'ARCHITECTURE'",name)
  $     if ipos .ne. f$length(name)
  $      then
  $       nam1 = f$extract(0,ipos,name)
  $       name = nam1 + "VAX"
  $       gosub add_file
  $       name = nam1 + "ALPHA"
  $       gosub add_file
  $       name = nam1 + "IA64"
  $      endif
  $     ipos = f$locate("'ARCHITECTURE_",name)
  $     if ipos .ne. f$length(name)
  $      then
  $       nam1 = f$extract(0,ipos,name)
  $       nam2 = f$extract(ipos+14,-1,name)
  $       nam2 = f$element(0,"'",nam2)
  $       name = nam1 + "NOT_"+nam2
  $       gosub add_file
  $       name = nam1 +nam2
  $      endif
  $add_file:
  $!
  $! Add the default extension
  $!
  $     if f$locate(".",name) .eq. f$length(name) then name = name + def_ext
  $     fn1 = f$search(name)
  $     name = name + f$parse(fn1,,,"VERSION")          !add the version
  $     list_'nm'(name)++               !store a new name (increment counter)
  $     if f$length(name) .gt. max_len then max_len = f$length(name)
  $     return
  $!
  $print:
  $     max_len = max_len
  $!
  $     open/write/log out 'version_inc_file'
  $     write out "     character*(*) dix_version"
  $     write out "     parameter    (dix_version = '",version,"')"
  $     write out "     character*(*) dix_creation_date"
  $     write out "     parameter    (dix_creation_date = '",f$time(),"')"
  $!
  $     cnt_inc = f$symbol(list_inc,"highdim",2)        !get # include files
  $     cnt_src = f$symbol(list_src,"highdim",2)        !get # sources
  $     sh symb cnt*
  $     ntot = cnt_inc + cnt_src
  $     write out "     INTEGER N_MODULES"
  $     write out "     PARAMETER (N_MODULES = ''ntot')"
  $     write out "     INTEGER MAX_LEN_MODULES"
  $     write out "     PARAMETER (MAX_LEN_MODULES = ''max_len')"
  $     write out "     CHARACTER*(''max_len') MODULE_NAMES(''ntot')"
  $     write out "     CHARACTER*(23) MODULE_DATES(''ntot')"
  $     nm = "inc"
  $     idx = 0
  $     gosub print_them
  $     nm = "src"
  $     gosub print_them
  $     close out
  $     return
  $print_them:
  $!
  $! Find the smallest
  $!
  $     for nam in list_'nm'(,2)        !go through all elements and
  $                                     !return index (not value)
  $       write out "   DATA MODULE_NAMES(''idx') /'" + nam + "'/"
  $       dt = f$file(nam,"CDT")        !get creation date
  $       write out "   DATA MODULE_DATES(''idx') /'" + dt + "'/"
  $     endfor
  $     return

DIX Example scripts MONITOR_FILES


  Example how to use elements of types:
   type hdr_types is defined in the monitor description

  open monitor.dat             !open monitor recording file
  on error then goto l1
  nrec = 0
  nfound = 0
  while true
   nrec++
   if MNR_HDR$B_TYPE=#hdr_types"modes" then  !select modes value from hdr_types
     exa/dis=recnr *q*
     nfound++
   endif
   next record
  end while
  l1: say "Found ''nrec' records, of which ''nfound' are modes records "

DIX Example scripts Plotting sunup/sundown

  $ DIX/INT
  data= f$read("sys$input",,,"CSV",,",")        !read the data in the file
  deck                                          !sunup,sundown,GMT offset
  8:48,16:46,1
  8:46,16:56,1
  8:41,17:08,1
  8:33,17:20,1
  8:24,17:33,1
  8:13,17:46,1
  8:00,17:59,1
  7:46,18:12,1
  7:31,18:25,1
  7:16,18:37,1
  7:00,18:50,1
  6:44,19:02,1
  7:28,20:14,2
  7:11,20:26,2
  6:55,20:38,2
  6:40,20:50,2
  6:25,21:02,2
  6:11,21:13,2
  5:58,21:25,2
  5:46,21:35,2
  5:36,21:45,2
  5:28,21:53,2
  5:23,21:59,2
  5:19,22:03,2
  5:18,22:04,2
  5:20,22:03,2
  5:24,21:59,2
  5:31,21:53,2
  5:39,21:44,2
  5:48,21:34,2
  5:58,21:22,2
  6:09,21:09,2
  6:21,20:55,2
  6:32,20:39,2
  6:43,20:24,2
  6:55,20:08,2
  7:06,19:51,2
  7:18,19:35,2
  7:29,19:18,2
  7:41,19:02,2
  7:53,18:47,2
  8:05,18:32,2
  8:17,18:18,2
  7:30,17:05,1
  7:42,16:53,1
  7:55,16:44,1
  8:07,16:36,1
  8:19,16:30,1
  8:29,16:28,1
  8:37,16:28,1
  8:43,16:31,1
  8:47,16:36,1
  eod
  nlines = f$symbol(data,"HIGHDIM",1)   !the number of values (should be 52)
  decla/type=deltatime sunup('nlines')  !declare a table for sunups (as deltatime)
  decla/type=deltatime sundown('nlines') !declare a table for sundowns
  decla/type=date dates('nlines')       !and one for the x values(the dates)
  shift = #deltatime"10:00"             !to let sunup/sundown overlap a bit
  bdat = f$date("1-JAN-2012")           !start date for the x values
  for k=1,nlines
   gmtoff = data(k,3)                   !get the GMT offset
   gmtd = #deltatime"0''gmtoff':00"     !and make it a delta time
   val = data(k,1)                      !get sunup value
   val = #deltatime"''val'"             !make it delta
   sunup(k) = val-gmtd                  !store in sunup (and adjust for gmt)
  !
   val = data(k,2)                      !get sundown
   val = #deltatime"''val'"             !make is delta
   sundown(k) = val-gmtd - shift        !store and adjust for GMT and a shift
  !
   dates(k) = bdat                      !store date
   bdat = bdat + f$date(7,"DAYS")       !and increment date by a week
  end for
  plot/x=symb=dates sunup,sundown       !plot them with dates as x

DIX HELP_SCREENS


DIX HELP_SCREENS PLOT


DIX HELP_SCREENS PLOT MAIN_PAGE


Help for main window

Buttons:
 File     : File options
   Close Window       : Close this window
   Print(PS)          : Make a .PS file of the whole window
   Print(CSV)         : Make a .CSV file of the whole window
   Open t4-file       : Add a T4 file in a new window (in T4 mode)
   Merge t4-file      : Merge a T4 file in the current window (in T4 mode)
   Close t4-file      : Close a T4 file (in T4 mode)
   Open csv-file      : Add a CSV file in a new window (in CSV mode)
   Merge csv-file     : Merge a CSV file in the current window (in CSV mode)
   Close csv-file     : Close a CSV file (in CSV mode)
   Read marker file   : Add markers from a .MRK file (in T4 mode).
   Add marker         : Add a single marker
   Remove marker      : Remove marker from the list
   Save setup         : Save the current plot setup to SYS$LOGIN:DIX_PLOT.SETUP
                        This can be used in plot/setup
   Set Font           : Change the font
   Exit               : Exit the plotting mode

 Options : General options
   [NO]Mouse          : Enable/disable continuous reporting of data values
                          After you left-clicked in a data-window
   Skip/display zero  : Remove all legends with all data values 0
   Legend mask        : Give a (list of) masks for the display of legends
                         * and % wildcards are supported
                        You may insert a #nn at the end of each mask,
                         selecting only topics from file nn
   Default Smooth=nn  : Set the default smooth factor (default=10)
   [NO]timeonly       : Toggle the timeonly flag (see DIX help)
   Common/Multiple    : Display only one x-axis over all data windows
                         or one per data window
   Only positive corr : Display only positive correlations
    Pos and neg correl: Display pos and neg correlation
   Correl threshold   : Set correlation threshold (default 0.5)
   Merged mode/Normal : For T4 files with more than one file open.
                         In merged mode datalines with the same name
                         will be seen as a single entity. This is only
                         valid if the T4 types of all files are the same
   filename tag/Number tag: For T4 files only. If more than one file open,
                         DIX will append the dataline name with the
                         date/time/type of the file, or just a number.
                         If all filenames are different the filename tag
                         will be empty.
   Clear default zoom : T4 files only. If the user specified a /zoom on the
                        command line, this button will clear the setting
   Display selected/all : Display only selected datalines, or display all 

Data-windows : Data window options
   n More windows     : Add n more data windows in this display
   n Less windows     : Remove n data windows in this display
   Next Page          : Display the next data
   Prev Page          : Display the previous data
   One more column    : Add one column to the display
   One less column    : Remove one column from the display
   Reset all sizes    : Reset all data windows to the default size

 Sort : Legend sorting options
   Sort legend forward    : Sort in ascending order
   Sort legend backward   : Sort in descending order
   Sort legend name       : Sort on name part of legend
   Sort legend full       : Sort on full name of legend (T4 only)
   Sort legend correl abs : Sort on absolute value of correlation
   Sort legend correl sign: Sort on signed value of correlation
   Sort legend fields     : Sort on specified fields

In the top left corner of the data windows a small square is present.
 You can click on it and move the line to change the size of :
 If this is the highest data window:
  If it is the leftmost column (or the only column), you can change the size
  of the legend window. If it is not the most left column, you can change
  the size of that column.
 If this is not the highest data window you can change the vertical size
  of that data window

 A closed square is a data item displayed in one of the data windows
  Left Clicking on it will remove the data line from all windows

  Left Clicking on it and dragging it to a data window will display the data
   item in that data window, and remove it from its previous location(s)
   If you hold the shift key, DIX will not remove it from its original
    location, so you can display data in multiple windows

 An open square is a data item not yet displayed
  Left Clicking on it will display the data item in the least used data window
  Left Clicking on it and drawing: See above

 Right clicking will open a menu with the following options
  Show data : Open a window with the data values in text
  FFT       : Open a new window with the FFT of this data
  WindowN   : Display the data in data windowN
  Offset    : Allows you to define an offset to this data line
               You can also set an offset to all datalines in a file in the
               file menu

 When the legend display is the current, you can type commands using the keyboard
 Down-arrow : Display the next dataline
 Up-arrow   : Display the previous dataline
 NEXT-page  : Display the next set of datalines (as many as your data windows)
 PREV-page  : Display the previous set of datalines (as many as your data windows)
 Other text : Build up a search string. If you have a search string present,
              there will be an up and down arrow in the button area that you
              can use to position the legend display to the line containing
              the string.

Filenames:
  Clicking on a filename opens a menu
   Info  : Show info about this file
   Close : Close this file
  Clicking on the box in front of the filename will add or remove the data
   line from the dows.

DIX HELP_SCREENS PLOT DATA_PAGE

  Help for the data window

Buttons:
 File    : File options
  Close Window      : Close this data window
  Print Window(PS)  : Make a .PS file of this data window
  Print Window(CSV) : Make a .CSV file of this data window
  Empty window      : Remove all data lines from this data window
  Enable marker line: Enable markers as a line only. In this mode DIX will
                      display the marker text if you point the cursor on it.
  Enable marker text: Enable markers as a line including the marker text
  Disable markers   : Disable markers in this data-display.
 Grid    : Set grid options
   Ena/Disable x-grid : Draw/remove x-grid in this data window
   Ena/Disable y-grid : Draw/Remove y-grid in this data window
   X-grid interval    : Change the grid interval for the x-axis
   Y-grid interval    : Change the grid interval for the y-axis

 Chart   : Set chart options
   [un]Stack          : [Un]Stack data lines
   Line               : Display data as a line
   Filled             : Display data as areas
   Points             : Display data as points
   Block              : Display data as block
   Two/One y-axis     : Add / remove a second y-axis
   Draw/remove y-zero : Add / remove a line for the y=0 value
   Enlarge            : Open a new window with only this data window. This is
                         the same as middle-clicking in the data window

 Correl  : Correlation options
  Correlate        : Open a new window with all data that correlates to the
                      datalines in this data window
  FFT              : Make an new FFT window for all datalines in this
                      data window
  SUM              : Draw a new line with the sum of the current datalines
  If the number of datalines is 2
    DIFF           : Draw a new line with the difference of the current
                      datalines.
    Compute        : DIX will compute the offset to be applied to the second
                      dataline that will return the highest correlation to
                      the first dataline.

 Values  : Set x-y value options
  Y_zero            : Set the minimum y value to 0
  NoY_zero          : Disable the y-min=0 option
  Set/Clear Y-Min   : Explicitly set a minimum y value
  Set/Clear Y-Max   : Explicitly set a maximum y value
  Round/Exact Y-axis: Enable/disable rounding of y values

  Set/Clear X-Min   : Explicitly set a minimum x value
  Set/Clear X-Max   : Explicitly set a maximum x value
  Round/Exact X-axis: Enable/disable rounding of x values

 If the data window has 2 y-axis, all changes are to the right y axis
   Y2_zero            : Set the minimum y value to 0
   NoY2_zero          : Disable the y-min=0 option
   Set/Clear Y2-Min   : Explicitly set a minimum y value
   Set/Clear Y2-Max   : Explicitly set a maximum y value
   Round/Exact Y2-axis: Enable/disable rounding of y values

 Zoom : Use the zoom options. You may zoom in via the right mouse click
        but also via the menu

  Zoom-in X  : Zoom in by 10% on x-axis only
  Zoom-out X : Zoom out by 10% on x-axis only (if you are zoomed in)
  Zoom-in Y  : Zoom in by 10% on y-axis only
  Zoom-out Y : Zoom out by 10% on y-axis only (if you are zoomed in)
  Zoom-in    : Zoom in by 10% on x-axis and y-axis
  Zoom-out   : Zoom out by 10% on x-axis and y-axis (if you are zoomed in)
  Unzoom     : If you are zoomed in, this button will undo the zoom
  Set this zoom as default :
               If the data window is zoomed in, you can set this zoom factor
                as default for new data windows
 On the right side of the display are two more buttons (at least if you have
  data lines present).

 A cross        : Clicking on it will close the data window, or the whole
                  window if this is the last data window
 An Open Square : Will open an enlarged version of this data window.
 A Closed Square: Will select all datalines in this window. After you select
                  one or morde datalines, you can display all selected
                  via the main window option display selected

 If you Right-Click on the legend name DIX will open a menu
  Smooth       : Ask for a smooth factor (from the default) and
                 Draw a new dataline smoothed by the smooth factor
  Close        : Remove the dataitem from the display
  Show data    : Open a new window with the raw data
  Correlate    : Open a new window with the correlations to this data
  FFT          : Open a new window containing a Fourier transform of this data
  X-Offset     : Set a new x offset value
  Y-Offset     : Set a new y offset value for this data line
  Window n     : Move this data to another window, like drawing it

  If you have a second y-axis enabled (via the chart option)

  To right y-axis : Move this data to the right y-axis
  To left y-axis  : Move this data to the left y-axis

 Left-Clicking on a legend name and drawing it to another window, will move the
 dataitem to the other window. It will be removed from the original window
 unless you hold the shift key

 Left-Clicking on a legend name and dragging it to the legend
  will remove the dataitem from the data window

 If you left click in a data window, DIX will create a marker line on the
 closest datapoint and display the value in the bottom line.
 If you have mouse enabled in the main window, DIX will continuously
 display the data values while you move the cursor.

 If you left-click in the display while holding the shift key, DIX will create
 a second marker and display the difference between the both markers.

 If you have a marker present, you can use the following keys
  Up-arrow   : Select the next highest data line in the current data window
  Down-arrow : Select the next lower data line in the current data window
  Next_screen: Select the highest data line in the next data window
  Prev_screen: Select the lowest data line in the previous data window

 Left clicking (with shift) outside the data window will remove the marker

 Right clicking in a data window allows you to zoom in. By moving the cursor
 DIX will display a box, showing the data area zoomed. Releasing the cursor
 DIX will zoom in. You can use the Unzoom button to unzoom

 Middle clicking will open a new display with only that data window. This may
 be useful if you want to look in more detail.

 In the top left corner of the data windows (if there are more than one) a
 small square is present.
 You can click on it and move the line to change the size of :
 If this is the highest data window:
  If it is the leftmost column (or the only column), you can change the size
  of the legend window. If it is not the most left column, you can change
  the size of that column.
 If this is not the highest data window you can change the vertical size
  of that data window

 If you have markers present, they will be plotted in the screen.
 If you position the cursor on the marker line, DIX will display the marker
 text on the right side of the bottom line

DIX HELP_SCREENS PLOT FONT_SELECTION

  DIX displays a list of possible fonts.
  You may select a new font
  The first line is the default font (the one used when DIX started)

  On top you find 3 buttons

  Close : Close the window, and do not change the font
  Reset : Reset the font to the one that is used when DIX started
  Help  : Print this help
  Fixed/All : Display only Fixed fonts or proportional too

  On the second line you may specify a mask for the fontnames
   The match is wildcarded, so do not forget the * in front or at the end

DIX HELP_SCREENS PLOT COLOUR_SELECTION


 DIX displays a list of possible colours. These are taken from the
  SYS$MANAGER:DECW$RGB.DAT, or if that is not available the file
  DIX_RGB.DAT in the same directory as the DIX image.

 You can select a colour by clicking on it, or reset to the default
 by clicking on default.

DIX HELP_SCREENS PLOT EDIT_KEYS

 The following keys are supported

  ^H    : Go to beginning of line
  ^E/F12: Go to end of line
  ^A    : Toggle overstrike
  ^U    : Clear entire line
  Left  : Go one position to the left
  Right : Go one position to the right
  Delete: Delete character left of cursor
  Enter : Accept
  ^Z/F10: Abort

 A small underscore as cursor means insert mode
 A big underscore means overstrike mode

DIX HELP_SCREENS PLOT EDIT_PAGE_FILE


Help for filename input

 There are 5 buttons at the top
  Close       : Just exit and do nothing
  Print       : Create output file
  Orientation : Toggle page orientation landscape/portrait
  PageSize    : Toggle page size a4/a3/original (the current screen size)
  Help        : Display this help

In the middle is the filename to be edited

At the bottom is a summary line how the output file will be created.

DIX HELP_SCREENS PLOT FILE_PAGE


Help for file selection

Buttons :
 Close    : Close window, no action
 Mod_dat  : Display Modification date of files
  Cre_dat : Display Creation date of files
 Directory: Current directory
 File     : Current file selection mask
   Both file and directory can be changed by clicking on text

 Clicking on a directory will make a new list

 For a T4 File:

 Left Clicking on the name will open the file
 Right clicking on a name will open a new window in which
   you can view the contents of the file and then accept (read) it
   change file attributes or skip it.

 For a .CSV File:

  DIX will always open a new window in which you can view the contents
  of the file and then accept (read) it, change file attributes or skip it.

DIX HELP_SCREENS PLOT FILE_ARGUMENTS

  Help about file arguments

Buttons :
 Close    : Close this window and back to file selection
 Read     : Read this file

When opening/merging CSV files, 4 more buttons appear
 Forward  : File is to be read in forward direction
  Reverse : File is to be read in forward direction
 Header   : First line of file is a header line
  Noheader: First line of file contains data
 X-Value  : Determines if and how the first column is to be treated
            None   : Just normal data
            Number : Index on x-axis, as a number
            Date   : Index on x-axis, as a date
            Time   : Index on x-axis, as a time
 Separator: The separation character between the fields
            Space     : A space character
            Comma     : A , character
            Tab       : A tab (char(9)) character
            Semicolon : A #; character
            Colon     : A : character
            Bar       : A | character
            Slash     : A / character
 Offset    : You can enter an offset for the x-axis
 The first 10 lines of the data file are displayed
  Changing the separator/x-values/header will change
  The display, showing how the fields will be split

DIX HELP_SCREENS PLOT FILE_INFO

 Help about the file info page
 Buttons:
  Close      : Close the window
  EN/DISable : Add or Remove all names from this file from the legend display.
               This can also be done by clicking on the box in front of the
               filename in the main display.
  Offset     : The offset that should be applied to all datalines in this file
               You can enter a positive or negative x value.
               All x-values will be adjusted using this offset
               Note that you can also set an offset on each dataline.

 DIX will always display the full filename and the Offset value for this file
  For T4 files DIX will display

    -The measuring interval (from the T4 header line)
    -And per topic ([MON], [ALG]...)
      -The number of time-values
      -The number of measurement values in the file
      -The number of measurement values displayed (depends on the legend mask)
      -The first and last timestamp for this type
  For normal CSV files one line will be displayed with the number of
   topics (columns) and the number of values (rows).

DIX HELP_SCREENS PLOT PIE_CHART

  Help about the pie chart plot.
 Total window buttons
  File     : File options
   Close Window       : Close this window
   Print(PS)          : Make a .PS file of the whole window
   Exit               : Exit the plotting mode
  Options  : general options
   [NO]Mouse          : Enable/disable continuous reporting of data values
  Window   : Window options, only if more than 1 pie in the plot
   One more vertical  : Increase the count of vertical data-windows
   One less vertical  : Decrease the count of vertical data-windows
   Automatic          : Let DIX choose the best window layout
   Ask vertical       : Start an input window to choose the number of vertical
                        windows.
  Help                : Display help
 Data window buttons
  show_data           : Open a new window containing the raw-data
  Under the options menu item
    Adapt Angle       : Choose the view angle between 0 and 80 degrees
    Segment count     : Choose the number of pie segments
                        If there are more values than segment count they
                        will be bundled with a label other.
    Show/Remove info  : Show/remove the labels+values in the display
    Sorted/Unsorted display : Change the order of display

  If you click on the pie chart, DIX will display the value at the bottom
  of the screen. If you have continuous mouse report enabled, positioning
  your mouse above the pie is enough (no click needed)

 Supported keys
   Up-arrow   : Increase the viewing angle for the pie. If clicked in a
                data-window, only that pie changed. If clicked in the top
                window, all pie angles are changed.
   Down-arrow : Decrease the viewing angle for the pie. If clicked in a
                data-window, only that pie changed. If clicked in the top
                window, all pie angles are changed.
   Page-up    : Increase the vertical data-window count
   Page-down  : Decrease the vertical data-window count

DIX HELP_SCREENS PLOT LARGE_WINDOW

 This is an enlarged window of one of the data windows.
 You can only close the window (or see the help)
 In the data window you can do the same things as in a normal display

DIX HELP_SCREENS PLOT ASK_KEY

 On the first line are the buttons
  Close  : Cancel input
  Start  : Use the current values to read the record
  Help   : Show help

  If the file is indexed
   On the second line
     5 buttons, EQ,GE,GT,LE,LT : The search mode
   On the following lines
     Key number : Input field for key number
     Key value  : Input field for key value
     Search xx  : The current search mode (change via button on top)
  If file is relative
   On the second line
     3 buttons, EQ,GE,GT : The search mode
   On the following lines
     Cell number : Input field for cell number
     Search xx  : The current search mode (change via button on top)
  If the file is sequential
   On the second line
     Record number : Input field for record number

DIX HELP_SCREENS PLOT decw_raw

 This is a display showing raw data
 On the top line are a number of buttons that will show a menu.
  file
   screen mode      : Switch to screen mode (SMG)
   interactive mode : Switch to interactive mode
    If you have more than one file open
     Next file        : Show the next file
     List of files    : Show the current opened files, and lets you select one
     Previous file    : Show the previous file
   file information : Display information about the current file
   set font         : Change the font
   Exit             : Exit DIX
  record
   Next record        : Get the next record
   Previous record    : Get the previous record. This may be a slow operation.
   Ask record         : Ask for the record number/keyvalue
   Rewind             : Go to the first record
   Find record        : Open a window to get search parameters and find the record
   Find next record   : Find the next (if you have search parameters present)
    If the file is open for write
     Update record    : Update the record with modified data
     Abort update     : Cancel updates, restore to original record value
  layout
   Interpreted display: Switch to raw display
   Hex                : Display the field value in hexadecimal
   Octal              : Display the field value in octal
   Binary             : Display the field value in binary
   Byte               : Display data by byte
   Word               : Display data by word (2 bytes)
   Longword           : Display data by longwords (4 bytes)
   [NO]Offset         : Do or do not show the offsets
   Hex/dec Offsets    : Show offsets in hexadecimal or decimal

  colours
   You can change the colour for the following parts
    Info text         : Used for fieldsnames, and filename
    Offset            : For the offset part
    Background 1      : Background in the header and the text
    Background 2      : Background in the rest
    Foreground        : Field value colour
    Menu              : Menu display
  options
   All display          : Open a new display with a lot of different field types
   Search               : Enter a string to search in this display
   Next search forward  : Find the string forward
   Next search backward : Find the string backward
  help
   Show help, you are doing it now

 On the right side is a square. If you click on it, DIX will close the display
  (and end the program)

 On the second line are a number of shortcut-buttons. All these buttons can
  also be found in one of the menu options, but these only need one click.
  Interpreted: Switch to interpreted display (if the file has a description)
  Hex        : Display the text in hexadecimal
  Octal      : Display the text in octal
  Binary     : Display the text in binary
  Next Record: Read the next record in the file
  Rewind     : Go to the first record in the file

 On the third line is some info
  Recsiz     : The record size of the current record (in bytes)
  Offs       : The offset (in the record) of the current line. This is displayed
               as byte[.bit]
  Type       : Sgn/uns : Signed/unsigned integers
  Recnr      : The current recordnumber (or Unknown if keyed read)
  RFA        : The record file address for the current record
  Key        : The current keynumber (for indexed files)

 On the fourth line is a list of offsets

 below are three displays
  On the left is the data display
   This contains the data (in the selected radix) and the ASCII value of each byte
   You can position the cursor using the mouse or the arrow keys.
   Right clicking opens a menu like the options menu.

  If the file is open for write, you can type characters.
   In the data part
    If the radix is decimal you can enter the string
     If you then type a Return, DIX will validate the text. If the syntax
     is correct, DIX will replace the value of the field. If the syntax is
     not correct, DIX will restore the original value.
    If the radix is hex/octal/binary, you can enter the digit value directly

   In the ASCII part you can type the text directly

  On the right the offset display

DIX HELP_SCREENS PLOT decw_des

 This is a display showing interpreted data (you need a description to do this)
 On the top line are a number of buttons that will show a menu.
  file
   screen mode      : Switch to screen mode (SMG)
   interactive mode : Switch to interactive mode
    If you have more than one file open
     Next file        : Show the next file
     List of files    : Show the current opened files, and lets you select one
     Previous file    : Show the previous file
   file information : Display information about the current file
   follow link      : If the current field has link info to another record/file
                       follow that link, possibly opening a new file
   back link        : If you have followed a link, you can back track.
   set font         : Change the font
   Exit             : Exit DIX
  description
   View description         : View the description source
   View expanded description: View the expanded description
    If this file has more than one description
     Next description         : Use the next description
     Prev description         : Use the previous description
     Directory description    : Show a list of descriptions, and lets you select one
  record
   Next record        : Get the next record
   Previous record    : Get the previous record. This may be a slow operation.
   Ask record         : Ask for the record number/keyvalue
   Rewind             : Go to the first record
   Find record        : Open a window to get search parameters and find the record
   Find next record   : Find the next (if you have search parameters present)
    If the file is open for write
     Update record    : Update the record with modified data
     Abort update     : Cancel updates, restore to original record value
  layout
   Raw display        : Switch to raw display
   Hex                : Display the field value in hexadecimal
   Octal              : Display the field value in octal
   Binary             : Display the field value in binary
   Descripted         : Display the field value descripted
   [NO]Compress       : Do or do not show "empty" fields
    If the file has a view
     Description      : Show field values according the description
     View             : Show field values according the view
   [NO]Offset         : Do or do not show the offsets
   [NO]Fields         : Do or do not show the fields
   Hex/dec Offsets    : Show offsets in hexadecimal or decimal

  colours
   You can change the colour for the following parts
    Info text         : Used for fieldsnames, and filename
    Offset            : For the offset part
    Background 1      : Background in the header and the text
    Background 2      : Background in the rest
    Foreground        : Field value colour
    Menu              : Menu display
  options
   All display          : Open a new display with a lot of different fieldtypes
   Descriptor display   : Open a new display with descriptor information
   Subfield display     : Open a new display with subfields
   Search text          : Enter a string to search in this display
   Next search forward  : Find the string forward
   Next search backward : Find the string backward
   Highlight            : Highlight all text matching search string
   Field input          : If the current field has "fields", open a new
                          window to show/edit field values
  help
   Show help, you are doing it now

 On the right side is a square. If you click on it, DIX will close the display
  (and end the program)

 On the second line are a number of shortcut-buttons. All these buttons can
  also be found in one of the menu options, but these only need one click.
  Raw        : Switch to raw display
  Hex        : Display the text in hexadecimal
  Binary     : Display the text in binary
  Descripted : Display the text descripted (using the descriptor)
  Next Record: Read the next record in the file
  Rewind     : Go to the first record in the file

 On the third line is some info
  Recsiz     : The record size of the current record (in bytes)
  Offs       : The offset (in the record) of the current line. This is displayed
               as byte[.bit]
  Type       : Sgn/uns : Signed/unsigned integers
  Recnr      : The current recordnumber (or Unknown if keyed read)
  RFA        : The record file address for the current record
  Key        : The current keynumber (for indexed files)

 below are three displays
  On the left is the offset display (can be hidden via the layout menu)
  In the middle the fieldname (can be hidden via the layout menu)
  On the right the value

   In the right display you can position to the wanted field by using the
   mouse (just click on it), or by using the arrow keys.
   Right clicking opens a menu like the options menu.
  If the file is open for write, you can type characters (or enter) for
   the current field, and DIX lets you modify the current line.
   If you then type a Return, DIX will validate the text. If the syntax
   is correct, DIX will replace the value of the field. If the syntax is
   not correct, DIX will restore the original value.

DIX HELP_SCREENS PLOT searchfile

  On the top line the buttons
   Close           : Close and do nothing
   Search          : Start search with the current selection
   Current record  : Set start search from current record
   Begin of file   : Set start search from begin of file
   help            : Show help
  On the second file the current start position

 You can search multiple items in multiple records

  On the third line the headers
  nextrecord       : Should this search item match in the next record
  search string    : The item to find
  show             : Will this be the record that is displayed
  casebl           : Search case blind
  match            : Locate : String must be in record/field
                     Match  : String must match whole record/field
                     lt     : String must be lt record/field
                     le     : String must be le record/field
                     eq     : String must be eq record/field
                     ge     : String must be ge record/field
                     gt     : String must be gt record/field
                     valid  : String is valid for fieldtype
                     exists : String is fieldname, and it must exist
                     range  : String is low-high, value be in range
                     never  : String matches never
                     always : String matches always

  wild             : Wildcard mode (node, standard, extended)
  loca             : Where to find (data/vfc/recl/both)
  andor            : Match and / or
  not              : Negate match
  pos              : Begin end size of part of the record
  size             : To look in the record
  type             : Explicit field type
  field            : Field name

 Help for the search record screen

DIX HELP_SCREENS PLOT searchtext

 Help for the search text in display screen

 On the top line are the buttons
   Close           : Close this window
   Start           : Start the search
   Forward         : Set the search to forward mode
   Backward        : Set the search to backward mode
   Help            : Show this help

 Below is a line where the search string may be edited.
 On the bottom line is the current search direction

 The search only highlights the first match, but does not change the current
 offset. If you click on the highlighted part the offset will be set.

DIX HELP_SCREENS PLOT DISPDES

  In this window you see information about the current descriptor
  On the top line are the buttons
  Below are the following line
   the name of the field
   the type of the field
   the flags for this field (if not empty)
   the fields (if not empty)

  You can only close the window

DIX HELP_SCREENS PLOT DISPDAT

  In this window you see the interpreted data in some formats.
  In the top line are 4 buttons
  Close : Close this display
  Left  : Decrease the offset by one byte
  Right : Increase the offset by one byte
  Help  : Show this help

 On the right side is the current offset displayed
  In the rest of the display you see the data displayed in various formats

  You can also use the left and right arrow key to change the offset

  If the file is open for modify, you can click on a line, and DIX will
  let you modify the value using the datatype of that line.

DIX HELP_SCREENS PLOT subfields

  In this window you see the various subfields of the data item.

  In the top line are 2 buttons
  Close : Close this display
  Help  : Show this help

  The subfields depend on the datatype

  If the file is open for modify, you can click on a line, and DIX will
  let you modify the subfield value.