Table of Contents
This appendix describes how to calculate a field buffer when migrating a Tuxedo environment that uses FML to Tmax.
The following describes how to calculate the size of a buffer according to field type.
Field Type | Size |
---|---|
String | Header 4bytes + Date len + Null 1bytes + Padding |
Carray | Header 4bytes +Specified Length + 4(Specified Length)bytes + Padding |
Char | Header 4bytes, Data 4bytes |
Short | Header 4bytes, Data 4bytes |
Long | Header 4bytes, Data 4bytes |
Float | Header 4bytes, Data 4bytes |
Double | Header 4bytes, Data 8bytes + Padding (4bytes) |
The following is an example of how to calculate the size of a buffer.
Buffer size = FDL buffer header + (Field header(4) + Data length + Padding) * Input counts
Data must be 8-byte-aligned for padding.
The following is an example of how to calculate Tax FD values.
F1 integer F2 long F3 float F4 double F5 STRING length 10 F6 STRING length 19 F7 CARRAY length 22
Buffer size is calculated according to the field type as shown below.
F1 integer F2 long F3 float F4 double F5 STRING Length 10 F6 STRING Length 19 F7 CARRAY Length 22 F1 integer : 8 (Header field(4) + 4) F2 long : 8 (Header field(4) + 4) F3 float : 8 (Header field(4) + 4) F4 double : 16 (Header field(4) + 8) + 4(padding) F5 STRING length 10 : 16 (Header field(4) + 10 + 1(null)) + 1 F6 STRING length 19 : 24 (Header field(4) + 19 + 1(null)) F7 CARRAY length 22 : 32 (Header field(4) + 22 + 4(int for specifying the length)) + 2 Total : 112
According to the buffer usage calculation method, a buffer of 179200 bytes is required to send 200 records.
fdl buffer header(8) + (length of a record * counts) 8 + (112 * 200) = 179200 byte
The following describes how to calculate buffer size according to field type.
Field Type | Size |
---|---|
String | Header 4bytes, Null 1byte |
Carray | Header 4bytes |
Char | Header 2bytes, Data 2bytes |
Short | Header 2bytes, Data 2bytes |
Long | Header 2bytes, Data 4bytes |
Float | Header 2bytes, Data 4bytes |
Double | Header 2bytes, Data 8bytes |
FML 16 has 2 bytes for a header field and a data field, and FML32 and Tax use 4 bytes for the fields. The FML32 calculation method has a slight difference in size between the Tax FD and the actual data size, while the FML 16 calculation method shows a notable difference in size. A field buffer size should be correctly calculated when migrating Tuxedo to Tmax.