VMS site scheduled for shutdown !
These VMS oriented and VMS served pages may disappear anytime with their host VMS systems shutting down.
The main page is now at http://www.mpp.mpg.de/~huber/vmsdoc/, but without the (online) HELP pages.
www.mpp.mpg.de/~huber/vmsdoc/index.html
image vms-shark OpenVMS is the operating system originally written for Digital Equipments (DEC) VAX series of MiniComputers.
Today , OpenVMS is owned by HewlettPackard (HP).
OpenVMS runs on Vax,Alpha, and Intel IA64 (Itanium) CPU architectures.

VMS Utility Routines

This directory is my development directory for several small routines not belonging to a specific package.
Not everything is written by myself though, just adapted to my needs.
Note: these are routines for use in VMS systems, so DEC specific compiler extensions are used where convenient; no porting considerations at all! Think as if all code is in a jacket of #ifdef __vms ... #endif !

Compile, Build Library:

Use either MMS or MMK: "MMS target" (using descrip.MMS).
blank target compiles everything, builds []UTIL.OLB
target INSTALL builds and copies []UTIL.OLB to SYS$COMMON:[SYSLIB]
some.OBJ just builds a single object from source .

Without MMS/MMK: @libcompile builds UTIL.OLB .
Note: All routines are made to compile under VMS 7.3-1 Alpha, DECC >= 6.5, Fortran >= 7.5., and VMS 8.3 IA64, HP C 7.2, Fortran 8.1.
No attempt made to compile with older versions or on VAX !
See
retro.html for routines affected.

FPP:

For fortran preprocessor files, I use the FPP from Sun-studio tools ( http://developers.sun.com/sunstudio/products/previous/fortran/ )
If not available, the standard C preprocessor (DECC CC/PREPROC/NOLINE_DIRECTIVES) can be used to produce the same result.

Missing $ILEDEF include module:

On older (Vax)Fortran compilers,where $ILEDEF is not available, use $ILEDEF.VAX as a replacement, it is just a copy from my Alpha system, the 64-bit definitions removed.
Put this file into a text library, and define logical FORT$LIBRARY to point to it:
$ Library/create myfordef.tlb/text $ILEDEF.VAX,$EFNDEF.VMS6_2
$ define FORT$LIBRARY 'f$environment("DEFAULT")'myfordef.tlb

Download:

All sources needed for Util.OLB and the applications in [.main] are available in huber_util.zip .
(Alpha) Object library util.olb in util_olb_alpha.zip .

Copyright:

If not stated differently inside a source file, all software here is issued under the GNU Public License (GPL), see ../pds/gpl.html , or the GNU Library Public License (LGPL) LGPL.txt

(Hyper)Text files

  1. freeware_readme.txt (1KB): freeware_readme.txt
  2. init_cli.HTML (3KB): init_cli Routines
  3. lgpl.txt (26KB): lgpl.txt
  4. retro.html (4KB): retrofitting sources
  5. util.HLP (71KB): Help for routines in util.olb

Program sources,scripts

  1. archive.COM (1KB): archive.COM
  2. basename_desc.C (2KB): return filename portion of path in a descriptor
  3. bigendian.C (1KB): ask if CPU is Big-endian
  4. bigendian.FOR (1KB): ask if CPU is Big-endian
  5. bincom.INC (1KB): bincom.INC
  6. bio.FOR (8KB): Collection of simple RMS-Block-I/O routines
  7. bio.INC (1KB): bio.INC
  8. Broadcast2Reqid.FOR (1KB): Convert BROADCAST class string to BRKTRHRU request ID
  9. bytes_to_char.FOR (1KB): copy a string of N bytes into a character string
  10. client_connect.C (2KB): TCPIP socket connection
  11. clispawn.FOR (1KB): spawns a DCL commandline and returns the commands completion code
  12. cli_c.C (1KB): cli_c.C
  13. CLI_Invocation.C (2KB): get program invocation method
  14. CLI_Invocation.FOR (1KB): returns how the calling program was invoked
  15. CLI_Invocation.H (1KB): CLI_Invocation.H
  16. CLI_Invocation.INC (1KB): Fortran definition file for cli_invocation
  17. convert_endianess.C (1KB): Integer endianess conversion
  18. cputim.FOR (1KB): CPUTIM returns the CPU time used since the process was invoked.
  19. crmpsc.FOR (7KB): create and map a global section file ( a sys$crmpsc example )
  20. crmpsc_pagfil.C (2KB): Create/Map a memory section to a pagefile section
  21. crmpsc_pagfil.H (1KB): Create/Map a memory section to a pagefile section
  22. csleep.FOR (1KB): Set timer and wait for SECSTR seconds.
  23. csleep.FPP (1KB): Set timer and wait for SECSTR seconds.
  24. csleep_d_float.FOR (1KB): Set timer and wait for SECSTR seconds.
  25. csleep_g_float.FOR (1KB): Set timer and wait for SECSTR seconds.
  26. csleep_ieee.FOR (1KB): Set timer and wait for SECSTR seconds.
  27. ctrl.H (1KB): ctrl.H
  28. cvtnum.C (6KB): Convenience routine to convert a string to a number.
  29. cvtnum.H (1KB): cvtnum.H
  30. dclexh.FOR (2KB): Declare standard exit-handler for image
  31. debug.FOR (1KB): Enter debugger
  32. delay.FOR (1KB): Delay for a time specified as a delta time string
  33. descrip.MMS (11KB): descrip.MMS
  34. dstrlen.FOR (1KB): strlen() in Fortran
  35. endianess.C (1KB): Returns 1 for little endian system, 0 for big endian
  36. endianess2.C (1KB): Returns 1 for little endian system, 0 for big endian
  37. endianess3.c (1KB): endianess3.c
  38. error.c (1KB): error.c
  39. error.h (1KB): error.h
  40. eu_date_to_vms.FOR (4KB): Convert date from European format to VMS format
  41. EXECUTE_COMMAND_LINE.FOR (2KB): Execute command line (F2008 standard) for VMS
  42. file_name_type.c (2KB): return name.type portion of a filespecification
  43. file_size.FOR (1KB): file_size returns the size of a file (blocks).
  44. fill_itmlst.F90 (2KB): Fill values in itemlist3
  45. fill_itmlst.FOR (2KB): Fill values in itemlist3
  46. find_file.FOR (2KB): returns next file name in a sequence of (wildcard) file searches
  47. find_file_c.FPP (3KB): returns next file name in a sequence of file searches: C call
  48. format_date-novms.for (4KB): Format date routines (EU,ISO,US,VMS)
  49. format_date.FOR (4KB): Format date routines (EU,ISO,US,VMS)
  50. fparse.FOR (6KB): Free format number conversion:
  51. fpp.com (1KB): fpp.com
  52. fpp90.com (1KB): fpp90.com
  53. fpp_for.com (1KB): fpp_for.com
  54. fs.C (1KB): convert C-string to pointer to VMS string descriptor
  55. fs.H (1KB): fs.H
  56. fsd.C (2KB): convert C-string to pointer to VMS string descriptor
  57. fsd.H (1KB): fsd.H
  58. gbl_section_ufo.FOR (3KB): Opens a file to be used as a global section
  59. gcml$codes.INC (1KB): gcml$codes.INC
  60. getbits.C (1KB): get n bits from position p
  61. getcml.FOR (5KB): Returns foreign DCL commandlines
  62. getcwd_dsc.C (1KB): get current working directory
  63. getenv_F.C (1KB): getenv_f: interface to CRTL getenv() for VMS string descriptors
  64. getjpi_logintime.FOR (1KB): Get the LOGIN time of process
  65. getpagesize.FOR (1KB): Returns the page size of the system.
  66. getprn.FOR (2KB): get process name (and ID)
  67. getpwnam_dsc.C (1KB): get user information via getpwnam
  68. getsyi_boottime.FOR (1KB): get VMS boot time
  69. getsyi_nodename.FOR (1KB): get VMS nodename
  70. get_asctime.C (1KB): get formatted time string from binary (Unix-32bit) time time.
  71. GET_NEW_MAIL_COUNT.FOR (2KB): GET_NEW_MAIL_COUNT.FOR
  72. get_token.FOR (1KB): get next token of a string
  73. get_vms_version.C (1KB): get_vms_version.C
  74. giver4.FOR (1KB): Copy argument to function value as real value
  75. glun.f (1KB): glun.f
  76. hg$get_input.C (2KB): HG$GET_INPUT provide command recall when reading from SYS$INPUT
  77. hg$get_input.FOR (3KB): HG$GET_INPUT provide command recall when reading from SYS$INPUT
  78. hg$get_input.H (1KB): hg$get_input.H
  79. i2bit.FOR (1KB): This subroutine gives bits I - K of IN
  80. i2toi4.FOR (1KB): Return short integer input argument as (long) integer,
  81. ignore_f_errors-alpha.FOR (3KB): A ignore all aritmetic trap condition handler
  82. ignore_f_errors-vax.FOR (3KB): A ignore all aritmetic trap condition handler
  83. inhib_msg.c (1KB): return status with inhibit error message bit set
  84. init_cli.C (3KB): DCL parsing of foreign command-lines
  85. init_cli.H (1KB): init_cli.H
  86. init_cli_argv.C (4KB): initialize CLI table parsing for C argv array
  87. init_cli_argv.H (1KB): init_cli_argv.H
  88. init_cli_for.FOR (3KB): DCL parsing of foreign command-lines (Fortran call)
  89. iostat_to_status.FOR (2KB): Converts FORTRAN IOSTAT value to a VMS condition code
  90. ipxfargc.FOR (1KB): Posix program argument count (and IARGC) for VMS
  91. ishell.FOR (1KB): SORTS N ELEMENTS OF A VECTOR X
  92. isleep.C (1KB): Fortram interface to CRTL sleep
  93. isleep.FOR (1KB): sleep seconds
  94. isleep.INC (1KB): isleep.INC
  95. isort.FOR (1KB): SORTING ROUTINE: SORT AN ARRAY OF INTEGERS IN ASCENDING ORDER
  96. istrue.FOR (1KB): ISTRUE - cast an expression into a logical value
  97. itmlst_init.H (1KB): itmlst_init.H
  98. julian_day.FOR (1KB): Julian day number of today in current year
  99. leapyear.FOR (1KB): is year a leapyear ?
  100. LENSTR.FOR (1KB): Position of last non-blank char in a string
  101. lenstr.FPP (1KB): Position of last non-blank char in a string
  102. lenstr0.FOR (1KB): length of zero terminated string
  103. lenstr2.FPP (2KB): Position of last non-blank char in a string
  104. libcompile.COM (7KB): compile routines in library util.olb
  105. limit.FOR (1KB): CLIP VALUE BETWEEN THE MINIMUM AND THE MAXIMUM
  106. logsysmessage.FOR (2KB): translates a system condition code into a readable text message
  107. make_dsc_str.C (1KB): make a descriptor for a fixed-length string
  108. make_test.com (1KB): make_test.com
  109. map_file.C (3KB): Map a file to a memory section
  110. move_data.C (2KB): moving data from source to destination.
  111. mtsense.INC (1KB): mtsense.INC
  112. mtutil.FOR (13KB): general tape I/O routines (logical block I/O)
  113. mvbits.fortran (2KB): mvbits.fortran
  114. myfree.C (1KB): myfree.C
  115. MyXtAppMainLoop.C (1KB): create local XtAppMainLoop and XtAppSetExitFlag
  116. numtim_to_quadtime.FOR (1KB): Convert $NUMTIM vector to VMS time quadword
  117. opmsg.FOR (1KB): Send message to OPCOM
  118. padd_zs.FOR (2KB): padds a NULL terminated character array with blanks,
  119. pdtoib.FOR (3KB): KONVERSION VON ASCII NACH EBCDIC UND viceversa
  120. permut.FOR (1KB): CALCULATES ALL PERMUTATIONS OF AN ARRAY (E1,.....EN)
  121. polar.FOR (1KB): CONVERTS RECTANGULAR COORDINATES (X,Y) TO POLAR (R,PHI)
  122. polar_to_rectangular.C (1KB): polar_to_rectangular.C
  123. pr.h (1KB): pr.h
  124. prcpid.FOR (1KB): get processID for process given by name
  125. print_and_delete.FOR (5KB): print a file on queue , delete after printing
  126. print_counted_string.C (2KB): print counted string
  127. print_dsc_string.C (2KB): print string passed by descriptor
  128. print_iostat.FOR (1KB): print fortran iostat message on sys$output
  129. process_scan.FOR (3KB): process_scan: sacn processes, return name,node,id,image
  130. pxfgetarg.FOR (1KB): Posix get commandline argument (and GETARG) for VMS
  131. pxfgetenv.FPP (6KB): Posix PXFGETENV, F2003 GET_ENVIRONMENT_VARIABLE for VMS Fortran
  132. pxfgetlogin.FOR (1KB): Posix compatible get username
  133. pxfrename.for (1KB): Posix call compatible RENAME for VMS
  134. pxfsetenv.FOR (1KB): Posix-conformant PXFSETENV for VMS Fortran
  135. rabadr.INC (1KB): rabadr.INC
  136. rectan.FOR (1KB): CONVERTS POLAR COORDINATES (R,PHI) TO RECTANGULAR (X,Y)
  137. replace_file_type.C (1KB): replace file-type of input filename
  138. resource_ctx.H (1KB): resource_ctx.H
  139. resource_ctx.INC (1KB): resource_ctx.INC
  140. resource_lock.FOR (2KB): Routines to establish a secure interlock
  141. resource_routines.INC (1KB): resource_routines.INC
  142. rot.FOR (1KB): ROTATE THE POINT (X,Y) BY THE ANGLE DRW
  143. rotvc.FOR (1KB): ROTATE COORDINATES (X(I),Y(I)) BY AN ANGLE DRW
  144. sbyte.C (1KB): swap bytes in 16bit array
  145. send_broadcast.FOR (3KB): broadcast a message to a user
  146. send_mail.FOR (6KB): sends a mail using callable mail - example
  147. send_mbx_message.FOR (2KB): General non-blocking write into a mailbox
  148. set_errno.C (1KB): set_errno.C
  149. set_symbol.C (1KB): lib$set_symbol for C-string call
  150. shell.FOR (1KB): SORTS N ELEMENTS OF A VECTOR X
  151. signum.f90 (1KB): signum.f90
  152. spawn_and_read.FOR (5KB): spawn a DCL command and return the output of the command
  153. spawn_nowait.C (2KB): C language interface to the VMS LIB$SPAWN run-time function
  154. str$lower.FOR (1KB): convert (src_string) to all lowercase characters
  155. stream_f.C (10KB): C stream I/O package
  156. stream_f.f (5KB): Fortran stream I/O package
  157. stream_f.fpp (8KB): Fortran stream I/O package
  158. stream_f.H (2KB): stream_f.H
  159. stream_f.INC (2KB): stream_f.INC
  160. stream_ff.C (1KB): the fortran interface for stream_f functions
  161. string_subtract.FOR (1KB): Subtract a substring from a string.
  162. strlen.FOR (1KB): strlen() in Fortran
  163. strlen.FPP (1KB): strlen() in Fortran
  164. submit_job.C (1KB): Submit a batch- or print-job (C call)
  165. swap16.c (1KB): Swap two 16bit words into a 32bit long word
  166. swap_b.FOR (1KB): Invert in-situ the 2 bytes in each 16-bit word of array MV, N bytes
  167. swap_w.FOR (1KB): Invert in-situ the 2 words in each 32-bit word of array MV, N longwords
  168. swap_words_c.C (1KB): int swap_words_c(lw) swaps the 2 words of a longword
  169. swap_words_f.FOR (1KB): integer swap_words_f(lw) swaps the 2 words of a longword
  170. sword.C (1KB): swap words in an array of long words
  171. tapuse.FOR (1KB): calculates the tape length used for a block
  172. termtype.C (1KB): TERMTYPE: interface to getenv(TERM)
  173. timbuf.inc (1KB): timbuf.inc
  174. timer_init.FOR (1KB): To measure the time spent in a program section,
  175. timevaldiff.c (1KB): timevaldiff - get difference of two timeval in msec
  176. time_to_tm.C (4KB): returns a given Unix binary time in an struct tm
  177. time_t_to_vmstime.C (2KB): Unix epoch time_t -> VMS time conversion
  178. time_t_to_vmstime.H (1KB): time_t_to_vmstime.H
  179. tm.INC (1KB): tm.INC
  180. tm_to_numtim.C (1KB): Convert from C tm structure to VMS $numtim vector
  181. ucopy.FOR (1KB): copy vector A into vector B, N storage units (4 bytes) long.
  182. unquote.FOR (1KB): remove quotes () around strings
  183. username.FOR (1KB): get my user name
  184. usropn.FOR (1KB): Example program how to use USEROPEN in Fortran to return the files channel
  185. uzero.FOR (1KB): Zero elements A(I1) to A(I2) of vector A
  186. vaxutil.H (1KB): vaxutil.H
  187. vmstime_to_time_t.C (2KB): VMS time -> unix time_t conversion
  188. vmstime_to_time_t.H (1KB): vmstime_to_time_t.H
  189. vmstime_to_time_t_q.C (2KB): VMS time -> unix time_t conversion
  190. vms_getpid.FOR (1KB): get my process ID
  191. vms_pagesize.COM (1KB): Make the system-/arch-specific vms_pagesize.for
  192. vms_pagesize.h (1KB): vms_pagesize.h
  193. vms_pagesize.inc (1KB): vms_pagesize.inc
  194. vms_vers.H (1KB): vms_vers.H
  195. vxinvb.C (1KB): vxinvb.C
  196. vxinvb.FOR (1KB): VXINVB(array,N) inverts endianess of integer*4 array
  197. wcopy.FOR (1KB): copy array A into array B , N words (*16 bits)
  198. xtappmainloop.C (1KB): create local XtAppMainLoop and XtAppSetExitFlag

Other files

  1. $EFNDEF.VMS6_2 (1KB):
  2. $ILEDEF.VAX (1KB):

More directories:

  1. COM/ [HUBER.util.COM]
  2. HLP/ UTIL.OLB
  3. main/ VMS Utility Programs
  4. tests/ [HUBER.util.tests]
  5. TPU/


main Directory of main programs, applications testing

See also my PDS page .

A lot of program sources from usenet or Decus are in /vmssig/src/


A note to MS InternetExploder users:
All source files here are sent using mime-type text/plain.
MSIE is apparently misusing the filename extensions like .COM .FOR,MAR,.C,.H to decide how to display the file in the browser, resulting in strange line-breaks.
Those files can either be downloaded by using the menu File->Save target as... on the link, or using View->source in the browser.
Joseph Huber , huber AT mppmu mpg de