MSCEWI2072

LABEL not found, GOTO statement was replaced with return statement

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Low

Description

The GOTO statement indicates to the BTEQ interpreter to skip all the statements until it find a LABEL statement with the same name. So if that LABEL statement are not in the code or the interpreter can't find it, all the statements below that GOTO will be skipped. To replicate this functionality the GOTO statement without the corresponding LABEL is replaced with a Snowflake return with code 1.

Example Code

Input Code:

.LOGON dbc,dbc;
select 1;
.label SECTIONA
.GOTO SECTIONA
.REMARK 'Zero Hours on Account'
.logoff      
.exit

Output Code

EXECUTE IMMEDIATE
$$
BEGIN
/*** MSC-ERROR - MSCEWI1037 - TRANSLATION FOR SCRIPT STATEMENTS IS PLANNED TO BE DELIVERED IN THE FUTURE ***/
/*.LOGON dbc,dbc;*/
 
SELECT
1;
/*** MSC-WARNING - MSCEWI1002 - REMOVED NEXT STATEMENT, NOT APPLICABLE IN SNOWFLAKE.  ***/
/*.label SECTIONA*/

/*** MSC-WARNING - MSCEWI2072 - LABEL SECTIONA NOT FOUND, GOTO SECTIONA WAS REPLACED WITH RETURN STATEMENT ***/
 
RETURN 1
/*** MSC-ERROR - MSCEWI1037 - TRANSLATION FOR SCRIPT STATEMENTS IS PLANNED TO BE DELIVERED IN THE FUTURE ***/
/*.REMARK 'Zero Hours on Account'*/

/*** MSC-ERROR - MSCEWI1037 - TRANSLATION FOR SCRIPT STATEMENTS IS PLANNED TO BE DELIVERED IN THE FUTURE ***/
/*.logoff*/
 
/*** MSC-WARNING - MSCEWI2070 - REMOVED NEXT STATEMENT, IT WAS INACCESSIBLE. ***/
/*RETURN 0;*/
END
$$

Recommendations

  • Remove the GOTO statement if their LABEL is not in the code or add the corresponding LABEL somewhere below the GOTO statement.

  • If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated