For BS2000 files, the CODED-CHARACTER-SET (CCS) represents the character set used in BS2000 (see section "File attributes for outputting files"). Normally, different character sets are used for the coding in SAM node files. To enable a code conversion for processing and displaying node files in BS2000, the character set used on Net-Storage is entered in the file catalog for the node files from BS2000 OS DX onwards.
The NET-CODED-CHAR-SET (NETCCS) file attribute represents the actual character set that was used to store the data of a node file on the Net-Storage. When the file is displayed or processed in BS2000, EBCDIC character sets are converted according to this setting. For PAM node files, no conversion takes place.
The NETCCS of a node file is specified when the catalog entry is created with CREATE-FILE or IMPORT-NODE-FILE and can be changed with MODIFY-FILE-ATTRBUTES. As a default for CREATE-FILE and IMPORT-NODE-FILE, the CCS and NETCCS character sets are determined from the settings in the user entry. In case of CREATE-FILE, the user may also make a different specification for CCS and NETCCS.
If NET-CODED-CHAR-SET=*NO-CONV or *ISO, a target character set is automatically determined and entered in the file attributes. However, the NET-CODED-CHAR-SET may also be explicitly stated, just like the CODED-CHARACTER-SET. Reference the following table for an overview.
In the first two columns, you can see the settings in the user entry or the specification made during CREATE-FILE, from which the resulting NET-CODED-CHAR-SET in the catalog entry of the node file is determined (see column on the right):
User entry CCS 1) | User entry NETCSS 1) | Resulting NETCSS in the catalog entry of the node files |
---|---|---|
EDF03IRV/*NONE | *ISO | ISO88591; during code conversion, EDF041 is assumed for CCS |
EDF03DRV | *ISO | ISO88591; during code conversion, EDF04DRV is assumed for CCS |
EDF04DRV | *ISO | ISO88591 |
EDF04x | *ISO | ISO8859x with x=1,2,..F |
ISO8859x | *ISO or *NO-CONV | ISOx |
UTFx | *ISO or *NO-CONV | UTFx |
<name_a 1..8> | <name_b 1..8> | <name_b 1..8> |
<name_a 1..8> | *NO-CONV | <name_a 1..8> |
1) User entry (SYSSRPM) or specification in CREATE-FILE / MODIFY-FILE-ATTRIBUTES |
Notes:
The user’s specifications are not validated. Only at OPEN is XHCS called to request the required code table. If it is not available there, the OPEN is rejected.
In the first place, changing the coded character sets (CCS and/or NETCCS) only changes the corresponding file attributes. Only when the file is processed (read and write), the code tables are used to transfer to/from the Net-Storage and simultaneously convert the data for the application.
The required character sets have to be created before the file is being processed. The settings for CCS and NETCCS should not be changed after the data have been written on Net-Storage, as it is very likely that further converting the characters and processing them with the now changed code tables will lead to inconsistencies.
All SAM node files and PAM node files created with BS2000 OS DX or later have a defined NETCCS. PAM node files created with an older version are treated as if they were created with *NO-CONVERSION.
The NETCCS is only relevant for processing SAM node files.
Irrespective of the setting for the file attribute, a line feed control character compatible with the character set is inserted between every converted sentence while the node file is being written. This is for example x'0A' (for ISO88591, ISO646, UTF-8), x'000A' (for UTF-16) or x'15' (for EBCDIC).
Even if the user has specified a 7-bit character set EDF03IRV or EDF03DRV as CCS, an eight-bit character set is used for the coded character set when the characters are being converted: EDF041 is assumed for EDF03IRV and EDF04DRV for EDF03DRV.
If an ISO or UTF character set is specified for the CCS, no conversion will take place.
A conversion from a 7- or 8-bit character code to a multibyte character set (e.g. UTF) is not possible.