Creating a Macro File

Because an XEDIT macro is a normal CMS file, you can create it in any of the ways CMS provides for file creation. You can even create it dynamically, by using the XEDIT multiple file editing capability (see Editing Multiple Files). After you issue FILE or SAVE for the macro file, you can use the macro.

Like any CMS file, a macro file has a file name, file type, and file mode. The file identifier for a macro file must follow certain rules:
  • For macros you enter from the command line, the file name is a string of 1-8 alphanumeric characters. This name invokes the macro. For example, if the file name is SEND, entering SEND during an editing session causes the macro to be executed. (For information on the search order and handling file names that contain numbers, see Avoiding Name Conflicts.)

    Prefix macro file names can be 1-8 characters, but they cannot contain numbers. (Because the prefix area is only five positions long, you can define a synonym for a prefix macro file name that is longer than five characters. For more information on defining synonyms for prefix macros, see Writing Prefix Macros, and the SET PREFIX subcommand description in z/VM: XEDIT Commands and Macros Reference.)

  • The file type must be XEDIT.
  • The file mode can specify any of your accessed disks or SFS directories, for example, A1.