CodePage class | QSYS API Reference Guide

Estimated reading time: 2 minutes

Provides facilities to probe an IBM i file’s code page.

Namespace: ASNA.QSys.Runtime.JobSupport Assembly: ASNA.QSys.Runtime.dll

Inheritance: Object

Properties

Type Name Description
Int32 StarHex Constant representing an unecoded hexadecimal code.

Methods

Signature Description
GetFileCCSIDAttr(AdgConnection, String) Gets the coded character set identifier of an IBM i physical file.
GetFileCCSIDAttr(AdgConnection, String, String) Gets the coded character set identifier of an IBM i physical file.
IbmCodepageToWinCodepage(Int32) Convert an encoded character set identifier to a Windows code page.

decimal GetFileCCSIDAttr(AdgConnection dbConnection, string pathName)

Gets the coded character set identifier of an IBM i physical file.

decimal GetFileCCSIDAttr(AdgConnection dbConnection, string pathName)

Parameters

Type Parameter name Description
AdgConnection dbConnection Database connection opened to an IBM i DataGate server.
String pathName Qualified named of the physical file.

Returns

Type Description
Decimal The file’s coded character set identifier.

decimal GetFileCCSIDAttr(AdgConnection dbConnection, string library, string filename)

Gets the coded character set identifier of an IBM i physical file.

decimal GetFileCCSIDAttr(AdgConnection dbConnection, string library, string filename)

Parameters

Type Parameter name Description
AdgConnection dbConnection Database connection opened to an IBM i DataGate server.
String library Name of the file’s library.
String filename Name of physical file.

Returns

Type Description
Decimal The file’s coded character set identifier.

int IbmCodepageToWinCodepage(int codePage)

Convert an encoded character set identifier to a Windows code page.

int IbmCodepageToWinCodepage(int codePage)

Parameters

Type Parameter name Description
Int32 codePage The IBM code page.

Returns

Type Description
Int32 The corresponding Windows code page.