Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Capturing Correct Error No. with &FOCERRNUM
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Capturing Correct Error No. with &FOCERRNUM
 Login/Join
 
Platinum Member
posted
I am running a procedure that prompts for a variable and if the user enters the wrong format I get error code FOC006 followed by FOC009. I want to test only for FOC006 but the code below displays only 9 - the second of 2 errors.

TABLE FILE CAR
PRINT SEG.MODEL
BY COUNTRY BY CAR BY SEATS
IF SEATS EQ '&SEATS.EVAL'
END
-RUN
-TYPE WEBFOCUS ERROR NO. = &FOCERRNUM


ERROR AT OR NEAR LINE 5 IN PROCEDURE Procedure1.fexFOCEXEC *
(FOC006) THE FORMAT OF THE TEST VALUE IS INCONSISTENT WITH FIELD FORMAT: xxx
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT
WEBFOCUS ERROR NO. = 9

This message has been edited. Last edited by: FP Mod Chuck,


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 190 | Location: London, UK | Registered: December 06, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
This might not apply to your specific use case but what if you checked for valid numbers instead so you don't even get an error?
  
-IF PATTERNS(&SEATS) NE 9 OR 99 THEN GOTO ERR_MSG
TABLE FILE CAR
PRINT SEG.MODEL
BY COUNTRY BY CAR BY SEATS
WHERE SEATS EQ &SEATS
END
-RUN
-EXIT
-ERR_MSG
-TYPE YOU ENTERED AN INVALID VALUE.


WebFOCUS 8204, Unix, Windows
 
Posts: 1617 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks for the suggestion but actually my prompted field is a date and I know I can check its syntax but was just wanting to capture the correct error number.


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 190 | Location: London, UK | Registered: December 06, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Ian

Unfortunately that variable is always the last error number that occurred even though it may not be the one you want to capture.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1498 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Ok thanks for the confirmation Chuck.


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 190 | Location: London, UK | Registered: December 06, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Capturing Correct Error No. with &FOCERRNUM

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.