How to run BTEQ export Script in Mainframe

JCL for BTEQ

JCL to Run BTEQ Script in Mainframe a best example.

/*......................................................*/
/*..........................Program ................. */
/* SCRIPT = XYY9999....................................*/
/* SCRIPTTYPE=TERADATA BTEQ............................*/
/* LANGUAGE=UTILITY COMMANDS AND SQL................ */
/* RUN MODE=BATCH ..................................... */
/* ---------------------------------------------------*/
/* PROGRAM................................*/

.SESSIONS 1
.RUN FILE ILOGON;  
/*JCL ILOGON -.LOGON CDW/SQL01,WHYNOT;*/
.RUN FILE=IDBENV;  
/*JCL IDBENV-DATABASE SQL_CLASS;*/
.EXPORT DATA DDNAME=REPORTSELECT    EMPLOYEE_NO,    LAST_NAME,   FIRST_NAME,   SALARY,   DEPT_NOFROM EMPLOYEE_TABLE
.IF ERROR CODE > 0 THEN 
.GOTO DONE
.EXPORT RESET.LABEL DONE
.QUIT

Comments

Popular posts from this blog

SQL for Quantile Function in Teradata

3 Uses of SAMPLE function in Teradata

All You Need NULL Value Functions