When transferring a file as a text file, openFT implements code conversion in accordance with the type of partner system and the coding information available to openFT.
The local system described below is a BS2000 system with XHCS support. Various different scenarios must be distinguished (send and receive, any file attributes and the type of the partner system).
Sending
If a CCSN is assigned as an attribute to the send file in the local system, openFT converts the file to a reference code compatible to the character set of the file. openFT transfers the code-converted file, the CCSN of the file and the CCSN of the reference code to the partner system.
Example
A file stored in the local computer is in EBCDIC.EHC.LC code. The CCSN of the character set is EEHCLC. The file has the attribute CCSN=EEHCLC. The code EBCDIC.EHC.LC is compatible with the reference code EBCDIC.DF.04-5. The CCSN of the reference code is EDF045.
Prior to transfer, openFT converts the file into EBCDIC.DF.04-5.
openFT transfers the following to the partner system:
the converted file
the CCSN of the reference code (EDF045)
the CCSN of the code of the original file on the local computer (EEHCLC)
If no CCS name has been assigned to the send file in the local system, openFT assumes that the file is coded in the unexpanded character set EBCDIC.DF.03.IRV. openFT no longer re-codes the send file before the file transfer. No CCSN is passed to the partner system.
openFT behaves in exactly the same way if the file has been assigned a CCSN. Moreover, there are no code tables in XHCS.
If the send file’s CCSN corresponds to a 7-bit code table, the file will likewise be converted to the 8-bit reference code before it is sent.
If the code used in the file is not EBCDIC.DF.03.IRV, you should assign the CCSN of the code used to the send file prior to transfer or a CCSN is specified in the transfer request, so that openFT can convert the data accordingly prior to file transfer and send the requisite information to the partner system.
Example
The sending user ID on your BS2000 system has EBCDIC.EHC.LC assigned to it as its user default character set. The file to be transferred is also coded in the user default character set, but does not have a CCSN assigned to it as an attribute.
Under these circumstances, openFT transfers the file without first converting it to a reference code. The partner system receives no information concerning data code. Consequently, the partner system assumes that the receive file is coded in
EBCDIC.DF.03.IRV. There is therefore a danger of data being corrupted in the receive file.
BS2000 provides a REP solution for this scenario in which files without a CCSN take the CCSN either from the user ID or from the host code.
The partner system interprets the information it receives on the character set according to its abilities. For example, openFT (Unix systems) converts the data into the ISO 8859-n code with the variant number of the reference code.
Receiving
The receiving system must be able to distinguish the type of sending system, because the scope of information on the data code sent with the transferred file differs.
The sending system is also an openFT in a BS2000 system with XHCS
The receiving openFT interprets the information on the CCSN and the reference code. If the receive file is to be created or an existing file overwritten, one of three possible cases may arise:
The CCSN transferred with the send file is matched by a character set defined in the receive system and this character set is compatible with the reference code used for the file transfer.
In this case the receiving openFT converts the received data into the corresponding character set by employing the tables that belong to the CCSN. The CCSN is included in the file's catalog entry as an attribute.
In the receiving system, the CCSN transferred with the file is not matched by a character set compatible with the reference code used for file transfer. A user default character set has, however, been defined for the receiving user ID and this character set is compatible with the reference code used.
In this case the local openFT converts the receive file into the user default character set. The CCSN of the user default character set is included in the file's catalog entry.
In the receiving system, the CCSN transferred with the file is not matched by a character set compatible with the reference code used for file transfer. Moreover, no user default character set has been defined for the receiving user ID or the user default character set defined is not compatible with the reference code used for the file transfer.
In this case, openFT does not implement conversion. The file is stored in the reference code of the send file and the CCSN of the reference code is included in the catalog entry of the receive file.
Example
The remote openFT sends a file to the local openFT instance. The reference code used for the file is EBCDIC.DF.04-2. In addition the file as such, the local openFT receives from the remote partner the CCSN of the reference code (EDF042) and the CCSN of the code in which the send file was coded on the remote BS2000 system (CCSN=EEHCL2 for EBCDIC.EHC.L2) before the remote openFT converted the file into the reference code.
In the local BS2000 system there is a character set with the CCSN EEHCL2. This character set is compatible with reference code EBCDIC.DF.04-2, which is the code of the received data.
The local openFT instance converts the incoming file into the corresponding code and assigns the CCSN EEHCL2 as an attribute to the file.
The sending system is not an openFT in a BS2000 system
In this case the file transferred by the non-openFT system is coded in a reference code. The non-openFT system informs openFT of the name of this reference code. openFT is the receiving system and as such, it checks whether a user default character set is defined for the receiving user ID in the local system.
If a user default character set exists and if it is compatible with the reference code transferred, the received file is converted into the user default character set and the corresponding CCSN is included in the file’s catalog entry.
If no user default character set has been defined or if it is incompatible with the reference code of the file, code conversion does not take place. Instead, the file is stored in the reference code of the send file. The CCSN of the reference code is assigned to the receive file as a file attribute.
Example
The receive file is coded in EBCDIC.DF.04-2. The user ID involved locally in file transfer has the user default character set EBCDIC.EHC.L2 (with CCSN EEHCL2). This user default character set is compatible with EBCDIC.DF.04-2.
In this case, the local openFT converts the receive file into EBCDIC.EHC.L2. CCSN=EEHCL2 is assigned to the file as an attribute.