1 |
|
---|
2 | Compiling GAWK on VMS:
|
---|
3 |
|
---|
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
|
---|
7 | |$ @[.VMS]VMSBUILD.COM
|
---|
8 | or
|
---|
9 | |$ MMS/DECRIPTION=[.VMS]DECSRIP.MMS GAWK
|
---|
10 |
|
---|
11 | DEC C -- use either vmsbuild.com or descrip.mms as is.
|
---|
12 | VAX C -- use `@vmsbuild VAXC' or `MMS/MACRO=("VAXC")'. On a system
|
---|
13 | with both VAX C and DEC C installed where DEC C is the default,
|
---|
14 | use `MMS/MACRO=("VAXC","CC=CC/VAXC")' for the MMS variant; for
|
---|
15 | the vmsbuild.com variant, any need for `/VAXC' will be detected
|
---|
16 | automatically.
|
---|
17 | GNU C -- use `@vmsbuild GNUC' or `MMS/MACRO=("GNUC")'. On a system
|
---|
18 | where the GCC command is not already defined, use either
|
---|
19 | `@vmsbuild GNUC DO_GNUC_SETUP' or
|
---|
20 | `MMS/MACRO=("GNUC","DO_GNUC_SETUP")'.
|
---|
21 |
|
---|
22 | Tested under Alpha/VMS V7.1 using DEC C V6.4. GAWK should work
|
---|
23 | without modifications for VMS V4.6 and up.
|
---|
24 |
|
---|
25 |
|
---|
26 | Installing GAWK on VMS:
|
---|
27 |
|
---|
28 | All that's needed is a 'foreign' command, which is a DCL symbol
|
---|
29 | whose value begins with a dollar sign.
|
---|
30 | |$ GAWK :== $device:[directory]GAWK
|
---|
31 | (Substitute the actual location of gawk.exe for 'device:[directory]'.)
|
---|
32 | That symbol should be placed in the user's login.com or in the system-
|
---|
33 | wide sylogin.com procedure so that it will be defined every time the
|
---|
34 | user logs on.
|
---|
35 |
|
---|
36 | Optionally, the help entry can be loaded into a VMS help library.
|
---|
37 | |$ LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP
|
---|
38 | (You may want to substitute a site-specific help library rather than
|
---|
39 | the standard VMS library 'HELPLIB'.) After loading the help text,
|
---|
40 | |$ HELP GAWK
|
---|
41 | will provide information about both the gawk implementation and the
|
---|
42 | awk programming language.
|
---|
43 |
|
---|
44 | The logical name AWK_LIBRARY can designate a default location
|
---|
45 | for awk program files. For the '-f' option, if the specified filename
|
---|
46 | has no device or directory path information in it, Gawk will look in
|
---|
47 | the current directory first, then in the directory specified by the
|
---|
48 | translation of AWK_LIBRARY if it the file wasn't found. If the file
|
---|
49 | still isn't found, then ".awk" will be appended and the file access
|
---|
50 | will be re-tried. If AWK_LIBRARY is not defined, that portion of the
|
---|
51 | file search will fail benignly.
|
---|
52 |
|
---|
53 |
|
---|
54 | Running GAWK on VMS:
|
---|
55 |
|
---|
56 | Command line parsing and quoting conventions are significantly
|
---|
57 | different on VMS, so examples in _The_GAWK_Manual_ or the awk book
|
---|
58 | often need minor changes. They *are* minor though, and all the awk
|
---|
59 | programs should run correctly.
|
---|
60 |
|
---|
61 | Here are a couple of trivial tests:
|
---|
62 | |$ gawk -- "BEGIN {print ""Hello, World!""}"
|
---|
63 | |$ gawk -"W" version !could also be -"W version" or "-W version"
|
---|
64 | Note that upper- and mixed-case text must be quoted.
|
---|
65 |
|
---|
66 | The VMS port of Gawk includes a DCL-style interface in addition
|
---|
67 | to the original shell-style interface. See the help entry for details.
|
---|
68 | One side-effect of dual command line parsing is that if there's only a
|
---|
69 | single parameter (as in the quoted string program above), the command
|
---|
70 | becomes ambiguous. To work-around this, the normally optional "--"
|
---|
71 | flag is required to force shell rather than DCL parsing. If any other
|
---|
72 | dash-type options (or multiple parameters such as data files to be
|
---|
73 | processed) are present, there is no ambiguity and "--" can be omitted.
|
---|
74 |
|
---|
75 | The logical name AWKPATH can be used to override the default
|
---|
76 | search path of "SYS$DISK:[],AWK_LIBRARY:" when looking for awk program
|
---|
77 | files specified by the '-f' option. The format of AWKPATH is a comma-
|
---|
78 | separated list of directory specifications. When defining it, the
|
---|
79 | value should be quoted so that it retains a single translation, not a
|
---|
80 | multi-translation RMS searchlist.
|
---|
81 |
|
---|