Handling COMMAREAs in Visual Basic

A CommArea is a block of storage that contains all the information you send to and receive from the server.

Because of this, you must create a CommArea that is big enough for this information. For example, you might need to send a 12 byte serial number to the server, but receive a maximum of 20 Kb back from the server; this means you must create a Commarea of size 20 Kb. To do this you could code
Set Buf = new CclOBuf  ' create extensible buffer object
Buf.SetString(serialNo)
Buf.setLength(20480)   ' stores Nulls in the unused area

In the above example, Commarea is given the serial number and the buffer is increased to the required amount, but the extra area is filled with nulls. This is important as it ensures that the information transmitted to the server is kept to a minimum. The Client daemon strips off the excess nulls and only transmits the 12 bytes to the server.


Information Information

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tg_latest/help/topic/com.ibm.cics.tg.doc//progde/cclaovc2.html