Wednesday, 24 February 2016

How to run BTEQ export 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

No comments:

Post a Comment

Featured post

5 Top Teradata DATE functions to read now

The following are the list of DATE functions. These are very frequently being used in Teradata. The following statement requests the cur...

Popular Posts