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.

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 .

Download:

All sources needed for Util.OLB and the applications in [.main] are available in
huber_util.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
More directories:
  1. include/
  2. main/
  3. special/
  4. tests/

Hypertext files
  1. init_cli.html (3KB): init_cli Routines

Text files
  1. lgpl.txt (26KB):
  2. util_olb.hlp (51KB):

Program Sources
  1. bigendian.c (1KB): ask if CPU is Big-endian
  2. bigendian.f (1KB): ask if CPU is Big-endian
  3. bincom.inc (1KB): bincom.inc
  4. bio.for (6KB): Collection of simple RMS-Block-I/O routines
  5. bio.inc (1KB): bio.inc
  6. Broadcast2Reqid.for (1KB): Convert BROADCAST class string to BRKTRHRU request ID
  7. bytes_to_char.for (1KB): copy a string of N bytes into a character string
  8. client_connect.c (2KB): TCPIP socket connection
  9. clispawn.for (1KB): spawns a DCL commandline and returns the commands completion code
  10. cli_c.c (1KB): cli_c.c
  11. convert_endianess.c (1KB): Integer endianess conversion
  12. cputim.for (1KB): CPUTIM returns the CPU time used since the process was invoked.
  13. crmpsc.for (5KB): create and map a global section file
  14. crtl_version.c (2KB): crtl_version.c
  15. csleep.for (1KB): Set timer and wait for SECSTR seconds.
  16. cvtnum.c (2KB): Convenience routine to convert a string to a number.
  17. date4.for (4KB): date4.for
  18. delay.for (1KB): Delay for a time specified as an absolute time string
  19. endianess.c (1KB): Returns 1 for little endian system, 0 for big endian
  20. dclexh.for (2KB): Declare standard exit-handler for image
  21. file_size.for (1KB): file_size returns the size of a file (blocks).
  22. fill_itmlst.for (2KB): Fill values in itemlist
  23. find_file.for (2KB): returns next file name in a sequence of (wildcard) file searches
  24. find_file_c.for (3KB): returns next file name in a sequence of file searches: C call
  25. fparse.for (6KB): Free format number conversion:
  26. fs.c (1KB): convert C-string to pointer to VMS string descriptor
  27. gbl_section_ufo.for (3KB): Opens a file to be used as a global section
  28. gcml$codes.inc (1KB): gcml$codes.inc
  29. getbits.c (1KB): get n bits from position p
  30. getcml.for (5KB): Returns foreign DCL commandlines
  31. getprn.for (2KB): get process name (and ID)
  32. getsyi_nodename.for (1KB): get VMS nodename
  33. get_asctime.c (1KB): get formatted time string from binary (Unix-32bit) time time.
  34. get_option_value.for (2KB): get next option and it's value from a command line
  35. get_token.for (1KB): get next token of a string
  36. get_vms_version.c (1KB): get_vms_version.c
  37. giver4.for (1KB): Copy argument to function value as real value
  38. hg$get_input.c (2KB): HG$GET_INPUT provide command recall when reading from SYS$INPUT
  39. hg$get_input.f90 (3KB): HG$GET_INPUT provide command recall when reading from SYS$INPUT
  40. hg$get_input.for (3KB): HG$GET_INPUT provide command recall when reading from SYS$INPUT
  41. hg$get_input_interface.f90 (1KB): hg$get_input_interface.f90
  42. i2bit.for (1KB): This subroutine gives bits I - K of IN
  43. i2toi4.for (1KB): Return short integer input argument as (long) integer,
  44. ignore_f_errors-alpha.for (3KB): A ignore all aritmetic trap condition handler
  45. ignore_f_errors-vax.for (3KB): A ignore all aritmetic trap condition handler
  46. init_cli.c (2KB): DCL parsing of foreign command-lines
  47. init_cli.h (1KB): init_cli.h
  48. init_cli_argv.c (3KB): initialize CLI table parsing for C argv array
  49. init_cli_argv.h (1KB): init_cli_argv.h
  50. init_cli_for.for (3KB): DCL parsing of foreign command-lines (Fortran call)
  51. iostat_to_status.for (2KB): Converts FORTRAN IOSTAT value to a VMS condition code
  52. ishell.for (1KB): SORTS N ELEMENTS OF A VECTOR X
  53. isleep.for (1KB): sleep seconds
  54. isort.for (1KB): SORTING ROUTINE: SORT AN ARRAY OF INTEGERS IN ASCENDING ORDER
  55. istrue.for (1KB): ISTRUE - cast an expression into a logical value
  56. itmlst_init.h (1KB): itmlst_init.h
  57. julian_day.for (1KB): Julian day number of today in current year
  58. lenstr.for (1KB): Position of last non-blank char in a string
  59. lenstr.fpp (1KB): Position of last non-blank char in a string
  60. lenstr0.for (1KB): length of zero terminated string
  61. limit.for (1KB): CLIP VALUE BETWEEN THE MINIMUM AND THE MAXIMUM
  62. logsysmessage.for (1KB): translates a system condition code into a readable text message
  63. make_dsc_str.c (1KB): make a descriptor for a fixed-length string
  64. move_data.c (2KB): moving data from source to destination.
  65. mtsense.inc (1KB): mtsense.inc
  66. mtutil.for (12KB): general tape I/O routines (logical block I/O)
  67. mvbits.fortran (2KB): mvbits.fortran
  68. myfree.c (1KB): myfree.c
  69. openff.for (1KB): Open a file for FORTRAN formatted I/O
  70. opmsg.for (1KB): Send message to OPCOM
  71. padd_zs.for (2KB): padds a NULL terminated character array with blanks,
  72. parse_os9_file.for (2KB): Parse an OS9-file-specification into path-name and pure file-name
  73. parse_os9_file_c.for (2KB): C-language interface to PARSE_OS9_FILE routine
  74. pdtoib.for (2KB): KONVERSION VON ASCII NACH EBCDIC UND viceversa
  75. permut.for (1KB): CALCULATES ALL PERMUTATIONS OF AN ARRAY (E1,.....EN)
  76. polar.for (1KB): CONVERTS RECTANGULAR COORDINATES (X,Y) TO POLAR (R,PHI)
  77. posix_test.c (1KB): posix_test.c
  78. prcpid.for (2KB): get processID for process given by name
  79. print_and_delete.for (5KB): print a file on queue , delete after printing
  80. process_scan.for (3KB): process_scan: sacn processes, return name,node,id,image
  81. putmsg.for (1KB): Put a formatted error message to sys$output
  82. rabadr.inc (1KB): rabadr.inc
  83. rectan.for (1KB): CONVERTS POLAR COORDINATES (R,PHI) TO RECTANGULAR (X,Y)
  84. remove_file_version.for (1KB): remove verion number (;...) from a VMS filename
  85. remove_file_version_c.c (2KB): remove verion number (;...) from a VMS filename
  86. replace_file_type.c (1KB): replace file-type of input filename
  87. resource_ctx.h (1KB): resource_ctx.h
  88. resource_ctx.inc (1KB): resource_ctx.inc
  89. resource_lock.for (2KB): Routines to establish a secure interlock
  90. resource_routines.inc (1KB): resource_routines.inc
  91. rot.for (1KB): ROTATE THE POINT (X,Y) BY THE ANGLE DRW
  92. rotvc.for (1KB): ROTATE COORDINATES (X(I),Y(I)) BY AN ANGLE DRW
  93. sbyte.c (1KB): swap bytes in 16bit array
  94. send_broadcast.for (3KB): broadcast a message to a user
  95. send_mail.for (6KB): sends a mail using callable mail - example
  96. send_mbx_message.for (2KB): General non-blocking write into a mailbox
  97. shell.for (1KB): SORTS N ELEMENTS OF A VECTOR X
  98. spawn_and_read.for (5KB): spawn a DCL command and return the output of the command
  99. spawn_nowait.c (2KB): C language interface to the VMS LIB$SPAWN run-time function
  100. strlen.for (1KB): strlen() in Fortran
  101. str$lower.for (1KB): convert (src_string) to all lowercase characters
  102. stream_f.c (8KB): C stream I/O package
  103. stream_f.h (2KB): stream_f.h
  104. stream_f.inc (2KB): stream_f.inc
  105. stream_ff.c (1KB): the fortran interface for stream_f functions
  106. swap_b.for (1KB): Invert in-situ the 2 bytes in each 16-bit word of array MV, N bytes
  107. swap_w.for (1KB): Invert in-situ the 2 words in each 32-bit word of array MV, N longwords
  108. swap_words_c.c (1KB): int swap_words_c(lw) swaps the 2 words of a longword
  109. swap_words_f.for (1KB): integer swap_words_f(lw) swaps the 2 words of a longword
  110. sword.c (1KB): swap words in an array of long words
  111. tapuse.for (1KB): calculates the tape length used for a block
  112. timer_init.for (1KB): To measure the time spent in a program section,
  113. time_to_tm.c (2KB): returns a given Unix binary time in an struct tm
  114. tm.inc (1KB): tm.inc
  115. ucopy.for (1KB): copy vector A into vector B, N storage units (4 bytes) long.
  116. unquote.for (1KB): remove quotes () around strings
  117. username.for (1KB): get my user name
  118. usropn.for (1KB): Example program how to use USEROPEN in Fortran to return the files channel
  119. uzero.for (1KB): Zero elements A(I1) to A(I2) of vector A
  120. vaxutil.h (1KB): vaxutil.h
  121. vms_arch.c (1KB): vms_arch.c
  122. vms_arch.h (1KB): vms_arch.h
  123. vms_getpid.for (2KB): get my process ID
  124. vms_vers.c (1KB): vms_vers.c
  125. vms_vers.h (1KB): vms_vers.h
  126. vxinvb.c (1KB): vxinvb.c
  127. vxinvb.for (1KB): VXINVB(array,N) inverts endianess of integer*4 array
  128. wcopy.for (1KB): copy array A into array B , N words (*16 bits)
  129. xtappmainloop.c (1KB): create local XtAppMainLoop and XtAppSetExitFlag

Command files,Scripts
  1. descrip.mms (7KB): descrip.mms
  2. libcompile.com (6KB): compile routines in library util.olb
  3. vms_pagesize.com (1KB): Create include file

Other files
  1. .message (1KB):
  2. decc_vms_config.notes (11KB):
  3. jamfile. (3KB):
  4. uvt100.par (1KB):
  5. vms_pagesize.axp (1KB):
  6. vms_pagesize.vax (1KB):


Eventually missing include files are in ../include
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/

Joseph Huber , huber AT mppmu mpg de