- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Batch Job Prompts - Novice Question
Operating System - OpenVMS
1754194
Members
4315
Online
108811
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО02-18-2008 04:36 AM
тАО02-18-2008 04:36 AM
Re: Batch Job Prompts - Novice Question
Hi Folks,
Thanks for all the responses - I got a lot more knowledge out of that......
Here is an example of the code from a batch job that call a DCL 'MM$LOAD:LOAD' routine that requires responses. I have commented out the prompts from the script :-
$ @mm$load:load
$! SCHEMA?
mandb
$! VERSION (Vn.n)?
11.4
$! AREA?
0
$! DATABASE DEVICE AND DIRECTORY?
dra2:[manman.mandb100]
$! FILENAME TO LOAD FROM?
mm$load:man0x0unl.dat
$!
Hope that helps clarify what we are trying to do - I'll try a few of the suggestions now.
Tony.
Thanks for all the responses - I got a lot more knowledge out of that......
Here is an example of the code from a batch job that call a DCL 'MM$LOAD:LOAD' routine that requires responses. I have commented out the prompts from the script :-
$ @mm$load:load
$! SCHEMA?
mandb
$! VERSION (Vn.n)?
11.4
$! AREA?
0
$! DATABASE DEVICE AND DIRECTORY?
dra2:[manman.mandb100]
$! FILENAME TO LOAD FROM?
mm$load:man0x0unl.dat
$!
Hope that helps clarify what we are trying to do - I'll try a few of the suggestions now.
Tony.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2008 05:37 AM
тАО02-18-2008 05:37 AM
Re: Batch Job Prompts - Novice Question
Looking at this, my first inclination would be to modify the batch job to be;
$ @mm$load:load
mandb
11.4
0
dra2:[manman.mandb100]
mm$load:man0x0unl.dat
$!
Tell me that you tried this!
Dave
(and for that matter, any other options you tried)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2008 06:00 AM
тАО02-18-2008 06:00 AM
Re: Batch Job Prompts - Novice Question
Tony,
$ SUBMIT mm$load:load -
/Params=("mandb","11.4","0","dra2:[manman.mandb100]","mm$load:man0x0unl.dat")
... and modify LOAD.COM such, that if P1 through P5 are ,nes, "", then do NOT ask that question, but inset the valu.
PS. As an aside: you abstracted mm$load to be wherever the logical name points.
_DO_ put in the effort to do similar for [manman.mandb100].
If you EVER upgrade you disk subsystem (or move to another computer), changing a few LNMs is SOOOO much easier and leass error-prone than finding and replacing EVERY disk reference!
hth
Proost.
Have one on me.
jpe
$ SUBMIT mm$load:load -
/Params=("mandb","11.4","0","dra2:[manman.mandb100]","mm$load:man0x0unl.dat")
... and modify LOAD.COM such, that if P1 through P5 are ,nes, "", then do NOT ask that question, but inset the valu.
PS. As an aside: you abstracted mm$load to be wherever the logical name points.
_DO_ put in the effort to do similar for [manman.mandb100].
If you EVER upgrade you disk subsystem (or move to another computer), changing a few LNMs is SOOOO much easier and leass error-prone than finding and replacing EVERY disk reference!
hth
Proost.
Have one on me.
jpe
Don't rust yours pelled jacker to fine doll missed aches.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2008 12:39 PM
тАО02-18-2008 12:39 PM
Re: Batch Job Prompts - Novice Question
Tony,
You still did not tell us how MM$LOAD.COM obtains the input.
READ or INQUIRE?
SYS$INPUT or SYS$COMMAND?
The solution I mentioned earlier, and which was essentially repeated by the Brit, works in batch but does not work both interactively as well as in batch.
Maybe I'm having a bad day and overlooking something simple but it is actually tricky to feed an inner command file data provided by the outter.... interactively.
The thing is that normally a such inner script would read the data from the command file itself, not from 'one level up'.
I ended up needing a pipe to do this interactively
------ test.com ----
$create tmp.tmp
yessirreee
aap
noot
mies
teun
$!does not work: $ pipe @inner < tmp.tmp
$!works
$pipe type tmp.tmp | @inner
$delete tmp.tmp.*
$ exit
$! ------ inner.com --------
$ show logical sys$input
$ show logical sys$command
$ old = ""
$loop:
$ inquire answer "answers"
$ ! yikes
$ write sys$output "The answer was: ", answer
$ if answer.eqs.old then exit 40
$ old = answer
$ goto loop
$done:
$exit '$status
$ type outer_pipe.log
:
"SYS$INPUT" = "_EISNER$DRA3:" (LNM$PROCESS_TABLE)
"SYS$COMMAND" = "_EISNER$MPA682:" (LNM$PROCESS_TABLE)
The answer was: YESSIRREEE
The answer was: AAP
The answer was: NOOT
The answer was: MIES
The answer was: TEUN
The answer was:
The answer was:
%SYSTEM-W-ABORT, abort
HEIN job terminated at 18-FEB-2008 14:16:58.80
This will work fine for an exact match of input data lines and inquiry commands, but here in the loop it shows something I find odd. At the end of the data, there is no EOF raised, just a blank lined returned.
This seems broken to me (Alpha 8.3).
Here is the reason I asked for the exact input method. If I make a seemingly trivial change in the inner.com from "inquery" to "read/prompt sys$input" and try we get:
$! ---- inner.com with read instead of inquire ----
$ show logical sys$input
$ show logical sys$command
$ old = ""
$loop:
$ read sys$input /prompt="answers" answer
$ ! yikes
$ write sys$output "The answer was: ", answer
$ if answer.eqs.old then exit 40
$ old = answer
$ goto loop
$done:
$exit '$status
$ typ outer.log
:
"SYS$INPUT" = "_EISNER$DRA3:" (LNM$PROCESS_TABLE)
"SYS$COMMAND" = "_EISNER$DRA3:" (LNM$PROCESS_TABLE)
The answer was: $ ! yikes
The answer was: $ ! yikes
%SYSTEM-W-ABORT, abort
Now change the sys$input to sys$command, and the result becomes:
The answer was: mies
The answer was: teun
The answer was: $exit
%RMS-E-EOF, end of file detected
So I got the data, and I got the EOF, but I also got a line starting with $. We (me!) would hope that any $ line would terminate the data lines (unless $DECK/DOLLARS is in effect.)
Hope this did not confuse too much!
Enjoy!
Hein.
You still did not tell us how MM$LOAD.COM obtains the input.
READ or INQUIRE?
SYS$INPUT or SYS$COMMAND?
The solution I mentioned earlier, and which was essentially repeated by the Brit, works in batch but does not work both interactively as well as in batch.
Maybe I'm having a bad day and overlooking something simple but it is actually tricky to feed an inner command file data provided by the outter.... interactively.
The thing is that normally a such inner script would read the data from the command file itself, not from 'one level up'.
I ended up needing a pipe to do this interactively
------ test.com ----
$create tmp.tmp
yessirreee
aap
noot
mies
teun
$!does not work: $ pipe @inner < tmp.tmp
$!works
$pipe type tmp.tmp | @inner
$delete tmp.tmp.*
$ exit
$! ------ inner.com --------
$ show logical sys$input
$ show logical sys$command
$ old = ""
$loop:
$ inquire answer "answers"
$ ! yikes
$ write sys$output "The answer was: ", answer
$ if answer.eqs.old then exit 40
$ old = answer
$ goto loop
$done:
$exit '$status
$ type outer_pipe.log
:
"SYS$INPUT" = "_EISNER$DRA3:" (LNM$PROCESS_TABLE)
"SYS$COMMAND" = "_EISNER$MPA682:" (LNM$PROCESS_TABLE)
The answer was: YESSIRREEE
The answer was: AAP
The answer was: NOOT
The answer was: MIES
The answer was: TEUN
The answer was:
The answer was:
%SYSTEM-W-ABORT, abort
HEIN job terminated at 18-FEB-2008 14:16:58.80
This will work fine for an exact match of input data lines and inquiry commands, but here in the loop it shows something I find odd. At the end of the data, there is no EOF raised, just a blank lined returned.
This seems broken to me (Alpha 8.3).
Here is the reason I asked for the exact input method. If I make a seemingly trivial change in the inner.com from "inquery" to "read/prompt sys$input" and try we get:
$! ---- inner.com with read instead of inquire ----
$ show logical sys$input
$ show logical sys$command
$ old = ""
$loop:
$ read sys$input /prompt="answers" answer
$ ! yikes
$ write sys$output "The answer was: ", answer
$ if answer.eqs.old then exit 40
$ old = answer
$ goto loop
$done:
$exit '$status
$ typ outer.log
:
"SYS$INPUT" = "_EISNER$DRA3:" (LNM$PROCESS_TABLE)
"SYS$COMMAND" = "_EISNER$DRA3:" (LNM$PROCESS_TABLE)
The answer was: $ ! yikes
The answer was: $ ! yikes
%SYSTEM-W-ABORT, abort
Now change the sys$input to sys$command, and the result becomes:
The answer was: mies
The answer was: teun
The answer was: $exit
%RMS-E-EOF, end of file detected
So I got the data, and I got the EOF, but I also got a line starting with $. We (me!) would hope that any $ line would terminate the data lines (unless $DECK/DOLLARS is in effect.)
Hope this did not confuse too much!
Enjoy!
Hein.
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP