Go to LeighWeb Home Page            

Back To LeighWeb Mainframe Utilities Page

View the module associated with this documentation

 ECHANGE is an edit macro which allows you to issue change commands which would
 not ordinarily fit on the edit command line or even on a PF key definition.
 Additionally, and perhaps even more important is that when ECHANGE is assigned
 to a PF key, and your cursor is in the body of your edit text, ECHANGE will
 automatically determine the space-delimited string that your cursor is on, and
 prepopulate the "change from" and "change to" strings on the ECHANGE data entry
 panel.

 When you invoke ECHANGE, you are presented with a screen which you can enter
 your change command in three basic components:

 1.  The "FROM" string (i.e. the string you are changing from).
 2.  The "TO" string (i.e. the string you are changing to).
 3.  Additional edit change command parameters (e.g. "X/NX", column numbers, a
     label range, etc.)

 These values are stored in your ISPF "shared" pool, so that the next time you
 invoke ECHANGE, those same values are there.  If you invoked ECHANGE as
 mentioned above, with your cursor "in" the data you are editing (as opposed to
 the COMMAND line), the "FROM" and "TO" string values will be the text string
 your cursor is placed on.  Any parameter values you had entered previously
 would still be there, however.

 To invoke ECHANGE, simply type echange on the command line of an edit session
 and press .  You can, of course, set this to a PF key as well (which can
 be very powerful).

 An additional feature to mix with cursor-specific operation of ECHANGE is the
 PREFIX (or SUFFIX) keyword.  The best way to explain this is with an example.

 Suppose that you were re-organizing the working storage of an existing ugly
 production program.  You had identified all the data names that were
 "accumulators", and you wanted to put them in the same area and prefix each one
 with an "A-" to better identify them in the code.  Instead of typing a change
 command for each one, you would do the following.

1. Set a PF key to ==> echange prefix a-
2. Place your cursor on one of the data names
3. Press the PF key

 ECHANGE now parses for the data name your cursor is on (for the sake of
 argument, let's say it's called MASTER-RECORDS-READ).  It would set the change
 "from" string to 'MASTER-RECORDS-READ' and the change "to" string to
 'A-MASTER-RECORDS-READ'.  In the "PARMS" field you would type "ALL" (this would
 remain until you changed it or until you got out of ISPF).

 When you press , you will be issuing the equivilent of the change
 command:

 c master-records-read a-master-records-read all

 With just ONE keystroke!  To process all these data names, you just position
 your cursor, press the PF key, and press .