You can use the following macro generator as an example for creating your own macro generators. Macro generators can be created
With any Windows Script Host compatible scripting language (for example, Visual Basic Script)
As an executable (.exe)
As an HTML application (.hta)
The following macro generator illustrates the use of a script created in Visual Basic Script to perform a set of related actions for an OS 2200 run.
' ' This macro generator asks the operator for the runid, then creates a macro that contains: ' ' E <runid> ' XS <runid> ' LG Operator [SP_WINDOWS_USER] at [SP_WORKSTATION] E'd off run <runid> ' Get pointer to file system object Set fso = CreateObject("Scripting.FileSystemObject") ' Get pointer to shell object Set WshShell = WScript.CreateObject("WScript.Shell") ' Get pointer to environment variables Set env = WshShell.Environment("PROCESS") ' Open a file to contain the macro, based on value of SP_MACRO_PATH Set rpStream = fso.CreateTextFile(env("SP_MACRO_PATH"), True) ' Ask the user to enter a runid runid = InputBox("Please enter the runid to error off") ' Generate the macro rpStream.WriteLine("E " & runid). rpStream.WriteLine("SX " & runid) rpStream.WriteLine("LG Operator " + env("SP_WINDOWS_USER") + " at " + env("SP_WORKSTATION") + " E'd off run " + runid) ' Close the file rpStream.Close
Additional examples are provided for your use in the installation-data-folder \os2200-macros folder on the Operations Server that hosts the console. Unisys Operations Sentinel Technology Consulting Services personnel can also create macro generators for you. Contact your local Unisys representative for more information.