When working with hexadecimal values, attribute bytes, "hidden" or "imbedded" decimal data, *LOVAL or *HIVAL you should be aware of the following: 

This is most commonly encountered with non-English and non-Japanese SQL Anywhere databases when a Translator is used in the ODBC data source. Refer to the Sybase SQL Anywhere Manual for more information on the use of a Translator. Do not change this option to attempt to make your embedded packed fields work as other more significant problems will be introduced.

The issue can also occur with, say, an SQL Server database running on an English Windows server and clients running on Greek Windows.

Using the *SBIN attribute on either input, output or both, causes the field to be created as a column of type binary in the database or the equivalent, for example, RAW in Oracle. All database reads and writes will just copy the actual data and not presume anything about the content. For example, embedded X'00' characters would be faithfully written and read from the database without causing any following data to be truncated.

It is important to remember that this functionality is only true at the database level. Manipulating an alphanumeric field with embedded packed fields as an alphanumeric field, rather than its packed constituent parts, will still yield unpredictable results as described in the previous point. In RDML you must refer to the embedded fields and not the alphanumeric field. This is an example of the code:

          FUNCTION OPTIONS(*DIRECT);
DEFINE FIELD(#A04) TYPE(*CHAR) LENGTH(4);
DEFINE FIELD(#A04A) TYPE(*CHAR) LENGTH(4) DECIMALS(0) TO_OVERLAY(#P07);
DEFINE FIELD(#P03R) TYPE(*DEC) LENGTH(003) DECIMALS(0) EDIT_CODE(J) TO_OVERLAY(#A02);
DEFINE FIELD(#C) TYPE(*DEC) LENGTH(007) DECIMALS(0);
DEF_LIST NAME(#L10) FIELDS(#P07 #P03R);
********** COMMENT(Insert 0 to 999 fields);
BEGIN_LOOP USING(#C) TO(1000);
CHANGE FIELD(#P07) TO('(#C - 1)');
CHANGE FIELD(#P03R) TO(#P07);
INSERT FIELDS(#P07 #A02) TO_FILE(F10);
END_LOOP;
********** COMMENT(Retrieve and converts previously saved fields);
SELECT FIELDS(#P07 #A02) FROM_FILE(F10);
ADD_ENTRY TO_LIST(#L10);
ENDSELECT;
**********
DISPLAY BROWSELIST(#L10);
          CHANGE FIELD(#P03R) TO(#P07);
CHANGE FIELD(#A04) TO(#A02)

It may or may not work as expected depending on whether the Packed Field representation #P03R (i.e., #A02) contains a byte of 0x00.

Uses that are not supported include: