4
There's a DCL command procedure that will issue all the necessary
5
CC and LINK commands, and there's also a Makefile for use with the MMS
6
utility. From the source directory, use either
9
|$ MMS/DECRIPTION=[.VMS]DECSRIP.MMS GAWK
11
VAX C V3.x -- use either vmsbuild.com or descrip.mms as is. These use
12
CC/OPTIMIZE=NOLINE, which is essential for version 3.0.
13
VAX C V2.x -- (version 2.3 or 2.4; older ones won't work); edit either
14
vmsbuild.com or descrip.mms according to the comments in them.
15
For vmsbuild.com, this just entails removing two '!' delimiters.
16
Also edit config.h (which is a copy of file [.config]vms-conf.h)
17
and comment out or delete the two lines ``#define __STDC__ 0''
18
and ``#define VAXC_BUILTINS'' near the end.
19
GNU C -- edit vmsbuild.com or descrip.mms; the changes are different
20
from those for VAX C V2.x, but equally straightforward. No
21
changes to config.h should be needed.
23
Tested under VMS V5.3 and V5.4-2 using VAX C V3.2, V3.1, and V2.3
24
and also GNU C V1.39. Should work without modifications for VMS V4.6
28
Installing GAWK on VMS:
30
All that's needed is a 'foreign' command, which is a DCL symbol
31
whose value begins with a dollar sign.
32
|$ GAWK :== $device:[directory]GAWK
33
(Substitute the actual location of gawk.exe for 'device:[directory]'.)
34
That symbol should be placed in the user's login.com or in the system-
35
wide sylogin.com procedure so that it will be defined every time the
38
Optionally, the help entry can be loaded into a VMS help library.
39
|$ LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP
40
(You may want to substitute a site-specific help library rather than
41
the standard VMS library 'HELPLIB'.) After loading the help text,
43
will provide information about both the gawk implementation and the
44
awk programming language.
46
The logical name AWK_LIBRARY can designate a default location
47
for awk program files. For the '-f' option, if the specified filename
48
has no device or directory path information in it, Gawk will look in
49
the current directory first, then in the directory specified by the
50
translation of AWK_LIBRARY if it the file wasn't found. If the file
51
still isn't found, then ".awk" will be appended and the file access
52
will be re-tried. If AWK_LIBRARY is not defined, that portion of the
53
file search will fail benignly.
58
Command line parsing and quoting conventions are significantly
59
different on VMS, so examples in _The_GAWK_Manual_ or the awk book
60
often need minor changes. They *are* minor though, and all the awk
61
programs should run correctly.
63
Here are a couple of trivial tests:
64
|$ gawk -- "BEGIN {print ""Hello, World!""}"
65
|$ gawk -"W" version !could also be -"W version" or "-W version"
66
Note that upper- and mixed-case text must be quoted.
68
The VMS port of Gawk includes a DCL-style interface in addition
69
to the original shell-style interface. See the help entry for details.
70
One side-effect of dual command line parsing is that if there's only a
71
single parameter (as in the quoted string program above), the command
72
becomes ambiguous. To work-around this, the normally optional "--"
73
flag is required to force shell rather than DCL parsing. If any other
74
dash-type options (or multiple parameters such as data files to be
75
processed) are present, there is no ambiguity and "--" can be omitted.
77
The logical name AWKPATH can be used to override the default
78
search path of "SYS$DISK:[],AWK_LIBRARY:" when looking for awk program
79
files specified by the '-f' option. The format of AWKPATH is a comma-
80
separated list of directory specifications. When defining it, the
81
value should be quoted so that it retains a single translation, not a
82
multi-translation RMS searchlist.