Hi Forum.
Is there a quick way to do the following search/replace within a block of data? I tried to google the solution but didn't really know what to look for.
I have the following text file (I want to search for a particular string "s_m_f_acct_txn_daily_a1" and replace the "$$startdate=to_char(sysdate-10,'j')" to "$$startdate=to_char(sysdate-10000,'j')" within that data block only (Appending 3 zeroes at end).
Everything else should remain as is.
Process should ask for a particular string to search for.
Original Text:
[s_m_f_acct_txn]
$PMSessionLogFile=$PMRootDir/Logs/AUTO.S_M_F_ACCT_TXN.LOG
$DBConnection_EDW=SAS2EDW
$$startdate=to_char(sysdate-10,'j')
$$enddate=to_char(sysdate, 'j')
[s_m_f_acct_txn_FULL_LOAD]
$PMSessionLogFile=$PMRootDir/Logs/AUTO.S_M_F_ACCT_TXN_FULL_LOA.LOG
$DBConnection_EDW=SAS2EDW
[s_m_f_acct_txn_daily_a1]
$PMSessionLogFile=$PMRootDir/Logs/SAS_FACT1/WF_FACT1_F.LOG
$DBConnection_EDW=SAS2EDW
$$startdate=to_char(sysdate-10,'j')
$$enddate=to_char(sysdate, 'j')
[s_m_f_asp_setup]
$PMSessionLogFile=$PMRootDir/Logs/SAS_FACT1/WF_FACT1_F.S_M_F_A.LOG
$DBConnection_EDW=SAS2EDW
$$startdate=to_char(sysdate-10,'j')
Modified Text:
[s_m_f_acct_txn]
$PMSessionLogFile=$PMRootDir/Logs/AUTO.S_M_F_ACCT_TXN.LOG
$DBConnection_EDW=SAS2EDW
$$startdate=to_char(sysdate-10,'j')
$$enddate=to_char(sysdate, 'j')
[s_m_f_acct_txn_FULL_LOAD]
$PMSessionLogFile=$PMRootDir/Logs/AUTO.S_M_F_ACCT_TXN_FULL_LOA.LOG
$DBConnection_EDW=SAS2EDW
[s_m_f_acct_txn_daily_a1]
$PMSessionLogFile=$PMRootDir/Logs/SAS_FACT1/WF_FACT1_F.LOG
$DBConnection_EDW=SAS2EDW
$$startdate=to_char(sysdate-10000,'j')
$$enddate=to_char(sysdate, 'j')
[s_m_f_asp_setup]
$PMSessionLogFile=$PMRootDir/Logs/SAS_FACT1/WF_FACT1_F.S_M_F_A.LOG
$DBConnection_EDW=SAS2EDW
$$startdate=to_char(sysdate-10,'j')
Thank you.