星期五, 9月 24, 2010

MI - Test Bit in String (TSTBTS)

Test Bit in String (TSTBTS)
RPGLE SAMPLE CODE:

H Option( *SrcStmt ) BndDir( 'QC2LE' )

**-- Test bit in string:
D tstbts Pr 10i 0 ExtProc( 'tstbts' )
D string * Value
D bitofs 10u 0 Value

D testStr S 4
D bitOffset c 30
D result S 10i 0

/Free

result = tstbts( %Addr( testStr ) : bitOffset );
dsply result;

/End-Free

星期一, 9月 06, 2010

AS/400 Security AS/400 Services AS/400 security Software AS/400 Training, System i and iSeries Security and iSeries Audit Services and Security Software

AS/400 Security AS/400 Services AS/400 security Software AS/400 Training, System i and iSeries Security and iSeries Audit Services and Security Software

QlgTransformUCSData()--Transform UCS Data API

QlgTransformUCSData()--Transform UCS Data API

The QlgTransformUCSData() function transforms, through a formula as compared to a mapping, data from one form of Unicode to another. A transformation type identification is used to specify the type of transformation.

Usage Notes:

1. When requesting a BOM tagged output buffer the following BOM values will be generated.

BOMS Hex values
UTF-32 BE (020) 00 00 FE FF
UTF-32 LE (030) FF FE 00 00
UTF-16 BE (040) FE FF
UTF-16 LE (050) FF FE
UTF-8 (060) EF BB BF

A sample conversion:

transformation type: 030021

UTF-32 LE (030) -> UTF-32 BE marked (021)

x'AB 5F 00 00 7C 8E 00 00' -> x'00 00 FE FF 00 00 5F AB 00 00 8E 7C'
2. Auto detection is available when there is a BOM in the beginning of the inbuf that represents a Unicode type.

Practical RPG: Initialization Made Easy | RPG

Practical RPG: Initialization Made Easy | RPG

TechTip: Simplify Your Development with DB2 Automatic Timestamp Support | Database

TechTip: Simplify Your Development with DB2 Automatic Timestamp Support | Database