From: jeh@cmkrnl.com
Newsgroups: comp.os.vms
Subject: Re: Maximum number of parameters in a link command
Date: 13 Oct 92 19:14:48 GMT
Organization: Kernel Mode Consulting, San Diego, CA

In article <1992Oct12.095017.221@rlgsc.com>, gezelter@rlgsc.com writes:
> In article <1992Sep15.104700.25251@hp9000.csc.cuhk.hk>, a006700@hp9000.csc.cuhk.hk (Tang Sammy) writes:
>> In trying to link a numbers of objs with VMS5.3-1, I get this from
>> the DCL : 
>> 
>> $ link /map=ilpd /full /trace/nodebug/exec=$@ lpd.obj,-
>> 	 config.obj,-
>> 	 util.obj,-
>> 	 cmd.obj,-
>> 	 rcvjob.obj,-
>> 	 showjob.obj,-
>> 	 deljob.obj,-
>> 	 sndjbc.obj,-
>> 	 getqui.obj,-
>> 	 llist.obj,-
>> %DCL-W-DEFOVF, too many command procedure parameters - limit to eight
>> 	 baseline.obj,-
>>  inet.obj, lpd/opt, sys$library:ucx$ipc/lib
>> 
>> It seems that DCL has a preset limit on the number of parameters in
>> a DCL command. If it's true, can I adjust it to fit my need?
>> 
>> Anybody has any ideas about this and solutions to avoid the error ?
>> 
>> Thanks in advance.
>> 
>> rgds
> -- 
> Mr. Tang,
>  
> The solution to your problem is two-fold. First, do not put 
> spaces between each set of options. Second, either use the 
> default input stream (sys$input) or a separate link options file
> to include all of the object files. 
>  
> Following these suggestions, your command would be:
>  
> $ link/map=ilpd/full/trace/nodebug/exec=$@ sys$input/option
> lpd.obj,-
> config.obj,-
> util.obj,-
> cmd.obj,-
> rcvjob.obj,-
> showjob.obj,-
> deljob.obj,-
> sndjbc.obj,-
> getqui.obj,-
> llist.obj,-
> baseline.obj,-
> inet.obj, lpd/opt, sys$library:ucx$ipc/lib
>  
> The above should work (I hope that I did not make a typo when 
> editing it).
> [...]
> +--------------------------------------------------------------------------+
> | Robert "Bob" Gezelter                       E-Mail:  gezelter@rlgsc.com  |
> | Robert Gezelter Software Consultant         Voice:   +1 718 463 1079     |
> | 35-20 167th Street, Suite 215               Fax:       (on Request)      |
> | Flushing, New York  11358-1731                                           |
> | United States of America                                                 |
> +--------------------------------------------------------------------------+

No.  No.  No.

The problem here is the "$@" in the LINK command.  This LINK command is 
obviously supposed to be part of a 'makefile', or MMS description file, wherein
"$@" is a macro expanding to the name of the target file. 

The "too many command procedure parameters" message is a red herring.  The
"@" in the command line is causing DCL to assume that a "command procedure" is 
being read to provide the files to be input to LINK (a little-known feature
of DCL) and that the subsequent items are parameters to be passed to it (an
even lesser-known feature). 

If the LINK command shown here is put inside a makefile or an MMS description
file, and make or MMS is used to interpret it, it will work fine just as it
is; the spaces between the object file names are not significant.  

Witness:

$ link /exec=$@ a, b, c, d, e, f, g, h, i
%DCL-W-DEFOVF, too many command procedure parameters - limit to eight
$ link /exec=foo a, b, c, d, e, f, g, h, i
%LINK-F-OPENIN, error opening SYS$SYSDEVICE:[JEH]A.OBJ; as input
-RMS-E-FNF, file not found

	--- Jamie Hanrahan, Kernel Mode Consulting, San Diego CA
uucp 'g' protocol guru and release coordinator, VMSnet (DECUS uucp) W.G., and 
Chair, VMS Programming and Internals Working Group, U.S. DECUS VAX Systems SIG 
Internet:  jeh@cmkrnl.com, hanrahan@eisner.decus.org, or jeh@crash.cts.com
Uucp:  ...{crash,eisner,uunet}!cmkrnl!jeh
Newsgroups: comp.os.vms,vmsnet.misc