From:	SMTP%"SACKETT@Best.CMH.ON.CA"  8-FEB-1995 13:30:34.59
To:	EVERHART
CC:	
Subj:	Passing /SWITCHES through DCL to VMS verbs

From: "Andrew Sackett, Information Services X 5150" <SACKETT@Best.CMH.ON.CA>
X-Newsgroups: comp.os.vms
Subject: Passing /SWITCHES through DCL to VMS verbs
Message-ID: <01HMT3YQOGQQ8WW29V@Best.CMH.ON.CA>
Date: Wed, 08 Feb 1995 13:25:55 -0500 (EST)
Organization: Info-Vax<==>Comp.Os.Vms Gateway
X-Gateway-Source-Info: Mailing List
Lines: 48
To: Info-VAX@Mvb.Saic.Com

Michael,

Yes, you can pass /SWITCHES through a command procedure to a VMS entity, and
make it look like a VMS command.

The trick (which I learned from this list a few years ago) is to define a
symbol that calls your DCL jacket.  But in your symbol definition, you force
the first parameter to be NULL.

Thus,

$	CMHMMS		:== "@DEV_UTILITY:CMHMMS.COM """""

Yes, all the quotes are necessary.  

This allows me to write a DCL shell around the DEC MMS product.  I can pass
MMS-looking switches to MMS without needing to remember how to make it work
properly.

The user types:

	$ CMHMMS/CMS/LOG target

But when DCL gets it, it gets broken down like this:

	$ CMHMMS/CMS/LOG target
becomes	$ @DEV_UTILITY:CMHMMS.COM "" /CMS/LOG TARGET

Note that CMHMM.COM has to ignore P1 because it will always be blank.  The
/switches which appear on the command line to be in P1's spot actually are
interpreted and passed by DCL as P2, and the target name by P3.

I don't think there's anything wrong with the following, either:

	$ CMHMMS/CMS /LOG /MACRO=(DEBUG) target /DESCRIP=prj_dir:descrip.mms
becomes	$ CHMMMS "" /CMS /LOG /MACRO=(DEBUG) TARGET /DESCRIP=PRJ_DIR:DSCRIP.MMS

As long as the DCL shell knows to check every parameter for the tell-tail '/'
character.

Hope this helps

Andrew
Andrew B. Sackett		Voice: (905) 521-9800 Ext. 5150	 
Information Services      	  Net: SACKETT@IHIS.CMH.ON.CA
Chedoke McMaster Hospitals
Hamilton, Ontario            I speak only for myself.  I don't know anybody
Canada                       else well enough to speak for them.
