Creating a server buffer

You can define a server buffer in a Server Dialog or a Business Component.

About this task

It is sometimes necessary that Business Components, whether they are called by the same Services Manager or called by other Business Components (through secondary level calls), share some data.

With the server buffer, you define a memory area shared between the Business Components which run a request.

The following rules apply to a server buffer:
  • When a Business Component is called by another Business Component which uses a server buffer, the called Business Component must use the same server buffer.
  • To call a Business Component which uses a server buffer, a TUI client must use a server monitor.

Procedure

  1. Open the -G Lines tab of a Server Dialog or Business Component.
  2. Open the -GO Lines section located in this tab.
  3. On an O-type line, enter the SERVBUFF=xx option (where xx is the Data Structure which represents the server buffer).
  4. In each Business Component, you can select some Segments of this Data Structure by specifying, on an O-type line, the SEGMBUFF=s1s2s3s4… option (where s1, s2, s3 … are the last two characters of the Segment codes). If you do not enter this option, all the Segments of the Data Structure are selected.

Results

Technical information about the generation of the server buffer:
  • The Segments of the Data Structure are generated as redefines of one another. If a 00 Segment exists, it is considered as the common part of all the other Segments.
  • The group fields, occurs, redefines are taken into account.
  • The FORMAT=EXTENDED option which triggers the generation of the fields in an extended DISPLAY usage is ignored. Binary and packed fields are thus generated with the corresponding usages and the sign in the numeric fields is virtual.
  • An alignment filler is generated for all the selected Segments whose length is smaller than that of the longest Segment of the Data Structure (even if the Segment is not selected). This way, the length is constant for all the Business Components, no matter which Segments are selected in each of them.

Feedback