Re: MIME - scripting and symbol substitutions
- From: David J Dachtera <djesys.no@xxxxxxxxxxxxxxxx>
- Date: Wed, 07 Feb 2007 20:46:31 -0600
mabbuttg@xxxxxxxx wrote:
Hi, I'm adding mail functionality to a script using MIME and MAIL.
This script is creating a text file with a different filename
everytime (time/date embedded in the filename), and attempting to mail
that script as an attachment. The constructed filename is stored in a
symbol called NEWFILENAME (which works, as the script generates the
file and manipulates it using that symbol) .
However, when the script invokes MIME, I can't seem to get the symbol
substitution to work with the filename when specifying "new" or "add"
- it keeps coming back with "invalid file name - respecify". I've
also tried it outside of the script, with the same results.
Inside of MIME, the syntax I've tried is:
- NEW 'NEWFILENAME'
- NEW 'NEWFILENAME
- NEW ''NEWFILENAME
Variations on this theme work in DCL scripts proper (and elsewhere in
this script itself), so at this point am I correct in assuming symbol
substitution doesn't work at all inside of the MIME interpreter? Do I
just have the syntax wrong?
I can't find many further details from HELP, and everything I've tried
so far hasn't worked, so is there an undocumented way to maybe invoke
MIME from the command line with all options (so normal DCL
substitutions will work)? Any other ideas/tricks I can try here
(writing a temp file with the commands substituted and redefining SYS
$INPUT for instance? Giving up on MIME and constructing a file for use
with SMTP_SFF)?
This is running on VMS 7.3-1 Alpha.
Thanks in advance.
PIPE is your friend:
$ PIPE -
(write sys$output "new ", filename ; -
write sys$output "save") | -
mc mime
That is, use WRITE SYS$OUTPUT statements to create the command stream
within the pipeline. That allows the use of symbols and other
constructs. When MIME is invoked in the second pipeline segment, SYS
$INPUT should be pointing to SYS$PIPE (the data flowing in through the
pipeline from the output of the previous segment).
Hope this helps.
--
David J Dachtera
dba DJE Systems
http://www.djesys.com/
Unofficial OpenVMS Marketing Home Page
http://www.djesys.com/vms/market/
Unofficial Affordable OpenVMS Home Page:
http://www.djesys.com/vms/soho/
Unofficial OpenVMS-IA32 Home Page:
http://www.djesys.com/vms/ia32/
Unofficial OpenVMS Hobbyist Support Page:
http://www.djesys.com/vms/support/
.
- References:
- MIME - scripting and symbol substitutions
- From: mabbuttg
- MIME - scripting and symbol substitutions
- Prev by Date: Re: Help configuring VMS mail with Dynaccess.com
- Next by Date: Re: SPANNING BACKUP TAPES
- Previous by thread: Re: MIME - scripting and symbol substitutions
- Next by thread: FYI: Blu-Ray disc as an bootdevice for a Itanium & Alpha (XP1000)
- Index(es):