                                                  MDMLIB User's Guide                  October, 1994       :           This manual contains information about MDMLIB, a<           set of miscellaneous utility routines. The library?           consists of routines for simple file I/O, interfacing ?           to the $PARSE, $ASCTOID, and $TRNLNM system services, 9           manipulating disk quota entries, and performing +           character conversions on strings.         A           Revision/Update Information:  This is a revised manual.                    Matthew D. Madison           MadGoat Software                                                                 "           ________________________           03 October 1994              __________*           Copyright 1994 MadGoat Software  =           Permission is granted to copy and redistribute this *           document for no commercial gain.  ?           The information in this document is subject to change 9           without notice and should not be construed as a 9           commitment by the author. The author assumes no ?           responsibility for any errors that may appear in this            document.   <           DISCLAIMER: The author, the author's employer, and@           MadGoat Software make no representations or warranties>           with respect to the contents hereof and specifically?           disclaim any implied warranties of merchantability or -           fitness for any particular purpose.                        A           _______________________________________________________              Contents  A                 _________________________________________________ A                 PREFACE                                         v   A           _______________________________________________________ A           CHAPTER 1  INTRODUCTION                             1-1   A                 _________________________________________________ A                 1.1   USING MDMLIB                            1-1   A                 _________________________________________________ A                 1.2   CONTACTING THE AUTHOR                   1-2     A           _______________________________________________________     &           Part I  ROUTINE DESCRIPTIONS:                 MDM_ASCTOID                          RTN-3:                 MDM_CLOSEF                           RTN-5:                 MDM_DQ_ADD                           RTN-7:                 MDM_DQ_CLOSE                         RTN-9:                 MDM_DQ_OPEN                         RTN-11:                 MDM_DQ_READ                         RTN-13:                 MDM_DQ_REMOVE                       RTN-16:                 MDM_DQ_SET                          RTN-18:                 MDM_MKDATE                          RTN-20:                 MDM_OPENF                           RTN-23:                 MDM_PARSE                           RTN-26:                 MDM_READF                           RTN-29:                 MDM_RWNDF                           RTN-31:                 MDM_STRANS                          RTN-33:                 MDM_SYS_TRNLNM                      RTN-35:                 MDM_WRITEF                          RTN-38          A                                                               iii                    A           _______________________________________________________              Preface   9           MDMLIB is a library of routines used by various 8           MadGoat utilities. They were written mainly to:           simplify access to existing VMS system services.  A           The_routines_can_be_grouped_as_follows:________________   A           ______________Sequential_File_I/O_Routines_____________   (           MDM_OPENF          Open a file4           MDM_READF          Read a record from file3           MDM_WRITEF         Write a record to file 8           MDM_RWNDF          Rewind to beginning of fileA           MDM_CLOSEF_________Clsoe_file__________________________   A           __________________Disk_Quota_Routines__________________   8           MDM_DQ_OPEN        Begin disk quota operations:           MDM_DQ_ADD         Add quota entry to quota file;           MDM_DQ_READ        Read one or more quota entries ;           MDM_DQ_SET         Modify an existing quota entry 1           MDM_DQ_REMOVE      Remove a quota entry A           MDM_DQ_CLOSE_______End_disk_quota_operations___________   A           _________________Miscellaneous_Routines________________   @           MDM_ASCTOID        Convert UIC or identifier string to*                              numeric value7           MDM_MKDATE         Create an RFC822-compliant -                              date/time string 8           MDM_PARSE          Simplified $PARSE interface8           MDM_STRANS         ASCII/EBCDIC/negative-ASCII2                              character translation:           MDM_SYS_TRNLNM     Logical name translation  la+                              LIB$SYS_TRNLOG       A                                                                 v                      A           _______________________________________________________       1      Introduction      ;           MDMLIB is a set of miscellaneous routines used in >           various MadGoat projects. The library includes a set?           of RMS interface routines for using simple sequential =           files, a routine to make date/time strings that are >           compliant with RFC 822, routines that interface with<           the $TRNLNM, $ASCTOID, and $PARSE system services,=           a routine for performing character conversions, and 0           routines for manipulating disk quotas.  =           Most of these routines are very similar to routines 9           that already exist on VAX/VMS, or perform tasks >           that can be accomplished through high-level language@           constructs (such as the file I/O routines). The MDMLIB>           routines were developed generally because the extant=           routines and I/O constructs did not provide exactly             the services required.  L           __________________________________________________________________      1.1    Using MDMLIB  @           The MDMLIB routines be callable from any VAX language;9           just link with library MDMLIB.OLB. A library of <           PL/I inserts (PLIMDM.TLB) and a BLISS REQUIRE file=           (BLISSMDM.R32) accompany the library for use of the >           routines from those languages. The PL/I text library:           also includes some preprocessor declarations and<           procedures to assist in using VMS system services.            A                                                               1-1                     Introduction        L           __________________________________________________________________      1.2    Contacting the Author   <           There is no formal support for MDMLIB. If you have9           Internet connectivity, however, you may wish to ;           subscribe to one or more of the following MadGoat !           Software mailing lists:   (              Info-MadGoat@wkuvx1.wku.edu  =              Discussion of MadGoat Software products by users A              and MadGoat developers. To subscribe, send a message <              to Info-MadGoat-Request@wkuvx1.wku.edu with the@              word SUBSCRIBE in the first line of the body of the              message. ,              MadGoat-Announce@wkuvx1.wku.edu  ;              Announcements of new releases and new products :              from MadGoat. To subscribe, send a message to=              MadGoat-Announce-Request@wkuvx1.wku.edu with the @              word SUBSCRIBE in the first line of the body of the              message. (              MadGoat-Bugs@wkuvx1.wku.edu  ;              Address for reporting bugs in MadGoat Software =              products. Please include the name of the package >              and version in the subject header of the message,=              so the report can be more easily directed to the #              appropriate developer.                       
           1-2                    A           _______________________________________________________   &           Part I  Routine Descriptions  >           This part describes the each of the MDMLIB routines.         A                                                       MDM_ASCTOID           A           _______________________________________________________   9           MDM_ASCTOID-Translate Identifier Name or UIC to                         Identifier  ;           MDM_ASCTOID translates an ASCII identifier or UIC 1           specification into an identifier value.   A           _______________________________________________________              FORMAT  #           MDM_ASCTOID  ascid, ident   A           _______________________________________________________              RETURNS            VMS Usage: cond_value (           type:      longword (unsigned)           access:    write only            mechanism: by value   A           _______________________________________________________              ARGUMENTS            ascid               VMS Usage: char_string%           type:      character string            access:    read only"           mechanism: by descriptor4           ASCII representation of UIC or identifier.             ident              VMS Usage: uic_code (           type:      longword (unsigned)           access:    write only            mechanism: by value 5           Identifier value of UIC or identifier name.   A                                                             RTN-3                     MDM_ASCTOID         A           _______________________________________________________              DESCRIPTION <           This routine uses LIB$TPARSE and $ASCTOID to parse?           and translate an identifier or UIC specification from 6           ASCII into the appropriate identifier value.  ?           A UIC specification or identifier may take any of the            following forms:  <           [g,m]          Group and member specified as octal                           numbers  :           [alphag,m]     Group as alphanumeric identifier;(                          member in octal  9           [alphag,alpham]Group and member as alphanumeric $                          identifiers  <           [alpham]       Alphnumeric identifier for full UIC  2           [octal,*]      Wildcard for entire group  2           [alphag,*]     Wildcard for entire group  =           [*,*]          Wildcard for all users in all groups   @           alphaid        Plain, ordinary alphanumeric identifier  8           %Xhexnum       Identifier value in hexadecimal  =           These are the forms generally recognized by DCL and            its utilities.  A           _______________________________________________________   #           CONDITION VALUES RETURNED   @           SS$_NORMAL         Normal successful completion. Other;                              status values from LIB$TPARSE, @                              LIB$ANALYZE_SDESC, and $ASCTOID are&                              possible.             RTN-4          A                                                        MDM_CLOSEF           A           _______________________________________________________   !           MDM_CLOSEF-Close a file   <           MDM_CLOSEF closes a file that was opened with MDM_           OPENF.  A           _______________________________________________________              FORMAT             MDM_CLOSEF  unit  A           _______________________________________________________              RETURNS            VMS Usage: cond_value (           type:      longword (unsigned)           access:    write only            mechanism: by value   A           _______________________________________________________              ARGUMENTS            handle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only           mechanism: by value 8           Handle of open file, as returned by MDM_OPENF.  A           _______________________________________________________              DESCRIPTION >           This routine closes a file that was opened with MDM_           OPENF.  ?           Warning about handle: Handles are for internal use by @           MDMLIB routines only, and should not be manipulated by           a user program.   A                                                             RTN-5                     MDM_CLOSEF        A           _______________________________________________________   #           CONDITION VALUES RETURNED   8           RMS$_NORMAL        indicates normal successful(                              completion.                                                                                 RTN-6          A                                                        MDM_DQ_ADD           A           _______________________________________________________   +           MDM_DQ_ADD-Add a disk quota entry   >           MDM_DQ_ADD adds a disk quota entry to a disk volume.  A           _______________________________________________________              FORMAT  4           MDM_DQ_ADD  dqhandle, ident, permq, overdr  A           _______________________________________________________              RETURNS            VMS Usage: cond_value (           type:      longword (unsigned)           access:    write only            mechanism: by value   A           _______________________________________________________              ARGUMENTS            dqhandle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only!           mechanism: by reference *           Handle created with MDM_DQ_OPEN.             ident              VMS Usage: uic_code (           type:      longword (unsigned)           access:    read only!           mechanism: by reference ?           UIC code or identifier value for which the disk quota            entry is to be added.              permq   &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only  A                                                             RTN-7                     MDM_DQ_ADD          !           mechanism: by reference 3           Permanent disk quota value to be entered.              overdr  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only!           mechanism: by reference 3           Overdraft disk quota value to be entered.   A           _______________________________________________________              DESCRIPTION >           This routine adds a new entry in the disk quota file4           for the specified UIC or identifier value.  A           _______________________________________________________   #           CONDITION VALUES RETURNED   :           SS$_NORMAL         Normal successful completion.<                              Other status value from $QIO or@                              I/O status returns from the ACP-QIO;                              interface driver are possible.                                          RTN-8          A                                                      MDM_DQ_CLOSE           A           _______________________________________________________   )           MDM_DQ_CLOSE-Close disk channel   @           MDM_DQ_CLOSE closes a channel opened with MDM_DQ_OPEN.  A           _______________________________________________________              FORMAT              MDM_DQ_CLOSE  dqhandle  A           _______________________________________________________              RETURNS            VMS Usage: cond_value (           type:      longword (unsigned)           access:    write only            mechanism: by value   A           _______________________________________________________              ARGUMENTS            dqhandle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    modify !           mechanism: by reference >           Handle created by MDM_DQ_OPEN identifying channel to           be closed.  A           _______________________________________________________              DESCRIPTION'=           MDM_DQ_CLOSE closes the channel opened with MDM_DQ_m;           OPEN and deallocates the memory used for the diskm           quota structures..    A                                                             RTN-9f n                  MDM_DQ_CLOSE        A           _______________________________________________________r  #           CONDITION VALUES RETURNEDe  :           SS$_NORMAL         Normal successful completion.                                                                                   RTN-10 G       A                                                       MDM_DQ_OPEN           A           _______________________________________________________   *           MDM_DQ_OPEN-Open channel to disk  ?           MDM_DQ_OPEN opens a channel to a disk volume for diski           quota operations.t  A           _______________________________________________________t             FORMAT  '           MDM_DQ_OPEN  devnam, dqhandle   A           _______________________________________________________s             RETURNSe           VMS Usage: cond_valuem(           type:      longword (unsigned)           access:    write onlyr           mechanism: by value   A           _______________________________________________________              ARGUMENTS            devnam              VMS Usage: device_name%           type:      character stringy           access:    read only"           mechanism: by descriptor2           Device name of disk device to be opened.             dqhandle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    write onlyF!           mechanism: by reference 7           Handle used to refer to disk for other MDM_DQ_           operations.   A                                                            RTN-11                     MDM_DQ_OPEN_        A           _______________________________________________________              DESCRIPTION =           MDM_DQ_OPEN assigns a channel to the specified disk_9           voolume and allocates the structures needed for :           subsequent disk quota operations. Note that this<           routine does not attempt to determine whether disk+           quotas are enabled on the volume.   >           Note that you must be suitably privileged to perform/           disk quota manipulations on a volume.   A           _______________________________________________________   #           CONDITION VALUES RETURNEDE  @           SS$_NORMAL         Normal successful completion. Other>                              status values from LIB$GET_VM and2                              $ASSIGN are possible.                                                       RTN-12         A                                                       MDM_DQ_READ           A           _______________________________________________________   -           MDM_DQ_READ-Read a disk quota entry   =           MDM_DQ_READ reads a disk quota and usage entry from            the quota file.   A           _______________________________________________________              FORMAT  <           MDM_DQ_READ  dqhandle, ident, permq, overdr, usage  +                        [,context, actident]   A           ________________________________________________________             RETURNS_           VMS Usage: cond_valuer(           type:      longword (unsigned)           access:    write only            mechanism: by valuee  A           _______________________________________________________s             ARGUMENTSh           dqhandle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only!           mechanism: by reference >           Handle for disk channel, as returned by MDM_DQ_OPEN.             identi             VMS Usage: uic_codeD(           type:      longword (unsigned)           access:    read only!           mechanism: by reference_;           UIC or identifier value for the entry to be read._  A                                                            RTN-13s                    MDM_DQ_READq                     permq   &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    write onlyr!           mechanism: by referencem6           Permanent quota value from disk quota entry.             overdr  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    write onlye!           mechanism: by reference 0           Overdraft value from disk quota entry.             usageC  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    write onlyP!           mechanism: by referenceS1           Disk usage value from disk quota entry.              contextt  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    modifyT!           mechanism: by reference <           Context information for wildcard searches of quota           file.              actident             VMS Usage: uic_code (           type:      longword (unsigned)           access:    write onlys!           mechanism: by referenceu<           UIC or identifier value read from disk quota entry!           during wildcard search.p             RTN-14    i    A                                                       MDM_DQ_READ         A           _______________________________________________________,             DESCRIPTIONe>           This routine reads the current quota, overdraft, and:           usage values for the specified UIC or identifier9           value. With the use of the context and actident @           arguments, this routine can be called repeatedly for a,           wildcard search of the quota file.  ?           Two types of wildcard searching can be performed. Theh=           entries for all users in a particular UIC group canh=           be obtained by specifying UIC$K_WILD_MEMBER for the >           member portion of the UIC. The entries for all users<           in all groups can be obtained by specifying UIC$K_@           WILD_GROUP for the group portion of the UIC and UIC$K_8           WILD_MEMBER for the member portion of the UIC.  >           To perform a wildcard search, initialize the context@           variable to zero before the first call to MDM_DQ_READ.?           The actual UIC or identifier read from the quota filee;           is returned in actident. Do not alter the context <           value after the initial read, and continue reading?           until an error code is returned indicating no further            entries.  A           ________________________________________________________  #           CONDITION VALUES RETURNED_  :           SS$_NORMAL         Normal successful completion.  ;           SS$_BADPARAM       Wildcard UIC specified without <                              context and actident arguments.:                              Other status values from $QIO<                              and the QIO-ACP driver are also&                              possible.          A                                                            RTN-15.    s               MDM_DQ_REMOVE           A           _______________________________________________________S  1           MDM_DQ_REMOVE-Remove a disk quota entry   ;           MDM_DQ_REMOVE removes a disk quota entry from the            quota file.s  A           _______________________________________________________s             FORMAT  (           MDM_DQ_REMOVE  dqhandle, ident  A           _______________________________________________________n             RETURNS            VMS Usage: cond_value (           type:      longword (unsigned)           access:    write onlyn           mechanism: by value   A           _______________________________________________________v             ARGUMENTSe           dqhandle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only!           mechanism: by reference *           Handle created with MDM_DQ_OPEN.             ident_             VMS Usage: uic_codeI(           type:      longword (unsigned)           access:    read only!           mechanism: by reference ?           UIC code or identifier value for which the disk quota !           entry is to be removed._             RTN-16 _  _    A                                                     MDM_DQ_REMOVE         A           _______________________________________________________              DESCRIPTION @           This routine removes disk quota entries. Note that the>           entry is removed regardless of whether the usage for2           the specified identifier is zero or not.  A           _______________________________________________________   #           CONDITION VALUES RETURNEDn  @           SS$_NORMAL         Normal successful completion. Other;                              status values from $QIO or the 9                              QIO-ACP driver are possible.                                                       A                                                            RTN-17     e               MDM_DQ_SET          A           _______________________________________________________e  .           MDM_DQ_SET-Modify a disk quota entry  @           MDM_DQ_SET sets a new quota and/or overdraft value for2           one UIC or identifier in the quota file.  A           _______________________________________________________              FORMAT  8           MDM_DQ_SET  dqhandle, ident, [permq], [overdr]  A           ________________________________________________________             RETURNS            VMS Usage: cond_valuer(           type:      longword (unsigned)           access:    write onlye           mechanism: by valueo  A           _______________________________________________________              ARGUMENTSr           dqhandle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only!           mechanism: by reference *           Handle created with MDM_DQ_OPEN.             ident              VMS Usage: uic_code (           type:      longword (unsigned)           access:    read only!           mechanism: by referencep?           UIC code or identifier value for which the disk quotal"           entry is to be modified.             RTN-18    W    A                                                        MDM_DQ_SETs                     permq   &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only!           mechanism: by reference ?           Permanent disk quota value to be entered. If omitted, 0           the permanent quota remains unchanged.             overdr  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only!           mechanism: by referenceI?           Overdraft disk quota value to be entered. If omitted,A0           the overdraft value remains unchanged.  A           _______________________________________________________              DESCRIPTIONO8           This routine modifies a disk quota entry for a:           specific UIC or identifier value. You can change@           either the permanent quota or overdraft value or both;<           if you omit a value it remains unchanged. Use MDM_?           DQ_REMOVE to remove a disk quota entry from the quotaL           file.   A           _______________________________________________________   #           CONDITION VALUES RETURNEDn  @           SS$_NORMAL         Normal successful completion. Other;                              status values from $QIO or the 9                              ACP-QIO driver are possible.           A                                                            RTN-19n                    MDM_MKDATE          A           _______________________________________________________   ,           MDM_MKDATE-make RFC822 date string  =           MDM_MKDATE constructs an RFC822-compliant date/time_,           string from a VMS date/time stamp.  A           _______________________________________________________N             FORMAT  3           MDM_MKDATE  [fs-date], fmt-date [,fd-len]   A           _______________________________________________________              RETURNS            VMS Usage: cond_value (           type:      longword (unsigned)           access:    write only            mechanism: by value_  A           _______________________________________________________R             ARGUMENTSN           fs-datet             VMS Usage: date_time(           type:      quadword (unsigned)           access:    read only!           mechanism: by reference 9           A VMS absolute date/time stamp. If omitted, the +           current system date/time is used.              fmt-date              VMS Usage: char_string%           type:      character stringt           access:    write onlya"           mechanism: by descriptor;           Character string into which the formatted date is_           written.             RTN-20    D    A                                                        MDM_MKDATE_                     fd-len  "           VMS Usage: word_unsigned$           type:      word (unsigned)           access:    write only !           mechanism: by reference 8           Length of character string stored in fmt-date.  A           _______________________________________________________              DESCRIPTION 9           This routine constructs a date/time string thatr5           complies with the Internet RFC822 date/time 5           specification. The format of the string is:   )              Dow, dd Mmm yy hh:mm:ss zone   =           Where Dow is a three-letter abbreviation of the day ;           of the week, dd is the day of the month, Mmm is ac>           three-letter abbreviation for the name of the month,@           yy is the year (last two digits only), hh:mm:ss is the?           time of day (using 24-hour notation), and zone is the "           time-zone specification.  <           This routine assumes operation in the Eastern time@           zone under the current daylight savings time schedule.>           You can override this default by defining one of two:           logical names. For systems observing US standard:           daylight savings time, defining the logical MDM_<           TZ_PREFIX to be one of E, C, M, or P (for Eastern,?           Central, Mountain, or Pacific) will cause that letter =           to be prepended to either ST or DT, as appropriate. :           To specify your own time zone string, define the?           logical name MDM_TIMEZONE to be the desired time zoner<           specification (such as GMT or "-0500"); it will be@           used without modification. Those logical names must be>           defined in the system logical name table to have any           effect.     A                                                            RTN-21I s  u               MDM_MKDATE        A           _______________________________________________________   #           CONDITION VALUES RETURNED   8           SS$_NORMAL         indicates normal successful;                              completion. Status values from_@                              LIB$DAY_OF_WEEK and LIB$SYS_FAO are+                              also possible.                                                                              RTN-22 _  _    A                                                         MDM_OPENF           A           _______________________________________________________              MDM_OPENF-Open a file_  7           MDM_OPENF opens a file for sequential access.   A           ________________________________________________________             FORMAT  ?           MDM_OPENF  key, fspec [,handle] [,defspec] [,resspec]   A           _______________________________________________________              RETURNSe           VMS Usage: cond_value (           type:      longword (unsigned)           access:    write only            mechanism: by value   A           ________________________________________________________             ARGUMENTS 
           key   &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only           mechanism: by valuet=           Function code indicating operation to be performed. 3           Key may have one of the following values:   A           ________________________________________________________A           Value______________Meaning_____________________________   <           MDM__EXISTS        Test only for file's existence.  3           MDM__READ          Open file for reading.   3           MDM__WRITE         Open file for writing.   A           MDM__APPEND________Open_file_for_appending._____________  =           If the key value may be ORed with the modifier MDM_p=           M_FID, which indicates that the fspec argument is aa  A                                                            RTN-23_ _  _               MDM_OPENF_          @           descriptor pointing to a VMS file ID. MDM_M_FID is not*           valid with the MDM__EXISTS  key.             fspec_              VMS Usage: char_string%           type:      character string            access:    read only"           mechanism: by descriptor<           File specification of file to be opened. If MDM_M_<           FID is specified, the descriptor should point to a?           28-byte structure containing the 16-byte device name, @           6-byte file ID, and 6-byte directory ID of the file to>           be opened (this is the 28 consecutive bytes of a NAM3           block starting with the NAM$T_DVI field).              handle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    write onlye!           mechanism: by referencer@           "Handle" assigned to opened file, used to identify the?           file for subsequent file operations. This argument is ;           optional only when key has the value MDM__EXISTS._             defspec_              VMS Usage: char_string%           type:      character string            access:    read only"           mechanism: by descriptor<           Default file specification to be used when opening@           the file. If omitteed, a default file specification of           .DAT is used.              resspeco              VMS Usage: char_string%           type:      character stringr           access:    write onlyl"           mechanism: by descriptor?           If specified, the RMS resultant file specification is             copied to this string.             RTN-24    N    A                                                         MDM_OPENF         A           _______________________________________________________l             DESCRIPTION =           MDM_OPENF provides simplified access to RMS for use =           with sequential disk files. Certain assumptions are            made by this routine:_  >           o  "Opening a file for writing" means creating a new=              file that is opened for writing. "Opening a filea>              for appending" means opening an existing file for>              writing and positioning to the end of file before>              the first write operation. Both of these types of>              open operations use exclusive access to the file.  =           o  Read-only operations allow for multiple readers.   ?           o  Files created by this routine have variable-lengthy?              records and carriage-return carriage control (i.e. /              typical VMS sequential text file)._  9           The handle is actually the address of a control <           structure used internally by the file I/O routines:           that should not be manipulated by user programs.  A           _______________________________________________________   #           CONDITION VALUES RETURNEDb  :           RMS$_NORMAL        Normal successful completion.  3           MDM__INVFUNC       Invalid value for key.   7           MDM__INVFSPEC      Invalid file specification_9                              given for fspec, defspec, ord=                              resspec. Error codes from $OPEN, ;                              $CREATE, $CONNECT, LIB$GET_VM, ;                              and LIB$ANALYZE_SDESC are also &                              possible.      A                                                            RTN-25  m  n               MDM_PARSEu          A           _______________________________________________________   '           MDM_PARSE-Interface to $PARSE   ?           MDM_PARSE is a simplified interface to the RMS $PARSE            service.  A           _______________________________________________________l             FORMAT  @           MDM_PARSE  keymask, fspec, [defspec,] result [,reslen]  A           _______________________________________________________f             RETURNS            VMS Usage: cond_value (           type:      longword (unsigned)           access:    write only            mechanism: by value   A           _______________________________________________________d             ARGUMENTS            keymask   "           VMS Usage: mask_longword(           type:      longword (unsigned)           access:    read only!           mechanism: by references8           A mask indicating actions to be performed. Any:           combination of the following values may be used:  A           _______________________________________________________ A           Value______________Meaning______________________________  7           MDM_M_NODE         Return node specification.e  9           MDM_M_DEV          Return device specification.a  <           MDM_M_DIR          Return directory specification.  .           MDM_M_NAME         Return file name.  .           MDM_M_TYPE         Return file type.             RTN-26 a       A                                                         MDM_PARSEl        A           _______________________________________________________aA           Value______________Meaning_____________________________$  3           MDM_M_VER          Return version number.   5           MDM_M_ALL          Return all parts of filea+                              specification.   7           MDM_M_SYNCHK       Perform syntax check only.   <           MDM_M_PWD          Leave password in DECnet access.                              string unaltered.  >           MDM_M_NOCONCEAL    Fully expand concealed device andA           ___________________root_specifications.________________f             fspecr              VMS Usage: char_string%           type:      character stringn           access:    read only"           mechanism: by descriptor*           File specification to be parsed.             defspec_              VMS Usage: char_string%           type:      character stringO           access:    read only"           mechanism: by descriptor>           Default file specification to be used while parsing.             result              VMS Usage: char_string%           type:      character string            access:    write only "           mechanism: by descriptor>           Result of the parsing operation. The result includes>           only those parts of the file specification specified           by keymask.              reslen  "           VMS Usage: word_unsigned$           type:      word (unsigned)           access:    write only_!           mechanism: by reference   A                                                            RTN-27     u               MDM_PARSE_          -           Length of string written to result.   A           _______________________________________________________              DESCRIPTION_<           This routine provides a fairly simple interface to<           the $PARSE RMS service. Specify which parts of the9           file specification you want returned, and thosen=           parts, written in normal RMS order with appropriate_?           punctuation, are returned in result. The SYNCHK, PWD, ;           and NOCONCEAL options are passed along to $PARSE. 7           Refer to the RMS manual for more information.   A           _______________________________________________________O  #           CONDITION VALUES RETURNEDM  :           RMS$_NORMAL        Normal successful completion.=                              Other status values from $PARSE,c<                              LIB$GET_VM, LIB$SCOPY_DXDX, and<                              LIB$ANALYZE_SDESC are possible.                                                 RTN-28         A                                                         MDM_READF_          A           _______________________________________________________s  !           MDM_READF-Read a record   =           MDM_READF reads a record from a file opened by MDM_            OPENF.  A           ________________________________________________________             FORMAT  *           MDM_READF  handle, recbuf [,len]  A           _______________________________________________________r             RETURNS            VMS Usage: cond_valueo(           type:      longword (unsigned)           access:    write only            mechanism: by value   A           _______________________________________________________              ARGUMENTS            handle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only           mechanism: by value_8           Handle of open file, as returned by MDM_OPENF.             recbuf              VMS Usage: char_string%           type:      character string_           access:    write onlyO"           mechanism: by descriptor>           Character string into which the record read from the           file is stored._  A                                                            RTN-29     e               MDM_READF)          
           leni  "           VMS Usage: word_unsigned$           type:      word (unsigned)           access:    write only !           mechanism: by reference *           Length of record read from file.  A           _______________________________________________________              DESCRIPTIONh=           MDM_READF reads in one record from a file opened by.:           MDM_OPENF. The RTL character string routines are=           used to copy the record into recbuf, so any type of >           character string descriptor that the RTL handles can           be used.  A           _______________________________________________________   #           CONDITION VALUES RETURNED   :           RMS$_NORMAL        Normal successful completion.  @           RMS$_EOF           Attempt was made to read beyond end>                              of file. Other status values from4                              $GET are also possible.                                       RTN-30         A                                                         MDM_RWNDF           A           _______________________________________________________              MDM_RWNDF-Rewind file   <           MDM_RWNDF rewinds a file that was opened with MDM_           OPENF.  A           _______________________________________________________              FORMAT             MDM_RWNDF  handle_  A           _______________________________________________________              RETURNSr           VMS Usage: cond_valuen(           type:      longword (unsigned)           access:    write onlyr           mechanism: by valuef  A           _______________________________________________________              ARGUMENTSe           handle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only           mechanism: by value_  A           _______________________________________________________              DESCRIPTIONf=           This routine simply issues a $REWIND RMS service onr           the file.         A                                                            RTN-31                     MDM_RWNDF         A           _______________________________________________________   #           CONDITION VALUES RETURNEDi  @           RMS$_NORMAL        Normal successful completion. Other@                              status values from $REWIND are also&                              possible.                                                                               RTN-32         A                                                        MDM_STRANS           A           _______________________________________________________   3           MDM_STRANS-Interface to MOVTC instruction   ;           MDM_STRANS translates character strings using the_           MOVTC instruction.  A           ________________________________________________________             FORMAT  *           MDM_STRANS  func, srcstr, dststr  A           _______________________________________________________o             RETURNS            VMS Usage: cond_valuen(           type:      longword (unsigned)           access:    write onlyc           mechanism: by value   A           _______________________________________________________n             ARGUMENTS            func  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only           mechanism: by value @           Selects the translation function to be performed. Func/           can have one of the following values:)  A           _______________________________________________________ A           Value______________Meaning_____________________________   9           MDM__ASCEBC        ASCII to EBCDIC translation.   9           MDM__EBCASC        EBCDIC to ASCII translation.   >           MDM__ASCPRI        ASCII to Prime-ASCII translation.  A           MDM__PRIASC________Prime-ASCII_to_ASCII_translation.___              srcstr              VMS Usage: char_string  A                                                            RTN-33t w  ,               MDM_STRANS          %           type:      character string            access:    read only"           mechanism: by descriptor"           String to be translated.             dststr              VMS Usage: char_string%           type:      character string            access:    write onlya"           mechanism: by descriptor            Result of translation.  A           _______________________________________________________n             DESCRIPTION =           This routine translates between ASCII and EBCDIC asl>           well as between ASCII and "Prime ASCII" (also called@           "negative ASCII"), which is 7-bit ASCII codes with the#           8th bit set in each byte.t  A           _______________________________________________________   #           CONDITION VALUES RETURNED   @           SS$_NORMAL         Normal successful completion. Other<                              status values from STR$GET1_DX,>                              LIB$ANALYZE_SDESC, and LIB$SCOPY_/                              DXDX are possible.e                                 RTN-34    e    A                                                    MDM_SYS_TRNLNMN          A           ________________________________________________________  5           MDM_SYS_TRNLNM-Interface to $TRNLNM serviceO  @           MDM_SYS_TRNLNM translates logical names using $TRNLNM.  A           _______________________________________________________o             FORMAT  >           MDM_SYS_TRNLNM  lognam, [attr], [tblmask], [acmode],  *                           eqvnam [,eqvlen]  A           ________________________________________________________             RETURNS            VMS Usage: cond_value (           type:      longword (unsigned)           access:    write only_           mechanism: by value   A           _______________________________________________________q             ARGUMENTS            lognam  !           VMS Usage: logical_name_%           type:      character string            access:    read only"           mechanism: by descriptor(           Logical name to be translated.             attr  "           VMS Usage: mask_longword(           type:      longword (unsigned)           access:    read only!           mechanism: by references<           Attributes controlling the logical name search, as           used by $TRNLNM.  A                                                            RTN-35i d                  MDM_SYS_TRNLNM                     tblmask   "           VMS Usage: mask_longword(           type:      longword (unsigned)           access:    read only!           mechanism: by referencew:           Mask specifying which tables should be searched.  A           ________________________________________________________           Bit     MaskA           number__value____Meaning_______________________________   5             3       8      Process logical name table   1             2       4      Job logical name table   3             1       2      Group logical name table_  A           __0_______1______System_logical_name_table_____________M  =           If omitted, the logical name tables that defined bya=           logical name LNM$FILE_DEV (which is either in tableR<           LNM$PROCESS_DIRECTORY or LNM$SYSTEM_DIRECTORY) are           searched.o             acmode              VMS Usage: access_mode$           type:      byte (unsigned)           access:    read only!           mechanism: by referencet?           Access mode to be used in the translation, as used byb           $TRNLNM.             eqvnam              VMS Usage: char_string%           type:      character stringt           access:    write only8"           mechanism: by descriptor>           String into which the equivalence name is written if           found.             RTN-36 t       A                                                    MDM_SYS_TRNLNM                      eqvlen  "           VMS Usage: word_unsigned$           type:      word (unsigned)           access:    write onlye!           mechanism: by referencen%           Length of equivalence name.a  A           _______________________________________________________e             DESCRIPTIONi9           This routine uses the $TRNLNM system service tol=           translate a logical name. Only the tables specifiedc:           by the tblmask argument are searched. The tables<           are searched in the following order: process, job,?           group, system. Only the first equivalence name can be :           retrieved with this routine-search lists cannot.  ?           See the description of the $TRNLNM system service forg:           an explanation of the attr and acmode arguments.  A           _______________________________________________________   #           CONDITION VALUES RETURNEDi  @           SS$_NORMAL         Normal successful completion. Other?                              status values from LIB$SCOPY_DXDX, <                              LIB$SCOPY_R_DX, and $TRNLNM are&                              possible.                      A                                                            RTN-37     i               MDM_WRITEF          A           _______________________________________________________p  -           MDM_WRITEF-Write a record to a file   =           MDM_WRITEF writes a record to a file opened by MDM_            OPENF.  A           _______________________________________________________s             FORMAT  $           MDM_WRITEF  handle, recbuf  A           _______________________________________________________u             RETURNSo           VMS Usage: cond_valuen(           type:      longword (unsigned)           access:    write only            mechanism: by valuet  A           _______________________________________________________              ARGUMENTSS           handle  &           VMS Usage: longword_unsigned(           type:      longword (unsigned)           access:    read only           mechanism: by values3           Handle of file, as returned by MDM_OPENF.              recbuf              VMS Usage: char_string%           type:      character stringE           access:    read only"           mechanism: by descriptor?           Character string containing data to be written to the            file.              RTN-38 t  _    A                                                        MDM_WRITEF         A           _______________________________________________________              DESCRIPTION =           This routine uses the $PUT RMS service to write theC@           record to the file. The file must have been opened for0           writing (or appending) with MDM_OPENF.  A           ________________________________________________________  #           CONDITION VALUES RETURNED_  @           RMS$_NORMAL        Normal successful completion. Other<                              status values from LIB$ANALYZE_9                              SDESC and $PUT are possible._                                                      A                                                            RTN-39 