A blog about IBM i (AS/400), MQ and other things developers or Admins need to know.
星期三, 9月 29, 2010
星期五, 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月 16, 2010
星期一, 9月 06, 2010
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.
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.
訂閱:
文章 (Atom)