home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
- From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
- Newsgroups: comp.os.vms
- Subject: Re: Can DCL programs execute 'other' commands ?
- Date: 25 Jan 1993 01:29:27 GMT
- Organization: HST Wide Field/Planetary Camera
- Lines: 42
- Distribution: world
- Message-ID: <1jvfpnINNjtu@gap.caltech.edu>
- References: <01GTUMJYR28G8Y6FL7@JCSVAX1.BITNET>
- Reply-To: carl@SOL1.GPS.CALTECH.EDU
- NNTP-Posting-Host: sol1.gps.caltech.edu
-
- In article <01GTUMJYR28G8Y6FL7@JCSVAX1.BITNET>, HANY@JCSVAX1.BITNET writes:
- > I am new to writing DCL programs. I tried to make a program
- >execute commands other than those issued at the '$' prompt, but just
- >couldn't figure out how to do it. For example .. What would be the code
- >for a program that would read 2 mail messages, then return back to the
- >'$' ? .. The following did NOT work :
- >
- >$ mail
- >$ read 1
- >$ read 2
- >$ exit
-
- You put $ signs only at the beginnings of DCL commands, not in front of lines
- which are data for an image. In your case, you want:
- $ MAIL
- READ 1
- READ 2
- EXIT
- If you need to provide data in which one or more records start with a $, you
- need to use the DECK command (see the on-line help for details) just after the
- command that invokes the image, and the EOD command (see the on-line help for
- details) to terminate the data stream for the program. For example, if you
- have an executable, FUBAR.EXE, and you want to provide the following data to
- it:
- $SPAM
- SPAM
- WHATEVER
- you'd use:
- $ RUN FUBAR
- $ DECK
- $SPAM
- SPAM
- WHATEVER
- $ EOD
- --------------------------------------------------------------------------------
- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
-
- Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
- understanding of astronomy is purely at the amateur level (or below). So
- unless what I'm saying is directly related to VAX/VMS, don't hold me or my
- organization responsible for it. If it IS related to VAX/VMS, you can try to
- hold me responsible for it, but my organization had nothing to do with it.
-