Version 6.3.1
 —  Command Reference  —

RE Command (Read ET User Data)

This document covers the following topics:


Function and Use

The RE command is used to read user data which has been previously stored in an Adabas system file by a CL or ET command.

This user data may be needed for a user restart following abnormal termination of a user or Adabas session.

User data from a previous session may only be read if the user has specified the same USERID with the OP command for both this session and the session in which the user data was stored.

User data stored by another user may be read if the USERID of the user who stored the data is known.

graphics/re.png

RE Command, Procedure Flow

Control Block

Field Format  
Call Type B F/U
Reserved (internal use)   -/-
Command Code A F/U
Command ID B -/A
File Number B F/U (1)
Response Code B F/A (1)
Record Buffer Length (ACB only) B F/U
Command Option 1 A F/U
Additions 1 A F/U
Additions 2 A,B -/A
Command Time B -/A
User Area   F/U

Buffer Areas

Buffer  
Format Buffer */–
Record Buffer –/A
Search Buffer –/–
Value Buffer –/–
ISN Buffer –/–
Formats:
A alphanumeric
B binary
x/y before/after Adabas call - x and y can take the values:
A Filled in by Adabas
F To be filled in by User
U Unchanged after Adabas call
- Not used
* Not used but must be included in parameter list of CALL statement

(1) The meaning of this field depends on the value specified for "Call Type". See Calling Adabas, The Control Block for details.

Top of page

Control Block

Command Code

RE

Command ID

If the user who stored the user data is an ET logic user, Adabas will return the transaction sequence number of the last successful logical transaction for the user in this field.

If the user is not active and the last session was terminated normally, a 0 is returned.

Response Code

Adabas returns the response code for the command in this field. Response code 0 indicates that the command was executed successfully.

Record Buffer Length (ACB only)

The length of the record buffer. The length specified determines the number of bytes of user data to be returned.

If the length specified is less than the number of bytes of user data available, only the specified number of bytes will be inserted in the record buffer and the rightmost bytes will be truncated. A response code 2 is returned.

Command Option 1

An `I' in this field indicates that user data stored by another user is to be read.

Additions 1

If user data stored by another user is to be read, this field must contain the USERID of the user who stored the data.

Additions 2

If the user who stored the data being read was an ET logic user, Adabas will return the transaction sequence number of the user's last successfully completed transaction for which user data was stored with an ET or CL command in this field.

Top of page

Record Buffer

Adabas returns the user data in this buffer.

If no ET data are found, the record buffer is filled with blanks.

If the record buffer is larger than the user data, the record buffer is padded with blanks. If the record buffer is smaller than the user data, the user data are truncated.

Top of page

Examples

Example 1:

The user wishes to read the user data which he previously stored with an ET command.

Control Block

Command Code          RE
Record Buffer Length  100 (100 bytes user data is to  be  read)
Command Option 1      b (the user data to be read was stored by
                         this user)

Example 2:

The user wishes to read user data stored by another user (USERID = USER6666).

Control Block

Command Code          RE
Record Buffer Length  150 (150 bytes of user data to be read)
Command Option 1      I (the user data to be read was stored by
                         another user)
Additions 1           USER6666  (USERID  of the user who stored
                                 the user data)

Top of page