Ensuring the edit routine returns the right results

Return the results in the ECSRSLT field, with trailing blanks for unused bytes. Make the results readable to the user's screen. This means that the resulting DBCS and EBCDIC characters must have the appropriate representations, and that the beginning and end of any string of DBCS characters are marked by So and Si characters.

Overflowing the ECSRSLT field

Be careful not to overflow the ECSRSLT field, whose length is contained in the ECSRSLEN field. If your results do not fit, truncate them on the right. If the last character represented in the truncated results is a DBCS character, be certain to retain its rightmost byte, and to follow that character with an Si character.

Printing the report column

QMF copies the ECSRSLT field into the corresponding report column. The result is exactly as wide as the report column. If you do not specify ALIGNMENT for data, the data is aligned exactly as you typed it.

How the report device represents what you return depends on the specific device. For some terminals, the following rules apply:

For other devices, the rules can be slightly different.

Instructions for using DBCS characters in the online help say not to use certain DBCS characters in queries and QMF commands. The same restriction does not apply to the formatted data returned by an edit routine. Any legitimate DBCS character can be returned in the ECSRSLT field.

[ Previous Page | Next Page | Contents | Index ]