1. LOAD DATA /* This line is the starting syntax for the control file */ 2. INFILE file_name / * /* This line gives location of input file */ IF a ‘*’ option is chosen then data is appended in the control file itself */ 3. INSERT/APPEND/REPLACE/TRUNCATE /* This line contains the DML operation we want to perform with SQL*Loader */ 4. CONTINUE IF THIS (1) = character /* The character ( for instance, ‘+’ or ‘*’) specifies that next physical record should be appended till they find another character like that to for a single logical record */ 5. INTO TABLE EMP /* These line provide the table names where records need to be inserted 6. ( empid SEQUENCE (MAX,1), 7. first_name Position (01:30) CHAR, 8. last_name Position (31:60) CHAR, 9. hire_date Position ( 61:72) DATE, 10. emp_no Position ( 73:85) CHAR 11. INTO TABLE DEPT /* These line provide the table names where records need to be inserted 12. WHEN DEPTNO!= '^Z' 13. (emp_no Position (73:85) CHAR, 14. dept_no Position (86:95) INTEGER_EXTERNAL) 15. BEGIN DATA - - if you are using * on line 2. . 5 & 11 . 12 This line filters (does not load) the records where deptno = ^Z. 15 This line is used if one is using the ‘*’ option on the Line# 2 EXECUTION- The command to execute SQL*Loader in a UNIX shell script is as follows. The files to be supplied as shell script variables that make the script more generic. sqlldr userid = ${LOGIN_CONVS} control = ${CTRL_FILE} log = ${LOG_FILE} discard = ${DIS_FILE} bad = ${BAD_FILE} data = ${DAT_FILE} errors = 1000000 # code to check the success of the invoking of sqlloader if [$ ? -ne 0] then echo "Error ! The sql loader call failed " exit 1 fi