Thanks for the reply. I need to avoid the "s///g" option because there may be multiple lines that I need to find and replace. Here is one of the input files:
/* -------------------------------------------------------------------
+------------------------------------------------
** %%TableName%%.Fl
** -------------------------------------------------------------------
+------------------------------------------------
** FastLoad Script for %%TableName%%
** -------------------------------------------------------------------
+------------------------------------------------
** Generated by LoadGen
** -------------------------------------------------------------------
+------------------------------------------------
** What | Who | When | Why
** -------------------------------------------------------------------
+------------------------------------------------
** 1.00 | %%Author_Initials%% | %%Date%% | Original Version
** -------------------------------------------------------------------
+------------------------------------------------
** | | |
** -------------------------------------------------------------------
+------------------------------------------------
** | | |
** -------------------------------------------------------------------
+------------------------------------------------
*/
.Show Versions;
.Sessions %%Sessions%%;
.LogOn %%TPID%%/%%User%%,%%Password%%;
Database %%StagingDB%%;
Drop Table ET_%%TableName%%;
Drop Table UV_%%TableName%%;
Drop Table %%TableName%%_Stage;
Create Set Table
%%TableName%%_Stage
, No FallBack
, No Before Journal
, No After Journal
, CheckSum = High
(
%%Column_Name_Comma%% Varchar(%%Column_Size%%)
)
Primary Index
(
%%Primary_Index_Column_Comma%%
)
;
.Set Record %%Record_Type%%;
Begin Loading
%%TableName%%_Stage
Errorfiles
ET_%%TableName%%,
UV_%%TableName%%;
Help Table %%TableName%%_Stage;
Define
File = %%Data_Dir%%%%Data_FileName%%;
Show;
ErrLimit %%ErrLimit%%;
Insert Into
%%TableName%%_Stage
Values
(
:%%Column_Name_Comma%%
);
End Loading;
.LogOff;
Doug |