- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Batch Job Prompts - Novice Question
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
тАО02-16-2008 04:47 AM
тАО02-16-2008 04:47 AM
Batch Job Prompts - Novice Question
When submitting a batch job that includes a call to another DCL routine that needs operator responses (i.e. Y or N to proceed)the batch job hangs as it doedn't recognise the input I have built into the routine.
I know that there is a command that will let me do this but I cannot find it anywhere in help or my user guide.
Thanks and apologies for asking 'eediot' questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 06:51 AM
тАО02-16-2008 06:51 AM
Re: Batch Job Prompts - Novice Question
A system operator (REPLY /ENABLE, et al) can then use REPLY /TO=n to complete the prompt operation (or REPLY /ABORT), where n is the number of the request that was generated by REQUEST /REPLY
The underlying sys$sndopr system service mechanism has additional features (it can get a string back from the operator; see what BACKUP does in this area by using that), but these strings have not been propagated up to DCL and passed back via symbol AFAIK. (A little compiled code could make your own REQUEST /REPLY image using sys$sndopr and lib$set_symbol; that wouldn't be more than an hour of coding and testing time at the outside.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 08:33 AM
тАО02-16-2008 08:33 AM
Re: Batch Job Prompts - Novice Question
The answer depends a little on the method used to trigger the response and whether you want a live response or not.
Hoff addressed the case of a real answer being needed.
I suspect you are dealing with a simple setup where a fixed "yes" is all that is needed. For that you might just be able to follow the call to nested procure by a data line. You might need to diddle th logical names for SYS$INPUT.
Here is something silly which works for me...
$ create outer_test.com
$ @inner_test.com
yessirreee
$ exit
^Z
$ create inner_test.com
$ inquire answer "Yes or no"
$ write sys$output "The answer was: ", answer
$exit
^Z
$ subm outer_test.com
Job OUTER_TEST (queue SYS$BATCH, entry 71) started on SYS$BATCH
$ typ outer_test.log
The answer was: YESSIRREEE
HEIN job terminated at 16-FEB-2008 10:29:04.37
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 08:39 AM
тАО02-16-2008 08:39 AM
Re: Batch Job Prompts - Novice Question
Hoff and Hein have answered different questions. From my perspective, on re-reading your posting, I am not sure which reflects your situation.
If you are asking for the operator to intervene, as in "Please mount the correct tape", then Hoff 's answer is correct.
If you are trying to get a series of inputs from the command file, I agree with Hein, except that my preference is to generate a temporary data file during an interactive setup script, and then pass the name of the file as one of the parameters on the SUBMIT command (e.g., SUBMIT/PARAM=("
Then, I can simply OPEN/READ on the temporary file and use READ statements to process it.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 11:27 AM
тАО02-16-2008 11:27 AM
Re: Batch Job Prompts - Novice Question
Or via OPCOM and a system operator:
REQUEST /REPLY "Do you want to play a game?"
and then a REPLY /TO or a REPLY /ABORT from an operator.
The other option is via shared logical name, or via some procedure or tool that creates a file after the fact, and for which the procedure polls, and waits for. Or you could submit the second-level job or task into a hibernation state or into a process suspension, and then release it, or delete it.
Based on the "should I proceed?" interpretation, the REQUEST is probably the easiest path forward.
If you choose the REQUEST /REPLY path, do ensure you test for the case when no operator is enabled when you issue the REQUEST /REPLY, as you'll get a status back from that indicating no operators are around. (The continue and the abort also return $STATUS values here.) This no-operators case is a common failure, but it's one that's not necessarily immediately obvious; it's a case that might not show up in basic testing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 12:23 PM
тАО02-16-2008 12:23 PM
Re: Batch Job Prompts - Novice Question
Look at how f$mode is used in some of the .com files in sys$startup:
$ search sys$startup:*.com f$mode
If the response is variable, then Hoff, Hein and Robert have given you some great answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 12:38 PM
тАО02-16-2008 12:38 PM
Re: Batch Job Prompts - Novice Question
$ if $mode().eqs.$edit("interactive","upcase")
or am I the only one who thinks that's funny?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 12:54 PM
тАО02-16-2008 12:54 PM
Re: Batch Job Prompts - Novice Question
Can you show us what you are doing and what isn't working? I.e. can you create a simple reproducer? Otherwise we are just guessing what you mean by "operator responses" and how those operator responses are being accepted.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 01:15 PM
тАО02-16-2008 01:15 PM
Re: Batch Job Prompts - Novice Question
>> $ if $mode().eqs.$edit("interactive","upcase")
>> or am I the only one who thinks that's funny?
Good catch! Made me smile. Totally sick.
The other way around would only be silly:
$ if "INTERACTIVE".eqs.f$edit(f$mode(),"upcase")
Tony,
Do you have control over the called routine? Can you change it? If you can, then indeed it would be better to teach it how not to ask instead of learning how to answer.
Tools for that would eb the F$MODE() suggested, and testing for the existing of a (global) application symbol or logical:
$ IF "".eqs.F$TYPE(your_globlal)
$ THEN ... use it
$ ELSE ... INQUIRE (or better: READ/PROMPT)
Replace F$TYPE by F$TRNLNM for logicals.
Cheers,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 02:55 PM
тАО02-16-2008 02:55 PM