Previous Topic: REQUEST-TO-SENDNext Topic: SEND-ERROR


SEND-DATA

Purpose

Sends data to the remote dialog.

Syntax

►►──── SEND-DATA variable-name ─────── . ─────────────────────────────────────►◄

Parameters

variable-name

Specifies the name of the record or element to be sent.

Variable-name can be up to 32 characters long.

Note: The definition of variable-name must be in the dictionary associated with the local dialog.

Usage

Data to be sent is stored in the CA ADS communications buffer. When the buffer is full or you issue a CONFIRM command or DEALLOCATE with the FLUSH option, the data in the buffer is sent to the remote dialog.

Considerations

CA ADS issues a compiler error:

Any field that redefines another field is ignored, but a transmitted field can be a REDEFINES field. For example, FIELD-B redefines FIELD-A within RECORD1. If you send RECORD1, FIELD-B is ignored and the record is sent as if FIELD-A is the current definition of the field.

Because only a subset of IDD data types are supported, you should:

  1. Create a work record (much like the map work record) of the proper data types.
  2. Move the values from your database record to this work record.
  3. Move the received values back to your database record.

Example

After retrieving data and building the work record, send the data to the client dialog.

SEND-DATA WK-EMP-REC2.
 IF APPCCODE LT 0 THEN  CALL SR-ABEND.