You should have the logical name DASH$LIBRARY defined. This is defined with DCL by @disk:[xxx.DASH]DASH_SETUP. You will need to know where DASH is installed on your computer to specify ``disk'' and ``xxx''. DASH_SETUP also creates a symbol called DASHLINK that you use to link your program.
Specify your modules for linking in a options file. This is a standard VMS feature, but perhaps you have not used it before. An options file is simply a list of files, just as they might follow a link command:
$ LINK MYPROGRAM, MYSUBROUTINE, - USEFUL_SUB, UTILITY$LIBRARY:UTILITY/LIBThis is the same as:
$ LINK MYPROGRAM,MY_OPTFILE/OPT
if the file MY_OPTFILE.OPT consists of:
MYSUBROUTINE, - USEFUL_SUB, UTILITY$LIBRARY:UTILITY/LIB
Now that you understand options files, make one that lists your declaration subroutine and your module and any other modules you intend to use. You actually link with the command:
$ DASHLINK <program-name> <options-file>
By convention, the name of the options-file should be the same as your program-name (see also how to name DASH_DECL- these are merely suggestions for bookkeeping). DASHLINK will link to the CERN libraries PACKLIB and KERNLIB for you. A perfectly acceptable alternative is for you to copy DASHLINK.COM to your area and use it as a template. You can put all the link directives into your own command (.COM) file.