Code Example
In the following example, User Data Type UTF16 and RECIDLEN 24 are specified on the PAGEDEF command and the RECIDLEN 26 is specified on the second PAGEFORMAT command (pf2).
For the two page formats pf1
and pf2
:
pf1
inherits a RECIDLEN of 24 bytes from the page definition, and the User Data Type for the entire page definition is UTF-16.- The LAYOUT name
Long Name 1
is translated to UTF-16 and padded to 24 bytes with UTF-16. - The delimiter
/
(slash) on the LAYOUT is translated to UTF-16. - The FIELD command text
abcd
is translated to UTF-16.
- The LAYOUT name
pf2
specifies a RECIDLEN fo 26 bytes and gets UDType UTF-16 from the page definition.- The LAYOUT name
Long Name 2
is translated to UTF-16 and padded to 26 bytes with UTF-16. - The CONDITION command text
ABCDEFGH
is translated to UTF-16. Note that the field length of the 8 character string is 16 bytes because each character is 2 bytes long.
- The LAYOUT name
PAGEDEF xmp1 UDType UTF16 RECIDLEN 24 REPLACE yes; FONT comp a075nc TYPE UNICODE FONT comp2 a075bg TYPE UNICODE PAGEFORMAT pf1; LAYOUT 'Long Name 1' DELIMITER '/' Position 2 1 FONT comp; FIELD TEXT 'abcd' Position 2.5 1.5; PAGEFORMAT pf2 RECIDLEN 26; LAYOUT 'Long Name 2' POSITION 2 1 FONT comp2; CONDITION cn1 START 13 Length 16 WHEN EQ 'ABCDEFGH' NULL Pageformat pf1;