Macros can be defined in one of two ways. The macros resource defines a set of default macros. The macros.host resource defines a set of named macros for use when connected to that host. It overrides macros.
Each definition is a multi-line resource. Each line looks like:
Define two named macros for use when connected to any host:
x3270.macros: \ rehash: String(rehash) Enter()\n\ Re-format text: String(":s/hello/there/g") Enter()
Define three named macros for use when connected to the host myhost.mycompany.com:
x3270.macros.myhost.mycompany.com: \ dologin: String(user1) Tab() String(secret) Enter()\n\ runjob: String("submit myjob2") Enter()\n\ logoff: String("logoff\n")
The macros menu was added to x3270 3.0.2 in 1994.