#### PLATFORM

#### Synopsis

    HELP:   Redefine environment variable FL_PLATFORM for read operation
    TYPE:   STRING
    SYNTAX: PLATFORM=WIN/UNX/ZOS/USS/VSE/BS2/MAC

#### Description

The parameters LANG (mainly for character conversion), PLATFORM (mainly for text formatting (delimiter), default character set definitions and default endianness), OWNER (mainly used to sign data with the correct key) and ENVID (mainly for key label mapping) can be used to overwrite the corresponding environment variables LANG, FL_PLATFORM, OWNERID and ENVID for the read and/or the write operation. This is useful to emulate another system when reading or writing and uses FLAM's automatism for character conversion, delimiter handling, key referencing or big and little endian representation (byte order) of integers.

Supported platform qualifiers:

- WIN - Windows with CRLF (0x0D0A) in ASCII and little endian
- UNX - Unix with LF (0x0A) in ASCII and little endian
- MAC - MAC-OS with CR (0x0D) in ASCII and little endian
- ZOS - z/OS with NL (0x15) in EBCDIC and big endian
- USS - Unix system services on z/OS with NL (0x15) in EBCDIC and big endian
- VSE - z/VSE with NL (0x15) in EBCDIC and big endian
- BS2 - BS2000-OSD with NL (0x15) in EBCDIC and big endian

Optionally you can append a '.L' to override the default endianness to little or a '.B' for big endian. This is mainly required for UNIX systems:

- UNX.B - for zLinux, AIX on Power, Solaris on Sparc

Three example scenarios:

1) You have a text file from a German Windows system that you wish to process on z/OS. It would be useful to read the file with the environment variable 'LANG' set to 'DE_DE.CP1252', but write the output with the default value for 'LANG' as set in the FLCL configuration file for z/OS. This can be done by specifying the 'LANG' variable with the read operation, e.g.

       READ.TEXT(FILE='input.txt' LANG='DE_DE.CP1252')

2) If you want to create a file for Windows on z/OS, the environment variable 'PLATFORM' set to 'WIN' ensures that the delimiter CRLF is used as default text delimiter:

       WRITE.TEXT(FILE='out.txt' LANG='DE_DE.CP1252' PLATFORM=WIN)

3) If you wish to write a file on a UNIX system for USS on z/OS, you could set the environment variable LANG to 'EN_US.IBM1047' for the write operation and the platform to 'USS'. The default LANG variable on the UNIX system is used for the read operation. As a result, the file is written in IBM1047 and the records are delimited with NL (0x15):

       WRITE.TEXT(FILE='out.txt' LANG='EN_US.IBM1047' PLATFORM=USS)

You may also implement an application against the byte, record or element interfaces and the environment ID must be defined for TEST, then you can set the parameter ENVID='T' to work with test keys or you can redefine the owner with OWNER='CLIENT'.

#### Selections

- `WIN - Choose Windows as platform (CRLF)`
- `UNX - Choose Unix derivative as platform (LF)`
- `ZOS - Choose ZOS as platform (NL)`
- `USS - Choose USS of ZOS as platform (NL)`
- `VSE - Choose VSE as platform (NL)`
- `BS2 - Choose BS2000-OSD as platform (NL)`
- `MAC - Choose MAC as platform (CR)`