sapdev logo background
sapdev logo sapdev logo
Comments

SAP UNICODE DATASET NEW OPTIONS documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

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 .
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    UNICODE_DATASET
    UNICODE_DATENCLUSTER




    comments powered by Disqus