- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- run a file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 08:35 PM
тАО09-20-2004 08:35 PM
How can I make a file that automatically runs the command mmi after that Choices predefined.
Choices needs to press return to be excecuted.
See below:
{MMI
1
1
35569222
etc.. }
BEP1->mmi ! Is a command
1: DECnet connections
2: X25 connections
3: TCP/IP connections
99: Return
Choice: 1
Calling smsc_r_api_init() at 21-SEP-2004 10:16:34.53
smsc_r_api_init() returned status of 1 and error code of 0 at 21-SEP-2004 10:16:34.54
1: Send submit SM
2: Send replace SM
3: Send delete SM
4: Send delete all SMs
5: Send cancel status report request
6: Send alert SME request
7: Send retrieve request
19: Send update SM
20: Send ext submit SM
99: Return
Choice: 1
Input MSISDN: 35569
etc..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 09:01 PM
тАО09-20-2004 09:01 PM
Re: run a file
Otherwise I'm confused about whatyou are trying to do.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 09:15 PM
тАО09-20-2004 09:15 PM
Re: run a file
if MMI read from standard input you can:
$ TYPE SYS$INPUT /OUT=MMI.COM
$ MMI="$
$ MMI
1
1
35569222
$ @MMI.COM
1.st line give you write a file from standard input (keyboard) until you press
2.nd line define a command that runs your executable
3.th line run your executable with standard input redirect from command file; all lines until $ (dollar) are the standard input for your file.
H.T.H.
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 10:34 PM
тАО09-20-2004 10:34 PM
Re: run a file
attached I have send a file that explain what i intend to do. Just that entered choices to excecute automatically when file.com is excecuted. See attached file:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 10:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2004 12:23 AM
тАО09-21-2004 12:23 AM
Re: run a file
Antonio's answer will work just fine, if you activate it interactively.
But, What is the real gain over just running interactively?
If you want to run it unattended, just
vreat the file MMI.com:
$! MMI.COM; Run MMI with fixed input:
$ MMI="$
$ MMI
1
1
35569222
n
0
n
94222
n
4
0
0
And any time you need it @
(btw, Antonio: I stick to your example, but I HATE Billywhere terminology! Please next time call a directory
If my guess about the problem you are trying to solve, part of your input is somehow coming from another application, and you want to feed THAT into MMI??
In that case, you probably have that value in some symbol, say "eightdigits" = "35569222"
Now, you can write a temporary file. Starting from VMS 7.3-2, you can use F$UNIQUE, but getting your own processes' PID or the current date-time are also usual.
.
.
$ open/write mmifi
$ write mmifi "$ MMI:=$
$ write mmifi "$ MMI"
$ write mmifi "1"
$ write mmifi "1"
vvvvvvvvvvv
$ write mmifi eightdigits
^^^^^^^^^^^
$ write mmifi "n"
.
etc
.
.
$ close mmifi
$ @
$ delete sys$scratch:mmifi.'unique';*
Please note that the one line between vvv & ^^^ does NOT have the quotes, it writes the VALUE of eightdigits into the file.
hth
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2004 08:07 PM
тАО09-21-2004 08:07 PM
Re: run a file
you need to use parameters! When you run a DCL command file, VMS automatically passes the first 8 parameters into variables P1 to P8.
Your code would look something like this :-
ACTION = P1
OPTION = P2
VALUE = P3
IF ACTION .EQS. "1" THEN GOTO DECNET
......
DECNET:
IF OPTION .EQS. "1" .AND. VALUE .EQS. "35569222" THEN do_something
You can then think about replacing numbers with proper names to make it more user friendly, i.e.
$ MMI DECNET SUBMIT_SM 35569222
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2004 10:09 PM
тАО09-21-2004 10:09 PM
Re: run a file
IF OPTION .EQS. "1" .AND. VALUE .EQS. "35569222" THEN do_something
you are assuming that VALUE can have only a very limited number of values. That might be the case, and than you can do with that number of "do_somethings"'s.
In the case where VALUE might have much more different values, or perhaps is determined only at run time, then your "do_something" would have to be something very much in the line of my procedure above.
Remember, parameter substitution is only done in command lines (lines beginning with "$" ), so if you want to feed parameters into data lines, you will HAVE to go the way around, and fill in the value of the parameter in a command line that is used in building a temporary procedure in which it is hardcoded; to be executed and discarded.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2004 10:34 PM
тАО09-21-2004 10:34 PM
Re: run a file
I was simply trying to show Taulant how to pass parameters to a DCL command file, which appears to me what his problem is.
If I've misunderstood his problem, then I apologise.
Robert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2004 10:55 PM
тАО09-21-2004 10:55 PM
Re: run a file
Jan