1 DIX DIX[/qualifiers] filename [/qualifiers] This is a program to dump/display/edit records in all types of files. -You can select records by keyvalue and number(indexed files) or recordnumber (sequential files or relative files). -You can display the record-data in raw format (like VMS DUMP) or interpreted format. For the interpreted mode you need a description. See the help about "display_modes interpreted_dump". -You can dump/display/edit the record data in three modes. 1. Screen oriented (using SMG) (See help about "modes screen_mode"). 2. Dump records to a file (See help about "modes file_mode"). 3. Interactive mode using powerful scripting possibilities (See help about "modes interactive_mode"). The program supports INDEXED, RELATIVE, DIRECT ACCESS and SEQUENTIAL files. The program can open multiple files and multiple descriptions per file. A fieldname in a record can contain a pointer to (a key in) another file, and you can follow that link to the other file. Files are opened READ-ONLY, unless you specify /MODIFY. 2 PARAMETER The filename to be "DIX"ed. The filename can contain wildcards. If you specify /MULTI_FILE DIX will open all files. If you do not specify /MULTIFILE and more than one files matches the filename, you will be prompted to select one file. If file_meode there is a second parameter, that contains record selection criteria (see the help on "modes file_mode"). 2 MODES Dix can operate in 3 modes, SCREEN_ORIENTED : DIX will display data full screen via the SMG routines and lets you look at the record and possibly modify it. FILE_ORIENTED : DIX will behave like DUMP, no interaction possible INTERACTIVE : DIX enter interactive (line) mode. This mode can also be used in BATCH. depending on the /SCREEN, /FILE, /INTERACTIVE qualifier The qualifiers /SCREEN, /FILE and /INTERATIVE must be entered just after the DIX verb. Three more major-qualifiers qualifiers can be given /HELP : display help /DEMO : Display demo pages /FILE : Display file information 3 SCREEN_MODE If you specify /SCREEN (default), the program will work full screen using the SMG routines, and you can look at the data, and possibly modify it (see /MODIFY qualifier). If you have a description present 1. You can modify fields (if in modify mode) by entering a right arrow, Enter, or any printable character. You are in fieldmodifying mode until you enter an Enter. After you type Enter DIX checks if the typed data is valid for that field(-type) and restores the original value if not. The record will not be updated until you type the DO key. 2. For fields that contain field-names, you can also enter a key_getfields key (default PF1-G) and modify/enter the fieldvalue through a SMG-menu. 3. If you type a key_contdis (default F8) DIX will open a popup-display containing information about the description of the current line, and update it when you move between lines. If you type key_contdis again DIX will remove the display. And lots more, see the help (Default PF2 or Help) Syntax DIX[/SCREEN] filespec[/qualifiers] [searchparameter] [searchparameter] .. The searchparameter is optional, see the help about record_search Upto 7 (search) parameters are supported. DCL allows 8 parameters, and the first one is the filename. 3 FILE_MODE If you specify /FILE the program will dump the data to a file or the terminal (see /OUTPUT qualifier) in either interpreted or raw dump mode. Syntax DIX/FILE filespec[/qualifiers] [searchparameter] [searchparameter] The searchparameter is optional, see the help about record_search Upto 7 (search) parameters are supported. DCL allows 8 parameters, and the first one is the filename. 3 INTERACTIVE_MODE If you specify /INTERACTIVE, DIX will enter interactive mode and lets you display/modify fields. This mode works in BATCH too, so you can create command-files and use DIX to display/modify fields. See also the /INTERACTIVE qualifier. ![Interactive mode]DIX /INTERACTIVE Syntax DIX/INTER [filespec] [/qualifiers] [searchparameter] .. Filespec is optional. If you do not specify a filespec DIX will start without any file open. You can then later open/close files with the interactive commands OPEN and CLOSE. Example: DIX/INTER SYSUAF/MODIFY /script=mycommands Will execute the commands in mycommands[.dix] and exit. The searchparameter is optional, see the help about record_search Upto 7 (search) parameters are supported. DCL allows 8 parameters, and the first one is the filename. 2 FILETYPE_SUPPORT The following file types are supported. 3 SEQUENTIAL For SEQUENTIAL or RELATIVE files the record selection is based on the /RECORD qualifier. If the start record is nn, the first nn-1 records will be skipped, this may take some time. If the record format is fixed, DIX can read the record directly without skipping the previous records. 4 /RECORD /RECORD=nr You can specify the starting record number. For indexed files you can also use the /key to go to the 'n'th record on key 'key'. If not specified the program starts at the first record. 3 INDEXED_FILES For INDEXED files the record selection is based on the /EQ or /GE or /GT or /LE or /LT and the /KEY qualifier. If the key has Ascending attributes, the /EQ, /GE or /GT qualifiers must be used, and if the key is descending, the /EQ, /LE or /LT qualifiers. Information about the keytypes can be obtained via the /INFO qualifier. 4 /RECORD /RECORD=nr You can specify the starting record number. You can also use the /key to go to the 'n'th record on key 'key'. 4 /KEY /KEY=nr Look for the keyvalue on the specified key. Default is the primary key (0). If none of the LT,LE,EQ,GE,GT options is specified, the program will start with the first record on the specified key. 4 /LT /LT=value Look for a record with keyvalue LT the specified value. Information about the keytypes can be obtained via the /INFO qualifier. The values will be converted by DCL to Uppercase, unless enclosed in quotes. See also the help about keyvalues. 4 /LE /LE=value Look for a record with keyvalue LE the specified value. Information about the keytypes can be obtained via the /INFO qualifier. The values will be converted by DCL to Uppercase, unless enclosed in quotes. See also the help about keyvalues. 4 /EQ /EQ=value Look for a record with keyvalue EQ the specified value. The values will be converted by DCL to Uppercase, unless enclosed in quotes. See also the help about keyvalues. 4 /GE /GE=value Look for a record with keyvalue GE the specified value. Information about the keytypes can be obtained via the /INFO qualifier. The values will be converted by DCL to Uppercase, unless enclosed in quotes. See also the help about keyvalues. 4 /GT /GT=value Look for a record with keyvalue GT the specified value. Information about the keytypes can be obtained via the /INFO qualifier. The values will be converted by DCL to Uppercase, unless enclosed in quotes. See also the help about keyvalues. 4 Keyvalues When specifying a keyvalue with /lt,/le,/eq,/ge,/gt the program will check for the keytype (in the file). For binary keytypes the program will convert the data from ASCII to binary. For string types you can enter binary values via the %DD syntax where DD are hexadecimal digits (%% will enter one %). See the conversion options below 5 INT2_conversion INT2 values can only be specified as integers. 5 INT4_conversion INT4 values can be specified in 3 ways 1. A normal integer. 2. A number with another RADIX in two formats 'DDDD'R or %Rddddd Radix can be X (headecimal), O(Octal) or D(decimal) or %Xddd (hexadecimal), %Oddd (octal), %Dddd (decimal) 3. A Date which will be converted to DATE*4 format. 4. A VMS Identifier 5. A UIC e.g. [SYSTEM] 6. An Ascii string "ABCD" 5 INT8_conversion INT8 keyvalues can be specified in 3 ways 1. One big integer up to 18 characters 2. Two INT4 values separated by a . (e.g. 10.20, see INT4 conversion) (e.g. SYSTEM.1-jan-1991) 3. A date string( e.g. 1-apr-1991). 3 VFC_FILES A VFC file is a sequential file with a fixed prefix. You will normally see this type of file form the DCL OPEN statement. This will generate a VFC file with a 2 byte header, that is used for carriagecontrol. But you can als create your own VFC file with other sizes (upto 255) and other meanings. DIX will display the data from the normal record in one window, and the VFC data in another (in screen mode), or lets you display the data via EXAMINE/VFC (in interactive mode). The filemode can also display the data when you specify /DISPLAY=(all) or /DISPLAY=VFC (see the help about /DISPLAY) The DEPOSIT/VFC will change data in VFC buffer (in interactive mode) and the PF1-Y command switches from normal data to VFC data in screen mode. 2 DISPLAY_MODES DIX can work either in RAW dump format or INTERPRETED (see the /DESCRIPTION qualifier). 3 RAW_DUMP In the RAW dump mode the dump is equal to the VMS DUMP format. It is used if no description file can be found, or if the /RAW qualifier is specified. The display is split into two parts. The left part is the data (byte,word,longword) in decimal or hexadecimal. The right part is the data in ASCII (if printable). In RAW dump mode the following qualifiers can be used. 4 /BYTE The data will be dumped in bytes. See also the /WORD and /LONG and /UNSIGNED. 4 /WORD The data will be dumped in words. See also the /BYTE and /LONG and /UNSIGNED. 4 /LONG The data will be dumped in longwords. See also the /BYTE and /WORD and /UNSIGNED. This is the default. 4 /UNSIGNED The data (if not in HEX mode) will be interpreted as unsigned. 4 /HEX Display the data in HEXadecimal (default). See also the /HEX,/BINARY,/OCTAL,/DECIMAL qualifier. 4 /DECIMAL Display the data in DECIMAL See also the /HEX,/BINARY,/OCTAL qualifier. 4 /OCTAL Display the data in OCTAL. See also the /HEX,/BINARY,/DECIMAL qualifier. 4 /BINARY Display the data in BINARY. See also the /HEX,/OCTAL,/DECIMAL qualifier. 3 INTERPRETED_DUMP In the interpreted mode, the program will try to display the fields of a record. This mode requires a description file (see the /DESCRIPTION) This is the default if a description can be found. Descriptions can be in files (default 'filename'.DES) or a text library. DIX will look for a description file in the same directory as the data file DIX will look for a file in the current directory. DIX will look for a module in the DIX_DES .TLB file (system_library) (see the help for the /SYSTEM_LIBRARY qualifier) DIX will look for a module in the DIX_DES_USER .TLB file(user_library) (see the help for the /USER_LIBRARY qualifier) For details see /DESCRIPTION. If no description can be found (or if /RAW is specified), DIX will display in RAW mode. 4 /ALL If the /ALL is given, all matching descriptions will be used. If /ALL is not given, only the first match will be used. The search order is 1. The .DES file in the same directory as the datafile 2. The .DES file in the current directory 3. Entries in USERlibrary (if present) 4. Entries in SYSTEMlibrary (if present) 4 /DESCRIPTION /DESCRIPTION[=name[,name]] Give the name of a record description file(s) or module. The format of description file/module is described in the RECORD_FORMAT help. If the /DESCRIPTION qualifier is given without the filename, the program will look for a file with a filename as the input file, but with the extension .DES. DIX also searches the Text library DIX_DES (with default file "IMAGE_DIRECTORY".TLB), so the textlibrary will be searched in the same directory as the DIX image, but you can redefine the logical name DIX_DES to any textlibrary) for a module with the name that matches the filename of the datafile. A match can be on device, directory, name and extension. DIX also supports a userdefined library. DIX searches for the file DIX_DES_USER with default SYS$LOGIN:.TLB. Normally DIX will stop as soon as a match is found, but if /ALL is given all matching descriptions will be used. Example: DIX MYDEV:[MYDIR]MYDATA.MYEXTENSION [/DES] 1. DIX searches in the current directory for the file MYDATA.DES 2. DIX searches for a description file MYDEV:[MYDIR]MYDATA.DES 3. DIX searches DIX_DES_USER.TLB for a module that matches the name mydev:[mydir]mydate.myextension. Empty parts of the module name match. So a module with the name *MY* , .MYEXTENSION, *:[*]*.* will all match. 4. DIX searches DIX_DES.TLB for a module that matches the name mydev:[mydir]mydate.myextension. Empty parts of the module name match. So a module with the name *MY* , .MYEXTENSION, *:[*]*.* will all match. The first or all (/ALL specified) matches will be loaded and can be used. 2 RECORD_FORMAT_FOR_DESCIPTIONS The description records are in normal ASCII, and can be edited with a normal editor. Lines starting with C,c or * are skipped (fortran comment lines) and data after the ! (comment) is skipped. Continuation lines are not like the normal FORTRAN syntax but use the DCL syntax (- at the end of the line) Spaces are ignored, except within names and types and between the type and its qualifier. Single lines can be upto 255 chars, and the total line length (including continuation lines) can be upto 4096 chars. There are 3 types of lines -Parameter definition -Conditional statements -Field Declarations. 3 PARAMETER_DEFINITIONS With the parameter definition, you can define parameter values, that can be used later in other parameter definitions, or in field declarations. Syntax: PARAMETER [(]name=expression[,name=expr] [)] The expression is evaluated at read time, so its value cannot depend on data in the data-record. examples : PARAMETER VALUE1 = 121 PARAMETER VALUE2 = (VALUE1*4+12) DIX supports the +,-,*,/ and () operators with normal precedence. DIX also supports some integer functions, see extra info in the help about "interactive_commands function" ![functions]DIX INTERACTIVE_COMMAND FUNCTION 3 Other_statements 4 #IF_#IFDEF_#ELSEIF_#ELSE_#ENDIF You can use the symbol table to conditionally use parts of the description. The #IF, #ELSE, #ELSEIF and #ENDIF are available to dis/enable parts of the description. The syntax is #IF Logical-statement #IFDEF symbolname #ELSEIF Logical-statement #ELSE #ENDIF The Logical-statement is evaluated using the available DIX-symbols and field variables. You can define the symbols in interactive mode via the normal assignments and in other modes via the /DEFINE=symbol qualifier Example (the indentation is just for visibility) #IF F$EXISTS("LANGUAGE") #IF LANGUAGE="DUTCH" CHARACTER*20 DUTCH_NAME #MESSAGE "The dutch version" #ELSEIF LANGUAGE="GERMAN" CHARACTER*20 GERMAN_NAME #MESSAGE "The german version" #ELSE CHARACTER*20 DEFAULT_NAME #MESSAGE "The default version" #ENDIF #ELSE CHARACTER*20 DEFAULT_NAME #MESSAGE "The default version" #ENDIF If you change a symbol that would affect the #IF/#ELSEIF clauses, you need to force DIX to reevaluate the description. You can do that via EXAMINE/EXPAND 4 #MESSAGE You can include the #MESSAGE statement in the description #MESSAGE text The text will be displayed via a message when the expander finds this statement. This can be useful with the #IF constructs see example below. declaration statement declaration statement ... #IF F$EXISTS("_DEBUG") #MESSAGE Debug variant integer*4 temp #ELSE integer*4 temp /nodisplay #ENDIF IF the symbol debug is defined the value of temp will be displayed and during the expansion of the descriptions the message "Debug variant" will be displayed on the terminal If the symbol debug is not defined, the value of temp will NOT be displayed and no message will occur. 3 Field_declaration You can use any normal fortran declaration, with some extensions General format TYPE*(SIZE)[qualifiers] fieldname[(dim1[,dim2[,dim3]])] Where size, dim1,dim2,dim3 can be expressions containing -Numbers -Parameter values -Fieldvalues of previously defined field_names. -Operators +,-,*,/ and () with the normal precedence. -DIX also supports some integer functions , see extra info in the help about "interactive_commands function" Fieldnames are strings upto 32 characters. They must start with a letter (a-z), and the following character may contain a letter (a-z), a digit (0-9) , a $ or an _. ![functions]DIX INTERACT FUNCTION Qualifiers can be /HEXADECIMAL Always display data in hexadecimal format /BINARY Always display data in binary format /OCTAL Always display data in octal format /RANGE=min_val:max_val For integer values, limit the range of the value /NODISPLAY Do not display data (can be referenced) /USER The type is a user defined type. See the help about user types /UPPERCASE Force conversion to uppercase on field modification /LOWERCASE Force conversion to lowercase on field modification /LIMIT=value If the value is reached, the repeat loop is terminated /LIMIT=>value If the field has a repeat, this will terminate, else /LIMIT=127 If *NN is specified, the strings are variable in a fixed allocation size. The total allocation is NN (HSTRING) NN+1(STRING,ZSTRING) NN+2(WSTRING) NN+4(LSTRING) If *NN is not specified the allocation is variable also. DIX can handle display and modification of variable fields, but only if the recordlength can be changed (indexed or relative files and not fixed) DECIMAL strings [U]DECIMAL The data is an (unsigned) decimal string. Depending on some qualifiers the allowed data is 0..9,".",E,+,- 0..9 are always allowed. If the type is signed (DECIMAL) the +/- sign are also accepted. For this datatype there are some extra qualifiers defined /ZERO_FILL The field is filled with leading zeros. All spaces will be replaced by 0. /FRACTION Allow the string to contain a decimal fraction. This qualifier adds the "." character to the allowed character set. /EXPONENT Allow the string to contain an exponent. This qualifier adds the E/e and the +/- for the exponent (E+12 or e-12) characters to the allowed character set. /LEFT_JUST IF the /ZERO_FILL is not specified, this qualifier decides if a short string must be left or right justified. DIX also supports a number of control statements STRUCTURE,ENDSTRUCTURE After the structure statement follows a name optionally followed by a dimension (dim1,dim2,dim3) If the name is specified the fieldname is extended by .structurename. if no name is specified, the fieldname is not extended UNION,ENDUNION MAP,ENDMAP See MAP_SYNTAX below. RANGE,ENDRANGE See RANGE_SYNTAX below POSITION[/RELATIVE] (value) Set the bit/byte offset to the value. This can be useful in some overlay structures See also the example in RANGE_SYNTAX. The value is the new byte position, unless in a bitfield. If the /relative is given (or the value is negative) the value is added/subtracted to/from the current offset, else it new offset=value. POINTER Temporary override the bitoffset for the following structure. See pointer_syntax below PAD[*NN] Round up bit/byte-offset to NN fold. nn=2,4,8 default in bitmode 8 (align to next byte) else 2 (align to next word) Rounding takes 0..NN-1 bytes/bits. The verb ALIGN is a synonym for PAD EXIT [condition] If condition is not specified, it will be evaluated true. If condition is true, skip the repeat of the current structure (there must be one) See exit_syntax below ABORT reason [condition] If the abort statement is seen, DIX checks if condition evaluates to TRUE (or is not present). If this is the case, the description is regarded as not valid. This statement can be used to do some sanity checking. See the examples help for an example. You can also define your own types. See the help about usertypes. Any variable can be followed by a dimension description up to 3 dimensions. Dimension are specified as Low:high or high (low=1) The sizes and dimensions can expressions with numbers, parameters or other fieldnames in the description. If fieldnames are used, they must appear before the line in which they are referenced. BITFIELD ENDBITFIELD Normally the number after the * will be interpreted as bytes, but between a BITFIELD and an ENDBITFIELD the numbers will be interpreted as bits. Only (U)INTEGER,(R)BITS,LOGICAL and PAD fields are allowed between BITFIELD and ENDBITFIELD. After an ENDBITFIELD the record pointer will be padded to the next byte. Example: INTEGER*4 value value contains 4 bytes = 32 bits BITFIELD integer*4 first_nibble value contains 4 bits. logical*1 first_bit[0=no,1=yes] value contains 1 bit PAD 2 Align to even bit (so this takes 1 bit) integer*1 second_bit value contains 1 bit ENDBITFIELD aligns on byte boundary (so 1 pad bits) LOGICAL*1 temp value contains 1 byte. CHARACTER*12/FILE=SYSUAF Username You can follow this link to the file SYSUAF keyvalue the contents of "USERNAME", KEY=0 INTEGER*4/FILE=DATAFILE/RECORD/COMPUTE="'thisfield'+10" index You can follow this link to the file DATAFILE with the recordnumber the contents of the field "index" + 10 INTEGER*4/FILE=SYSUAF/KEY=1/IF="'thisfield'>0" identifier Follow the identifier to the SYSUAF file, but only if the identifier is >0 (UIC identifier) Field names starting with a % and PAD fields are not displayed (fillers). These fields cannot be used for field-dependend computation. The display can also be disabled with the /NODISPLAY option, and these fields CAN be used. 4 Name_syntax With the (R)BITS*(*),(U)INTEGER*(*),LOGICAL*(*) and the DATE*(*) declarations you can append a list of names to the description. There are two formats 1. [field,field,,field...] A list of fields numbered from 0 up to nn Fields may be omitted, but comma's are significant. Mostly used for bits. A # means do never display this bit even if set. 2. [idx=name,idx=name,...] A list of numbered names, the indexes do not have to be in order. Mostly used for integers. The idx's are integer*4 only, if the values are 8 bytes wide, DIX will check if the high longword is a sign extension of the low longword. Example for case 1 (the privileges in SYSUAF) BITS*8 UAF$Q_DEFPRIV - [CMKRNL,CMEXEC,SYSNAM,GRPNAM,ALLSPOOL,IMPERSONATE,DIAGNOSE,- LOG_IO,GROUP,NOACNT,WORLD,MOUNT,OPER,EXQUOTA,NETMBX,VOLPRO,- PHY_IO,BUGCHK,PRMGBL,SYSGBL,PFNMAP,SHMEM,GRPPRV,READALL,- IMPORT,AUDIT,SECURITY,,,ACNT,,,,ALTPRI] bit(0) = CMKRNL, bit(1)= CMEXEC ... Bits are named in order, but some bits are skipped (see the ,,,, just before ther ALTPRI). If the non-named bits are in the mask they will be displayed with text "BITnn". If any bit has the name # it will not be displayed (see below) Example for case 2 INTEGER*2 type [1=special,4=normal,10=fatal] Field values 1,4,10 will be by displayed as a name, all others in numeric Example for not displayable fields The file_char bits in the indexf.sys contain 2 bits that define the caching attributes (bit 8 and 9). Since the names for these bits are a #, DIX will not display these bits. The POSITION (-24) : reposition the byte_offset by 24 (bits). The INTEGER*2 : define a 2 bits integer with 4 possible values. The POSITION/RELATIVE (22) : Sets the byte_offset back to where we were. bits*4 file_char - [Wascontig,Nobackup,Writeback,Readcheck,Writecheck,- Contigb,Locked,Contig,#,#,,Badacl,- Spool,Directory,Badblock,Markdel,Nocharge,Erase,alm_aip,- shelved,scratch,nomove,noshelvable,shelv_res] bitfield !start in bits mode, the next 2 bits define the caching position/relative (-24) !skip back 24 bits, the /relative !is optional since the value is negative integer*2 caching [writethrough,writeback,flush_on_clos,no_cache] posision /relative (22) !skip the next 22 bits(in total 3 bytes) end bitfield !back to non field mode again This could also have been achieved by structure !no name atttached union map bits*4 file_char - [Wascontig,Nobackup,Writeback,Readcheck,Writecheck,- Contigb,Locked,Contig,#,#,,Badacl,- Spool,Directory,Badblock,Markdel,Nocharge,Erase,alm_aip,- shelved,scratch,nomove,noshelvable,shelv_res] end map map byte %temp1 bitfield integer*2 caching [writethrough,writeback,flush_on_clos,no_cache] end bitfield !will align back to the next byte end map end union end structure 4 USERTYPES The user can define his own types. The translations between ascii and binary must be programmed in the DIX interactive language. This translation script can be defined in the following ways. 1. In the .des file Somehwere in the .DES file there must be a section the contains the script code. This section must begin with #TYPE name and end with #ENDTYPE 2. In a module in the dix_des.tlb (either user or system) library. The module name must be USERTYPE_'name'. In this case the #TYPE and #ENDTYPE tags are not necessary. This script is called with 4 symbols defined 1. ACTION : a string symbol that defines the action to take, values can be SIZE : Return the size (in bits) of the binary data. (only used in variable length data) ASCBIN : Convert from ascii to binary BINASC : Convert from binary to ascii 2. DATA : A string variable containing the the source data. In case "SIZE" and "BINASC" DATA contains the binary data In case "ASCBIN" DATA contains the ascii text. In all cases the length of the string is the size in bytes. 3. BITSIZE: An integer value that contains the size in bits. Normally this is 8*length(data), but not for bitfields. 4. FIELDS : The fields as defined in the declaration statement. The script must set the following symbols Case "SIZE" : SIZE , an integer containing the size in BITS. case "ASCBIN" : RESULT, a string variable containing the binary data. SIZE , an integer value containing the size in BITS. case "BINASC" : RESULT, a string variable containing the ascii text. Also the script must finish with an EXIT statement that returns the status. For BINASC 0 means the text will be suppressed by the /compress qualifier. 1 means is is not regarded as "suppressable" For others 1=oke, 2=error. Example: You have a line in the description record: mytype*8/user fieldname !user type mytype , size=fixed to 8. Now we must have either a section in the description record enclosed in the following statements: #type usertype ... #endtype Or a module in the DIX_DES or DIX_DES_USER file with the name USERYTPE_MYTYPE In this case the #type and #endtype are not needed. Below an example of a script that will work. It will convert a 8 byte string to a sequence like 12,34,56,43,123,0,56,9 #type 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 !assmume error in conversion lp2: part = f$element(k,",",data) if (part <> ",") then byt = int(part) if (even($status)) goto err if (byt < 0 | byt > 255) goto err result = result + f$char(byt) k = k + 1 goto lp2 endif size = f$length(result)*8 !return length in bits stat = 1 !successful convert err: endif exit 'stat' !return conversion result #endtype 4 RADIX_OVERRIDE Normally all fields are displayed in decimal or text. If the fieldtype is followed by the a radix qualifier the display (and also the input is in the requested radix) The following radices are supported /HEXADECIMAL /OCTAL /BINARY example INTEGER*4 FIELD Will be displayed and modified in decimal INTEGER*2/BIN DATA Will be displayed and modified in Binary INTEGER*2/OCT DATA Will be displayed and modified in OCT CHARACTER*3/HEX TMP Will be displayed and modified in HEX 4 RANGE_SYNTAX The record descriptions can contain one or more RANGES RANGE (min_offset:max_offset) field field ... END RANGE The () are required syntax. The fields start at offset "min_offset" and continue until the offset "max_offset". If the byte_offset exceeds the max_offset, the rest of the RANGE is ignored. An example is in the ODS2 File headers byte id_offset ! Offset to Ident area byte map_offset ! Offset mapping area byte acl_offset ! Offset to ACL area byte res_offset ! Offset to ACL area integer*2 seg_num ! Extension seqment number .... range (map_offset*2:acl_offset*2-1) diskmap maps(256) !enough end range ..... position (510) integer*2/hex checksum The DISKMAP entries start at byte offset MAP_OFFSET*2 (MAP_OFFSET is in words) and continues until ACL_OFFSET*2-1. The checksum is at fixed location 510 4 MAP_syntax The MAP command has a special syntax. It is included in a UNION statement. UNION MAP [selectionstring] END MAP MAP [selectionstring] END MAP .. END UNION If there is no selectionstring specified, DIX will show the mapping. If there is a selection string, DIX will show the map only if the selection string matches. The format for the selection string is: Expression=sel_value[,sel_value...] And sel_value is 1. expresion Just a single (integer) expression 2. expression:expression A range of (integer) expressions At this moment only integer expressions are allowed. You can specify a dependency on a previously defined variable. SYNTAX: integer*4 sel !any field will do (dependency field) UNION MAP SEL=value !Display this map if SEL has value "value" END MAP MAP SEL=VALUE1 !Display this map if SEL has value "value1" END MAP .. END UNION If all maps have a dependency and none of them is used, DIX will always use the last one, unless one of the MAP entries has a depandancy-fieldname of * Example integer*4 sel !any field will do (dependency field) UNION MAP SEL = 0,10:12 !case for sel=0 and 10:12 character*4 valuec END MAP MAP SEL = 1 !case for sel=1 integer*4 value4 END MAP MAP * !case for all other values of sel logical*4 valuel END MAP MAP SEL = 2 !case for sel=2 integer*2 value2(2) END MAP END UNION If SEL has value 0 or is betwwe 10 and 12 the character VALUEC is displayed If SEL has value 1 the INTEGER*4 VALUE4 is displayed If SEL has value 2 the INTEGER*2 VALUE2(2) is displayed If SEL has any other value the LOGICAL*4 VALUEL is displayed IF the MAP * had not existed, and SEL would not have been 0 or 10-12 or 1 or 2 the last map (SEL=2 : = VALUE2(2)) would have been used. 4 POINTER_syntax The pointer statement allows you to decode a piece of data in an other place in the record. An example is the PENDING structure (pending.dat for Allin1/Office server character*64 pending_key !MAIL + the name of the user character*1 record_code !continuation record index character*1 cont_flag ! flag for contin record integer*2 total_attr_size !total size of the pointers+data ! of all records together integer*2 this_rec_attr !size of pointer+data in this record character*2 usage_count !how often is this record used character*5 new_mail_count !new mail count for the user character*3 padding structure pointers(100) [1] !start of pointer/data integer*2 type [7=mail] !type of field integer*2 %dummy pointer*4 offs [pointers] [2] !offset to the "pointer" field structure work [3] !the data section integer*2 length !length of string byte %unknown(6) character*(length-6) test !the string end structure [4] !end of the data definition exit [offs+length+2>=this_rec_attr] [5] !exit statement end structure The record is build up as follows a. 80 bytes of fixed data b. a pointer section containing an array of 1. TYpe 2. Offset to a position in the record after the pointers c. the text area pointed to by the offset The statement pointer*4 offset[pointers] at [2] must be followed by a structure statement [3]. DIX will take the value from the record at the position of the pointer statement [2] (the length contains the size of the field), adds the location of "POINTERS" [1], and uses that offset to expand the statements in the structure "work" [3]. When the end structure [4] is found, DIX will resume processing the next statement [5] with the saved offset. At the end [5] is the exit test. If the offs > cur rec length : exit This means : leave the "pointers" structure. since there is no more data available, the display is stopped. See the display below 0|PENDING_KEY |MAIL JOHN.DOE 64|RECORD_CODE | 65|CONT_FLAG |. 66|TOTAL_ATTR_SIZE |86 68|THIS_REC_ATTR |82 70|USAGE_COUNT | 72|NEW_MAIL_COUNT |3 77|PADDING | 80|POINTERS(1).TYPE |MAIL 84|POINTERS(1).OFFS |16 96|POINTERS(1).WERK.LENGTH|31 104|POINTERS(1).WERK.TEST |OA$SHARA7718:IFQ3FORG.TXT 88|POINTERS(2).TYPE |MAIL 92|POINTERS(2).OFFS |49 129|POINTERS(2).WERK.LENGTH|31 137|POINTERS(2).WERK.TEST |OA$SHARE2664:IFR1XUY1.TXT 96|POINTERS(3).TYPE |31 You could suppress the display of pointers(1).offs, by changing the definition of pointer to : pointer*4/nodisplay offs [pointers] 4 EXIT_syntax The pointer statement allows you to terminate a structure repeat count character*64 test structure pointers(100) [1] integer*4 type [7=mail] integer*4 value exit [type=10] [2] end structure character*10 rest The record is build up as follows a. 64 bytes of fixed data (test) b. a structure section containing an array of 1. TYpe 2. value c. 10 bytes trailer (rest) The statement "exit [type=10]" at [2] will exit the *100 repeat for [1] if the contents for type = 10. 0|TEST |MAIL 01CURSIST 80|POINTERS(1).TYPE |MAIL 96|POINTERS(1).VALUE |20 88|POINTERS(2).TYPE |MAIL 92|POINTERS(2).VALUE |25 96|POINTERS(3).TYPE |10 <- this terminates with the exit 100|POINTERS(3).VALUE |25 104|REST |The rest If the description had been character*64 test structure pointers(100) [1] integer*4 type [7=mail] exit [type=10] [2] integer*4 value end structure character*10 rest The result would have been (POINTERS(3).VALUE at 100 is not displayed) and so the offset for REST is 4 lower 0|TEST |MAIL 01CURSIST 80|POINTERS(1).TYPE |MAIL 96|POINTERS(1).VALUE |20 88|POINTERS(2).TYPE |MAIL 92|POINTERS(2).VALUE |25 96|POINTERS(3).TYPE |10 <- this terminates with the exit 100|REST |The rest 4 Examples 5 EXAMPLE_for_ABORT The following description is from the SYSUAF description. The UAF$B_RTYPE is expected to be 1. BYTE UAF$B_RTYPE ABORT wrongtype [UAF$B_RTYPE <> 1] .... rest of desciption If the UAF$B_RTYPE is <> 1, DIX will assume that the current record cannot be described by this description. Dix will issue a warning "description is aborted wrongtype. The desciption will remain open for the file, so if another record does have the right UAF$B_RTYPE this record will be displayed using this desciption. 5 EXAMPLE_for_MAP PARAMETER REP_BITS=2 INTEGER*4 RECNR STRUCTURE DATUSR DATE*4 DATTIM !internal date format #minutes since 1857 UIC*4 UIC !standard VMS UIC format (group,member) END STRUCTURE INTEGER*2 type - !1,4,10 will be by name, all others in [1=special,4=normal,10=fatal] !decimal format INTEGER*2 COUNT INTEGER*4 RESCHED STRUCTURE BITS(REP_BITS) !2 structures, with both bits*1 flag=1 byte long BITS*1 FLAGS [mon,tue,wed,thu,fri,sat,sun] !the total is 2 bytes END STRUCTURE UNION MAP TYPE=Special !this case is valid if type=1 (special) INTEGER*2 time(2) END MAP MAP * !this case is valid for any other field value CHARACTER*2 dunnow ! ENDMAP MAP type=normal !this case is value if type=4 (normal) INTEGER*4 time ENDMAP MAP Type=fatal !this case is valid if type=10 (fatal) ENDMAP !No allocation is this type ENDUNION !total structure length is dependend on type WSTRING*60 MESSAGE !word counted ASCII string with 60 bytes room INTEGER*4 FIELD(1:COUNT) !field has COUNT members 5 EXAMPLE_for_FIELD_FOLLOW An example about field_following to another file The example is about 3 RMS indexed files that form a simple sourcemodule cross_reference system The first file (CROSS_REF.CRF_FILE_NAMES) has the following description (.CRF_FILE_NAMES in the system or user textlibrary) integer*2 file_nr !primary key character*60 file_name integer*2 %filler The second file (CROSS_REF.CRF_MOD_NAMES) has the following description (.CRF_MOD_NAMES in the system or user textlibrary) integer*2 mod_nr !primary key character*32 mod_name integer*2 file_nr/file=.crf_file_names !link to the filename The third file (CROSS_REF.CRF_CROSS) has the following description (.CRF_CROSS in the system or user textlibrary) integer*2 caller_nr /file=.crf_mod_names !link to modulename integer*2 called_nr /file=.crf_mod_names !link to modulename Now if you open a record in the third file $DIX CROSS_REF.CRF_CROSS %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REC.CRF_CROSS %DIX-I-USINGDES, Using description SYSLIB(.CRF_CROSS) DIX> EXA * 0|CALLER_NR>|738 !the > tells us there is a link present 2|CALLED_NR>|-262 DIX> EXA/DES * 0|CALLER_NR>|738 Type :INTEGER*2 Linenumber:0 Variable :False Dependency:False Link file :.CRF_MOD_NAMES !and yes there is a link defined Link field:0 Match :EQ 2|CALLED_NR>|-262 Type :INTEGER*2 Linenumber:1 Variable :False Dependency:False Link file :.CRF_MOD_NAMES Link field:0 Match :EQ DIX> Follow CALLER_NR !try to follow this link File .CRF_MOD_NAMES not (yes) opened, open it (y/[n]):Y !do you want to open the file %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REF.CRF_MOD_NAMES %DIX-I-USINGDES, Using description SYSLIB(.CRF_MOD_NAMES) DIX> Exa * 0|MOD_NR |738 2|MOD_NAME|CHECK_ALLOWED_USER 34|FILE_NR>|66 !and this field has a link defined DIX> Follow file_nr File .CRF_FILE_NAMES not (yes) opened, open it (y/[n]):y %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REF.CRF_FILE_NAMES %DIX-I-USINGDES, Using description SYSLIB(.CRF_FILE_NAMES) DIX> Exa * 0|FILE_NR |66 2|FILE_NAME|REM_SERVER_CHECK_ACCESS DIX> Back !now backtrace %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REF.CRF_MOD_NAMES %DIX-I-USINGDES, Using description SYSLIB(.CRF_MOD_NAMES) DIX> Exa * 0|MOD_NR |738 2|MOD_NAME|CHECK_ALLOWED_USER 34|FILE_NR>|66 DIX> Back !and again a backtrace %DIX-I-USINGFIL, Using file DSA40:[DIR]CROSS_REC.CRF_CROSS %DIX-I-USINGDES, Using description SYSLIB(.CRF_CROSS) DIX> EXA * 0|CALLER_NR>|738 !the > tells us the is a link present 2|CALLED_NR>|-262 As you see, you can jump around an look at the recordstructures and links Another example is the .DIR description integer*2 verslim [32767=None] !version limit bits*1 flags !flag byte string name !bytecounted string (variable) pad*2 !align to word boundary structure v(64) !n*version,fileid integer*2 version fileid fileid/file=[000000]indexf.sys/record- /comp="f$getd($file,""blnr"")+int(f$extr(1,-1,f$elem(0,"","",$FIELD)))" end structure The fileid has a link to the corresponding indexf.sys with a record number equal to the first number in the fileid (layout = (filenr,revnr,volume)) + the record number in indexf.sys of the fileheader with fileid 0. You need read access to the index file for this $ dix somedir.dir/int %DIX-I-USINGFIL, Using file USER50:[STUBBF.PROGRAMS.DIX]SOMEDIR.DIR;1/NOMOD %DIX-I-USINGDES, Using description DSA50:[STUBBF.PROGRAMS.DIX]DIX_DES.TLB;54(.DIR) DIX>exa * 0|VERSLIM |NONE 2|FLAGS | 3|NAME |Q.Q 8|V(1).VERSION|1 10|V(1).FILEID>|(63474,3,0) DIX>foll v(1).fileid !follow link to fileheader File [000000]INDEXF.SYS not (yet) opened, open it (y/[n]):y %DIX-I-USINGFIL, Using file USER50:[000000]INDEXF.SYS;1/NOMOD %DIX-I-USINGDES, Using description DSA50:[STUBBF.PROGRAMS.DIX]DIX_DES.TLB;54(INDEXF) DIX>exa * 0|ID_OFFSET |40 ... 8|FILE_ID |(63474,3,0) ... 66|BACKL_FID >|(62674,1,0) 80|FNAM |Q.Q;1 ... DIX>Follow backl_fid !follow link to parent directory 0|ID_OFFSET |40 ... 8|FILE_ID |(62674,1,0) ... 66|BACKL_FID >|(44986,1,0) ... 80|FNAM |SOMEDIR.DIR;1 ... DIX>back !back to the fileheader DIX>exa * 0|ID_OFFSET |40 ... 8|FILE_ID |(63474,3,0) ... 66|BACKL_FID >|(62674,1,0) 80|FNAM |Q.Q;1 ... DIX>back !back to the entry in the somedir.dir file %DIX-I-USINGFIL, Using file USER50:[STUBBF.PROGRAMS.DIX]SOMEDIR.DIR;1/NOMOD %DIX-I-USINGDES, Using description DSA50:[STUBBF.PROGRAMS.DIX]DIX_DES.TLB;54(.DIR) DIX>exa * 0|VERSLIM |NONE 2|FLAGS | 3|NAME |Q.Q 8|V(1).VERSION|1 10|V(1).FILEID>|(63474,3,0) 5 EXAMPLE_for_LIMIT_QUAL Example for the /LIMIT qualifier Description CHARACTER*10 TEXT STRUCTURE data(100) INTEGER*4 flag/limit=>100 CHARACTER*20 what END STRUCTURE If the field limit contains a value > 100, the repeat for the structure data(100) will be terminated. CHARACTER*10 TEXT STRUCTURE data(100) INTEGER*4 flag(5)/limit=>100 CHARACTER*20 what END STRUCTURE If the field limit contains a value > 100, the repeat for the structure flags (5) will be terminated, but the repeat for the structure will be continued 2 Record_searches Dix has a powerful record search function. You can look for text in records, but also in fields (if you have a description). If the fields are not text-fields but binary data, dix will do a convert of the search string to binary and then do the compare. Dix also allows you to seaerch data in more than one record, so a query like "search record that contain A and the next record contains B" is possible, and this is not limited to just 2 records. The search can be a simple locate, or a wildcard match, or a compare (le,le,eq,ge,gt), and the compares can be done in any known type. The searchsyntax is Parameter [parameter] [parameter..] Upto 6 parameters. If more than one parameter is given, parameter2 must match data in the following record, parameter3 is the then next record and so on. Each parameter has the syntax (a list of values and qualifiers) string1[/qual],string2[/qual],.. Search can be used in 4 places Interactive mode : Entered on the command line or in the interactive commands: Will set the record pointer to the first match Screen mode : Will set the record pointer to the first match File mode : Will display all records matching the search (unless /count is given) 3 Examples All these examples are for the DIX/FILE mode. They can also be used for the screen and interactive mode. The file mode will display all matches, the interactive and screen will select the first record that matches. 1.DIX/FILE data.dat TEST Display all records that contain TEST (/MATCH=LOCATE). The search is NOT case sensitive. 2.DIX/FILE data.dat TEST,12/FIELD=FOR*MAT/MATCH=GE Display all records that contain TEST (/MATCH=LOCATE), OR have the value in any field that matches "FOR*MAT" >=12 3.DIX/FILE data.dat TEST/LOGIC=AND,12/FIELD=FORMAT/MATCH=GE Display all records that contain TEST (/MATCH=LOCATE), AND have the value of field "FORMAT" >=12 4.DIX/FILE data.dat TEST/WINDOW=(position=10,size=40) Display all records that contain TEST (/MATCH=LOCATE) in the byte 10..49 of the record. The search is NOT case sensitive. 5.DIX/FILE data.dat *XYZ/MATCH Display all records that match *XYZ (so the XYZ must be at the end of the record. 6. DIX/FILE data.dat "TesT"/case_sensitive Display all records that contain TesT is this case. 7. DIX/FILE data.dat string1,string2/next_record/wild=extended Display the records that contains string1 and the next record matches string2 (with extended wild characters). Only the first record is displayed. 8. DIX/FILE data.dat 123:456/match=range/field=myfield Displays the records that contain a value between 123 and 456 (including) in field myfield 9. DIX/FILE data.dat 123/field=myfield/type=integer*2/mat=eq Displays the records that contain an value of 123 in the first two bytes (converted as integer*2) of the field field myfield Field myfield does not have to be of type integer. 10. DIX/FILE data.dat 123/field=myfield/type=integer*2/wind=(pos=10)/mat=eq Displays the records that contain an value of 123 in the bytes 10,11 (converted as integer*2) of the field field myfield. If bytes 10-11 do not exist in the field, the match returns false. 11. DIX/FILE data.dat 123:456/field=myfield/wind=(pos=10,siz=4)/mat=Range Displays the records that contain an value between 123 and 456 in the bytes 10-13 (converted as integer*4 (size=4)) of the field field myfield. If bytes 10-13 do not exist in the field, the match returns false. 12. dix/file data.dat *str*ing1*/mat=match/wild 1234/matc=eq/field=myfield Display the record that match *str*ing1* AND the following record contains the value 1234 in field myfield. 13. DIX/FILE data.dat string1 string2 string3 Will search for for a record that contains "string1" AND the next record contain "string2" AND the next record containing "string3". Record 1 will be displayed, record 2 and 3 not. 14. DIX/FILE data.dat string1 string2/show string3/show Will search for for a record that contains "string1" AND the next record contain "string2" AND the next record containing "string3". Record 1 will be not be displayed, record 2 and 3 will. 3 SEARCH_Qualifiers /CASE_SENSITIVE The text in STRING is to be matched case sensitive. DCL will change all parameters to uppercase unless within quotes. So if you use /case_sensitive, make sure STRING is within quotes. This qualifier is positional, so each search item can have its own value. /EXISTS If the /field is specified, DIX checks if the field is present. If the /WINDOW is also used, DIX checks if the ranges specified is in the record (no /FIELD) or in the field. The search string will not be used in this case. /FAST /FAST=number /FAST=1024 (default) If you specify /FAST, DIX will search the file bypassing RMS, using SYS$QIOW to access the datablocks. This may speed up searches for indexed files, skipping the overhead for RMS-locking. This does not always speed things, depending on how the buckets are distributed over the file. If the buckets are mostly sequential in the file, DIX can use large buffers, and read many buckets in one IO. If buckets are scattered over the file, these large reads will not be benificial, and a normal search with the SYS$GET may be faster. The qualifier is supported for all types of files, but the gain for non-indexed files may be small. The value is the number of disk-blocks readin in one IO. /FIELD /FIELD=NAMEMASK namemask is fieldnamemask descriptionmask\fieldnamemask filenamemask\descriptionmask\fieldnamemask If filename mask is present, the pattern is matched against the filename if no match is found, this entry is skipped. If descriptionname mask is present, the pattern is matched against the description. If no match is found, this entry is skipped. Normally DIX will search the string in the whole record. If you enter /FIELD only the field(s) that match the "fieldnamemask" are searched. This match uses the normal VMS wildcard * and %. See the examples, see also the /WINDOW qualifier. The type of the field (integer,character etc.) determines the way the compares are done. For examples, for INTEGERS the compare is done in binary etc. This qualifier is positional, so each search item can have it own value. /LOCATION /LOCATION=location_value Where should the data be searched. location_value van be data : the normal data (default) vfc : the vfc data both : in the vfc as well in the normal data recl : Special value for comparing record_length. In the cas only the /matc=lt,le,eq,ge,gt and randge can be used. /LOGIC /LOGIC=AND /LOGIC=OR !Default If you specify /LOGIC=AND, this string must match as well as the the next. This qualifier is positional, so each search item can have it own value. Example STRING1/LOGIC=AND,STRING2 Matches only if both STRING1 and STRING2 are found. STRING1/LOGIC=OR,STRING2 (the /logic=or is default) Matches only if either STRING1 or STRING2 are found. STRING/LOGIC=AND,STRING2,STRING3 Matches only if either (STRING1 and STRING2) or STRING3 is found. /MATCH /MATCH=LOCATE Default /MATCH=MATCH /MATCH=LT /MATCH=LE /MATCH=EQ /MATCH=GE /MATCH=GT /MATCH=RANGE Defines the match. This qualifier is positional, so each search item can have it own value. See also the /wildcard qualifier LOCATE : The string must occur somewhere in the (part of the) record MATCH : The string must match the whole record LE,LE,EQ,GE,GT : The value is compared with the STRING. This can be used with a /FIELD If the fieldvalue is a numeric value, compares are done in the normal numeric way. If the fieldvalue is a STRING, compares are done as strings. See also the /TYPE comand to overrule the default type. RANGE : The searchstring is LOW:HIGH. A match will be found it the value is between LOW and HIGH (including the boundaries). Example 123/FIELD=UAF$L_TQENT/MATCH=GE (binary (integer*2) field) Will display all records with the UAF$W_BYTLM value >=123. (binary conmpare) XYZ/FIELD=UAF$T_USERNAME/MATCH=LT (ascii (character*12) field) Will display all records with the UAF$T_USERNAME value or . A < in the text will be displayed as <<. This display is reversible, so DIX can reconstruct the original unprintable value. If you are in this mode, on input a < must be entered as << /HEX If the /HEX qualifier is given, the program will display the data in Hexadecimal. In interpreted mode the CHARACTER*(*) fields will be dumped in ascending order separated by spaces. All other fields will be dumped in descending byte order (the VMS standard). Default /HEX in raw dump mode. Default /DECIMAL in interpreted mode. See also the /HEX, /BINARY and /OCTAL qualifier. /INFO The /INFO qualifier will display information about the file(s), including information about the keys of an indexed file. This information includes name,position,size and type of keys. The /INFO qualifier must be the first on the command line. Example: $DIX/INFO SYSUAF Keyinformation on file SYS$COMMON:[SYSEXE]SYSUAF.DAT;1 File Organization : Indexed Record format: Variable Creation date : 24-MAR-2000 14:47:46.41 Expiration date : Backup date : 20-APR-2003 18:12:43.19 Revision date : 21-APR-2003 09:40:36.09 File id : (17,1,0) File owner : [1,1] = [1,1] Record Record attribute : NoBlockspan,NONE Max record size : 1412 Longest record : 0 Allocation EOF block : 49 (FFB = 0) Allocated blocks : 48 Area Allocation bucketsize extension 0 48 3 10 Keyinformation ..INDEX.. ..DATA... Nr Type Pos Siz Area Bkt Area Bkt Keyname Nr siz Nr siz 0 STG 4 32 0 3 0 3 1 BIN4 36 4 0 3 0 3 2 BIN8 36 8 0 3 0 3 3 BIN8 44 8 0 3 0 3 Descending keys would have a D before the type. /INTERACTIVE Enters INTERACTIVE mode. This is a commandline mode that allows you to enter commands at the prompt. This mode us useful for DCL procedures. See the INTERACTIVE_COMMANDS help for possible commands. This mode also supports scripting commands (IF, GOTO etc). The /INTERACTIVE qualifier must be the first on the command line. Example: $ DIX/INTERACTIVE SYSUAF/EQ=SYSTEM Processing file :SYS$COMMON:[SYSEXE]SYSUAF.DAT;1/NOMOD Using description:DSA0:[PROGRAMS.DIX]DIX_DES.TLB;9(SYSUAF) DIX>disp *pwd* 340.0|UAF$Q_PWD(1) |22B619B5 344.0|UAF$Q_PWD(2) |E19FAE22 348.0|UAF$Q_PWD2(1) |00000000 352.0|UAF$Q_PWD2(2) |00000000 362.0|UAF$B_PWD_LENGTH |8 372.0|UAF$Q_PWD_LIFETIME|30 00:00:00.00 380.0|UAF$Q_PWD_DATE |17-MAY-2002 18:34:12.00 388.0|UAF$Q_PWD2_DATE |17-NOV-1858 00:00:00.00 DIX>EXIT You can type HELP at the prompt to obtain online help. /LOCKING /LOCKING=(val,val...) Val can be RRL : Read all record with the RAB$M_RRL option. This means that even if the record is locked by another stream, DIX can read it. The usage is at your own risk, since any other user can modify the data you are looking at (and possibly change). OPTIMISTIC: Dix will read the record with the RAB$M_NLK option. The record is read, but not locked. Other streams can read the data. When you want to update a modified record, DIX will check if the record still contains the original data, and if not warn you, and give you the option to not modify the record. If the file is opened with /nomodify (default) records will never be locked (the file is readonly). /MARK If you leave the program DIX will define a symbol DIXRFA containing the filename and RFA of the current record. If you start DIX at a later moment with the same file and the /RFA qualifier, DIX will return to the same record as before. Example $DIX/INTER SYSUAF/EQ=SYSTEM Dix>EXA * Will display all data of the SYSTEM record Dix>READ Will read the next record from the sysuaf Dix>Exit Leave DIX $DIX/RFA SYSUAF Will return you to the record in sysuaf following the SYSTEM record. /MODIFY If the /MODIFY qualifier is specified, you are allowed to modify /delete/insert records, Either in interactive or screen mode, and in raw (DEP BYTE_OFFSET=VALUE) or description mode (DEP field_name=value). /MOUSE /MOUSE (default) /NOMOUSE Enable the usage of the decwindows mouse. Default mouse_usage is enabled, but if you want, you can disable it to allow the mouse for selecting text. In the interactive mode the mouse usage can be enabled/disabled via the set mouse command. /MULTI_FILE Normally DIX will open only one file. If you specify more than one file (via wildcard or list), the program will prompt you which file to use. If you specify /MULTI_FILE, DIX will open all files and lets you switch between them. /NUMBER /[no]Number /NUMBER=DECIMAL (default for interpreted mode) /NUMBER=HEX If the /NONUMBER qualifier is given, the program will not display the byte offsets of the data. Default is /NUMBER(=decimal) /OCTAL If the /OCTAL qualifier is given, the program will display the data in octal. Default /HEX in raw dump mode. Default /DECIMAL in interpreted mode. See also the /HEX, /DECIMAL and /BINARY qualifier. /OUTPUT /OUTPUT=Filename Give an alternative output file. This qualifier will only be used if you specify the /FILE qualifier. Default is the terminal. If you specified /WIDE the width will be 132. If you specified /WIDTH=nn, the width will be nn (upto 4095) /RAW If DIX can find a description, DIX will use it. If you specify /RAW DIX will display in RAW mode even if it can find a description. /RFA /RFA=(rfaval) Can be used to select a specific record by rfa rfaval is either a 3 16bits number value (like dump) bucketnrl,bucketnrh,offset or a 32 bits bucketnr, floowed by a 16bit offset example $ DIX FILE.DAT/RFA=(100,12) !Bucket=100, offset=12 $ DIX FILE.DAT/RFA=(100,3,12) !Bucket=3*65536+100, offset=12 /SCREEN /SCREEN If the /SCREEN qualifier is given, the program will display a record, (either interpreted or raw) and lets you specify editing(only in /MODIFY mode) or display commands . You can 1. Alter display formats (raw/interpreted) 2. Modify description files 3. Create description files 4. Modify/insert/delete records (only in modify mode) Press the PF2/HELP key for info in screen mode. The /SCREEN qualifier must be the first on the command line. /SCRIPT /SCRIPT=filename If interactive mode, if you enter /script=file, DIX will take commands from that file (defaultfilename=.DIX), and return to DCL. See also the /define qualifier and the /command qualifier /SELECT /SELECT=(name[,name..]) In the /FILE mode, DIX will print all fields (of all desriptions) to a file. If you specify /SELECT, DIX will display only fields with a name that matches one of the name(s) of the /SELECT. Wildcards (* and %) can be used. The value is [descriptionmask\]fieldmask. If no description mask is given, all descricption (for the current file) are used. Examples: DIX/FILE SYSUAF/EQ=SYSTEM will display all the known fields. DIX/FILE SYSUAF/EQ=SYSTEM/SELEC=*PWD* will display only the fields with PWD in the name. DIX/FILE SYSUAF/EQ=SYSTEM/SELEC=UAF$P* will display only the fields beginning with UAF$P DIX/FILE SYSUAF/des=(sysuaf,special) - /EQ=SYSTEM/SELEC=(SYS*\UAF$P*,SPE*\TEMP*) will display only the fields that match UAF$P* in the description SYSUAF or TEMP* in the desciption SPECIAL DIX/FILE SYSUAF/des=(sysuaf,special) - /EQ=SYSTEM/SELEC=(TEMP*) will display only the fields that match TEMP* in the description SYSUAF or TEMP* in the desciption SPECIAL The select is case insensitive. /STARTUP /STARTUP=filename /STARTUP=DIX_INI Default Process commands from a startup file. The default filename is SYS$LOGIN:.INI See the topic about the startup_file about allowed commands. /STRICT /STRICT=(mode[,...]) Sets the STRICT mode for DIX for this level. Deeper levels inherit the strict mode from the outer levels. Normally DIX is not very strict in the symbol handling. You can define new symbols by typing 1. a=10 (define the symbol a , type integer, value 10) and then say 2. a="SKLFG" (redefine a to type character, value "SKLFG" TYPING : Once a symbol is created, you cannot change the type anymore In the example above you can do 1. but not 2. DECLARATION : All symbols have to be declared before usage This also disallows calling subroutines or @ files and not having the sume number of arguments given and declared. LOCAL : Even with /DECLARATION, symbols from an outer level can be used. With /LOCAL this is not allowed. /SYMBOL /SYMBOL=symbolname If you specify /SYMBOL and DIX operates in /FILE mode, the result is printed to the output file, and symbols are defined for each fieldname. for example $ DIX/FILE sysuaf/eq=system/select=*pwd*/symb=test will display %Recordsize = 644 340.0|UAF$Q_PWD(1) |22B619B5 344.0|UAF$Q_PWD(2) |E19FAE22 348.0|UAF$Q_PWD2(1) |00000000 352.0|UAF$Q_PWD2(2) |00000000 362.0|UAF$B_PWD_LENGTH |8 372.0|UAF$Q_PWD_LIFETIME |30 00:00:00.00 380.0|UAF$Q_PWD_DATE |17-MAY-2002 18:34:12.00 388.0|UAF$Q_PWD2_DATE |17-NOV-1858 00:00:00.00 But also the following symbols will be set $show symbol test* TESTUAF$B_PWD_LENGTH = "8" TESTUAF$Q_PWD(1) = "22B619B5" TESTUAF$Q_PWD(2) = "E19FAE22" TESTUAF$Q_PWD2(1) = "00000000" TESTUAF$Q_PWD2(2) = "00000000" TESTUAF$Q_PWD2_DATE = "17-NOV-1858 00:00:00.00" TESTUAF$Q_PWD_DATE = "17-MAY-2002 18:34:12.00" TESTUAF$Q_PWD_LIFETIME = "30 00:00:00.00" This makes it easy to use DIX in command procedures. /USER_LIBRARY /USER_LIBRARY=usertlbfile /USER_LIBRARY=DIX_DES_USER (default) If you specify /USER_LIBRARY (default), DIX will use this .TLB file for extra description records. The default filespecification is SYS$LOGIN:.TLB /SYSTEM_LIBRARY /SYSTEM_LIBRARY=systemtlbfile /SYSTEM_LIBRARY=DIX_DES (default) If you specify /SYSTEM_LIBRARY (default), DIX will use this .TLB file for systemwide description records. The default filespecification is dix-image-directory:.TLB /WIDE Set the output width (/INFO en /FILE) to 132. This is a shorthand for /WIDTH=132. /WIDTH /WIDTH=nn Set the output width (/INFO and /FILE) to nn nn will be clipped between minimum 80 and maximum 4095. 2 STARTUP_FILE When DIX is started DIX will try to open a startupfile and process commands in it. THe name of file is entered with the /STARTUP qualifier and is default DIX_INI with a default filespec of SYS$LOGIN:.INI In this file the following commands are allowed 3 DEFINE Used to define keys Keys can be defined for screen mode or for interactive mode. 4 DEFINE/KEY DEFINE/KEY keyname string[/qualifiers] Define keys for the INTERACTIVE mode of DIX. See also the RTL SCreen Management (SMG) manual about the possible keys. 5 Qualifiers /SET_STATE /SET_STATE=name DEFINE/KEY keyname string /SET_STATE=NAME. Sets the key driver to state NAME. /IF_STATE /IF_STATE=name DEFINE/KEY keyname string /IF_STATE=NAME If the user enters "keyname", the string "string" will only be returned if a previous key has put the key driver in the "NAME" state. /TERMINATE After the /TERMINATE, the result will be given to DIX. /ECHO Echo the translated strings /LOCK_STATE DEFINE/KEY keyname string/SET_STATE=NAME/LOCK Normally the state is removed after the typing of the next key. If you define the key (and the SET_STATE) with the /LOCK, the state will remain "NAME" until another state is entered. 4 DEFINE/SKEY DEFINE/SKEY skey function [/qualifiers] Define a key combination for the screen mode of DIX. skey : the keyboard key : Almost all keys can be used for keydefinitions. function : the DIX function See the help about DIX_functions for allowed functions 5 qualifiers /SET_STATE /SET_STATE=name The parameter "" must be present but the contents are not used. SMGKEY will set a new state (GOLD and BLUE are used by default, but you may redefine the states if you redefine all keys) Statenames may not contain a - (hyphen) example DEFINE/SKEY PF1/SET=GOLD "" DEFINE/SKEY UPPERCASE_A/IF_STATE=GOLD key_print If the user enters PF1-A, the function key_print is executed. For a list of allowed functions, see the help about KEY_MAPPING /IF_STATE /IF_STATE=NAME Specifies a state that must be in effect for the key definition to work. The state name is an alphanumeric string. States are established with the /SET_STATE qualifier Statenames may not contain a - (hyphen) DEFINE/SKEY PF1/SET=GOLD "" DEFINE/SKEY F20/IF_STATE=GOLD key_print DEFINE/SKEY F20 key_swap_dis If the user enters PF1-F20, the function key_print is executed. It ths user enters F20, the function key_swap_dis is executed. For a list of allowed functions, see the help about KEY_MAPPING /CONTEXT_SCREEN /CONTEXT_SCREEN=Screen_context Define this key only for a specific screen. Default is that the key is valid in all screens. Valid screens are DISPLAY_ALL Display data in all formats SELKEY Select data for a key value EDIT Edit description SELFILES Select one file when mulitple files match EDITFILES Select a file (or add one) SELDESCRIPTIONS Select a description (or add one) YESNO Yes/No screen VIEW View all kinds of data HELP Help screen(s) EDITMULTIPLE Edit multiple lines (in show description) EDITLINE Edit a single line SELFIELD Select a field SHOWRAW Show data in raw format SHOWDES Show data in description format Define/skey F20 key_print/context_screen=showraw Will define key F20 as print key, but only in the showraw screen 3 DELETE DELETE/SKEY/ALL Delete all (default)screenkeydefinitions DELETE/SKEY skey [/STATE=NAME] Delete the key definition for skey (possibly with state NAME) 3 SET Various set options 4 BINARY SET BINARY option Normally all "character" like fields will not contain unprintable data. These field types are CHARACTER,xSTRING. If the data does contain unprintables (hex 0:1f,7f,80:9f or ff) the /BINARY qualifier decides how this data should be displayed. Option can be DOT :All unprintables are replces by a ".". This encoding is not reversible, after an unprintable value is replaced by a ".", DIX cannot knwo what the unprintable value was. This may be a problem in the screen mode. HEX :All unprintable data is displayed as %Xdd, a hexadecimal display. A % in the data will be displayed as %%. This display is reversible DIX can reconstruct the original unprintable value. BINARY:Dix will not change the unprintable data. The data is displayed as it is. THis mode will not work in screen mode, and maybe poorly when the output device is a terminal. FANCY :Unprintalbe bytes are represented by a 2 or 3 letter mnemonic like or . A < in the text will be displayed as <<. This display is reversible, DIX can reconstruct the original unprintable value. 4 DECIMAL SET DECIMAL/DIGITS=n /ROUNDED /TRUNCATE Normally DECIMAL type data will use the number of digits needed. But if you do a divide of two decimal strings, the "n" will define the number of digits after the ".". So if "n" = 0, F$DECIMAL(20)/F$DECIMAL(3) = 0.2 The /ROUND or /TRUNCATE decides wheather the divide must be rounded or truncated Default = /DIGITS=10/ROUND 4 EDITOR SET EDITOR which Define your editor for editting description records Possible options are EDT Use EDIT/EDT INTERNAL Use an internal editor (simple but fast) TPU Use EDIT/TPU 4 INTEGER SET INTEGER commands SET INTEGER SIZE=n SET INTEGER SIZE=n Set the size for the real symbols. Value can be 4, 8. The size 8 is only supported in alpha and IA64 (sorry not vax). If you set the size to 8, all integer symbols use 64bit integers, and also all computations use 64bit integers. 4 MESSAGE Set the message display wanted /[NO]FACILITY Sets/clears the facility part /[NO]IDENT Sets/clears the Ident part /[NO]SEVERITY Sets/clears the severity part /[NO]TEXT Sets/clears the text part /ALL Sets all parts /NONE Clear all pars 4 MOUSE SET MOUSE ON SET MOUSE OFF Enable or disable the MOUSE usage in screen mode If enabled, DIX will interpret the mous clicks, if disabled DECWINDOWS will use interpreted the clicks, so you can select/copy text. 4 PROMPT Change the default prompt. SET PROMPT string If the string contains a # sign, this # will be replaced by _level if the commandfile depth is >1 The default prompt is DIX#>, which will be DIX> at level 1 DIX_1> at level 2 etc. 4 PROCESS_NAME Change the processname. If you have a script that modifies a lot of records, this can take while. If this happens in BATCH, it is difficult to see how far the process has completed. By changing the processname, you can see on the outside (via show system/batch) the progress of the job. Example: count = 0 loop: modify rec count = count + 1 if mod(count,1000) then set process/name="At_''count'" next rec goto loop This will change the processname to At_nnnn every 1000 records. 4 REAL SET REAL commands SET REAL SIZE=n SET REAL FORMAT/SIZE=n[/default] format SET REAL SIZE=n Set the size for the real symbols. Value can be 4, 8 or 16. The actual datatype depends on the architecture (see table) Size Arch 4 8 16 Vax REAL_F REAL_D REAL_H Alpha REAL_F REAL_G REAL_X IA64 REAL_S REAL_T REAL_X SET REAL FORMAT[/size=n] [/default] format Set the format for conversion. This format is the normal fortran real format specification, (Fn.m, En.mEe, Gn.mEe). n is maximum field width m is the number of digits after the decimal. e is the numer of digits in the exponent (default 2). See the Fortran manual for more detail. /SIZE=n : set the format for size=4 (n=4,8,16) /DEFAULT: set the format back to the default The defaults are size 4 g20.8 8 g25.10e3 16 g30.15e4 4 SEARCH SET SEARCH string[/quals].... Set the search string for the next search (without executimg the search) See the help about record_searches for the syntax 4 STRICT SET STRICT [qualifiers] Normally DIX is not very strict in the symbol handling. You can define new symbols by typing 1. a=10 (define the symbol a , type integer, value 10) and then say 2. a="SKLFG" (redefine a to type character, value "SKLFG" DIX has two levels of more strict behaviour /TYPING : Once a symbol is created, you cannot change the type anymore In the example above you can do 1. but not 2, unless you delete the symbols inbetween. /DECLARATION : All symbols have to be declared before usage This also disallows calling subroutines or @ files and not having the same number of arguments given and declared. /LOCAL : Even with /DECLARATION, symbols from an outer level can be used. With /LOCAL this is not allowed. Example SET STRICT/LOCAL INTEGER a=10,b=20 CALL test 20,b EXIT TEST: SUBROUTINE loc1,loc2/symbol SHOW SYMB A !A is undefined with /LOCAL SHOW SYMB loc1 !has the value of 10 loc1= 20 !this changed loc1. LOC2=20 !this changes loc2 AND b, so output variables can be used. ENDSUBROUTINE 4 SUBSTITUTION Set or clear the symbol substitution flags /[NO]VERB Enable/disable the substitution of verbs /[NO]SYMBOLS Enable/disable the substitution of symbols Default both flags are enabled 2 INTERACTIVE_COMMANDS If you specify /INTERACTIVE the program will enter commandline mode. It will prompt you for commands. Lines can be continuated with a - on the last position of the line (like DCL). Blanks are not significant, except in symbol names, verbs and strings. Dix is NOT case sensitive, except within strings. Dix has a powerful set of commands to enable scripting inside a command file. See the @file_and_commands_in_file help topic. 3 @file_and_commands_in_file Format @filename[/output=filename] [expression[,expression...] Take the commands from a command file. The default filespec is 'this_directory'.dix The expressions will be available in the subroutine as local symbols with the names Pn (As DCL) or any name the ENTRY statement gives them. There is no limit to the number of arguments. There is also a symbol $NRARGS that contains the number of arguments. See also the help about the ENTRY command. The file is read into memory before any statement is executed. At this point all loop-structures are checked for correct overlap (f.e. FOR IF ENDFOR ENDIF is not acccepted. Inside this file you can use the following extra commands. 4 CALL Call label [expression[,expression...] Call to a subroutine with optional parameters There is no limit to the number of arguments. See help about SUBROUTINE statement The parameters will be local symbols for the SUBROUTINE, see the help about symbols. 4 CYCLE Skip the rest of the for, repeat, while, loop block and resume execution at the corresponding ENDxxx statement to start the next iteration. This command does not exit the current block (as the LEAVE command). Example nrec = 0 REPEAT read !read next record if (fieldname=5) cycle !if a fieldname = 5, skip the rest fieldname = fieldname+1 !update the fieldname UPDATE !and write out to the file nrec = nrec + 1 !and count UNTIL nrec=10 !when 10 processed stop 4 ENTRY ENTRY parametername[qualifiers][,parametername[qualifiers]...] Declare names for parameters on @ed files. must be the first command in the file If a call is make to a command file, the (optional) parameters are evaluated, and the resulting value is placed in the (local) symbol with the name "parametername" or Pn if there are more parameters then parameternames. Qualifiers can be /REAL /INTEGER /DATE /CHARACTER /LOGICAL The expression given at the @ line must match the type given to this symbol /SYMBOL If the parametername has a /SYMBOL qualifier, the parameter will be an alias to the original expression parameter (which must be a symbol) so that modifications to the parameter will be done to the symbol. This is a way to let the @file return output values. If DIX is in STRICT/DECLARATIONS mode, the number of defined and actual parameters must be equal. Example integer x=10 @mysub 10*4,"TExt",x,41 and the file mysub.dix contains the following lines entry count/integer,name,xparam/symbol ... ... exit In the file "mysub" there will be 5 symbols defined COUNT : integer with the value 40 (the expression MUST be integer). NAME : character with the value "TExt" XPARAM : Integer with the value 10 and modifications are done to the X symbol is the calling file. P4 : integer with the value 41 $NRARGS: Integer with the value 4 (4 arguments) If there are more parameternames then parameters, the parametername will be defined as a character string with the value "" (empty). If there are more parameters than parameternames, the symbols P* are defined with the same type as the parameter. Both possibilities are not allowed with the STRICT/DECLARATION mode. 4 IF Syntax The IF command is present in 2 formats 1. IF (logical expression) command If the expression evaluates to true, execute command. 2. IF (logical expression) THEN [ELSE] ENDIF If the expression evaluates to true, execute the IF part else execute the (optional) ELSE part See the help about expressions ![dix inter expression]help about expressions See also the help about the LEAVE command 4 FOR_ENDFOR FOR symbol=first,last[,increment] ENDFOR first,last and increment must be integer. last can be < first, but then increment must be negative. The normal FOR construct. The local Symbol is initialized with 'first', and checked against 'last' If first <= last (and increment is >0) or first >= last (and increment is <0) The expressions first,last and increment are evaluated only once, at the FOR command. the statements up to the ENDFOR will be executed, and then increment will be added to first and the check repeated. If the condition does not match, the statement following ENDFOR will be executed. See the help about expressions After the for loop finishes, the symbol is no longer defined. It is not allowed to change the value of the FOR variable in the FOR loop (attempts are signalled and ignored). See also the help about the LEAVE and the CYCLE command ![dix inter expression]help about expressions 4 GOTO Syntax: Goto Label Goto the line with this label. If the label cannot be found, DIX will close this command file (and possibly its parent) until the input comes from a terminal or (in BATCH) exit DIX. The label must be visible from the current context level, so for example "LAB" will not be found, because "LAB" is in the repeat/until structure, and you cannot jump into a loop structure. x=1 repeat lab : x=x+1 until x>5 goto lab 4 GOSUB Syntax: GOSUB label Goto the line with this label. If the label cannot be found, DIX will close this command file (and possibly its parent) until the input comes from a terminal or (in BATCH) exit DIX. The return address will be stacked, and the RETURN command returns you to the next line. The maximum depth is 10. The label must be visible from the current context level, so for example "LAB" will not be found, because "LAB" is in the repeat/until structure, and you cannot jump into a loop structure. x=1 repeat lab : x=x+1 until x>5 gosub lab 4 Labels Each line can be preceded by a label The label can be any string terminated by a : Labelnames are notr case-sensitive and can have upto 32 chararacters. The first must be a-z, and the remaining a-z 0-9 $ or _. Example This_label12 : statement 4 LEAVE Leave the current block (IF,FOR,REPEAT, WHILE) and start with the statement just after this block. The LEAVE command can only be executed within a block. 4 LOCAL syntax : LOCAL symbolname[,symbolname...]] Declare local symbols in blocks. See the help about symbols. This command is obsolete and replaced by the declarations command. See the help about declarations 4 LOOP_TESTLOOP_ENDLOOP The more general form of the while/endwhile and the repeat/until. This allowes the test to occur at any place in the repeat loop. LOOP [statement1(s) ] TESTLOOP logical_expression [statement2(s) ] ENDLOOP The loop/endloop is a block of statements. The TESTLOOP decides whether the loop will be exited. If the logical_expression evaluates to false, the loop is exited. Example $DIX/INT SYSUAF SET NOON NREC=0 LOOP NEXT RECORD TESTLOOP LOGICAL($STATUS) SAY "USername = ",uaf$t_username NREC = NREC + 1 ENDLOOP SAY "#Records = ",nrec EXIT See also the help about the LEAVE and the CYCLE command 4 ON On option command Option can be Warning Error Severe Control_c And can be abbreviated to one letter if an error occurs, DIX will execute 'command' for the errorlevel or a lower level. Example ON error goto label_error. Any error and severe will jump to label_error. Warnings will be ignored. 4 RETURN Will return from a previous GOSUB. Return without an open GOSUB is NOT signalled as an error. DCL does not signal it, and so does DIX. 4 REPEAT_UNTIL syntax : REPEAT statement statement ... UNTIL logicalexpression Repeat the statements as log as "logicalexpression" evaluates to true. See also the examples See also the help about the LEAVE and the CYCLE command 4 SUBROUTINE_ENDSUBROUTINE Format label: SUBROUTINE [parametername[/qualifiers][,parametername[/qualifiers]..]] Defines the beginning of a subroutine in a command procedure. The SUBROUTINE command must be the first executable statement in a subroutine. The subroutine must be terminated with an ENDSUBROUTINE. If a call is make to a subroutine, the (optional) parameters are evaluated, and the resulting value is placed in the (local) symbol with the name "parametername" or Pn if there are more parameters then parameternames. Qualifiers can be /REAL /INTEGER /DATE /CHARACTER /LOGICAL The expression given at the @ line must match the type given to this symbol /SYMBOL If the parametername has a /SYMBOL qualifier, the parameter will be an alias to the original expression parameter (which must be a symbol) so that modifications to the parameter will be done to the symbol. This is a way to let the @file return output values. If DIX is in STRICT/DECLARATIONS mode, the number of defined and actual parameters must be equal. Example integer x=10 Call mysub 10*4,"TExt",x,4 mysub: subroutine count,name/character,xparam/symbol ... ... endsubroutine In the subroutine "mysub" there will be 5 symbols defined COUNT : integer with the value 40 NAME : character with the value "TExt" (must be a charcter expression) XPARAM : Integer with the value 10 and modifications are done to the X symbol P3 : integer with the value 4 $NRARGS: Integer with the value 3 (3 arguments) If there are more parameternames then parameters, the parametername will be defined as a character string with the value "" (empty) 4 WHILE_ENDWHILE syntax : WHILE logicalexpression statement statement ... ENDWHILE Repeat the statements as log as "logicalexpression" evaluates to true. See also the examples See also the help about the LEAVE and the CYCLE command 4 Examples k = 1 !define symbol k value 1 Loop: k = k + 1 !label + increment of symbol Examine field_'k' !exam with symbol substitution IF (2*(k+10) < 20) goto loop !test for repeat This following script will increment BYTLM by 1000 for all users with a name that matches *A*, and have a bytlm of >=50000 and a jtquota >4000 (maybe not a very useful example, but is shows the possibilities) nmod = 0 nfnd = 0 on error goto done loop: nfnd = nfnd + 1 if (f$matchwild(uaf$t_username,"*A*")) goto next echo "Found user ''uaf$t_username'" if (uaf$l_bytlm < 50000 | uaf$l_jtquota <= 4000 ) goto next deposit uaf$l_bytlm='uaf$l_bytlm + 1000' nmod = nmod + 1 update/quiet echo "Updated ''uaf$t_username' to ''uaf$l_bytlm'" next: read goto loop done: echo "Found ''nfnd' users , modified ''nmod' users" Example for while constructs a = 10 while a>0 b = 2 repeat say "a = ''a' b = ''b'" b = b - 1 until b=0 a = a-1 endwhile Example for a FOR contruct FOR k=10,1,-2 say "The value of K = ''k'" ENDFOR will deliver the output The value of K = 10 The value of K = 8 The value of K = 6 The value of K = 4 The value of K = 2 Example for a repeat construct k = 10 REPEAT say "The value of K = ''k'" k = k -2 UNTIL k<=1 Delivers the same output as the FOR example K = 10 WHILE k<=1 say "The value of K = ''k'" k = k -2 ENDWHILE Delivers the same output as the FOR example See also the help about the LEAVE and the CYCLE command 3 ADD ADD DESCRIPTION name[,name...] Add new descriptions to the current file. See also the remove command. example Add description extension.dir Will add the .dir description to the current file 3 BACK Syntax BACK [/LOG] This command allows you to return to the file from which you followed a link to this file. Up to 10 jumps are saved in a history buffer. See also the FOLLOW command 3 CHARACTER CHARACTER name[=value] Declare a new symbol of type "CHARACTER" and optionally give a value. The value must be of type "character" Example CHARACTER mystring="Heading line" See the help about declaration 3 CLOSE CLOSE[/qualifiers] close the current file CLOSE[/qualifiers] mask close file with tag=mask or filename matches mask mask can contain wildcards Will close the file(s) that match 'mask'. If the current file is closed the first file in the list will become the current file. 4 qualifiers /ERROR /ERROR=label If the CLOSE results in an error, DIX will jump to the label. If the /ERROR qualifier is not specified, DIX will look for the ON condition. 3 CREATE Create something CREATE DESCRIPTION new_description !create new description record CREATE !create new record in the file 4 CREATE CREATE Create a new record. The record will be filled with default data - binary null for non-text fields - Spaces for text fields and then allow you to modify this record, and eventually write it out via the Update command. 4 CREATE_DESCRIPTION CREATE DESCRIPTION Create a new description. This can be in the system_library(if you have write access), the user_library or in a file. If you specify /SYSTEM_LIBRARY , the new description will be placed in the system_library If you specify /USER_LIBRARY , the new description will be placed in the user_library If you specify /FILE or nothing, the new description will be in the file in the current directory. 3 COPY is an alias for CUT 3 CUT CUT[/qualifiers] [TAG] COPY is an alias for the word Save current record values to save area (clipboard) or to a symbol. TAG is optional. If not specified, the current file is used, otherwise the file specified by 'TAG' is used. The PASTE command can be used to restore data from the save area. See the help about PASTE Qualifiers can be /SYMBOL=symbolname save the data to a symbol You can use the PASTE command to restore the record from this save-area or symbol. /DCL The symbol name is a dcl symbol. There are limitations on DCL symbols, and it you exceed them, you will see an error /GLOBAL The dcl symbol is a global. 3 DATE DATE name[=value] Declare a new symbol of type "DATE" and optionally give a value. The value must be of type "date" Example DATE start_date=f$date("1-JAN-2004") See the help about declaration 3 DECIMAL DECIMAL name[=value] Declare a new symbol of type "DECIMAL" and optionally give a value. The value must be of type "decimal" Example DECIMAL counter=f$decimal("12345e12") See the help about declaration 3 DECLARATIONS Syntax 'type' name[=value][,name[=value]...] where type : REAL, CHARACTER, LOGICAL ,INTEGER or DATE, DECIMAL name : The name of the local symbol value : An expression that returns a value of the correct type Symbols declared cannot be declared again, and cannot be assigned another value than the declared type. See also the help about SET STRICT Example INTEGER a=10 !declare an integer a with value 10 INTEGER a=20 Will result in an error "symbol A is already defined." a=20 Is allowed, change the value to 20 (value must be integer) a="XYZ" Will result in an error "Symbol A has other type than expression" 3 DEFINE Used to define keys Keys can be defined for screen mode or for interactive mode. 4 DEFINE/KEY DEFINE/KEY keyname string[/qualifiers] Define keys for the INTERACTIVE mode of DIX. See also the RTL SCreen Management (SMG) manual about the possible keys. 5 Qualifiers /SET_STATE /SET_STATE=name DEFINE/KEY keyname string /SET_STATE=NAME. Sets the key driver to state NAME. /IF_STATE /IF_STATE=name DEFINE/KEY keyname string /IF_STATE=NAME If the user enters "keyname", the string "string" will only be returned if a previous key has put the key driver in the "NAME" state. /TERMINATE After the /TERMINATE, the result will be given to DIX. /ECHO Echo the translated strings /LOCK_STATE DEFINE/KEY keyname string/SET_STATE=NAME/LOCK Normally the state is removed after the typing of the next key. If you define the key (and the SET_STATE) with the /LOCK, the state will remain "NAME" until another state is entered. 4 DEFINE/SKEY DEFINE/KEY skey function [/qualifiers] Define a key combination for the screen mode of DIX. skey : the keyboard key : Almost all keys can be used for keydefinitions. function : the DIX function See the help about DIX_functions for allowed functions 5 qualifiers /SET_STATE /SET_STATE=name The parameter "" must be present but the contents are not used. SMGKEY will set a new state (GOLD and BLUE are used by default, but you may redefine the states if you redefine all keys) Statenames may not contain a - (hyphen) example DEFINE/SKEY PF1/SET=GOLD "" DEFINE/SKEY UPPERCASE_A/IF_STATE=GOLD key_print If the user enters PF1-A, the function key_print is executed. For a list of allowed functions, see the help about KEY_MAPPING /IF_STATE /IF_STATE=NAME Specifies a state that must be in effect for the key definition to work. The state name is an alphanumeric string. States are established with the /SET_STATE qualifier Statenames may not contain a - (hyphen) DEFINE/SKEY PF1/SET=GOLD "" DEFINE/SKEY F20/IF_STATE=GOLD key_print DEFINE/SKEY F20 key_swap_dis If the user enters PF1-F20, the function key_print is executed. It ths user enters F20, the function key_swap_dis is executed. For a list of allowed functions, see the help about KEY_MAPPING /CONTEXT_SCREEN /CONTEXT_SCREEN=Screen_context Define this key only for a specific screen. Default is that the key is valid in all screens Valid screens are DISPLAY_ALL Display data in all formats SELKEY Select data for a key value EDIT Edit description SELFILES Select one file when mulitple files match EDITFILES Select a file (or add one) SELDESCRIPTIONS Select a description (or add one) YESNO Yes/No screen VIEW View all kinds of data HELP Help screen(s) EDITMULTIPLE Edit multiple lines (in show description) EDITLINE Edit a single line SELFIELD Select a field SHOWRAW Show data in raw format SHOWDES Show data in description format SELDEMO The select demo screen 3 DELETE DELETE/KEY name[/state=name] Delete SMG key definitions for interactive mode DELETE/SKEY/ALL Delete all (default)keydefinitions for screen mode DELETE/SKEY skey [/STATE=NAME] Delete the key definition for skey (possibly with state NAME) DELETE/SYMBOL/LOG Delete symbol DELETE/SYMBOL/LOCAL Only delete local symbol DELETE/RECORD Delete the current record (if the file is indexed or relative and you have opened it with /MODIFY) This will set the record context to the next record 3 DEPOSIT DEPOSIT fieldname=value. DEPOSIT offset=value Modify a field to the given value. DEPOSIT fieldname = value DEPOSIT/RAW offset[.bit_offset] = value DEPOSIT/VFC Deposit data in VFC buffer or record The entered data is first 'unsymbolized' (see substitution) and then translated to the field definition, and deposited in the data-record. The value specified is converted to the binary equivalent. This will do what you expect, but there are some extensions See the CONVERSION subtopic. 4 Qualifiers /RAW Display data in raw (non description) mode. In this mode the qualifiers /WORD, /BYTE, /LONG, /HEX are significant. Default is the /LONG. Offset can be specified as byte_offset[.bit_offset] /WORD Display data in words. Valid only in /RAW mode. /BYTE Display data in bytes. Valid only in /RAW mode. /LONG Display data in longwords. This is the default in /RAW mode. Valid only in /RAW mode. /UNSIGNED Display integers as unsigned. Not used for /HEX. /BITS /BITS=number_of_bits For field_mode you can set any bitsize up to 32. Valid only in /RAW mode. /BINARY Interpret the data in binary mode /DECIMAL Interpret the data in decimal mode. /HEX Interpret the value in HEX mode. /OCTAL Interpret the value in OCTAL mode 4 CONVERSION Normally the value will be converted to binary, but for some field-types more options are available. See below (R)BITS fields DEPOSIT field=name1,name2,name3 Set bits name1,name2,name3 DEPOSIT field=+name4 Leave the original value, and add name4 DEPOSIT field=-name1 Leave the original value, and clear name1 INTEGER*n with n=1,2 Only normal integer conversion is tried INTEGER*4,*8 First try integer conversion. Then try %Xnnnn, the %Onnnn, %Bnnnn, %Dnnnn conversions (hex,octal,binary,decimal) Then try 'dddd'X, 'dddd'O, 'dddd'B 'ddddd'D conversions (hex,octal,binary,decimal) Try to convert as date*4,*8 Try to convert as IDENTIFIER Try to convert as UIC Try to convert as 'xxxx ascii On VAX INTEGER*8 is only partial supported and is expressed as INT*4.INT*4 VFC The format is "DD text" The DD are 2 hexdecimal chars. Not all combinations are valid. The text field is ignored. Only 0..7F : 0.127 linefeeds 80..9F : C0 control codes 00..1f E0..EF : VFU codes 00..0F See the VMS-manuals about VFC formats. 3 DISPLAY Display is a synonym for EXAMINE 3 DUMP DUMP [/qualifiers] Dump ine ore more records. Can be used to display one or more records, and also to output data in CSV (comma Seperater Values) mode. 4 Qualifiers /OUTPUT /OUTPUT=filename /OUTPUT=sys$output (default) Set the output file /COUNT /COUNT=n determines the number of records displayed. Default is all records /CSV /CSV=(Csv_option[,csv_option...]) Csv_option can be HEADER : Print a header line before all data NOQUOTES : Do not 'quote' fields (see below) ALL_QUOTES: User quotes around all fields SEPARATOR=COMMA : Use COMMA as separator (default) SEPARATOR=TAB : Use TAB char as separator SEPARATOR=COLON : Use COLON (:) a separator SEPARATOR=SEMICOLON: Use SEMICOLON (;) as separator SEPARATOR=CHARACTER=%Xdd: Use %Xdd as separator QUOTE=DOUBLEQUOTE : Use the " character for quotes around fields (default) QUOTE=QUOTE : Use the ' character for quotes around fields QUOTE=CHARACTER=%Xdd: Use the %Xdd character for quotes around field If you want quoting (DEFAULT) , DIX will insert the "quotecharacter" around text fields and field that contain the "separatorcharacter" or space If you specify ALL_QUOTES, DIX will insert the "quotecharacter" around all fields. If you specify NOQUOTES, DIX will never insert the "quotecharacter" The header fields are regarded as "text" fields. See also the /SELECT qualifier for help about selection of fields Example DIX/FILE/CSV=(header,all_quotes,quote=quote,separator=semicolon) file Output is a file with all fields quoted, using ' as quote and ; as separator with a header line. DIX/FILE/CSV=(header,noquote,separator=char=32) file or DIX/FILE/CSV=(noquote,separator=char=%X20) file Output is a file with no fields quoted, and SPACE as separator /DISPLAY /DISPLAY=(displayitem[.,displayitem...]) /DISPLAY=ALL (default) This qualifier decides what parts of the record are to be displayed Displayitem can be [NO]DATA : Display the data part of the record [NO]VFC : display the VFC part of the record (if present) [NO]RECNR : Display the recordnumber (only if record not found via keyed access) [NO]RECLEN : Display the recordlength [NO]RFA : Display the RFA of the record ALL : Print all parts 3 ECHO ECHO[/qualifier] modify record xyz Display a text to the output file. This can be useful in batch-jobs. One qualifier is supported /CONSOLE : Print the output to the terminal regardless of the /output setting. 3 EDIT EDIT The default is description EDIT DESCRIPTION Edit the description with the current defined . EDIT SEARCH Edit the search string(s) 3 EXAMINE EXAMINE[/qualifiers] [fieldmask] EXAMINE/RAW offset[:end_offset] Display all fields with the name matching 'fieldmask' . Default all names match. Fieldmask can contain references to other files/descriptions. The full format is [FILEMASK\[DESCRIPTIONMASK\]]FIELDNAMEMASK. The filemask and descriptionmask are matched against the file and descriptions tags. (see the show file [/all][/full] The qualifiers MUST be entered before the fieldmask or the offset In the RAW mode, the data starting from byte 'offset' will be displayed. If offset is absent, the whole record is dumped in raw mode If end_offset is not present, only the line containing 'offset' is displayed. 4 QUALIFIERS /ALL Display the selected fields or offset with all data formats See examples below $dix/int sysuaf DIX>exa/all *byt* 560|UAF$L_BYTLM |Raw data |40 0D 03 00 00 00 00 00 00 10 00 00 00 00 00 00 |INTEGER*1 |64 |INTEGER*2 |3392 |INTEGER*4 |200000 |UINTEGER*1 |64 |UINTEGER*2 |3392 |UINTEGER*4 |200000 |REAL*4 |0.14791E-00030 |REAL*8 |0.18307E-00244 |REAL*16 |0.48925E-04942 |REALG*8 |0.18307E-00244 |REAL_IEEE*4|Overflow |REAL_IEEE*8|Overflow |LOGICAL*1 |False |UIC |[3,6500] |CHARACTER*4|@... |DATE*4 |4-APR-1859 21:20:00.00 |DATE*8 |17-NOV-1858 00:00:00.02 |PROTECTION |S:RWED, O:RWD, G:W, W:RWED |RINTEGER |222298115 |FILEID |(3392,3,0) |BITS |BIT6 564|UAF$L_PBYTLM|Raw data |00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |INTEGER*1 |0 |INTEGER*2 |0 |INTEGER*4 |0 |UINTEGER*1 |0 |UINTEGER*2 |0 |UINTEGER*4 |0 |REAL*4 |0.0000 |REAL*8 |Overflow |REAL*16 |0.11391E-04951 |REALG*8 |Overflow |REAL_IEEE*4|0.0000 |REAL_IEEE*8|Overflow |LOGICAL*1 |False |UIC |[0,0] |CHARACTER*4|.... |DATE*4 |17-NOV-1858 00:00:00.00 |DATE*8 |7-DEC-1858 08:40:18.60 |PROTECTION |S:RWED, O:RWED, G:RWED, W:RWED |RINTEGER |0 |FILEID |(1048576,0,0) |BITS | /DESCRIPTION Display the description info after the field value. /DISPLAY /DISPLAY=(displayitem[,displayitem...]) /DISPLAY=DATA (default) This qualifier decides what parts of the record are to be displayed Displayitem can be [NO]DATA : Display the data part of the record [NO]VFC : display the VFC part of the record (if present) [NO]RECNR : Display the recordnumber (only if record not found via keyed access) [NO]RECLEN : Display the recordlength [NO]RFA : DIsplay the RFA of the record ALL : Print all parts /EXPAND Force new expansion of the current description. If the description has conditional fields, and one of the symbols used as a condition has changed, you can force DIX to reexpand the description and therefore reevaluate the conditions. /HEADER In raw mode the /HEADER will output a line wit the byte offsets of the data below. /OUTPUT /OUTPUT=filename Print the output to a file. /SCREEN /SCREEN /NOSCREEN (Default) Display the data in an SMG window, that allows you to scroll through it. See also SET PAGED SCREEN /PAGED If the output is printed to the terminal, the output is printer per page, and the user must type a return to continue /ORIGINAL Do not display the data from the current (possibly modified) data in memory but use the original contents of this record. /SAVE_AREA Do not display the data from the current (possibly modified) data in memory but use the save area (see also CUT and PASTE). /RAW Display data in raw (non description) mode. In this mode the qualifiers /WORD, /BYTE, /LONG, /HEX are significant. Default is the /LONG. /WORD Display data in words. Valid only in /RAW mode. /BYTE Display data in bytes. Valid only in /RAW mode. /LONG Display data in longwords. This is the default for RAW mode. Valid only in /RAW mode. /UNSIGNED Display integers as unsigned. Not used for /HEX. /HEX DIsplay the data in HEX. Default is decimal. If this qualifiers is specified in /RAW mode, the data is displayed in HEX. This qualifier can also be used in /NORAW mode (description mode). The data will be displayed in HEX. See also the /NUMBER qualifier /NUMBER /NONUMBER /NUMBER=DECIMAL (default) /NUMBER=HEX Display byte offsets for each field. This is the default. /COMPRESS /NOCOMPRESS Do not display empty fields (spaces for text, and nulls for binary). Default is /NOCOMPRESS. This command is valid only in /NORAW mode. /MARK /MARK Default If you specify /MARK (default), DIX will display fieldnames, that are in the current key of an indexed file, in bold/reverse. /TAG /TAG /NOTAG Display data from multiple files with file\desc\ tag. The default value is taken from the default display setting See the SET DISPLAY and SHOW DISPLAY commands IF tag is true, and the user examines multiple file/desctriptions the display will prefix the fielname with the file\description\ tag. If tag is false, fieldnames will be printed normally, and all files/desciptions are signalled. Only if no file\description\ mask is present, there will be no display of file/description. Example Assume we have 3 files opened (tags file1, file2 and file3) and on file1 there is a descr1 description etc... File2 is the current file DIX>examine/tag *\*\*txt* !display all fields with the name containing !txt if all files opened and all descriptions. 18|file1\descr1\mytxting|My Text 12|file2\descr4\yourtxtorso|Your test 12|file3\descr1\histxtornot|His text If the /tag would not have been specified, the display would look like File:file1.dat Description:descr1 18|mytxting|My Text File:file2.dat Description:descr4 12|yourtxtorso|Your test File:file3.dat Description:descr1 12|histxtornot|His text 3 EVALUATE Evaluate expression Evaluate expression. An expression can contain integers, reals, character strings,field values and parameters. See the help about expressions ![dix inter expres]Help about expressions Dix supports some functions, see the help about functions in "interactive_Commands functions" ![function]dix inter functions 4 qualifiers /hex Display the result in HEX. /octal Display the result in octal. 4 qualifiers /binary Display the result in binary. 3 EXIT Leave DIX. 3 Expressions Expressions can use the following operators Arithmetic : +,_,/,* Logical : & (and) | (or) operator. Comparison : <,<=,=,>=,> or <> Priority : Comparison (highest) &,| *,/ +.- (lowest) Brackets can be used to change priority of the operator. The operands can be 1. Numbers (integer or real) Integers can be specified as just numbers or 'dddd'R with R=D(ecimal),H(ex),O(ctal),B(inary) or %Rdddd with R as above. 2. character strings. They start and end with a " 3. Logical constants (true or false) 4. Symbols (with their types) 5. Parameters 6. Special functions. See the help about functions ![dix inter function]Help about functions 7. Fields of the record. It a field type in not logical, integer or real, it will translated to text. The full syntax of the fieldname is filetag\descriptiontag\fieldname. The filetag defaults to the currentfile. The descriptiontag defaults to the current description of the selected file. If there is only one tag, it is regarded as a filetag, so name\fieldname seaches for field "fieldname" in the current description of the file with tag "name". If there is no tag, the search will be for the fieldname in the current description of the current file. The operators have the normal meaning with some extensions for operations on character strings 1. integer*character will result in a string that contains integer times the source e.g. 10*"A" => "AAAAAAAAAA" 5*"AB" => "ABABABABAB" 2. character/character will remove all occurrences of the second string from the first e.g. "ABABABAB"/"A" => "BBBB" "ABABCABAB"/"AB" => "C" 3. date1-date2 The result must be a delta time, so date2 must be >date1, or date2 must be a delta time and the result must bne a delta time. 4. date1+date2 Date1 or date2 (or both) must be delta times 3 FIND FIND[/qualifiers] searchmask Search data in record (not a record search). Display those fields that contain the sear-string. The compare is done in ascii mode with the normal VMS wildcards (* and %). 4 qualifiers /RAW Display data in raw (non description) mode. In this mode the qualifiers /WORD, /BYTE, /LONG, /HEX are significant. Default is the /LONG. Offset can be specified as byte_offset[.bit_offset] /WORD Display data in words. Valid only in /RAW mode. /BYTE Display data in bytes. Valid only in /RAW mode. /LONG Display data in longwords. This is the default in /RAW mode. Valid only in /RAW mode. /UNSIGNED Display integers as unsigned. Not used for /HEX. /HEX Interpret the value in HEX mode. /COMPRESS Do not display fields with "empty" values (0 for binaries and space for text) /OUTPUT /OUTPUT=Filename Print the output to a file. /SCREEN /SCREEN /NOSCREEN (Default) Display the data in an SMG window, that allows you to scroll through it. See also SET PAGED SCREEN /PAGED If the output is printed to the terminal, the output is printer per page, and the user must type a return to continue 3 FOLLOW FOLLOW[/LOG][/automatic][/READ][/WRITE] fieldname If the fielddefinition in the description file contains info about a link to another file (/FILE,/KEY,/RECORD,/COMPUTE) you can follow this link to another file. If that file is not already opened in DIX and you specified /automatic, DIX will try to open the file. If you do not specify /AUTOMATIC, you will be asked if you want to open the file. If the file can be opened and the record can be found, DIX will display the new record. If the file cannot be opened or the record cannot be found DIX will signal the error, and you stay in the current file/record. DIX will open the file in the same mode (rad/write) as the source file, unless you overide with the /READ of /WRITE qualifier. See the help about DIX DISPLAY INTER/DESCR RECORD_FORMAT FIELD_DECL See also the BACK command ![DIX DISPLAY INTER/DESCR RECORD_FORMAT FIELD_DECL]Help about /file 3 FUNCTIONS Dix supports some function during the evaluation of the input. Functions are defined with up to 10 arguments. The functionnames can be abbreviated to the point described in the help about the function. More info about these functions is in the deeper topics. The () are required, even if no arguments are present. arithmetic functions arg1 Arg2 Arg3 Arg4 Output AND Int Int Int : Anded value OR Int Int Int : Ored value NOT Log Log : Reverse logical value EVEN Int Log : True if arg1 is even ODD Int Log : True if arg1 is odd LSHIFT Int Int Int : arg1 shift arg2 to left RSHIFT Int Int int : arg1 shift arg2 to right MOD Int Int Int : mod(arg1,arg2) MAX Int/real Int/real Int/real same: max value (up to 10 args) MIN int/real Int/real Int/real same: min value (up to 10 args) BTEST Int Int Log : Return true if bit 'arg2' of arg1 is set IBSET Int Int Int : arg1 with bit 'arg2' set IBCLR Int Int Int : arg1 with bit 'arg2' cleared Conversion functions INT Int/real/char Int : Converted to int LOGICAL Int Log : Converted to Logical NINT Int/real/char Int : Nearest integer REAL Int/real Real: converted to real STRING All Log Char: Converted to char Lexical funtions F$CHAR int char: make a string of 1 char F$CHECKSUM int int char char Int : The checksum (4 args) F$COLLAPSE char char: remove all spaces F$DATE int String date: Create a date symbol F$EDIT String String char: Like DCL F$ELEMENT int char char char: Return the n'th element if n <0 return the last+1+'n' element F$ENUMERATE int char char: Returns filenames F$EXISTS char char: True or false for symbols F$EXTRACT Int Int Char char: Like DCL F$EXTRACT if int<0 return data from the end of the string F$FEXISTS char char: True or False for fields F$FAO char allsorts char: F$FAO of DCL F$FIELD char char char: return info about a field F$FTYPE char char: The type of the field F$GETDVI char char various : See f$getdvi help F$ENVIRON char various F$EXTV int int any int : Extract some bits (sign ext) from p3 F$EXTZV int int any int : Extract some bits (zero ext) from p3 F$FILE char chr/int: Attributes of the file F$ICHAR char Int : Return integer val of string of 1 length F$INSV int int int any any : Insert bits in arg4 F$LOCASE char Char: Return lowercase string F$LOCATE char char Char char Int : Find char2 in char1 F$MATCHWILD char char Char char log : Check if arg1 matches wild in F$MESSAGE int char: The message text of operand F$LENGTH char Int : Length of string F$RANDOM int/real Int/real : A random value F$TIME String Time Char: See help about f$time F$TRIM char Char: Delete trailing spaces F$TRNLNM char various char/int: Like DCL F$TYPE char char: The type of the symbol F$VERIRY int/log Log : Get and change the verify setting F$UPCASE char Char: return uppercase string F$ADD char char int int Char: add text numeric string F$SUB char char int int Char: subtract text numeric string F$MUL char char int int Char: multiply text numeric string F$DIVIDE char char int int Char: divide text numeric string F$MODE None Char: The current mode (interactive/...) F$RADIX Int Int Char Char: Convert integer to any radix F$DECIMAL Int/chr Deci: Convert data to decimal type Data dependend functions FILECOUNT None Int : Return the number of files open %DATA None Char: A string with the record contents %LOC char Int : The location of the field in the data %BLOC char Int : The bitlocation of the field in the data %RECORDSIZE None Int : The current recordsize 4 AND AND (Value1,value2) delivers the ANDed value All arguments are integer The result is integer 4 OR OR (Value1,value2) delivers the ORed value All arguments are integer The result is integer 4 NOT NOT (Value1) delivers the negated value The argument is logical The result is logical 4 ODD ODD (Value1) delivers true if value1 is ODD The argument is integer The result is logical 4 EVEN EVEN (Value1) delivers true if value1 is EVEN The argument is integer The result is logical 4 LSHIFT LSHIFT (Value1,value2) delivers value1 left shifted by value2 Can be abbreviated to LSHI All arguments are integer The result is integer 4 RSHIFT RSHIFT (Value1,value2) delivers value1 right shifted by value2 Can be abbreviated to RSHI All arguments are integer The result is integer 4 MOD MOD (Value1,value2) delivers value1 MOD value2 All arguments are integer. The result is integer 4 MAX MAX (Value1,value2[,value3]) delivers MAX of value1,2,3 (max 10 args) All arguments are integer or real. The result will be integer if all elements are integer, or real if one of them is real. 4 MIN MIN (Value1,value2[,value3]) delivers MIN of value1,2,3 (max 10 args) All arguments are integer The result will be integer if all elements are integer, or real if one of them is real. 4 REAL REAL(integer) will return a real value Argument is integer or real, return value is real 4 LOGICAL Converts the integer to a logical (low bit) Argument is integer or logical, return value is logical 4 INT INT(real) will return an int value, truncated Argument is real, return value is integer 4 NINT NINT(real) will return an int value rounded Argument is character, real, return value is integer 4 STRING STRING(allformats[,hex]) will return a string value Argument can be of all defined symbol types. hex can be true or false (or not present) The return value is char 4 BTEST BTEST (intval,bitnr) Return true if bit 'bitnr' of intval is set Args are integer, result is logical 4 IBSET IBSET (intval,bitnr) Return ival with bit 'bitnr' set Args are integer, result is integer 4 IBCLR IBCLR (intval,bitnr) Return ival with bit 'bitnr' cleared Args are integer, result is integer 4 FILECOUNT Filecount() Return the number of files opened. No arguments may be specified, but the () must be present. 4 F$ADD F$ADD(str1,str2[,width]) Str1 and str must contain string values, result is a string F$ADD will will add str1 to str2 and return the result If width is not specified, the result will be as long as needed If width >0, the result will be blank filled in a string of length 'width' If width <0, the result will be zero filled in a string of length 'width' If width<>0 and the result does not match, result will be a string of 'width' * Example SAY F$ADD("123","345") Returns "468" F$ADD("123","345",6) Returns " 468" F$ADD("123","345",-6) Returns "000468" F$ADD("123","345",2) Returns "**" 4 F$CHAR F$CHAR(integer) Result is an character string with length 1 with the ascii-value of the argument. The argument is integer The result is char 4 F$CHECKSUM F$CHECKUM(bpos,epos,[type],[alg],[filetag]) Can be abbreviated to F$CHEC bpos : int : starting position in data record (in bytes). The first byte in the buffer = 0 epos : int : end position in the databuffer type : char: Optional, BYTE or WORD or LONGWORD, default is byte. The size of the data elements alg : char: Optional, XOR or SUM, default is SUM. The algorithm of the checksum tag : char Optional file tag, default is current file example: the indexf file has a checksum at the end of the record it is the "SUM" of the previous 255 words. des record ... ... integer*2 checksum (at offset 510) end record Can be computed with F$CHECKSUM(0,509,"WORD") or even more sophisticated F$CHECKSUM(0,%LOC("CHECKSUM")-1,"WORD") 4 F$COLLAPSE F$COLLAPSE(string) will remove all blanks Can be abbreviated to F$COLL Input and result are character 4 F$DATE Syntax F$DATE(value[,what]) Value can be 1. a string containing a valid VMS date-time 2. an integer or real and "what" decides what this value means. "what" can be Weeks,days,hours,minutes,seconds,hundredth or cputicks F$DATE returns a symbol of type DATE examples DIX>A = F$DATE("TODAY") DIX>SHO SYMB A A == "23-OCT-2003 12:23:51.09" DIX>A = F$DATE(1.3,"HOURS") DIX>SHOW SYMB A A == "0 01:17:59.99" 4 F$DECIMAL F$DECIMAL(value) Convert an integer or string to the "decimal" type. The decimal type is a fixed decimal string Parameter : value : Integer or Character vlue Result: Decimal type 4 F$DIVIDE F$DIVIDE(str1,str2[,width],[ndigits]) Str1 and str must contain string values, result is a string F$DIVIDE will will divide str1 by str2 and return the result. The result will be rounded. If width is not specified, the result will be as long as needed If width >0, the result will be blank filled in a string of length 'width' If width <0, the result will be zero filled in a string of length 'width' If width<>0 and the result does not match, result will be a string of 'width' * If ndigits is >0, F$DIVIDE will insert 'ndigits' fractional digits. THe default value is the current setting of the set decimal/digits Example SAY F$DIVIDE("1234","2") Returns "617" F$DIVIDE("1234","2",6) Returns " 617" F$DIVIDE("1234","2",-6) Returns "000617" F$DIVIDE("1234","2",2) Returns "**" F$DIVIDE("12","5") Returns "2.4000000000" !the default setting of !set decimal/digits F$DIVIDE("12","5",,2) Returns "2.40" !overrule 4 F$EDIT F$EDIT(string,"WHAT[,WHAT..]") Argument 1 : string : The string to be edited Argument 2 : string : The control string containing COM[press] replace all multiple blanks/tabs by one COL[lapse] Remove all blanks T[rim] Remove trailing blanks UP[percase] Make all chars uppercase L[owercase] Make all chars lowercase UN[comment] Remove comment "!" char If the string contains "", then the part within "" is untouched. Result : string : The edited string 4 F$ELEMENT F$ELEMENT(number,char,string) Can be abbreviated to F$ELEM Return the 'number'th part of string "string" separated by "char" If number<0 the result will be the last but 'number'th part The first element of the string has number 0. Example F$ELEMENT( 2,"|",A|B|C|D|E") returns C F$ELEMENT(-2,"|",A|B|C|D|E") returns D arg1 is integer arg2 is character (only first char used) arg3 is character Result is character 4 F$ENUMERATE F$ENUMERATE(index[,mask]) index : Integer : the index'th match is returned mask : Character: Pattern match for the name Supports * and %. Returns the next fieldname that matches "mask" Example DIX>index = 1 DIX>loop:value =F$ENUMERATE(index,"*BYT*") DIX>if (value <> "") then DIX> say "Found name ",value DIX> index = index + 1 DIX> goto loop DIX>endif 4 F$EXISTS F$EXISTS("name") Can be abbreviated to F$EXIS Deliver true if name is an existing symbol 4 F$FAO F$FAO(controlstring[,parameter[,paramter...]]) Like the DCL F$FAO, format a string controlstring : char parameter : either integer, character or date. Output : char 4 F$EXTRACT F$EXTRACT(bpos,nkar,string) Can be abbreviated to F$EXTR Extract part of the string (like DCL F$EXTRACT) If bpos is <0 the bpos will be taken from the end of the string The first char of the string is at position 0. Examples F$EXTRACT(2,3,"ABCDEF") => CDE F$EXTRACT(-2,1,"ABCDEF") => E arg1 is int arg2 is int arg3 is character result is character 4 F$EXTV F$EXTV(pos,size,base) Extract some bits (sign extended) from a source pos (integer): the position from the base size (integer): Max number of bits (no more than 32) base (any) : Source The result is an integer 4 F$EXTZV F$EXTZV(pos,size,base) Extract some bits (zero extended) from a source pos (integer): the position from the base size (integer): Max number of bits (no more than 32) base (any) : Source The result is an integer 4 F$FEXISTS F$FEXISTS("name") Can be abbreviated to F$FEXI Deliver true if name is an existing field 4 F$FIELD F$FIELD(fieldname,what) Return info about a fieldname what can be EXISTS : Return true or false whether the fieldname exists SIZE : Returns the size (IN BITS) of the field OFFSET : Return the byte offset BITOFFSET : Return the bit offset TYPE : The type of the field FIELD : Return true if the field is in a bit-range. NDIM : Number of dimensions For the next two items, a 3rd parameter can be used (the dimension index) F$FIELD(fieldname,what,dimidx) LOWDIM : the low value for dimension 'dimidx' HIGHDIM : The high value for dimension 'dimidx' 4 F$FTYPE F$FTYPE("name") Can be abbreviated to F$FTYP Deliver the type of an existing field many possibilities (see the help about file types) This statement looks like the DCL F$TYPE, but it's argument must be a string between quotes. 4 F$GETDVI Result = F$GETDVI(device,what) Device : char string containing the device name what : The item you want Result is depending on the what What Resulttype MAXBLOCK Integer The size of the disk MAXFILES Integer Maximum number of files EXISTS Logical If the device exists TRUE else FALSE BLNRFILE Integer The record number of the fileheaderentry of the file with fileid 0 in INDEXF.SYS. The record number in INDEXF.SYS of a file with fileid (12345,5,6) = F$GETDVI("disk","BLNRFILE") + 12345 You muset have READ access to the index file. 4 F$ENVIRONMENT F$ENVIRONMENT("What") Report some environment info What Type Meaning DEPTH Int Command procedure depth PROCEDURE Char Name of command procedure PROMPT char The current Prompt string INTERACTIVE Log Interactive mode MESSAGE Char The curtent message mode ON_SEVERITY Char The current on level ON_ACTION Char The current on action PRCNAM Char The current processname STRICT Char The current strict mode VERIFY Log The current verify setting 4 F$FILE F$FILE("arg"[,index]) Return info about the 'indexth' file. If index is not specified the current file is used. Index is either a number of a string that will be matched against the tag of the file. arg Meaning Result Value ORG Fileorganization Char IDX REL SEQ BLK(blockmode) KEY Currentkey Int Current key (0 for nonindexed files) NAME Filename Char Filename NOK Numberofkeys Int Number of keys (0 for nonindexed files) For indexed files the following extra can be specified F$FILE("arg"[,index],[keyindex]) info for the 'keyindex'th key, default is the current KNAME Name of the key Char NAme of the key KASCENDING Key is ascending Log KVALUE Keyvalue Char KSTRING Is key string LOG KSEGMENT Segments in key Int Number of key segments KTYPE The keytype Char For keysegments there is a fourth parameter (the segment index) F$FILE("arg"[,index],[keyindex],[keysegment]) info for the 'keyindex'th key, the 'keysegment'th segment KSPOS Segment position Int The position of the segment (or 0) KSSIZE Segment size Int The size of the segment (or 0) DESCRIPTION Description info For the description info two more arguments are allowed F$FILE("DESCRIPTION",[fileindex],[what],[desindex]) what : What information is returned NAME : The full name of the description TAG : The tag of the description desIndex : The index of the description (default=current). Desindex is either a number, or a string that will be matched agains the tag of the description Examples $dix/int sysuaf/des=(sysuaf,.dir),alpha.dir/des=(.dir,profile)/mul %DIX-I-USINGFIL, Using file SYS$COMMON:[SYSEXE]SYSUAF.DAT;1/NOMOD %DIX-I-USINGDES, Using description DSA0:[STUBBE.PROGRAMS.DIX]DIX_DES.TLB;88(SYSU DIX>sh file/all/des C TAG Type Filename Size * SYSUAF IDX SYS$COMMON:[SYSEXE]SYSUAF.DAT;1 48 * SYSUAF Descr SYSLIB(SYSUAF) DIR Descr SYSLIB(.DIR) ALPHA SEQ SYS$SYSDEVICE:[STUBBE.PROGRAMS.DIX]ALPHA.DIR;1 15 * DIR Descr SYSLIB(.DIR) PROFILE Descr SYSLIB(PROFILE) * means the current file DIX>say f$file("NAME") !returns the current file name SYS$COMMON:[SYSEXE]SYSUAF.DAT;1 DIX>say f$file("NAME",2) or say f$file("NAME","ALPHA") !both return the name of the second file SYS$SYSDEVICE:[STUBBE.PROGRAMS.DIX]ALPHA.DIR;1 DIX> 4 F$DESCRIPTION F$DESCRIPTION(index) Return info about the loaded descriptions Index is an integer Return value is the name of the loaded description (char) 4 F$ICHAR F$ICHAR(character) Can be abbreviated to F$ICHA The argument must be exactly one character. Result is an integer with the ascii-value of the argument. 4 F$INSV F$INSV(source,pos,size,base) Insert bits from source into base and return the changed value (base is unchanged) source (integer) : the source of the bits pos (integer) : the position from the base size (integer) : Max number of bits. There is no limit on the size, only the size of the source (pos+siz>=0 and pos+siz0, the result will be blank filled in a string of length 'width' If width <0, the result will be zero filled in a string of length 'width' If width<>0 and the result does not match, result will be a string of 'width' * Example SAY F$MUL("123","12") Returns "1476" F$MUL("123","12",6) Returns " 1476" F$MUL("123","12",-6) Returns "001476" F$MUL("123","12",2) Returns "**" 4 F$LENGTH F$LENGTH(string) will return the length of the string (including blanks) Can be abbreviated to F$LENG argument is character, result is integer 4 F$RADIX F$RADIX(value,radix[,separator]) Convert an integer value to any radix Argument value : integer radix : integer separator: the string to insert between the "digits" Result : string If separator is not specified (or is blank) If radix <=36, each "digit can be 0..9,a..z if radix >36 each "digit" will be expressed as decimal numbers separated by . If radix is specified <> " " then All "digits" will be expressed as decimal numbers separated by "separator" Example f$radix(33,16) will deliver "21" f$radix(37,37) will deliver "1.0" f$radix(33,16,".") will deliver "2.1" f$radix(37,37,"|") will deliver "1|0" 4 F$RANDOM F$RANDOM([argument]) Return a random number Argument : integer : Return an integer value 0..argument-1 Real : Return a real value 0<=result0, the result will be blank filled in a string of length 'width' If width <0, the result will be zero filled in a string of length 'width' If width<>0 and the result does not match, result will be a string of 'width' * Example SAY F$SUB("123","345") Returns "-222" F$SUB("123","345",6) Returns " -222" F$SUB("123","345",-6) Returns "-00222" F$SUB("123","345",2) Returns "**" 4 F$TIME The argument selects the part of the date/time to select. Syntax F$TIME([what[,time]) Time can be either a string containg a valid vms date-time or a date type symbol. It time is not specified, the current date/time is used. Return value is character for F$TIME() Date/time F$TIME("DATE") The date F$TIME("TIME") The time F$TIME("MONTHASC") The name of the month Return value is integer for F$TIME("YEAR") The year F$TIME("MONTH") The month F$TIME("DAY") The day F$TIME("HOUR") The hour F$TIME("MINUTE") The minute F$TIME("SECOND") The seconds F$TIME("HUNDREDTH")The hundredth 4 F$TRIM F$TRIM(string) will remove all trailing blanks Argument and result are character 4 F$TRNLNM Translates a logical name and returns the equivalence name string or the requested attributes of the logical name specified. Format F$TRNLNM(logical-name [,table] [,index] [,mode] [,case] [,item]) See the DCL help about this function 4 F$TYPE F$TYPE("name") Deliver the symbol type of an existing symbol (integer/real/character/logical/decimal/date) This statement looks like the DCL F$TYPE, but it's argument must be a string between quotes. 4 F$VERIFY F$VERIFY([new_setting]) Change the verify setting and return the old value (like DCL) New_setting : Integer or logical the new setting If new_setting is not specified, the VERIFY setting is not changed Returns : Logical the old setting Example old_setting = f$verify(true) .... .... Statements with verify on .... k = f$verify(old_setting) 4 F$UPCASE F$UPCASE(STRING) Result is a string with all letters (a-z) upcased. Can be abbreviated to F$UPCA argument and result is character 4 %BLOC %BLOC("fieldname") Gives the offset of a field in the datarecord in bits. Example des record for sysuaf ... ... integer*2 uaf$w_logfails ... end record %BLOC("UAF$W_LOGFAILS") will return 2848 (8*356) 4 %DATA %DATA([tag]) Returns a string value containg the current record. This value can be saved in a symbol to perform a CUT/PASTE function. The optional tag parameter is the tag of the file. Default is the current file Example DIX>a = %DATA() !Save the current record contents DIX>.. modify record !do a log modifications DIX>PASTE/SYMBOL=a !Returns the record to its previous state 4 %LOC %LOC("fieldname") Gives the offset of a field in the datarecord in bytes. Example des record for sysuaf ... ... integer*2 uaf$w_logfails ... end record %LOC("UAF$W_LOGFAILS") will return 356 4 %RECORDSIZE %RECORDSIZE([what],[tag]) Return the recordsize of the data in what If what is "DATA" Databuffer "SAVE" Save buffer "VFC" VFC buffer Default is databuffer tag is the optional filetag, default is the current file 3 GOMARK GOMARK markname Return to a previous mark set by MARK. 3 HELP Display help, you are doing it now. 3 INQUIRE INQUIRE symbol [promptstring] [/qualifiers] Lets the user give a value to a symbol (like the DCL inquire) promptstring is default Data Qualifiers can be /PUNCTATION (default) append a colon and a space to promptstring The string will be evaluated, and the symbol will be defined with the result. 3 INTEGER INTEGER name[=value] Declare a new symbol of type "INTEGER" and optionally give a value. The value must be of type "integer" Example INTEGER counter=10 See the help about declaration 3 INQUIRE INQUIRE symbol [prompt] [qualifiers] Read a value from the terminal, and assign it to the symbol. The value of the expression determines the type of the symbol. Prompt is the (optional) prompt string, default "Data" Qualifiers can be /[NO]PUNCTUATION (default) : add a ": " to the prompt string. 3 LOGICAL LOGICAL name[=value] Declare a new symbol of type "LOGICAL" and optionally give a value. The value must be of type "logical" Example LOGICAL debug=false See the help about declaration 3 MARK MARK markname Place a marker on this record. You can return to this record via the RETURN command. THe default markname is DIXMARK example MARK this_rec command command ... GOMARK this_rec !return to the record of the MARK 3 NEXT Via the NEXT command you can select the NEXT file or description. NEXT FILE : Select next file NEXT DESCRIPTION : Select next description of the current file. NEXT [RECORD] : Read the next record of the current file NEXT RECORD Tag : Read the next record of file with tag 'tag' 3 OPEN Open more files. The open command has two syntaxes 1. OPEN[/qualifiers] file[/qualifiers] 2. OPEN[/qualifiers] tag file[/qualifiers] Tag is a symbol that can be used to reference the file to. Most file commands use the current file, but if you specify a tag you can execute the command for a non-current file. DIX will append a sequence number to the tag if it is not unique. If you do not specify a tag, DIX will assume tag FILE, and append a sequence number to make it unique. Open will automatically read the first record, so there is a current record, unless the user specifies a record sslection qualifier. example $DIX/INTERACTIVE DIX> OPEN vaxdir vax.dir !open the file vax.dir and make it current DIX> OPEN alphadir alpha.dir !open the file alpha.dir, but VAX.dir will !remain the current DIX> NEXT RECORD alphadir !read the next record of alpha.dir, but !vax.dir will remina the current file DIX> SELECT FILE alphadir !now alpha.dir is the current DIX> CLOSE vaxdir !close vax.dir DIX> CLOSE !close the current file (alpha.dir) DIX> OPEN test test.dat/ge="Test"/key=1 Open the file test.dat and (try to) read record with keyge "Test" on key 1 4 Qualifiers /BLOCKED /BLOCKED[=blocksize] If the /BLOCK qualifier is specified, the file is accessed via BLOCK IO. The data transfer is done via a multiple(blocksize) of 512 bytes, and no recordstructure is assumed. This method can destroy file/record integrity and should be used only if you know what you are doing. Blocksize is default 1 (/BLOCKED), and can have a value 1..63. It can be useful for files with undefined recordtype (as the DUMP file). /LOG Display a message when opening the file. /LOCKING /LOCKING=(val,val...) Val can be RRL : Read all record with the RAB$M_RRL option. This means that even if the record is locked by another stream, DIX can read it. The usage is at your own risk, since any other user can modify the data you are looking at (and possibly change). OPTIMISTIC: Dix will read the record with the RAB$M_NLK option. The record is read, but not locked. Other streams can read the data. When you want to update a modified record, DIX will check if the record still contains the original data, and if not warn you, and give you the option to not modify the record. /MODIFY If the /MODIFY qualifier is specified, you are allowed to modify /delete/insert records, Either in raw mode (BYTE_OFFSET=VALUE) or in interpreted mode (file_name=value). If /MODIFY is present /INTERACTIVE is assumed. /DESCRIPTION /DESCRIPTION[=name[,name]] Give the name of a record description file(s) or module. For more help see the DIX /DESCRIPTION help ![DIX DESCRIPTION]Dix /description help /ERROR /ERROR=label If the OPEN results in an error, DIX will jump to the label. If the /ERROR qualifier is not specified, DIX will look for the ON condition. /KEY /KEY=nr Look for the keyvalue on the specified key. Default is the primary key (0). If none of the LT,LE,EQ,GE,GT options is specified, the program will start with the first record on the specified key. /LT /LT=value Look for a record with keyvalue LT the specified value. This qualifier is valid for descending keys. Information about the keytypes can be obtained via the /INFO qualifier. /LE /LE=value Look for a record with keyvalue LE the specified value. This qualifier is valid for descending keys. Information about the keytypes can be obtained via the /INFO qualifier. /EQ /EQ=value Look for a record with keyvalue EQ the specified value. /GE /GE=value Look for a record with keyvalue GE the specified value. This qualifier is valid for ascending keys. Information about the keytypes can be obtained via the /INFO qualifier. /GT /GT=value Look for a record with keyvalue GT the specified value. This qualifier is valid for ascending keys. Information about the keytypes can be obtained via the /INFO qualifier. /RECORD /RECORD=number For sequential/relative files give the record number to read. 3 REAL REAL name[=value] Declare a new symbol of type "REAL" and optionally give a value. The value must be of type "real" Example REAL limit=10.0 See the help about declaration 3 RECALL RECALL/ERASE Clear recall buffer RECALL/ALL Mask Make a list of commands that start with "mask" RECALL/SEARCH Mask Make a list of commands that match with "mask" RECALL Mask Recall the statement, and let you modify it. Mask can be - a number : recall 6 (recall the 6'th previous command) - A text : Recall open (recall the last command that started with open) 3 PASTE PASTE[/qualifiers] [TAG] Restore current record values from save area(clipboard) or from a symbol, where it is placed with the CUT command. Qualifiers can be /SYMBOL=expression Read the data from an expression. This expression must return a value of the type char. /DCL The symbol name is a dcl symbol. There are limitations on DCL symbols, and it you exceed them, you will see an error /GLOBAL THe dcl symbol is a global. Normally you would use this command with PASTE/SYMBOL=symbolname, where the symbol was previously filled with CUT/SYMBOL=symbolname. TAG is optional. If not specified the current file is used, otherwise the file specified by 'TAG' is used. Be careful : the value of /symbol is an expression, and all qualifiers in the string after the /symbol are considered a part of the expression. so : paste/symbol=symbol/dcl Will probable not work. and : paste/dcl/symbol=symbol Will work. 3 PREVIOUS Via the PREVIOUS command you can select the PREVIOUS file or description. PREVIOUS FILE : Select PREVIOUS file PREVIOUS DESCRIPTION : Select PREVIOUS description of the current file. PREVIOUS [Record] : Select the previous record. This is not (yet) supported for relative files. PREVIOUS Record tag : Select the previous record for file with tag 'tag' This is not supported for relative files. 3 READ READ [/qualifiers] read from the current file READ [/qualifiers] tag [/qualifiers] Read from file tag Via the READ command, you can read a record. For indexed files, the selection is via the /KEY,/EQ,/GE,/GT,/LE,/LT qualifiers. For all other files, the selection is via the /RECORDNUMBER qualifier If for an indexed file neither /EQ,/GE,/GT,/LE,/LT or, for a sequential file /RECORD, is not given, DIX performs a sequential read. 4 QUALIFIERS /RECORDNUMBER /RECORDNUMBER=number Select the record to be manipulated. For direct access files or relative files, the record can be read direct. For sequential files, the record will be found by rewinding and skipping 'number'-1 records. /KEY /KEY=nr Look for the keyvalue on the specified key. Default is the primary key (0). This qualifier is not allowed for non indexed files. /LT /LT=value Look for a record with keyvalue LT the specified value. If none of the LT,LE,EQ,GE,GT options is specified, and the /KEY is given, DIX will the first record of the specified key. /LE /LE=value Look for a record with keyvalue LE the specified value. If none of the LT,LE,EQ,GE,GT options is specified, and the /KEY is given, DIX will the first record of the specified key. This qualifier is not allowed for non indexed files. /EQ /EQ=value Look for a record with keyvalue EQ the specified value. If none of the LT,LE,EQ,GE,GT options is specified, and the /KEY is given, DIX will the first record of the specified key. This qualifier is not allowed for non indexed files. /GE /GE=value Look for a record with keyvalue GE the specified value. If none of the LT,LE,EQ,GE,GT options is specified, and the /KEY is given, DIX will the first record of the specified key. This qualifier is not allowed for non indexed files. /GT /GT=value Look for a record with keyvalue GT the specified value. If none of the LT,LE,EQ,GE,GT options is specified, and the /KEY is given, DIX will the first record of the specified key. This qualifier is not allowed for non indexed files. /ERROR /ERROR=label If the READ results in an error (or an EOF_OF_FILE and /END is not specified), DIX will jump to the label. If the /ERROR qualifier is not specified, DIX will look for the ON condition. /END /END=label If the READ results in an EOF_OF_FILE and , DIX will jump to the label. If the /END is not specified, and an END_OF_FILE occurs, DIX will jump to the label in the /ERROR statement (if it is specified). If neither qualifier is specified, DIX will look for the ON condition. /TRANSLATE /TRANSLATE Default /NOTRANSLATE If a read is done with a /KEY=string, the string is checked for the occurrence of %DD where DD is a valid HEX number. In this way you can enter binary numbers in a string. %% is translated to one %. This behaviour is the default, but can be disabled by /NOTRANSLATE 3 REMOVE Remove description mask Remove all descriptions that match 'mask'. After this the first description is made the current one (if one is left). The descriptions are not deleted, only the link to the current file. 4 qualifiers /SYSTEM_LIBRARY Remove only the description(s) from the system library /USER_LIBRARY Remove only the description(s) from the user library /FILE Remove only the description(s_ from file(s) 3 REWIND REWIND current file REWIND /KEY=keynumber current file, Indexed file only REWIND tag file with tag "tag" REWIND tag /key=keynumber file with tab "tag", indexed file only Rewind the file and read the first record . For indexed files you can specify the key to rewind on. 3 SEARCH SEARCH string[/qualifiers] [,string[/qualifers...]] [string..] SEARCH Search the file for a (list of) string(s). The first match will stop the search. See the help about record_searches One extra qualifier is allowed : /REWIND. If it is specified, DIX will search from the beginning of the file, otherwise the next record. 3 SELECT SELECT thing name SELECT FILE name Make the first file that matches 'name' to the filename or that has a tag 'name' the current file SELECT DESCRIPTION name Make the first DESCRIPTION that matches 'name' the current description for the current file 3 SET Set some things 4 DISPLAY Set default display parameters These setting can be overruled by qualifiers in the EXAMINE command. Syntax : SET DISPLAY par[,par...] Where par can be [NO]HEX : Set or clear HEX display mode [NO]OFFSET : Set or clear display offsets [NO]HEXOFFSET : Set or clear HEX display of offsets [NO]COMPRESS : Set or clear compress mode [NO]RAW : Set or clear ROW mode display BYTE : display raw data in byte mode WORD : display raw data in word mode LONGWORD : display raw data in longword mode UNSIGNED : display raw data (if not in hex mode) as unsigned integers. [NO]TAG : Display data from multiple files with file\desc\ tag, see the help at examine/tag 4 EDITOR SET EDITOR which Define your editor for editting description records Possible options are EDT Use EDIT/EDT INTERNAL Use an internal editor (simple but fast) TPU Use EDIT/TPU 4 FILE SET FILE [mask] [qualifiers] Change the attributes for one or more opended files. If you do not specify [mask], only the attributes of the current file are changed. Supported qualifiers are /LOCKING=(value[,value...]) And value [NO]RRL : Change the RRL setting for this file [NO]OPTIMISTIC : Change the optimistic locking flag See the help about /locking /[NO]MODIFY : Change the modify setting of the file, The current record remains the same. Example Set file *TEST*/locking=RRL Set all files with tag matching *TEST* to rrl locking mode. Set file /modify Set the current file to modify. 4 FORMAT SET FORMAT option SET FORMAT DOT (default) Normally all "character"-like fields will not contain unprintable data. These field types are CHARACTER,xSTRING. If the data does contain unprintables (hex 0:1f,7f,80:9f or ff) the /FORMAT qualifier determines how this data should be displayed. Option can be DOT :All unprintables are replaced by a ".". This encoding is not reversible, after an unprintable value is replaced by a ".", DIX cannot know what the original unprintable value was. This may be a problem in the screen mode. HEX :All unprintable data is displayed as %Xdd, a hexadecimal display. A % in the data will be displayed as %%. This display is reversible, so DIX can reconstruct the original unprintable value. If you are in this mode, on input a % must be entered as %% PASSALL:Dix will not change the unprintable data. The data is displayed as it is. THis mode will not work in screen mode, and maybe poorly when the output device is a terminal. DUMP :Unprintable bytes are represented by a 2 or 3 letter mnemonic like or . A < in the text will be displayed as <<. This display is reversible, so DIX can reconstruct the original unprintable value. If you are in this mode, on input a < must be entered as << 4 MESSAGE Change the way dix displays error messasges 5 qualifiers /FACILITY /FACILITY /NOFACILITY Set or clear the facility part /IDENT /IDENT /NOIDENT Set or clear the ident part /SEVERITY /SEVERITY /NOSEVERITY Set or clear the severity part /TEXT /TEXT /NOTEXT Set or clear the text part /NONE Clear all message flags /ALL Set all message flags 4 MOUSE SET MOUSE ON SET MOUSE OFF Enable or disable the MOUSE usage in screen mode If enabled, DIX will interpret the mous clicks, if disabled DECWINDOWS will use interpreted the clicks, so you can select/copy text. 4 ON SET ON SET NOON Like DCL, the SET NOON ignores errors, and let the user check these errors by examining $STATUS. 4 PAGED_MODE SET PAGED NO SET PAGED YES SET PAGED SCREEN Set/clear the paged mode for output. Page_mode screen will display the text in a window to allow easy scrolling (Uses SMG) 4 PROMPT Change the default prompt. SET PROMPT string If the string contains a # sign, this # will be replaced by _level if the commandfile depth is >1 The default prompt is DIX#>, which will be DIX> at level 1 DIX_1> at level 2 etc. 4 REAL SET REAL commands SET REAL SIZE=n SET REAL FORMAT/SIZE=n[/default] format SET REAL SIZE=n Set the size for the real symbols. Value can be 4, 8 or 16. The actual datatype depends on the architecture (see table) Size Arch 4 8 16 Vax REAL_F REAL_D REAL_H Alpha REAL_F REAL_G REAL_X IA64 REAL_S REAL_T REAL_X SET REAL FORMAT[/size=n] [/default] format Set the format for conversion. This format is the normal fortran real format specification, (Fn.m, En.mEe, Gn.mEe). n is maximum field width m is the number of digits after the decimal. e is the numer of digits in the exponent (default 2). See the Fortran manual for more detail. /SIZE=n : set the format for size=4 (n=4,8,16) /DEFAULT: set the format back to the default The default formats are size 4 g20.8 8 g25.10e3 16 g30.15e4 4 SCREEN_MODE Change mode to full-screen mode. 4 STRICT Normally DIX is not very strict in the symbol handling. You can define new symbols by typing 1. a=10 (define the symbol a , type integer, value 10) and then say 2. a="SKLFG" (redefine a to type character, value "SKLFG" DIX has two levels of more strict behaviour /TYPING : Once a symbol is created, you cannot change the type anymore In the example above you can do 1. but not 2. /DECLARATIONS: All symbols have to be declared before usage This also disallows calling subroutines or @ files and not having the same number of arguments defined and declared. See the ENTRY statement. /LOCAL : Even with /DECLARATIONS, symbols from an outer level can be used. With /LOCAL this is not allowed. 4 TERMINAL SET terminal /[no]line_editing Enable/disable line editing. In line_editing mode the function keys f6-f14 cannot be used for key definitions. SET terminal /[no]insert SET terminal /[no]overstrike Set the default insert/overstrike flag SET terminal /width=nn (nn must be between 40 and 132) CHange the terminal width 4 VERIFY Set verify Set verify mode on Set noverify Clear verify mode In verify mode all lines read from the command procedure are echo'd to the terminal. 3 SHOW Show all kind of things. SHOW File[/all][/full][/description] Show file information SHOW Description Show current description from internal datastructure SHOW Description/SOURCE Show current description from source file/module SHOW Description/EXPAND Show current expanded description SHOW Parameter [mask] Show parameters SHOW Symbols [mask] Show defined symbols SHOW Display Show default display parameters (HEX,Number,raw etc) SHOW Terminal Show the terminal setting /[NO]LINE_EDITING SHOW FORMAT SHow the current binary translation mode SHOW SEARCH Show the current record search string(s) SHOW SUBSTITUTION Show the current symbol substitution flag SHOW Message Show the current message settings SHOW Paged Show the current paged mode SHOW Decimal Show the settings for decimal arithmetic SHOW version Show the current version of DIX SHOW real Show the size /formats for the real symbols SHOW integer Show the size /formats for the integer symbols SHOW Release_notes Show the release notes 4 Release_notes Display the release notes show release_notes [/page] Show all release notes show release_notes/version Show all version with their release dates without the contents show release_notes/version=d.d-d Show the release_notes for version The version can be entered as d.d (major.minor version) or d.d-d (major,minor,patch release) 4 description Show the description information 5 qualifiers /all show description/all Display a list of descriptions of the current file. The current description is signaled by an * in the first column. /expanded show description/expanded Show the expanded desciptors for this record. You can use /FULL to display more info. /loaded show description/loaded Show all loaded descriptions. If more then one file uses the same description, this description is loaded only one. /full show description/full Show all info about the description. See the /source qualifier. /source Show the original source of the description, instead of the interpreted one. /paged Display the data per page (on terminal only) /output /output=filename Print the output to the file "filename" /SCREEN /SCREEN /NOSCREEN (Default) Display the data in an SMG window, that allows you to scroll through it. See also SET PAGED SCREEN 4 DISPLAY_MODE SHOW DISPLAY_MODE Show the current setting of the display mode. 4 EDITOR SHOW EDITOR Show the current setting of the editor type. 4 FILE Show file [/qualifiers] Show the file information 5 qualifiers /all show file/all Display a list of all opened files. The current file is signaled by an * in the first column. /full show file/full Show all info about the file(s). /paged Display the data per page (on terminal only) 4 KEYS SHOW KEYS [key] [/STATE=state] Display the (interactivemode) key definitions or the definition for key "key" [with state="state"] SHOW KEYS/DIRECTORY Display all IF_STATES 4 PAGE_MODE SHOW PAGE_MODE Show the current setting of the paging mode. 4 PARAMETERS Show parameters [mask] [/hex] Show all parameters of the current description. 4 REAL Show real size, type and format for real conversions. The default size and formats can be changed via the SET REAL command. The datatypes depends on the architecture (see table) Size Arch 4 8 16 Vax REAL_F REAL_D REAL_H Alpha REAL_F REAL_G REAL_X IA64 REAL_S REAL_T REAL_X example DIX> show real Current real_size = 4 Size 4 type REAL_F format (G20.8) Size 8 type REAL_G format (G25.10) Size 16 type REAL_X format (G30.15E5) 4 SKEYS Show the key definitions for the screen mode. They can be defined with the define/skey command. The default key setting is described in the help about key_mapping. 4 symbols Show symbols [mask] /hex Display all defined symbols [in hex] Show symbols/statistics[/full[/all]] Show statistical information about the symbol table 4 STRICT SHOW STRICT Show the current setting of the strictsetting. 4 TERMINAL SHOW TERMINAL Show the current setting of the terminal settings. 3 SPAWN SPAWN [Commandline] Create a subprocess, and execute 'commandline'. If commandline is not present, you can enter commands interactively until you type LOGOUT. 3 SUBSTITUTIONS DIX will try to do symbol-substitution. If a line contains a name enclosed in ''s, DIX will substitute the symbol by its value. If the symbol is not found, DIX will substitute an empty string. In a String enclosed by "" the first ' must be a double one (as in DCL). 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 3 SYMBOLS You can define symbols. Syntax symbolname = expression symbolname := stringvalue Symbolname can have upto 32 chararacters. The first must be a-z or _, and the remaining a-z 0-9 or $ . 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 can be turned on or off with the "set substitution /[no]verb/[no]symbols" command Dix will define four/five predefined symbols. $STATUS Containing the status of the last command $SEVERITY Containing the severity status of the last command $FILE Containing the current file (can be empty) $DESCRIPTION Containing the current description (can be empty) Inside a SUBROUTINE or @'ed' file there is one more symbol $NRARGS Containing the number of arguments $Pn Containing the 'n'th parameter Symbols can have six types Logical true/false Integer signed values of 4/8 bytes long Character strings upto 65535 characters Real Real (native) format of 4/8 bytes Date The VMS date structure (8 bytes) Decimal Fixed decimal string If you create a symbol without declaring it, the symbol is visible at all all levels (global). If you declare a symbol (via the INTEGER/REAL/CHARACTER.. command), the symbol will be visible from the level is was declared, and all deeper levels, but not the upper levels. You can declare symbols at any @file level and within any loopstructure (FOR/ENDFOR,WHILE/ENDWHILE etc.) The symbols are local to that level (and all levels included) and will be deleted when the level (@file or loopstructure) exits. If a local symbol has the same name as a global symbol, the global symbol will be inaccessible. Symbol declaration can be done with the INTEGER,REAL,CHARACTER,LOGICAL,DATE and DECIMAL command. See the help about declarations The setting of the STRICT mode influences the way symbols are seen f.e. with strict/local, symbols from outer levels are NOT seen. This forces you to declare all symbols before using them. See the help about the SET STRICT command Example a = 10 k = 12 for k=1,10 !K is also a local symbol in the for block integer a=40 !declare an integer local symbol a (with value 40) a = 20 !a(local) has the value 20 say "a=''a'" !a has the value 20 say "k=''k'" !will have the value 1..10 endfor say "a=''a'" !a still has the value 10 say "k=''k'" !k still has the value 12 3 TRUNCATE TRUNCATE newreclength set recl for current file TRUNCATE tag newreclength set recl for fiel with tag "tag" Set new recordsize. Allowed only for Indexed and relative files, if they do not have the recordattribute FIXED. 3 UNDO UNDO Undo changed for current file UNDO tag Undo changed for file with tag "TAG" Undo all changes made to the current record. 3 UPDATE UPDATE [tag] Save changed record to file. If no parameter is specified, the current file is updated, else the file with tag "tag" 3 WAIT WAIT expression Wait for a specific time, the expression can be integer or real and will be interpreted as seconds. 3 WRITE WRITE filename[/APPEND] Write the current record to the file "filename". If /append is given, the record will be appended to an existing file. 2 KEY_MAPPING Dix uses key mapping. In the Screenmode (SMG)Keys are mapped to dix_functions. DIX has a default map, but you can override it in the startup_file. As you can see below, this mapping is not very nice so you can adapt this mapping to your own needs. See the help about the STARTUP file 3 DIX_functions Dix has the following functions Move functions key_up one line up key_down one line down key_left one pos left key_right one pos right key_prev screen up key_next screen down key_top first line key_bot last line key_set_forw set forward mode on find key_set_backw set backward mode on find key_page page command either forw or backward depending on mode key_find search in display for text string key_find1 Ask search string and the key_find key_next_window toggle ascci/bin display in raw_mode key_prev_window toggle ascci/bin display in raw_mode key_do save changes to record key_save Save to save area key_restore Restore record from save area key_contdis continously display description key_getfields get data through menu for bit-fields key_viewvfc View/modify vfc data key_help display help Field modify functions key_enter enter and terminate input in field input key_first goto first char in line in field input key_last goto last char in line key_erase erase input field key_delete delete character on input key_toggle toggle insert/overstrike General key_cancel cancel (search) action key_dispall display all descriptions of the data key_editdes edit description file key_prev_field previous field on input key_fileinfo file (RMS) info key_print print display to file key_select select a field from the (file of description) list key_swap_num Toggle offset display (none/hex/decimal) key_byte Display data in bytes (raw mode) key_word Display data in words (raw mode) key_long Display data in longwords (raw mode) key_compres Toggle compres mode (do not display "empty" fields) key_displ_hex HEx 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_abort Abort changed to record key_remove Delete current record (idx /rel file only) key_nextdes Next description file key_prevdes Prev description file key_dirdes Directory description file key_ask_key Ask for new key in the current file key_next_rec Next record in the file key_prev_rec Previous record key_put Insert new record key_find_rec Find data in in file (search) key_find_rec1 find data in file , but ask for search string first key_next_file next file (if in multi_file mode) key_prev_file previous file(if in multi_file mode) key_dir_file dir file (if in multi_file mode) key_exit Exit program key_rfa_restore return to previous set rfa key_modechange toggle screen/interactive key_follow_link Follow the link to another file key_back_link Retrun to the original file after a key_Follow_link key_ch_width Toggle screen width between 80 and 132 characters 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 3 Default keymapping DIX is NOT case sensitive, so all keys are defined in uppercase The default keymapping 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 uppercase_s key_dispall /IF_STATE=GOLD define/skey delete key_delete define/skey uppercase_e key_editdes /IF_STATE=GOLD define/skey uppercase_f key_fileinfo /IF_STATE=GOLD define/skey uppercase_z key_follow_link/IF_STATE=GOLD define/skey uppercase_z key_back_link /IF_STATE=BLUE define/skey 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_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 2 DIX_parameters The following limits apply to DIX. Number of open files : Unlimited* Number of descriptions/file : Unlimited* Interactive mode Number of commmandfile levels : 65535 Number of if/for/while levels : 32767 Symbolnames : 32 characters Labelname length : 32 characters Follow history : 16 Screen mode Number of screen key definitions : 200 Descriptions Fieldnames : 32 characters/level Total name length :512 Number of dimensions : 3 Structure levels : 10 Union levels : 4 *Unlimited means : limited by process quota, not DIX.