We need to make a BTEQSQL with the command “EXPORT REPORT” using a variable that contain the name file that we must use and generate. Following, we explain the SQL with the syntax USING to recuperate the name file that is used to export data.
.IMPORT DATA FILE = 'TEST.DAT'; USING ROOT (CHAR (20)), CODE (CHAR(2)) .EXPORT DATA FILE =:ROOT; SELECT NAMEFILE FROM DATABASE.USERS WHERE CODE=:CODE; .EXPORT RESET
But this solution isn't write because we can't used the syntax USING. Another solution?