ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » TCP/IP

Post new topic  Reply to topic
 TCP/IP « View previous topic :: View next topic » 
Author Message
gag_nm
PostPosted: Sat Oct 10, 2015 4:16 am    Post subject: TCP/IP Reply with quote

Centurion

Joined: 16 Oct 2008
Posts: 102

HI,

please find my below flow.

MQInput-->ComputeNode---->TCPClientOut--->TCPCLientReceive--->MQOutput

i am successfully connecting TCP Server, but other team are saying they are not receving any Data.

please find below code in Compute node.

i have to send data only in ASCII plan Text.I am using below codepage mentioned in Code.


DECLARE CharOutput CHARACTER '<RER>1<ABC><XYX>';
SET OutputRoot.BLOB.BLOB = CAST(CharOutput AS BLOB CCSID 1200);


TCPClientOut Properties

Advance::
Close Connection : No
Output Stream Modififcation : Reserve output Stream(For use by future TCPIP Nodes) Then release at end of flow.
Input Stream Modififcation : Reserve Input Stream(For use by future TCPIP Nodes) Then release at end of flow.

Record Elements: Record in Unmodified Data.


TCPClientReceive Properties

Timeout : 60

Advance::
Close Connection : No
Output Stream Modififcation : Reserve output Stream(For use by future TCPIP Nodes) Then release at end of flow.
Input Stream Modififcation : Reserve Input Stream(For use by future TCPIP Nodes) Then release at end of flow.


can some one correct flow..
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sat Oct 10, 2015 8:31 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Find out from the other end how they expect to receive the stream.

There are two ways of sending data over a TCP/IP connection

1) Send a short message that includes the lenght of the data that is to follow
Then you send the data. This needs TWO TCPIP nodes
2) Agree with the other end a termination character. Then you ADD this character to the message and send it. This requires one TCPIP Node

Unless you do one of the above the other end may very well say we have not received anything because there is no way for the other end to recognize the end of a message in a stream.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
gag_nm
PostPosted: Sat Oct 10, 2015 9:13 pm    Post subject: Reply with quote

Centurion

Joined: 16 Oct 2008
Posts: 102

other end they are expecting data in ASCII Plan Text.

they expect to receive data in below format.

<STX>1<ETB>0<ETB><ETX>

I am using TCPIPClientoutput Node to send to TCP/IP server.

i have changed my code to

DECLARE CharOutput CHARACTER '<STX>1<ETB>0<ETB><ETX>';
SET OutputRoot.BLOB.BLOB = CAST(CharOutput AS BLOB CCSID 1200);

<ETX> is terminator

but still they are not receving data...
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sat Oct 10, 2015 10:42 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

You must be new to Telecoms. For those of us 'greybeards' this is old hat.

This

Code:

<STX>1<ETB>0<ETB><ETX>


Does not mean what you think it does.

May I suggest that you read this
https://en.wikipedia.org/wiki/Control_character

You need to wrap your data in the HEX values for <STX> and <ETX> (x02 & x03)

You could look at letting the TCP nodes do it for you. It will witth the ETX but can't remember about the STX side.

all of this should be in the interface message spec that you are working to. You do have one don't you?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
gag_nm
PostPosted: Sat Oct 10, 2015 11:25 pm    Post subject: Reply with quote

Centurion

Joined: 16 Oct 2008
Posts: 102

thanks for input , to convert to Hex values, do we have any fucntion or code page to convert it.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sun Oct 11, 2015 12:04 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Can be done is ESQL

something like
Code:

declare blSTX BLOB x'02';
declare blETX BLOB x'03'

then concatenate the blobs

Code:

set OutputRoot.BLOB.BLOB = blSTX || blMyMessage || blETX;

code not tested but using UserTrace will tell you in detail what is going on at every step.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
gag_nm
PostPosted: Sun Oct 11, 2015 8:13 pm    Post subject: Reply with quote

Centurion

Joined: 16 Oct 2008
Posts: 102

thanks for your support.

your code help me to proceed to send and receive data.

i have issue with Format of data.

input from message broker <STX>1<ETB>0<ETB><ETX>

Code:
DECLARE blSTX BLOB x'02';
DECLARE blETX BLOB x'03';
DECLARE blETB  BLOB x'17';

DECLARE TypeNumone  CHARACTER '1';
DECLARE TypeNumZero CHARACTER '0';

DECLARE blTypeNumone  BLOB CAST (TypeNumone  AS BLOB CCSID 1200);
DECLARE blTypeNumZero   BLOB CAST (TypeNumZero   AS BLOB CCSID 1200);
DECLARE blbString  BLOB;
Set  blbString  =blSTX || blTypeNumone  ||blETB  ||TypeNumZero ||blETB  ||blETX ;

SET OutputRoot.BLOB.BLOB = String;


At Server End, below data is received

[2][0]1[23][0]0[23][3]

it is supposed to be [2]1[23]1[23]0000[3], i don't know where [0] is coming from.

can you please check my code.
Back to top
View user's profile Send private message
stoney
PostPosted: Sun Oct 11, 2015 8:48 pm    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2013
Posts: 140

Quote:

i have to send data only in ASCII plan Text.I am using below codepage mentioned in Code.


Quote:

DECLARE blTypeNumone BLOB CAST (TypeNumone AS BLOB CCSID 1200);
DECLARE blTypeNumZero BLOB CAST (TypeNumZero AS BLOB CCSID 1200);


Are you sure you wanted CCSID 1200 - UTF-16?
This will cast each single character into a two byte string.
Back to top
View user's profile Send private message
gag_nm
PostPosted: Sun Oct 11, 2015 9:06 pm    Post subject: Reply with quote

Centurion

Joined: 16 Oct 2008
Posts: 102

i have changed to 1208.now its working fine.

thanks guys for your inputs...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » TCP/IP
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.