Testing Macro Definition Files
Contents
Testing Macro Definition Files
Macro testing depends on your environment and on how Visimage and AskPlus have been configured.
Creating a Test Macro File
- Click here for instructions for installing a new macro file.
- By default, the load_macros script always creates a file called macro in the current directory.
Use the following steps to create a test macro file:
login askplus cd /ASKPLUS/visimage # Make a backup of the old macro file and macrodef definition file. mv macrodef macrodef.save mv macro macro.save # Copy the new macrodef file so the new definitions will be used by load_macros cp macrodef.samp macrodef ../load_macros # Rename the new macro file and restore the saved files mv macro macro.test mv macro.save macro cp macrodef.save macrodef
Creating a Test VsrvTcp Profile
- Most AskPlus jobs get their default environment by reading a configuration file when AskPlus starts. This environment is specified either by entering a vsrvtcp profilename using the -a parm, or using the -u parm to specify the actual name of the configuration file. The configuration file contains the names of the databases and files to open as well as the name of the compiled macro file.
- The easiest way to test existing jobs is to create/modify a test vsrvtcp profile. The profile will need to reference the test Eloquence instance and a test vmgr configuration file. The profile will look something like this:
[summit_test] login=botest directory=/var/summit/spectrum/TEST/visimage EQ_DBSERVER=localhost:TEST vmgr=/ASKPLUS/visimage/vmgrtest profile=askplus
- This is just a sample, the settings in your environment will probably be different.
- Once the test profile exists, edit the test configuration file and change the name of the macro file. In our example, we are editing the file /ASKPLUS/visimage/vmgrtest. For example:
Macro: /ASKPLUS/visimage/macro.test;
- When the new profile has been created/updated, you can use this profile to test existing AskPlus jobs or Visimage contexts.
Testing AskPlus Jobs
- You will need to make two changes to run a UC4 job in test.
- 1. Change the job login so that the job logs in as botest.
- 2. Change the askplus run parms to use the test profilename.
# Original syntax: /usr/bin/nice -20 /ASKPLUS/askplus -asummit_live << EOD # New syntax: /usr/bin/nice -20 /ASKPLUS/askplus -asummit_test << EOD
Testing Visimage Contexts
In Visimage, create a new connection that uses the test profile. When you start server, you will be connected to the test Eloquence instance using the test profile and the test macro file.