Ready STATEMENT

The READY statement prepares an area, called the READY area, for the creation of a new record that will later be included in the master, transaction, or an auxiliary Data Set

SYNTAX

READY \\{MASTER; TRANSACTION; designator} /AREA/ [WITH \\

{MASTER; TRANSACTION; designator}] [HUSH] [IF; UNLESS clause]

READY

with no WITH option specifies the DS to which the record will be written by a later CREATE  command.

WITH

If the SD form is binary all fields are cleared to zero.  If it is an ASCII data set the record area is set to spaces.

copies the current record from the named DS into the READY area.  A prior GET statement is required on the specified DS.  The record will be the one retrieved by the last GET statement.

Example

GET FROM AUX5 PRIOR RECORD
READY AUX9 AREA WITH AUX5

NOTES:  If a WITH clause is used, the SD of the DS specified in the WITH clause must be the same as that of the destination DS.

If the DS has multiple record types, the first value moved to the READY area must be the record identification field unless a WITH clause is used.

While a record is in a READY area, its fields must be referenced by the following suffixes:

fieldname:M:R for the master READY area

fieldname:T:R for the transaction READY area

fieldname:designator:R for the auxiliary READY area

Once the READY area is set up, any of the fields in that area can be further changed with assignment statements.

After a record is completed, it is written to the appropriate DS by the CREATE statement.

If the DS to which the record will be written is an auxiliary DS, it must be defined in the RELATE statement in the mode UPDATE, CREATE, or CREATE APPENDING.  If the destination is the master or transaction DS, it must be related in UPDATE mode.