- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Input redirection loops endlessly when out of inpu...
Operating System - HP-UX
1748162
Members
3732
Online
108758
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
тАО06-12-2002 06:19 PM
тАО06-12-2002 06:19 PM
Input redirection loops endlessly when out of input
I am invoking an application (cobol executable) from a shell script (ksh) and redirecting input (<) from a file. When the application requests terminal input and no more input lines are available from the input file (ie. run out of input), the application loops forever (generating error messages). It seems that the system is feeding endless NULLs (Enter's) to the application even though the ned of input file is reached. How do I make the process to abort when "out of input" condition is hit? Thank you.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:25 PM
тАО06-12-2002 06:25 PM
Re: Input redirection loops endlessly when out of input
Hi,
Using the same file that you redirected input from, can you test the following in your shell script:
# cat < inputfile
If this does not result in an endless loop, then the problem lies with how your cobol executable handles redirected input.
If this results in an endless loop, then it might be an issue with your input file or shell. Show us your input file.
Hope this helps. Regards.
Steven Sim Kok Leong
Using the same file that you redirected input from, can you test the following in your shell script:
# cat < inputfile
If this does not result in an endless loop, then the problem lies with how your cobol executable handles redirected input.
If this results in an endless loop, then it might be an issue with your input file or shell. Show us your input file.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:40 PM
тАО06-12-2002 06:40 PM
Re: Input redirection loops endlessly when out of input
Thanks for prompt response. I did as you suggested 'cat < file' and it did not loop. Here's the input file, very simple:
06012002
06302002
P
Just 3 lines. If the application requires further input due to some unforseen condition (which I am testing out), the app goes into an endless loop displaying an error message that the input was invalid (NULL). I'm using !/bin/ksh. Is this something to do with ksh? Is there a way to abort a process on end of input? Thanks.
06012002
06302002
P
Just 3 lines. If the application requires further input due to some unforseen condition (which I am testing out), the app goes into an endless loop displaying an error message that the input was invalid (NULL). I'm using !/bin/ksh. Is this something to do with ksh? Is there a way to abort a process on end of input? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:54 PM
тАО06-12-2002 06:54 PM
Re: Input redirection loops endlessly when out of input
Hi,
# cat < inputfile
If this does not result in an endless loop in your script, then the problem lies with how your cobol executable handles redirected input.
It has nothing to do with your input file or ksh. It is to do with your Cobol executable. Too bad I don't know Cobol. You can post your Cobol code up in the languages forum under HP-UX to seek further assistance on getting your executable to handle input redirection properly.
Hope this helps. Regards.
Steven Sim Kok Leong
# cat < inputfile
If this does not result in an endless loop in your script, then the problem lies with how your cobol executable handles redirected input.
It has nothing to do with your input file or ksh. It is to do with your Cobol executable. Too bad I don't know Cobol. You can post your Cobol code up in the languages forum under HP-UX to seek further assistance on getting your executable to handle input redirection properly.
Hope this helps. Regards.
Steven Sim Kok Leong
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