A tool of type "Execute ISPF Edit Macro" should be defined in an action which itself is defined as a global action with an ISA_Editor_Action relation so that it is added to the editor’s context menu. In the ISA_Editor_action relation, you can define the file suffixes for which the editor action should apply.
A tool of type "Execute ISPF Edit Macro" will copy the current content from the active editor to a temporary data set on the remote system and then apply a user defined ISPF edit macro to this remote data set. Afterwards the potentially-changed content of the remote file is transferred back to the client and replaces the current content of the editor from where the content was originally taken. The temporary data set will have the same data set attributes as the original file but will be allocated with less space. If the editor contains a member of a partitioned data set, the temporary file will be a partitioned data set as well with a member that has the same name as the member that is being edited. The name of the remote temporary data set is derived from the name of the parameter file data set (see Master configuration).
The current cursor position will additionally be exchanged between the client and the remote system. That means that the current cursor position in the active editor is read at the beginning of the tool and sent to the remote system. On the remote system the cursor will then be placed in that position in the temporary data set right before the execution of the ISPF edit macro starts. After the ISPF edit macro has finished, the cursor position is read out of the remote editor and pushed back to the client machine, which then will put the cursor in that same position in the client editor after its content is replaced.