This function converts I-DBCS data to E-DBCS data. It builds a temporary string value by concatenating an S/D character, the contents of the referenced alpha field or literal (ignoring any trailing spaces), and an S/S character. You can use the function in any context where you can use a $STRING function. Some examples are:
SET A = $DBCS-ATTACH(B) IF A = $DBCS-ATTACH(B) LIST $DBCS-ATTACH(B)
This function converts E-DBCS data to I-DBCS data. It builds a temporary string value by removing the S/D character at the left (ignoring leading spaces), removing any trailing spaces, and then removing the S/S character. A runtime error occurs if the S/D and S/S characters are not found when this function is used or if there are any S/D or S/S characters remaining. You can use an alpha-literal as an operand instead of an alpha-field. You can use the function in any context where you can use a $STRING function, however, it cannot have other functions imbedded in the $DBCS functions.
For $DBCS-DETACH to work successfully, at least one DBCS character must appear between the S/D and S/S characters and only spaces can follow the S/S character. For this reason, do not specify LOW VALUES as an INPUT FILL character for panel fields that have $DBCS-DETACH applied to them.
This string function returns a one-byte code to indicate whether a field is E‑DBCS. The codes indicate:
For the $DBCS-TYPE function to return an L, at least one DBCS character must appear between the S/D and S/S characters and only spaces can follow the S/S character. For this reason, do not specify LOW VALUES as an INPUT FILL character for panel fields that the $DBCS-TYPE function tests. You can use this function anywhere you can use a $STRING function. For example:
IF $DBCS-TYPE(A) = 'L'
This string function returns the hexadecimal value of the specified field's contents. The length of the receiving field should be twice the size of the sending field to avoid truncation. An example follows:
X = ABCD SET Y = $CHAR-TO-HEX(X) Y = C1C2C3C4
If X was defined in working data as a 5-byte field, the value of Y is C1C2C3C440.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|