Receive data from a database file

The only command you can use to receive data from a database file is the Receive File (RCVF) command.

When you run a Receive File (RCVF) command, the next record on the file's access path is read, and the values of the fields defined in the database record format are placed in the corresponding CL variables. Note that CL does not support zoned decimal or binary numbers. Consequently, fields in the database file defined as zoned decimal or binary cause *DEC fields to be defined in the CL procedure or program. *DEC fields are internally supported as packed decimal, and the Receive File (RCVF) command performs the conversion from zoned decimal and binary to packed decimal as required. Database files which contain floating point data cannot be used in a CL procedure or program.

When the end of file is reached, message CPF0864 is sent to the procedure or OPM program. The CL variables declared for the record format are not changed by the processing of the Receive File (RCVF) command when this message is sent. You should monitor for this message and perform the appropriate action for end of file. If you attempt to run additional RCVF commands after end of file has been reached, message CPF0864 is sent again.

Related information
Receive File (RCVF) command