- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Passing channels through mailboxes... (COBOL)
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
тАО04-05-2011 04:50 AM
тАО04-05-2011 04:50 AM
I am having problems when I try to pass an I/O channel as a string through a mailbox. I mean, I have one cobol program which opens a tcp/ip (using fortran <-- not important) session and keep listening for some data. When it receives something it sends this data to a mailbox and a second program must take this data,generate a proper reply and send it back to same socket, so it must use the open connection and I need to pass the channel from the first program to the second.
My problem is that I do not know how to pass the channel as a parameter.
Can you help me?
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2011 05:04 AM
тАО04-05-2011 05:04 AM
Re: Passing channels through mailboxes... (COBOL)
Just a thought.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2011 05:20 AM
тАО04-05-2011 05:20 AM
Re: Passing channels through mailboxes... (COBOL)
1)first program is stuck reading the socket until it receives something.
2) As far as I know a mailbox is able to work just in one direction. I do not know a way to read a message without delete it. So if the second program writes on the mailbox it will read his own message and it goes into an infinite loop.
Of course I can make a second mailbox, one for each direction, and put a time-out when I read the socket, but this is what I want to avoid.
It is hard to believe that there is not a way to pass a channel as a 'parameter' (using logicals, mailboxes, a data file or whatever).
Any other ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2011 05:36 AM
тАО04-05-2011 05:36 AM
SolutionIf the application is coded synchronously, yes.
With asynch I/O and asynchronous system traps (event-triggered subroutines), the application can have a read pending, and can continue with other operations until the AST fires.
>2) As far as I know a mailbox is able to work just in one direction. I do not know a way to read a message without delete it. So if the second program writes on the mailbox it will read his own message and it goes into an infinite loop.
Mailboxes are bi-directional, but it's vastly easier to use a pair of mailboxes as you don't need to deal with the turn-around. A common mailbox application design here uses one or more writers, and one reader.
They are message-oriented devices, and attempting a read-ahead adds substantial complexity to the design.
Infinite loops are programming errors, usually in the application, though occasionally in the lower-level code.
>Of course I can make a second mailbox, one for each direction, and put a time-out when I read the socket, but this is what I want to avoid.
Why? Mailboxes are cheap to create and cheap to run. They're not the lightest-weight, but performance optimizations here are likely premature.
>It is hard to believe that there is not a way to pass a channel as a 'parameter' (using logicals, mailboxes, a data file or whatever).
OpenVMS I/O channels are process-local context references, and the values are meaningless outside the particular process.
Trying to have a shared socket should be approached with caution; you can end up with two readers operating in parallel, and that gets interesting to manage within the application image(s). This because you can end up with all the look-ahead push-back hand-off hackery, and that gets complex.
Here is code that allows socket sharing:
http://h71000.www7.hp.com/wizard/wiz_3995.html
Here's a recent discussion:
http://groups.google.com/group/comp.os.vms/browse_thread/thread/2fcbb036b7cc84b6
I'd suggest looking at the auxiliary server here, and have that start up the application that will listen on the socket.
And I'd probably also look to move up-stack with the designs here - from primitives such as mailboxes and sockets - as that's an older design and more involved, and you're going to be reimplementing a whole lot. Selection of appropriate communications middleware and better languages can help speed your deployments; you spend more time on your own application logic, and less time on the glue code and debugging same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2011 06:18 AM
тАО04-05-2011 06:18 AM
Re: Passing channels through mailboxes... (COBOL)
Now I don't know yet what I am going to do, but I think I have all information that I need to take a decision and a way to do it.
I close this thread. Thanks again.