- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- CTRL/C signal command
Operating System - OpenVMS
1752842
Members
3833
Online
108789
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
тАО11-10-2009 03:26 AM
тАО11-10-2009 03:26 AM
CTRL/C signal command
I want to run a batch that requires CTRL/C ternminate action.
For example i want to automate the memory check process and i need to use CTRL/C.
cli
smm
CTRL/C
endcli
Here what command should i use for CTRL/C ?
For example i want to automate the memory check process and i need to use CTRL/C.
cli
smm
CTRL/C
endcli
Here what command should i use for CTRL/C ?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2009 06:03 AM
тАО11-10-2009 06:03 AM
Re: CTRL/C signal command
> Here what command should i use for CTRL/C ?
I know of no way to do a real CTRL/C there.
alp $ smm
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\SMM\
I don't know what "smm" means to you.
Whatever it is, in a batch job, it may work
differently from the way it works with a
terminal for SYS$COMMAND. Have you tried it?
I know of no way to do a real CTRL/C there.
alp $ smm
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\SMM\
I don't know what "smm" means to you.
Whatever it is, in a batch job, it may work
differently from the way it works with a
terminal for SYS$COMMAND. Have you tried it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2009 06:41 AM
тАО11-10-2009 06:41 AM
Re: CTRL/C signal command
Batch processes do not have terminals, and it is data input from a terminal or from a pseudo-terminal that is fielded by the terminal driver, and it is the terminal driver then passes along the command to DCL to process the ^C or ^Y input.
Here, you can fix the code to exit properly (which would generally be the better approach here), or you can send a STOP/ID /EXIT at the batch process from a controlling application or job scheduler, and these will work from batch.
The most direct analog to your request would be to run the application via pseudo terminal and send the ^C under application control; the pseudo-terminal allows an application-controlling program to control another; the second operates as if it had a terminal, but its input and output are processed by the controlling application. This is not available in batch; you'd need to use what amounts to a detached process with a terminal here, not a batch process. (Again, batch processes don't have terminals.)
And yes, you could configure some wiring and a real terminal, and connect the application and the controlling application that way; pseudo-terminals eliminate the cabling. That still doesn't get you access into the context of the batch job, though.
If your goal is to activate a specific ^C or ^Y handler within the image executing within the batch process, that's (barring pseudo-terminals) not directly available AFAIK. STOP will send an exit but won't typically activate any ^C handlers or such that might be present within the application.
The best approach (and presuming you have the source code available) is to implement a different exit path within the image (eg: an exit command), or to implement some form of interprocess communications here (anything from simple to complex) to notify the batch process it should exit.
Here, you can fix the code to exit properly (which would generally be the better approach here), or you can send a STOP/ID /EXIT at the batch process from a controlling application or job scheduler, and these will work from batch.
The most direct analog to your request would be to run the application via pseudo terminal and send the ^C under application control; the pseudo-terminal allows an application-controlling program to control another; the second operates as if it had a terminal, but its input and output are processed by the controlling application. This is not available in batch; you'd need to use what amounts to a detached process with a terminal here, not a batch process. (Again, batch processes don't have terminals.)
And yes, you could configure some wiring and a real terminal, and connect the application and the controlling application that way; pseudo-terminals eliminate the cabling. That still doesn't get you access into the context of the batch job, though.
If your goal is to activate a specific ^C or ^Y handler within the image executing within the batch process, that's (barring pseudo-terminals) not directly available AFAIK. STOP will send an exit but won't typically activate any ^C handlers or such that might be present within the application.
The best approach (and presuming you have the source code available) is to implement a different exit path within the image (eg: an exit command), or to implement some form of interprocess communications here (anything from simple to complex) to notify the batch process it should exit.
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