TRANSFER

TRANSFER

Addition:

... LENGTH len

Effect

Transfers the field f (usually a field string) to the sequential file specified in dsn (this may be a literal or a field).

If the specified file is not open, TRANSFER attempts to open the file dsn FOR OUTPUT (IN BINARY MODE or using the further specifications of the last OPEN command for this file). If this fails, a runtime error occurs.

Example

DATA REC(80). 
TRANSFER REC TO '/usr/test'. 

If the file is opened with the TRANSFER statement, the system automatically performs an authorization check. If the user does not have the appropriate authorization, a runtime error occurs. You can check the existence of the authorization with the function module AUTHORITY_CHECK_DATASET.

Effect

Transfers the length of the record to be output in the length len.

Related

OPEN DATASET, READ DATASET, CLOSE DATASET