Hi Chris, There are several ways to accomplish this. As other users have already discussed, it can be done using a user written code which calls an Unix script using a X command. In the attachement, I have outlined all the steps with screenprints. Below are the steps. 1. Read the CSV file. 2. Perform the needed ETL Transformation as per your businees requirements. 3. Load the file in to the DB Table. 4. Have a conditional start (Job return code > 4 is a job failure) and conditional end transformations to check that there are no errors while processing/loading the file. 5. Call the Unix Script using the X command using SAS User Written Code Transformation. 6. Below is a sample Unix script to move a file to archived directory. #!/bin/ksh umask 002 export LOG_DIR="<LOG Directory Path>" export LOG_FILE="$LOG_DIR/FILENAME.log" export FILE="<File Path/CDH_cc*.csv>" export TRGT_DIR='<Archive Directory Path>' if [ -f $FILE ] then echo "File $FILE exists. " echo "Moving the $FILE to $TRGT_DIR directory" | tee -a $LOG_FILE mv $FILE ${TRGT_DIR} RET_CD=$(echo $?) # Check for the return code of the previous command if [[ $RET_CD -ne 0 ]]; then echo "Moving the $FILE to $TRGT_DIR failed..." | tee -a $LOG_FILE echo "Please check $LOG_FILE for error message" exit 1; else echo "Moved $FILE to $TRGT_DIR Successfully"| tee -a $LOG_FILE fi else echo "No $FILE present in the incoming directory" |tee -a $LOG_FILE fi 7. I have outlined all the steps with screenprints in the attachment. Thanks, -Sai
... View more