17.08.2013 Views

Data Interfaces

Data Interfaces

Data Interfaces

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Transferring <strong>Data</strong> Records<br />

© SAP AG<br />

TRANSFER TO .<br />

Sequential<br />

file<br />

data<br />

record<br />

Each TRANSFER statement transfers one data record to a sequential file.<br />

Before TRANSFER, you place the data record in a field or a structure.<br />

Possible structures are field strings or table work areas.<br />

The execution of the TRANSFER statement depends on the mode:<br />

- Binary mode: Writes the length of the field or structure.<br />

- Text mode: Writes a line.<br />

If the specified file is not open, the TRANSFER statement tries to open the file FOR<br />

OUTPUT (IN BINARY MODE) or using the additions of the last OPEN DATASET statement for this<br />

file.<br />

Errors which occur during the TRANSFER statement result in program termination.<br />

The additional parameter LENGTH of the TRANSFER statement allows you to specify a<br />

length in bytes (in the format TRANSFER TO LENGTH ). In this<br />

case, the exact number of characters specified in is transferred. If the structure is shorter, the<br />

record is padded (with blanks in text mode and hexadecimal zeros in binary mode). If the structure is<br />

longer, the record is truncated.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!