MSCEWI2071
GOTO statement was replaced with the label section with the same name
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Medium
Description
The GOTO statement indicates to the BTEQ interpreter to skip all the statements until it find a LABEL statement with the same name. To replicate this functionality the GOTO statement is replaced with the LABEL section.
Example Code
Input Code:
.LOGON dbc,dbc;
select 1;
.IF activitycount >= 1 then .GOTO SECTIONB
.REMARK 'REMARK1'
.label SECTIONB
.REMARK 'REMARK2'
.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;
IF (SQLROWCOUNT >= 1) THEN
/*** MSC-WARNING - MSCEWI2071 - GOTO SECTIONB WAS REPLACED WITH THE LABEL SECTION WITH THE SAME NAME ***/
/*** MSC-WARNING - MSCEWI1002 - REMOVED NEXT STATEMENT, NOT APPLICABLE IN SNOWFLAKE. ***/
/*.label SECTIONB*/
/*** MSC-ERROR - MSCEWI1037 - TRANSLATION FOR SCRIPT STATEMENTS IS PLANNED TO BE DELIVERED IN THE FUTURE ***/
/*.REMARK 'REMARK2'*/
/*** MSC-ERROR - MSCEWI1037 - TRANSLATION FOR SCRIPT STATEMENTS IS PLANNED TO BE DELIVERED IN THE FUTURE ***/
/*.logoff*/
RETURN 0;
END IF;
/*** MSC-ERROR - MSCEWI1037 - TRANSLATION FOR SCRIPT STATEMENTS IS PLANNED TO BE DELIVERED IN THE FUTURE ***/
/*.REMARK 'REMARK1'*/
/*** MSC-WARNING - MSCEWI1002 - REMOVED NEXT STATEMENT, NOT APPLICABLE IN SNOWFLAKE. ***/
/*.label SECTIONB*/
/*** MSC-ERROR - MSCEWI1037 - TRANSLATION FOR SCRIPT STATEMENTS IS PLANNED TO BE DELIVERED IN THE FUTURE ***/
/*.REMARK 'REMARK2'*/
/*** MSC-ERROR - MSCEWI1037 - TRANSLATION FOR SCRIPT STATEMENTS IS PLANNED TO BE DELIVERED IN THE FUTURE ***/
/*.logoff*/
RETURN 0;
END
$$
Recommendations
If you need more support, you can email us at [email protected]
Last updated