Posts

Showing posts from February, 2016

12 Frequently Used File Control Commands in BTEQ utility

Image
The below list shows ultra frequently used commands in BTEQ utility. DEFAULTS: Reset all BTEQ format command options to their defaults. This will utilize the default configurations ECHOREQ - Enable the Echo required function in BTEQ returing a copy of each Teradata SQL request and BTEQ command to the standard output stream EXPORT - Open a file with a specific format to transfer information directly from the Teradata database. IMPORT - Open a file with a specific format to import information into Teradata INDICDATA - One of multiple data mode options for data selected from Teradata. The modes are INDICDATAFIELD or RECORD MODE OS - Execute an MS-DOS, PC-DOS or Unix command inside BTEQ QUIET -Limit BTEQ output displays to all error messages and request processing statistics REPEAT - Submit the next request a certain amount of times RUN - Execute Teradata SQL requests and BTEQ commnads directly from a specified run file TSO - Execute an MVS TSO command from inside the BTEQ env

How to run BTEQ export Script in Mainframe

Image
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