Focal Point
Dynamic Label for errorhandling [SOLVED]

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1197094616

February 10, 2012, 04:55 AM
TKMAN
Dynamic Label for errorhandling [SOLVED]
-*********************Errorhandling****************************
-IF (&FOCERRNUM EQ 0) THEN GOTO :&myHandleError.EVAL;
-SET &myErrorTxt = 'Error in Step: ' |&myHandleError.EVAL |' Errorcode: ' | &FOCERRNUM;
-GOTO :ERROR_XT
-:&myHandleError.QUOTEDSTRING
-SET &myErrorInc = &myErrorInc + 1;
-SET &myHandleError = 'ERR_' | &myErrorInc.EVAL;
-**********************Errorhandling***************************

Id like to copy n paste or include the piece of sourcecode into my procedures. Unfortnately
the label -:&myHandleError.QUOTEDSTRING
isnt recocnized as such.

Is a dynamic goto label possible?
Could you give me a hint whats wrong with my syntax?

This message has been edited. Last edited by: TKMAN,


-----------------------------
PROD WF 7.7.02, PMF 5.2.3, MSQL 2005
QA WF 7.7.02, PMF 5.2.3, MSQL 2005
Primarily self-service; adapters: SAP BW, SAP R/3, SQL Server, FlexEnable
Windows, all output
February 10, 2012, 09:26 AM
j.gross
Two things:

1. It won't work with -INCLUDE; a GOTO within an -INCLUDEd file can only reference a label in the same file.

2. The label must be static text. (The scan to find the matching label does not perform amper-variable substitutions before determining whether a given line matches the specified target-label.)
February 16, 2012, 02:27 AM
TKMAN
Thank you j.gross!

Thats actually what I thought the answer would be.. :-(

[SOLVED]


-----------------------------
PROD WF 7.7.02, PMF 5.2.3, MSQL 2005
QA WF 7.7.02, PMF 5.2.3, MSQL 2005
Primarily self-service; adapters: SAP BW, SAP R/3, SQL Server, FlexEnable
Windows, all output