As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.
I'm on a large project where (among other things) I have had to make 2 specific changes to build my program test bed.
main_loop.bat:
@ECHO OFF
REM *****************************************************************************
REM * WARNING: THIS SCRIPT WILL UNMERCIFULLY UPDATE WHATEVER FILES ARE LISTED IN
REM * FILE_LIST.TXT. BE VERY CAREFUL.
REM *****************************************************************************
REM * Read the comments carefully and if you still don't understand look up the
REM * commands before running.
REM *****************************************************************************
REM * I can't / won't be responsible for negative effects of this script.
REM *****************************************************************************
REM Step 0: Loop through a list of given files.
for /f %%a in (file_list.txt) do (
REM Step 1: Tell the user what file is being processed.
echo Processing %%a
REM Step 2: Prepend the file contents to the beginning of the file in the list.
REM Save the results to a temporary filename. This example uses a 1 at the end
REM of the file name
type mrnoedit_include_epic2012_report.txt %%a > %%a1
REM Step 3: Since file cannot be opened for both input and output at the same
REM time, rename the file above from a temp name back to the production name.
move /y %%a1 %%a
)
-*=====================================================================*
-* COPYRIGHT 2008, MY COMPANY, INC. *
-* INFORMATION DELIVERY *
-*=====================================================================*
-* PROGRAM: Readmits Reporting by Nurse Unit
...(snip)...
File After:
-MRNOEDIT -INCLUDE EPIC2012_REPORT
-*=====================================================================*
-* COPYRIGHT 2008, MY COMPANY, INC. *
-* INFORMATION DELIVERY *
-*=====================================================================*
-* PROGRAM: Readmits Reporting by Nurse Unit
...(snip)...
- ABTThis message has been edited. Last edited by: Kerry,
Second task was to update a large list of MFDs (6000+) to point from one Data Adapter to another.
Update MFDs:
@ECHO OFF
REM *****************************************************************************
REM * WARNING: THIS SCRIPT WILL UNMERCIFULLY UPDATE FILES. BE VERY CAREFUL.
REM *****************************************************************************
REM * Read the comments carefully and if you still don't understand look up the
REM * commands before running.
REM *****************************************************************************
REM * I can't / won't be responsible for negative effects of this script.
REM *****************************************************************************
REM Step 0: read the output of the DIR command dynamically to produce a change list.
for /f %%a in ('dir /b c:\epic_2012\mfds\*.acx') do (
REM Step 1: Tell the user what's hanppening
echo Processing c:\epic_2012\mfds\%%a
REM Step 2: Use SED to edit the file and change CLRTST_2012 to CLRPRD. Add the CONNECTION flag
REM to ensure it is only in the scope of the data adapter definition. Hold the output to a
REM temporary directory with the same name. Copy those files out to WebFOCUS server manually.
sed "s/CONNECTION=CLRTST_2012/CONNECTION=CLRPRD/g" c:\epic_2012\mfds\%%a > c:\epic_2012\mfds\hstemp\%%a
)
You can download a Windows port of SED here (http://gnuwin32.sourceforge.net/packages/sed.htm) and read more about it's capabilities here: http://ss64.com/bash/sed.html
- ABTThis message has been edited. Last edited by: ABT,