× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Gerald,

Firstly, are you using the API's from Scotts tutorials ? 'ReadLine' &
'WriteLine' does all the work for you including optional special chars and
translations.

If you are doing it yourself, don't forget that if you compose the output in
your program, its EBCIDIC hex codes you want, if they are going to be
translated into ACSII by the system. X'25' is indeed LineFeed in EBCDIC
I am dubious about your start block character. X'0B' is vertical tab. Why
that ?
Others to experiment with are:
SOH start of heading X'01'
STX start of test X'02'
Form Feed X'0C'


Regards

Ian Patterson
Grange Management Consultants
tel 01947 880458
www.grange-systems.co.uk




-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Chris Bipes
Sent: 09 December 2003 16:18
To: 'Midrange Systems Technical Discussion'
Subject: RE: Socket Programming - HL7 Data to Win2k server


Basically build your message to send in a variable length field and xlate it
ASCII.  Then set your output buffer to Start_Block + ASCII_DATA +
Cariage_Ret + Line_Feed.  Your Write to the socket should be the length of
the variable length field + 3.  This way the SB/CR/LF do not get translated.
You may want to double check the hex value of your line feed.  I don't think
x'25' is the ASCII value.

Chris Bipes

-----Original Message-----
From: Gerald P. Kern [mailto:gkern@xxxxxxxxxxxxxxxxxxx]
Sent: Monday, December 08, 2003 4:08 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Socket Programming - HL7 Data to Win2k server


Using the Scott Klement tutorial and the 'Sorcerer RPG'  Redbook, I've
learned to do iSeries to iSeries socket programming. In my proof of concept
and coding, the programs communicated between the iSeries without problems,
and that is because I controlled the data and the end of file processing.

Now my challenge is to get my RPGIV client program talking to a Win2k server
that's using Biztalk and Microsoft Message Queuing.

My client program sends HL7 messages (from an EBCDIC DB2 file) that gets
translated to ASCII (the translation works fine and is not the problem), as
the variable length socket data field.

So far my program connects to the server and sends the data, but after I
send the data I'm not getting any reply from the server. My program hangs
there, waiting for a response from the server (as it's supposed to do).

We think it's because I'm not sending 'start block' and 'carriage
return/line feed' data with my message - which is something the server is
expecting.

So at the request of the vendor, I modified the message I'm sending to send
a 'start block' at the beginning of my HL7 message, and then a Carriage
Return and Line Feed at the end of the HL7 message. So for the carriage
return and line feed I'm sending the following hex equivalents:

D Carriage_Ret      C                   CONST(x'0D')
D Line_Feed         C                   CONST(x'25')

And for the start block this:

D Start_Block       C                   CONST(x'0B')

Is this correct for the 'start block'? Could this be a new line character or
something similar?

The vendor does see some kind of activity but I'm not sure what to send for
the 'Start Block' and hex 0B was her recommendation, but she's not sure
since she's not familiar with DB2, RPG or EBCDIC.
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.