We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
... ${BINARY MODE$}
$| ${TEXT MODE
encoding $[linefeed$]$}
$| ${LEGACY BINARY MODE $[endian$]$[
CODE PAGE cp$]$}
$| ${LEGACY TEXT MODE $[
endian$] $[
CODE PAGE cp$] $[linefeed$]$} ...
1. ... BINARY MODE
2. ... TEXT MODE
3. ... LEGACY BINARY MODE
4. ... LEGACY TEXT MODE
These mandatory additions define whether the file is handled as a binary file or as a text file. By specifying LEGACY, files can be written in the format that is expected by a non-
Unicode system, and files that have been created by a non-Unicode-system can be read. The
byte order or the
code page must be specified explicitly.
... BINARY MODE
The addition IN BINARY MODE opens the file as a binary file. When writing to a binary file, the
binary content of a data object is passed in unchanged form to the file. When reading from a binary file, the binary content of the file is passed in unchanged form to a data object.
Opens a binary file for reads and writes. The binary data is created by converting a string to UTF-8.
... TEXT MODE
The addition IN TEXT MODE opens the file as a text file. Only the content of character-like data objects can be passed to text files and read from text files.
The addition encoding defines how the characters are represented in the text file. When writing to a text file, the content of a data object is converted to the representation entered after encoding and passed to the file. If the data type is character-like and flat, any trailing blanks are cut off. In the data type string, trailing blanks are not cut off.
The end-of-line marker of the relevant platform is applied to the passed data by default. When reading
from a text file, the content of the file is read until the next end-of-line marker, converted from
the format specified after ENCODING into the current character format, and passed to a data object.
The end-of-line marker used is controlled using the addition linefeed.
Opens a text file for reads and writes. An end-of-line marker is appended in every write in every TRANSFER
statement. Any reads are performed line by line. Compare the example for the addition NO END OF LINE of the statement TRANSFER.
... LEGACY BINARY MODE
Opening a legacy
file. The addition IN LEGACY BINARY MODE opens the file as a legacy binary file, where endian can be used to specify the
byte order and CODE PAGE can be used to specify the
code page that handle the content of the file.
When a flat character-like field is written to the legacy binary files, the number of bytes written
to the file is the same as the number of characters in the source field. The field content can be affected
by this when writing texts in Eastern Asian languages. It is therefore best to only write texts opened without the addition LEGACY to text files.
See the example for the addition endian.
... LEGACY TEXT MODE
Opening a legacy file. The addition IN LEGACY TEXT MODE opens the file as a legacy text file, where, in legacy binary files, endian can be used to specify the byte order and CODE PAGE can be used to specify the code page that handle the content of the file. The syntax and semantics of ${BIG$|LITTLE$} ENDIAN and CODE PAGE cp are the same as in legacy binary files. The syntax and meaning of linefeed are the same as for regular text files.
Unlike legacy binary files, the trailing blanks are cut off when writing character-like
flat data objects to a legacy text file. Also, as in the case of a text file, an
end-of-line marker is appended
to the passed data by default. Unlike the text files opened by the addition IN TEXT MODE, there
is no check on whether the data objects used in writing or reading are character-like. Also, the LENGTH
additions of the statements READ DATASET and TRANSFER are used for counting in bytes for legacy text files, and in the units of a character represented in the memory for text files.
See the example for the addition CODE PAGE.
Leave us your contact details and we will call you back. Fields marked with * are mandatory.
We offer holistic SAP solutions from a single source to shape digital change and develop new business areas.
Switzerland
Schaffhausen
Germany
Mannheim, Düsseldorf, Munich
USA
Haverhill
Greece
Thessaloniki