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

1 comment:

  1. Thank you for sharing this wonderful idea and an awesome BTEQ Mainframe Export Script Example. This is something that we can use in our work collaboration with research paper customer service data project.

    ReplyDelete