MSCEWI2023

File execution inconsistency

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

Severity

Low

Description

This warning appears when the migrated code is a BTEQ sentence executing an environment file with SQL statements E.g. $(<$INPUT_SQL_FILE). The difference between the BTEQ execution and the python generated code is that BTEQ continues with the other statements in the file when one of them fails but the python execution stops whenever an error occurs.

Code Example

Input Code:

.logmech LDAP;
.logon $LOGON_STR;
.SET DEFAULTS;


$(<$INPUT_SQL_FILE)

.export reset
.logoff
.quit

Output Code:

def main():
   snowconvert.helpers.configure_log()
   exec("$INPUT_SQL_FILE")
   snowconvert.helpers.quit_application()

if __name__ == "__main__":
   main()

Recommendations

Last updated