TSO/E stores the names of the EDIT subcommand processors that
you write in a table called IKJEBMA9. IKJEBMA9 is a CSECT within
load module IKJEBEMA. When a user enters an EDIT subcommand, IKJEBMA
invokes the appropriate subcommand processor.
After you write an EDIT subcommand processor, you must
add the name to the IKJEBMA9 table. You use the IKJEBEST macro instruction
to add the name. You
must ensure that the name of your subcommand processor is not
the same as the name of any subcommand processor that TSO/E
provides. For a list of the subcommand processors TSO/E
provides, see .
Using IKJEBEST, specify the following operands:
- Name of the subcommand
- Abbreviation for the subcommand name
- Name of the module that processes the subcommand
- CSECT=USER
The abbreviation for the subcommand name is optional. The three
other operands are required.
You can add one or more sub
command processor names
on one invocation of the IKJEBEST macro. The format of the macro
is:
IKJEBEST(subcmd,abbr,mod-name)[,…],CSECT=USER
When
you assemble the IKJEBEST macro instruction, the CSECT=USER operand
causes the resulting object module to be named IKJEBMA9. You must
link-edit the IKJEBMA9 module with the IKJEBEMA load module, performing
a CSECT-replacement operation for IKJEBMA9 object module. The EDIT
subcommands that you added are then available for use.
You can obtain the IKJEBEST macro from SYS1.MABLIB. You can also
include IKJEBEST in your macro library using the code shown in Figure 1.
The following examples illustrate how to use IKJEBEST.
Example 1: To add the EDIT sub
command processor named
SWTCH, code IKJEBEST as follows:
IKJEBEST (SWTCH,SW,XXXSWTCH),CSECT=USER
The abbreviation for the SWTCH subcommand is SW and the name of
the module that processes the subcommand is XXXSWTCH.
Example 2: To add the following sub
command processor names,
code IKJEBEST as follows:
IKJEBEST (SWTCH,SW,XXXSWTCH),(SRTRN,SRT,XXXSRTRN),CSECT=USER
Name |
Abbreviation |
Module name |
---|
SWTCH |
SW |
XXXSWTCH |
SRTRN |
SRT |
XXXSRTRN |
Figure 1. Example
of Including IKJEBEST in your macro library MACRO
IKJEBEST &CSECT=IBM;
LCLA &A,&B,&C,&D,&E
LCLA &F
LCLC &CNAME,&SCNAME,&ABBR,&LDMOD,&LABEL,&LABEL1,&LABEL2,&NMBR;
AIF ('&CSECT' NE 'IBM').CONT0
&CNAME, SETC 'IKJEBMA8' DEFINE CSECT NAME FOR IBM TABLE.
IKJEBMA8 CSECT
ENTRY MA8IP002
ENTRY MA8LI002
AGO .CONT1
.CONT0 ANOP
AIF ('&CSECT' NE 'USER').ERROR2
&CNAME SETC 'IKJEBMA9' DEFINE CSECT NAME FOR USER TABLE.
IKJEBMA9 CSECT
.CONT1 ANOP
&A SETA N'&SYSLIST
AIF (&A EQ 0).END
&B SETA 1
&F SETA 1
.CONT2 ANOP
&C SETA N'&SYSLIST(&B)
AIF (&C LT 2 OR &C GT 3).ERROR1
&E SETA K'&SYSLIST(&B,&C)
&D SETA &E-1
.* THE FOLLOWING FLAGGED INSTRUCTIONS WERE ADDED TO PROVIDE UNIQUE
.* LABELS, EVEN IF MODULES HAVE IDENTICAL LAST TWO CHARACTERS IN
.* ENTRY POINT NAMES. THE LABELS FOR MODULES IKJEBELI AND IKJEBEIP
.* ARE UNCHANGED. SINCE THEY ARE REFERENCED WITHIN IKJEBEMA.
AIF ('&CSECT' NE 'IBM').CONT10
AIF ('&SYSLIST(&B,&C)'(&D,&E) EQ 'LI'OR X
'&SYSLIST(&B,&C)'(&D,&E) EQ 'IP' ).CONT11
.CONT10 ANOP
&LABEL1 SETC '&CNAME'(6,8).'@'.'&F'
&F SETA &F+1
&LABEL2 SETC '&CNAME'(6,8).'@'.'&F'
&F SETA &F+1
AGO .CONT12
.CONT11 ANOP
&LABEL1 SETC '&CNAME'(6,8).'&SYSLIST(&B,&C)'(&D,&E).'001'
&LABEL2 SETC '&CNAME'(6,8).'&SYSLIST(&B,&C)'(&D,&E).'002'
.CONT12 ANOP
&SCNAME SETC '&SYSLIST(&B,1)'
SPACE 2
DC AL1(&LABEL1-*-1) LENGTH OF SUBCOMMAND NAME.
DC C'&SCNAME' SUBCOMMAND NAME.
&LABEL1 EQU *
DC AL1(&LABEL2-*-1) LENGTH OF ABBREVIATION.
AIF (K'&SYSLIST(&B,2) EQ 0).CONT5
&ABBR SETC '&SYSLIST(&B,2)'
DC C'&ABBR' ABBREVIATION FOR SUBCOMMAND.
.CONT5 ANOP
&LABEL2 EQU *
&LDMOD SETC '&SYSLIST(&B,&C)'
DC CL8'&LDMOD' LOAD MODULE NAME.
AIF (&B EQ &A).END
&B SETA &B+1
AGO .CONT2
.END ANOP
SPACE 2
DC AL1(255) END OF TABLE MARKER.
MEXIT
.ERROR1 MNOTE 12,'INVALID TABLE ENTRY'
MEXIT
.ERROR2 MNOTE 12,'INVALID KEYWORD VALUE'
MEND