Docs

Macros

A WND Terminal macro is a short script anyone can read and edit. You can record it as you work or write it by hand. PCOMM macros can be imported.

In short

Open Ctrl+K > Macros to record a macro, write one, or import a PCOMM .mac file. A macro is a plain script of type, press, wait, move and pause commands, and it runs from the Macros panel, the Ctrl+K palette or a key.

CommandWhat it does
type "text"Types the text at the cursor.
type {name}Asks for a value when the macro runs, then types it. {password} is asked for hidden and never saved.
press KEYPresses a key. After Enter and the other keys that send the screen, it waits for the mainframe to answer.
wait "text" [seconds]Waits until the text appears on the screen, for up to the given number of seconds.
move ROW COLMoves the cursor to that row and column.
pause SECONDSWaits that many seconds.
# commentIgnored when the macro runs.

Keys for press are Enter, Clear, PF1 to PF24, PA1 to PA3, Tab, BackTab, Home, NewLine, EraseEOF, EraseInput, Reset, Insert, Delete, Backspace and the arrow keys.

An example

This macro logs on to CICS. It asks for the user ID and password each time it runs.

wait "LOGON ==>"
type "CICSPROD"
press Enter
type {user}          # asked for when it runs
press Tab
type {password}      # asked for, hidden, never saved
press Enter
wait "READY" 10

Record a macro

  1. Press Ctrl+K and choose Macros.
  2. Choose Record a macro.
  3. Do the task on the screen as you normally would.
  4. Press Ctrl+K and choose Stop recording.

Recording never keeps what’s typed into a hidden field. It records type {password} instead, so the macro asks for the password when it runs. The recorded macro is a plain script you can read and edit afterwards.

Write or edit a macro

You can write a macro from scratch in the Macros panel, or edit one you recorded or imported. If a line has a mistake, WND Terminal explains it with its line number.

Run a macro

  • From the Macros panel.
  • From the Ctrl+K palette, such as “Run macro: Logon”.
  • From a key. In Ctrl+K > Keyboard maps, set a key to “Run the macro Logon”. See Keyboard maps.

A running macro can be stopped at any time. Other sessions keep working while it runs.

Import PCOMM macros

In Ctrl+K > Macros, import a PCOMM .mac file. Common lines become steps, and the rest are listed so you can see what didn’t convert. Simple macros convert fully, or with message boxes left out. Macros with program logic or screen reading need a person to rebuild them. See Import from PCOMM.

What isn’t supported

WND Terminal doesn’t run VBA, Reflection Basic, BlueZone scripts or EXTRA! Basic macros. The Migration readiness report counts these and lists each file for a person, so you know how many there are before you move.

Some jobs people used to script are built in. Fill from Excel types each row of a spreadsheet into an entry screen and writes the host’s answer back. Capture all pages collects a multi-page list into one Excel table.

Questions

Does a recorded macro save my password?

No. Recording replaces anything typed into a hidden field with type {password}, so the macro asks for it each time it runs. That value is hidden and never saved.

Can WND Terminal run VBA or Reflection Basic macros?

No. The Migration readiness report counts and lists them for a person. Fill from Excel and Capture all pages cover many jobs those macros were written for.

Can I run a macro from a key?

Yes. In Ctrl+K > Keyboard maps, set a key to run the macro.

See it on your own mainframe.

Install WND Terminal on a handful of PCs or Macs, import your sessions and keymaps, and let a real team use it next to what you run today. Free, two to four weeks.