Ansicht
Dokumentation

ABENUNICODE_DATASET_NEW_OPTIONS - UNICODE DATASET NEW OPTIONS

ABENUNICODE_DATASET_NEW_OPTIONS - UNICODE DATASET NEW OPTIONS

PERFORM Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Neue Zusätze für die Dateischnittstelle

Overview

1. Opening files
2. Reading data
3. Writing data
4. File attributes



1. Opening files

OPEN DATASET dsn IN TEXT MODE.

The file is opened so that it can be read or written to line-by-line. Final space characters are deleted in this mode.

  • ... ENCODING ( DEFAULT | UTF-8 | NON-UNICODE )addition
    The keyword ENCODING specifies the character set used to edit the data. In a Unicode system, the DEFAULT is UTF-8, while in a non-Unicode system, it is NON-UNICODE. NON-UNICODE means that the system uses the code page specified either when the user logs on to the R/3 System or in the SET LOCALE statement.
  • ... REPLACEMENT CHARACTER rc addition
    Specifies the replacement character that is used if a character is not available in the target character set when the file is converted. The default replacement character is the hash symbol (#).

OPEN DATASET dsn IN BINARY MODE.

The file is opened to be read or written to, without any line breaks. In both the Unicode system and the non-Unicode system, the exact content of memory is copied.

OPEN DATASET dsn IN LEGACY TEXT MODE.

The file is opened so that it can be read or written to line-by-line, in a format compatible with TEXT MODE in the non-Unicode system.

  • ... LITTLE | BIG ENDIAN addition
    The optional ENDIAN addition specifies the byte order in which the system will process numbers of type I or F. If this addition is missing, the operating system on the application server specifies the byte order. If the byte order declared differs from that used by the operating system, the data is converted as appropriate for the statements READ DATASET and TRANSFER. You can also specify a REPLACEMENT CHARACTER, rc, in this variant.
  • ... CODE PAGE cp addition
    The CODE PAGE addition specifies the code page used to display text from the file dsn. If this addition is missing, the system uses the code page used to read or write to the file.

OPEN DATASET dsn IN LEGACY BINARY MODE.
The file is opened to be read or written to without any line breaks, in a format compatible with non-Unicode system BINARY MODE. The additions ENDIAN and CODE PAGE are used as described above. You can also specify a REPLACEMENT CHARACTER,  rc, in this variant.

Note
For each of the above variants, you can use the IGNORING CONVERSION ERRORS addition to make the system suppress conversion errors at runtime when reading or writing to a file. In general, reading or writing to a file causes a runtime error, unless this file has already been opened using an OPEN DATASET statement.

2. Reading data

READ DATASET dsn INTO f [ LENGTH len ] ...

The ... LENGTH len addition specifies the length of the file in characters (for a text-mode file), or in bytes (for other file types).

3. Writing data

TRANSFER f TO dsn [ LENGTH len ] ...

The ... LENGTH len addition specifies the length of the file in characters (for a text-mode file), or in bytes (for other file types).

4. File attributes You can obtain the attributes of a file at runtime, using the GET DATASET or change them using SET DATASET.






rdisp/max_wprun_time - Maximum work process run time   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 4703 Date: 20240426 Time: 110821     sap01-206 ( 73 ms )