Mainframe · ISPF

Jobcard Template Insert Macro

ispf edit-macros rexx

Macro: Insert job card template
About: An ISREDIT macro to insert a job card into a member open in ISPF edit.
Usage: Allocate the macro to your SYSPROC or SYSEXEC in your login proc or dynamically with:

TSO ALLOC FI(SYSPROC) DA('macro.dataset') SHR REU

Enter the macro name on the command line. Either press Enter to insert at the top of the member, or place your cursor where you would like to insert and then press Enter.

The Macro

/* rexx */
"isredit macro"
"isredit (cur) = cursor"
lineno = cur
line = "//JOBCARD  JOB ,'Name',NOTIFY=&SYSUID.,"
"isredit line_after "lineno" = (line)"
line = "//           MSGCLASS=A,MSGLEVEL=(1,1),CLASS=A"
"isredit line_after "lineno+1" = (line)"
line = "//"
"isredit line_after "lineno+2" = (line)"

The macro inserts three lines: the JOB statement, a continuation line with common parameters, and a blank comment line. Customize the template to match your site's standard job card parameters.

For more about what the individual job card parameters mean, see What's in a Job Card?