Convert Macro

The Convert Macro utility enables you to convert an existing Personal Communications Plain Macro file to XML/VBScript file, and a Personal Communications VBScript Macro file to XML.

To use the conversion utility, click IBM Personal Communications → Utilities → Convert Macro.

Macro/Script Directory: Specify the directory where the macros that need to be converted are placed. By default, it is the common Macro/Scripts location (if specified) in the User Preferences dialog, or the application data directory specified during the installation of Personal Communications.

To convert an existing Plain macro to XML/VBScript or VBScript to XML, do the following:

  1. Clicking Browse will open a dialog box to select an existing directory.
  2. Select “Input File Type” as “Plain Text Macro”. By default, “Input File Type” is selected as “Plain Text Macro”. On Selecting “Plain Text Macro”, “Macro Name” field will list all the plain text macro from macro directory. On Selecting “VB Script”, “Macro Name” field will list all the VB Scripts from macro directory and the option for “VBScript” in the “Output File Type” will be disabled and “XML” is selected by default.
  3. Select “Output File Type” to either VBScript or XML. By default, “Output File Type” is “VBScript”.
  4. Select the macro to be converted from the “Macro Name” combo.
  5. Click “Convert”, conversion happens as per the selected input and output file formats. User can enter a file name for the new XML file/VBScript or accept the generated file name. The extension will be added automatically.
  6. Click Save.
  7. Repeat the procedure to convert another macro or click Close to end the application.
Note:
  1. User can choose to save the converted file in the macro directory itself, so that it will be listed during the “Play Macro/Script” OR can save the converted file at any location.
  2. Macros that are converted to XML are intended for use in Host On-Demand and will not function in Personal Communications emulation sessions. Use the HOD Macro Manager to import a converted Personal Communications macro into HOD. These converted macros will not appear in the list of available Personal Communications macros. These XML file can also be run in HACPEE product.
  3. Following are the necessary criteria and limitations for converting VBScript Macro file to XML file.
    • If any of the following mandatory header is missing in the selected VBScript, user will be prompted with an appropriate message and cannot proceed with the conversion.
      1. [PCOMM SCRIPT HEADER]
      2. LANGUAGE=VBSCRIPT
      3. autECLSession.SetConnectionByName(ThisSessionName)
    • If the subroutine syntax validation is failed because of missing an “end sub” or if the selected VBScript macro contains more than one subroutine, user will be prompted with an appropriate message and cannot proceed with the conversion.
    • Following are the VBScript statements supported for the conversion from VBScript to XML.
      • List of macro actions in the Table No 1.0.
      • “wait” statements. Examples of wait statements are as below.
        • WaitWhileCursor
        • WaitWhileString
        • WaitForCursor
        • WaitForString
      • “Send” and “Receive” macro statements only for the TSO application.
    • During the conversion unsupported macro actions will not be converted, instead a comment that it will not be converted is added in the XML.
Table 1. List of Macro Actions supported for VB to XML conversion

Macro Actions

[ack] [fieldmark] [pf2] [vt numpad 1]
[altcsr] [field-] [pf20] [vt numpad 2]
[backspace] [field+] [pf21] [vt numpad 3]
[wordleft] [help] [pf22] [vt numpad 4]
[backtab] [home] [pf23] [vt numpad 5]
[bel] [printhost] [pf24] [vt numpad 6]
[bs] [ht] [pf3] [vt numpad 7]
[can] [insert] [pf4] [vt numpad 8]
[clear] [left] [pf5] [vt numpad 9]
[cr] [lf] [pf6] [vt numpad enter]
[dc1] [printps] [pf7] [vt numpad period]
[dc2] [nak] [pf8] [vt prev]
[dc3] [newline] [pf9] [vt]
[dc4] [pa1] [reset] [waitforappavailable]
[delete] [pa2] [right] [waitforsystemavailable]
[worddel] [pa3] [rolldown] [waitfortransition]
[dle] [pagedown] [rollup]
[down] [pageup] [si]
[dup] [pause] [so]
[em] [pf1] [soh]
[eof] [pf10] [stx]
[enq] [pf11] [sub]
[enter] [pf12] [syn]
[eot] [pf13] [attn]
[eraseof] [pf14] [sysreq]
[erinp] [pf15] [tab]
[etb] [pf16] [wordright]
[etx] [pf17] [up]
[ff] [pf18] [vt next]
[fldext] [pf19] [vt numpad 0]