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??.
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??
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
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".
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
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.
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.
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
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.