HP3000-L Archives

April 2003, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Anderson <[log in to unmask]>
Reply To:
Michael Anderson <[log in to unmask]>
Date:
Mon, 7 Apr 2003 16:46:02 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (99 lines)
Anytime someone ask's 'can you do this on the HP3000 with COBOL?' I have
to reply, no matter how busy I am. The answer is yes you can, and yes I
can send you an example.

I have some COBOL source code that uses the M.P.E. Native IPC calls to
simultaneously listen to incoming socket connections, some from windows,
some from Unix, it doesn't really matter where they come from. This
source also handles msg file I/O completions. If you want, I could send
it to you, minus a library of many subroutines. My only intention being
that you use it as an example of how to do multi-process socket
programming, using native M.P.E., and COBOL. It was designed to work
allot like inetd, but on the classic 16 bit (M.P.E. V), and has since
been ported to M.P.E./iX. It looks at the initial data received and an
external file to determine what son process to start, then starts the
son process and hands the socket connection to the new process, and then
goes back to listening and sleeping.

It is an excellent COBOL example of how to post multiple reads (file
I/O and Sockets) and use IOWAIT to wait for I/O on all of them
simultaneously.

Let me know, WRQ Labels format, or plan old ASCII,






--
Michael Anderson
Spring Independent School District
16717 Ella Boulevard
Houston, Texas 77090-4299
office: 281.586.1105
fax: 281.586.1187
-

>>> Jay Chandru <[log in to unmask]> 04/04/03 08:29PM >>>
Greetings,

I am working in HP3000 - COBOL environment. I have a socket call from
a
client (Windows System). The client puts the request in my Socket port
in
HP3000.

I am having a listener program in HP3000 which will be taking this
request
from the port and spawning a child program. This child program will
look at
the incoming request and call different programs for processing the
request
based on the request type.

e.g.

My data request at the socket port is as follows
FLIGHT70UPDATEPASSENGER100

In this case, FLIGHT70(First 8 bytes of the buffer at the port) is the
program which will be called from my child program (in turn spawned by
listener program)


Another data request at the socket could be FLIGHT80UPDATEPASSENGER100

In this case, FLIGHT80(First 8 bytes of the buffer at the port) is the
program which will be called from my child program (in turn spawned by
listener program)

In the above cases, my listener program will spawn and call programs
FLIGHT70 and FLIGHT80 and work parallely.

But in case the second request is also for program FLIGHT70, will the
programs parallely execute?

In short, is parallel processing possible in HP3000 - Cobol programs.
If so,
can anyone pls. provide me with a sample code on how to do the same.

Any pointers to the same will also be higly helpful

Thanks for your vaulable time and response,
-Jay




_________________________________________________________________
High ISD bills? Get a phone card. http://www.msn.co.in/webtelephony
Call US
for just Rs. 5

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2