D
Daby
Guest
I'm trying to populate and integer variable from a character variable. If there is any error found I want to show the error message and trace all the possible cases for failure got.
//Defining variable
Define variable char_value as character no-undo initial "kk".
Define variable int_value as integer no-undo.
Assign int_value = char_value no-error.
IF ERROR-STATUS:ERROR OR ERROR-STATUS:NUM-MESSAGES > 0 THEN DO:
MESSAGE ERROR-STATUS:NUM-MESSAGES " errors occurred during conversion." SKIP "Do you want to view them?" VIEW-AS ALERT-BOX QUESTION BUTTONS YES-NO
UPDATE view-errs AS LOGICAL.
IF view-errs THEN DO ix = 1 TO ERROR-STATUS:NUM-MESSAGES:
END.
There are two conditions which I want to know.
Continue reading...
//Defining variable
Define variable char_value as character no-undo initial "kk".
Define variable int_value as integer no-undo.
Assign int_value = char_value no-error.
IF ERROR-STATUS:ERROR OR ERROR-STATUS:NUM-MESSAGES > 0 THEN DO:
MESSAGE ERROR-STATUS:NUM-MESSAGES " errors occurred during conversion." SKIP "Do you want to view them?" VIEW-AS ALERT-BOX QUESTION BUTTONS YES-NO
UPDATE view-errs AS LOGICAL.
IF view-errs THEN DO ix = 1 TO ERROR-STATUS:NUM-MESSAGES:
Code:
MESSAGE ERROR-
STATUS:GET-NUMBER(ix)
ERROR-STATUS:GET-
MESSAGE(ix).
END.
END.
There are two conditions which I want to know.
- What char value I gave so that no. Of error returns will be more than 1.
- How can I trace all the possible cases for failure got.
Continue reading...