IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Question on CONVERSE command..


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chetanmabi

New User


Joined: 03 Nov 2011
Posts: 2
Location: India

PostPosted: Sat Jan 21, 2012 8:42 pm
Reply with quote

I am using CONVERSE command in application program to send data to, and recieve data from, a program that is running in remote system. Using CONVERSE command CICS can return only 32k of data to the application program. But the question is I am getting more than 32k of data from the remote system. Because of this INTO field is not getting any data so being set to spaces and TOLENGTH is being set to zeroes. I just want to know that is this how CONVERSE behaves if it recieves data more than 32k from remote system??.

Here is the code i am using in my application:

EXEC CICS CONVERSE
CONVID(ws-conv-id)
FROM(ws-send-area)
FROMLENTH(ws-send-area-leng)
MAXLENGTH(ws-max-length)
INTO(ws-recieve-area)
TOLENGTH(ws-recieve-area-leng)
END-EXEC

I have defined FROMLENGTH, MAXLENGTH as 32K and I am getting more than 32K of data so INTO(ws-recieve-area) is getting spaces and TOLENGTH(ws-recieve-area-leng) is getting zero after the successfull completion of the command.

Will the CONVERSE command throws an error if it recieves data more than it can hold which is 32K??

Please help me out...

Thanks in advance
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Jan 21, 2012 9:06 pm
Reply with quote

I've used "CONVERSE" to talk from a Front-End region to a Back-End region, over an LU6.2/APPC link. It actually combines a SEND INVITE (sets Change Direction indicator) with a RECEIVE and subsequent SEND (on the Back-End) and finalizing with a RECEIVE on the Front-End, with the Back-End's response.

IIRC, you can RECEIVE more than 32K of data on the Front-End RECEIVE from the Back-End SEND by issuing multiple RECEIVE's on the Front-End, using the NOTRUNCATE option.

But, in order to reduce or even eliminate message truncation using mutiple RECEIVES (outside of the CONVERSE response), use the TOLENGTH alternative TOFLENGTH and the FROMLENGTH alternative FROMFLENGTH. These "FLENGTH" alternatives use binary-fullwords (16MB limit) rather than "LENGTH", which use binary-halfwords (32K limit).

Also, review the MAXLENGTH alternative MAXFLENGTH.

Review your applicable CICS version/release "Application Programming Reference" for more information regarding "CONVERSE".

IBM Book Manager ===> publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/library

Mr. Bill
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Jan 21, 2012 10:08 pm
Reply with quote

The Application Programming Reference manual on CONVERSE says
Quote:
MAXLENGTH(data-value)

specifies as a 16-bit binary value the maximum amount of data that CICS can return to the application on the CONVERSE command. This value must be between zero and 32767 inclusively.

If the NOTRUNCATE option is specified and the data received is longer than the maximum specified in MAXLENGTH, CICS returns the data up to the maximum length and sets EIBCOMPL=EIBFALSE to indicate that there is more data to follow. The remaining data can be received using one or more of the RECEIVE commands.

If the NOTRUNCATE option is not specified and the data received is longer than the maximum specified in MAXLENGTH, CICS returns the data up to the maximum length and returns the LENGERR condition. The remaining data is discarded by CICS and cannot be received by the application. If MAXLENGTH is not coded on the CONVERSE command, CICS uses the value passed in the TOLENGTH argument as the maximum length.
As Bill said, you need to change your options to use the full-word fields instead of the half-word fields, and use NOTRUNCATE.
Back to top
View user's profile Send private message
chetanmabi

New User


Joined: 03 Nov 2011
Posts: 2
Location: India

PostPosted: Sat Jan 21, 2012 10:10 pm
Reply with quote

Hi Bill,

Thank you very much for quick reply..

1). You are saying that we can receive more than 32k of data by issuing multiple RECEIVE command using NOTRUNCATE option. But IBM manuals are saying that using CONVERSE command CICS can return only 32k of data to the application program. Then how is it possible to receive more than 32k data by issuing multiple RECEIVE commands. Correct me if I am wrong.

Could you please share me sample code on how to issue multiple RECEIVE commands to get more than 32k data if you have??

2). As you said TOFLENGTH, FROMFLENGTH will use binary full word whereas TOLEGNTH, FROMLENGTH will use binary half words. But I have read somewhere that irrespective of which option we use CICS can return only 32k data. I have not tested with these FLENGTH options so i will test with these options and get back to you.

Thanks,
Chetan
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Mon Jan 23, 2012 10:01 pm
Reply with quote

I have an old MRO LU6.1/APPC LU6.2 book and yes, it does state that the maximum length value is 32767, regardless whether you're using LENGTH or FLENGTH.

Unfortunately, the interfaces which I've written with CONVERSE never had to deal with messages greater than 300-bytes.

The book is not clear on CONVERSE with length values that exceed 32767, so perhaps, you need to use a SEND INVITE, then followed by a RECEIVE with NOTRUNCATE, in which case, if a message length is greater than 32767, then you'd use multiple RECEIVES (driven by EIB field EIBCOMPL) until you've received all the data back from the remote region. But, you need to use the FLENGTH version of the LENGTH keywords.

That's all I can suggest....

Mr. Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top