If you need to make a series of permanent changes to the VB6 source, for example to make it ready for running and testing in a specific environment, you can use the gmPL Fix command. Not to be confused with compile/fix, the gmPL Fix is a top-level command that does a search and replace on a specific named file. The command may be placed in a custom script file and added to your gmProj so that it is handy for executing on new versions of the source as needed.
For example here is a script that changes the database connection information in a file.
SrcName = [MertrixVB6_Edit] SrcProj = [C:\gmClients\Mertrix\proj\usr\MertrixVB6_Edit.xml] SrcType = [XML] BldType = [CUSTOM] TScript = [C:\gmClients\Mertrix\proj\usr\MertrixVB6_Edit.xml] <gmBasic> <Storage Action="Create" Identifier="VB6Edit" /> <Select Progress="1"/> <Fix name="Pre-Edit" fileFilter="C:\gmClients\Mertrix\src\Mertrix\Claims_Administration\SourceCode\frmDBselect.frm"> <Replace name="frmDBselect.frm"> <OldBlock><![CDATA[ mainModule.strprimaryConnection = "Provider=SQLOLEDB;Integrated Security=SSPI;" & _ "Initial Catalog=" & cboDB.Text & ";Data Source=" & cboServer.Text & ";Network Library=dbnmpntw" ]]></OldBlock> <NewBlock><![CDATA[ cboServer.Text = "GMI-CS-02.gmi.local" 'GM fix: modify ConnectionString for GM Lab mainModule.strprimaryConnection = "Provider=SQLOLEDB;Integrated Security=SSPI;" & _ "Initial Catalog=" & cboDB.Text & ";Data Source=" & cboServer.Text & ";" 'Network Library=dbnmpntw" ]]></NewBlock> </Replace> </Fix> <Storage Action="Close" /> </gmBasic>
Produces the following log:
Basic Processor V20.01(Beta.003) System Build(12/03/13 13:51:18)
REPLACE Line=[7] Lang=[All] Name=[Pre-Edit:frmDBselect.frm] host=[C:\gmClients\Mertrix\src\Mertrix\Claims_Administration\SourceCode\frmDBselect.frm] Type=[ReplaceGlobal]
Translation Time (sec) = 0.11\