Create either a Uxxxx or Vxxxx edit code to be handled by your edit exit routine. For U codes, data passed to the edit routine has the internal database representation of the source data. For V codes, numeric data is converted to a character string, and this character string is passed to the edit program.
Both codes can indicate processing for either character or numeric data. U and V must be uppercase. Replace xxxx with zero to four characters (letters, digits, or special characters) that can be entered from a terminal; embedded blanks or nulls are not allowed. The following examples show valid U-type and V-type edit codes:
U1 UAB42 V_1 VX%5
When the source data is character, codes of either type are equally easy to process. If the formatting requires arithmetic operations, consider using U codes for numeric sources; otherwise, use V codes. If the data type is extended floating point, ensure that the programming language supports it. For example, VS COBOL II does not handle extended floating point data. In this case, use V codes.
For V codes containing numeric data, QMF converts the data to character format and then calls the user edit routine. The length of the converted number varies depending upon its original data type, as shown in Table 67.
If data type of original numeric data is: | QMF converts it to this length: |
---|---|
Small integer | 5 |
Integer | 11 |
Decimal | Equal to the precision of the original data (raised to an odd number if the original data is even) |
Floating point | 15 or more depending on the base 10 exponent |
Extended floating point | 30 or more depending on the base 10 exponent |
You do not need to restrict an edit code to the processing of numeric data, or to the processing of character data. The sample edit routines supplied with QMF process one edit code for both numeric and character data.
If the CASE field of a user's profile has the value UPPER or STRING, QMF converts all input entered from the terminal to uppercase, and the edit code might not be recognized. If your edit code is written to accept edit codes in mixed case, enter the edit codes when case is set to mixed.
[ Previous Page | Next Page | Contents | Index ]