Consultor Eletrônico



Kbase P148953: 4GL/ABL:  Can error 22 be generated by r-code?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/8/2009
Status: Unverified

GOAL:

4GL/ABL: Can error 22 be generated by r-code?

GOAL:

Is the error '** Character number <character> of format <format string> is invalid. (22)' a compile time only error?

GOAL:

How can the error: '** Character number 3 of format "99+99/99" is invalid. (22)' be generated when running r-code?

FACT(s) (Environment):

All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)

FIX:

The error '** Character number <character> of format <format string> is invalid. (22)' may occur at both compile time as well as run time.
For example:
1. Compiling the following line of code will generate the error:
DEFINE VARIABLE dVariable AS DATE FORMAT "99+99/99" NO-UNDO.
2. The following procedure compiles error free, but running its r-code generates the error at run time:
DEFINE VARIABLE dVariable AS DATE NO-UNDO.
DEFINE FRAME FrameName
dVariable.
ASSIGN
dVariable = TODAY
dVariable:FORMAT IN FRAME FrameName = "99+99/99".