| 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
|
 |
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
- freeware_readme.txt (1KB): freeware_readme.txt
- init_cli.HTML (3KB): init_cli Routines
- lgpl.txt (26KB): lgpl.txt
- retro.html (4KB): retrofitting sources
- util.HLP (71KB): Help for routines in util.olb
Program sources,scripts
- archive.COM (1KB): archive.COM
- basename_desc.C (2KB): return filename portion of path in a descriptor
- bigendian.C (1KB): ask if CPU is Big-endian
- bigendian.FOR (1KB): ask if CPU is Big-endian
- bincom.INC (1KB): bincom.INC
- bio.FOR (8KB): Collection of simple RMS-Block-I/O routines
- bio.INC (1KB): bio.INC
- Broadcast2Reqid.FOR (1KB): Convert BROADCAST class string to BRKTRHRU request ID
- bytes_to_char.FOR (1KB): copy a string of N bytes into a character string
- client_connect.C (2KB): TCPIP socket connection
- clispawn.FOR (1KB): spawns a DCL commandline and returns the commands completion code
- cli_c.C (1KB): cli_c.C
- CLI_Invocation.C (2KB): get program invocation method
- CLI_Invocation.FOR (1KB): returns how the calling program was invoked
- CLI_Invocation.H (1KB): CLI_Invocation.H
- CLI_Invocation.INC (1KB): Fortran definition file for cli_invocation
- convert_endianess.C (1KB): Integer endianess conversion
- cputim.FOR (1KB): CPUTIM returns the CPU time used since the process was invoked.
- crmpsc.FOR (7KB): create and map a global section file ( a sys$crmpsc example )
- crmpsc_pagfil.C (2KB): Create/Map a memory section to a pagefile section
- crmpsc_pagfil.H (1KB): Create/Map a memory section to a pagefile section
- csleep.FOR (1KB): Set timer and wait for SECSTR seconds.
- csleep.FPP (1KB): Set timer and wait for SECSTR seconds.
- csleep_d_float.FOR (1KB): Set timer and wait for SECSTR seconds.
- csleep_g_float.FOR (1KB): Set timer and wait for SECSTR seconds.
- csleep_ieee.FOR (1KB): Set timer and wait for SECSTR seconds.
- ctrl.H (1KB): ctrl.H
- cvtnum.C (6KB): Convenience routine to convert a string to a number.
- cvtnum.H (1KB): cvtnum.H
- dclexh.FOR (2KB): Declare standard exit-handler for image
- debug.FOR (1KB): Enter debugger
- delay.FOR (1KB): Delay for a time specified as a delta time string
- descrip.MMS (11KB): descrip.MMS
- dstrlen.FOR (1KB): strlen() in Fortran
- endianess.C (1KB): Returns 1 for little endian system, 0 for big endian
- endianess2.C (1KB): Returns 1 for little endian system, 0 for big endian
- endianess3.c (1KB): endianess3.c
- error.c (1KB): error.c
- error.h (1KB): error.h
- eu_date_to_vms.FOR (4KB): Convert date from European format to VMS format
- EXECUTE_COMMAND_LINE.FOR (2KB): Execute command line (F2008 standard) for VMS
- file_name_type.c (2KB): return name.type portion of a filespecification
- file_size.FOR (1KB): file_size returns the size of a file (blocks).
- fill_itmlst.F90 (2KB): Fill values in itemlist3
- fill_itmlst.FOR (2KB): Fill values in itemlist3
- find_file.FOR (2KB): returns next file name in a sequence of (wildcard) file searches
- find_file_c.FPP (3KB): returns next file name in a sequence of file searches: C call
- format_date-novms.for (4KB): Format date routines (EU,ISO,US,VMS)
- format_date.FOR (4KB): Format date routines (EU,ISO,US,VMS)
- fparse.FOR (6KB): Free format number conversion:
- fpp.com (1KB): fpp.com
- fpp90.com (1KB): fpp90.com
- fpp_for.com (1KB): fpp_for.com
- fs.C (1KB): convert C-string to pointer to VMS string descriptor
- fs.H (1KB): fs.H
- fsd.C (2KB): convert C-string to pointer to VMS string descriptor
- fsd.H (1KB): fsd.H
- gbl_section_ufo.FOR (3KB): Opens a file to be used as a global section
- gcml$codes.INC (1KB): gcml$codes.INC
- getbits.C (1KB): get n bits from position p
- getcml.FOR (5KB): Returns foreign DCL commandlines
- getcwd_dsc.C (1KB): get current working directory
- getenv_F.C (1KB): getenv_f: interface to CRTL getenv() for VMS string descriptors
- getjpi_logintime.FOR (1KB): Get the LOGIN time of process
- getpagesize.FOR (1KB): Returns the page size of the system.
- getprn.FOR (2KB): get process name (and ID)
- getpwnam_dsc.C (1KB): get user information via getpwnam
- getsyi_boottime.FOR (1KB): get VMS boot time
- getsyi_nodename.FOR (1KB): get VMS nodename
- get_asctime.C (1KB): get formatted time string from binary (Unix-32bit) time time.
- GET_NEW_MAIL_COUNT.FOR (2KB): GET_NEW_MAIL_COUNT.FOR
- get_token.FOR (1KB): get next token of a string
- get_vms_version.C (1KB): get_vms_version.C
- giver4.FOR (1KB): Copy argument to function value as real value
- glun.f (1KB): glun.f
- hg$get_input.C (2KB): HG$GET_INPUT provide command recall when reading from SYS$INPUT
- hg$get_input.FOR (3KB): HG$GET_INPUT provide command recall when reading from SYS$INPUT
- hg$get_input.H (1KB): hg$get_input.H
- i2bit.FOR (1KB): This subroutine gives bits I - K of IN
- i2toi4.FOR (1KB): Return short integer input argument as (long) integer,
- ignore_f_errors-alpha.FOR (3KB): A ignore all aritmetic trap condition handler
- ignore_f_errors-vax.FOR (3KB): A ignore all aritmetic trap condition handler
- inhib_msg.c (1KB): return status with inhibit error message bit set
- init_cli.C (3KB): DCL parsing of foreign command-lines
- init_cli.H (1KB): init_cli.H
- init_cli_argv.C (4KB): initialize CLI table parsing for C argv array
- init_cli_argv.H (1KB): init_cli_argv.H
- init_cli_for.FOR (3KB): DCL parsing of foreign command-lines (Fortran call)
- iostat_to_status.FOR (2KB): Converts FORTRAN IOSTAT value to a VMS condition code
- ipxfargc.FOR (1KB): Posix program argument count (and IARGC) for VMS
- ishell.FOR (1KB): SORTS N ELEMENTS OF A VECTOR X
- isleep.C (1KB): Fortram interface to CRTL sleep
- isleep.FOR (1KB): sleep seconds
- isleep.INC (1KB): isleep.INC
- isort.FOR (1KB): SORTING ROUTINE: SORT AN ARRAY OF INTEGERS IN ASCENDING ORDER
- istrue.FOR (1KB): ISTRUE - cast an expression into a logical value
- itmlst_init.H (1KB): itmlst_init.H
- julian_day.FOR (1KB): Julian day number of today in current year
- leapyear.FOR (1KB): is year a leapyear ?
- LENSTR.FOR (1KB): Position of last non-blank char in a string
- lenstr.FPP (1KB): Position of last non-blank char in a string
- lenstr0.FOR (1KB): length of zero terminated string
- lenstr2.FPP (2KB): Position of last non-blank char in a string
- libcompile.COM (7KB): compile routines in library util.olb
- limit.FOR (1KB): CLIP VALUE BETWEEN THE MINIMUM AND THE MAXIMUM
- logsysmessage.FOR (2KB): translates a system condition code into a readable text message
- make_dsc_str.C (1KB): make a descriptor for a fixed-length string
- make_test.com (1KB): make_test.com
- map_file.C (3KB): Map a file to a memory section
- move_data.C (2KB): moving data from source to destination.
- mtsense.INC (1KB): mtsense.INC
- mtutil.FOR (13KB): general tape I/O routines (logical block I/O)
- mvbits.fortran (2KB): mvbits.fortran
- myfree.C (1KB): myfree.C
- MyXtAppMainLoop.C (1KB): create local XtAppMainLoop and XtAppSetExitFlag
- numtim_to_quadtime.FOR (1KB): Convert $NUMTIM vector to VMS time quadword
- opmsg.FOR (1KB): Send message to OPCOM
- padd_zs.FOR (2KB): padds a NULL terminated character array with blanks,
- pdtoib.FOR (3KB): KONVERSION VON ASCII NACH EBCDIC UND viceversa
- permut.FOR (1KB): CALCULATES ALL PERMUTATIONS OF AN ARRAY (E1,.....EN)
- polar.FOR (1KB): CONVERTS RECTANGULAR COORDINATES (X,Y) TO POLAR (R,PHI)
- polar_to_rectangular.C (1KB): polar_to_rectangular.C
- pr.h (1KB): pr.h
- prcpid.FOR (1KB): get processID for process given by name
- print_and_delete.FOR (5KB): print a file on queue , delete after printing
- print_counted_string.C (2KB): print counted string
- print_dsc_string.C (2KB): print string passed by descriptor
- print_iostat.FOR (1KB): print fortran iostat message on sys$output
- process_scan.FOR (3KB): process_scan: sacn processes, return name,node,id,image
- pxfgetarg.FOR (1KB): Posix get commandline argument (and GETARG) for VMS
- pxfgetenv.FPP (6KB): Posix PXFGETENV, F2003 GET_ENVIRONMENT_VARIABLE for VMS Fortran
- pxfgetlogin.FOR (1KB): Posix compatible get username
- pxfrename.for (1KB): Posix call compatible RENAME for VMS
- pxfsetenv.FOR (1KB): Posix-conformant PXFSETENV for VMS Fortran
- rabadr.INC (1KB): rabadr.INC
- rectan.FOR (1KB): CONVERTS POLAR COORDINATES (R,PHI) TO RECTANGULAR (X,Y)
- replace_file_type.C (1KB): replace file-type of input filename
- resource_ctx.H (1KB): resource_ctx.H
- resource_ctx.INC (1KB): resource_ctx.INC
- resource_lock.FOR (2KB): Routines to establish a secure interlock
- resource_routines.INC (1KB): resource_routines.INC
- rot.FOR (1KB): ROTATE THE POINT (X,Y) BY THE ANGLE DRW
- rotvc.FOR (1KB): ROTATE COORDINATES (X(I),Y(I)) BY AN ANGLE DRW
- sbyte.C (1KB): swap bytes in 16bit array
- send_broadcast.FOR (3KB): broadcast a message to a user
- send_mail.FOR (6KB): sends a mail using callable mail - example
- send_mbx_message.FOR (2KB): General non-blocking write into a mailbox
- set_errno.C (1KB): set_errno.C
- set_symbol.C (1KB): lib$set_symbol for C-string call
- shell.FOR (1KB): SORTS N ELEMENTS OF A VECTOR X
- signum.f90 (1KB): signum.f90
- spawn_and_read.FOR (5KB): spawn a DCL command and return the output of the command
- spawn_nowait.C (2KB): C language interface to the VMS LIB$SPAWN run-time function
- str$lower.FOR (1KB): convert (src_string) to all lowercase characters
- stream_f.C (10KB): C stream I/O package
- stream_f.f (5KB): Fortran stream I/O package
- stream_f.fpp (8KB): Fortran stream I/O package
- stream_f.H (2KB): stream_f.H
- stream_f.INC (2KB): stream_f.INC
- stream_ff.C (1KB): the fortran interface for stream_f functions
- string_subtract.FOR (1KB): Subtract a substring from a string.
- strlen.FOR (1KB): strlen() in Fortran
- strlen.FPP (1KB): strlen() in Fortran
- submit_job.C (1KB): Submit a batch- or print-job (C call)
- swap16.c (1KB): Swap two 16bit words into a 32bit long word
- swap_b.FOR (1KB): Invert in-situ the 2 bytes in each 16-bit word of array MV, N bytes
- swap_w.FOR (1KB): Invert in-situ the 2 words in each 32-bit word of array MV, N longwords
- swap_words_c.C (1KB): int swap_words_c(lw) swaps the 2 words of a longword
- swap_words_f.FOR (1KB): integer swap_words_f(lw) swaps the 2 words of a longword
- sword.C (1KB): swap words in an array of long words
- tapuse.FOR (1KB): calculates the tape length used for a block
- termtype.C (1KB): TERMTYPE: interface to getenv(TERM)
- timbuf.inc (1KB): timbuf.inc
- timer_init.FOR (1KB): To measure the time spent in a program section,
- timevaldiff.c (1KB): timevaldiff - get difference of two timeval in msec
- time_to_tm.C (4KB): returns a given Unix binary time in an struct tm
- time_t_to_vmstime.C (2KB): Unix epoch time_t -> VMS time conversion
- time_t_to_vmstime.H (1KB): time_t_to_vmstime.H
- tm.INC (1KB): tm.INC
- tm_to_numtim.C (1KB): Convert from C tm structure to VMS $numtim vector
- ucopy.FOR (1KB): copy vector A into vector B, N storage units (4 bytes) long.
- unquote.FOR (1KB): remove quotes () around strings
- username.FOR (1KB): get my user name
- usropn.FOR (1KB): Example program how to use USEROPEN in Fortran to return the files channel
- uzero.FOR (1KB): Zero elements A(I1) to A(I2) of vector A
- vaxutil.H (1KB): vaxutil.H
- vmstime_to_time_t.C (2KB): VMS time -> unix time_t conversion
- vmstime_to_time_t.H (1KB): vmstime_to_time_t.H
- vmstime_to_time_t_q.C (2KB): VMS time -> unix time_t conversion
- vms_getpid.FOR (1KB): get my process ID
- vms_pagesize.COM (1KB): Make the system-/arch-specific vms_pagesize.for
- vms_pagesize.h (1KB): vms_pagesize.h
- vms_pagesize.inc (1KB): vms_pagesize.inc
- vms_vers.H (1KB): vms_vers.H
- vxinvb.C (1KB): vxinvb.C
- vxinvb.FOR (1KB): VXINVB(array,N) inverts endianess of integer*4 array
- wcopy.FOR (1KB): copy array A into array B , N words (*16 bits)
- xtappmainloop.C (1KB): create local XtAppMainLoop and XtAppSetExitFlag
Other files
- $EFNDEF.VMS6_2 (1KB):
- $ILEDEF.VAX (1KB):
More directories:
- COM/ [HUBER.util.COM]
- HLP/ UTIL.OLB
- main/ VMS Utility Programs
- tests/ [HUBER.util.tests]
- 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