HP3000-L Archives

November 2007, Week 4

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:
Doug Werth <[log in to unmask]>
Reply To:
Doug Werth <[log in to unmask]>
Date:
Wed, 28 Nov 2007 08:30:38 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (67 lines)
Ian Warner wrote:
> Mark Wonsil wrote:
> 
>> Hello Ian,
>>
>>  
>>
>>> I have been asked the following question -
>>> "You will only be calling a webservice from the 3000 with some XML data.
>>> Ideally when an order status has changed. The desired frequency will be
>>> realtime, but im sure we will have to make some room for queuing these
>>> updates.
>>> The webservice on our end will be transparent to you. Our webservice
>>> will
>>> update the SQL server. All you need to focus on is being able to call a
>>> webservice from the 3000 passing some XML into it.".
>>>
>>> How would one go about this?
>>>   
>>
>> We'll need more detail from you on this. What programming language are
>> you
>> using? What version of MPE on you on? How often will you send order
>> status
>> changes?
>>
>> Mark W.
>>
>>
>>  
>>
> MPE 6.5, We will be using COBOL and sending status changes will peak at
> about 1 a second.
> Is there a tutorial and/or examples of Socket programming in COBOL I can
> examine, It seems that
> (as per Dave Waroff) the easiest way is to open a socket and do a POST.

On our web site we have COBOL examples of sockets programming. There is
a set of COBOL callable routines in an NMOBJ file that can be linked
directly into your programs or placed in an XL. Client and server
(listener) examples are included. These routines are using Berkeley
sockets rather than NetIPC sockets.

Go to http://www.beechglen.com/mpe/downloads.html and find sockets.std.

The callable routines work best for fixed-length socket reads. This is
most efficient when you are writing both the client and the server and
have complete control over both. It sounds like you will interfacing
with a Web server and sending HTTP POST commands with embedded XML and
can't control the amount of data returned. I have found that putting the
"variable read" logic in the COBOL source by calling one-byte socket
reads within a loop is a good alternative. It costs a few extra CPU
cycles but typically the socket code is a very small portion of the
overall program logic in this type of application and you won't even
notice it.

HTH.

Doug.
-- 
Doug Werth [log in to unmask]            Beechglen Development Inc.
Director of Technical Support Services             Cincinnati, Ohio
Voice: (513) 922-0509 x26                       Fax: (513) 347-2834

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

ATOM RSS1 RSS2