REXX/CICS text editor

REXX/CICS provides a general purpose CICS-based text editor, patterned after VM/CMS XEDIT.

The editor is provided so that execs and data can be created, updated, and viewed from within the CICS environment.

The REXX/CICS editor includes several prefix commands (for example: C, CC, M, MM, B, A, F, P) in common with the XEDIT editor. To use the editor, enter EDIT.

While in an editor session, commands entered on the command line can be chained by placing a ";" between each command. Support is also provided for macros written in REXX. This lets you customize editor settings with a profile exec, add new commands to the editor, or use the editor facilities as part of an application.

Note: The REXX/CICS Text Editor does not support binary files.

Invoking the REXX/CICS text editor

You can start a REXX/CICS edit session from a CICS terminal (clear screen), a REXX/CICS session, another edit session, or a REXX exec. You can enter the editor by executing the CICS EDIT transaction identifier (or your site-defined transaction identifier for the REXX/CICS editor). From a clear REXX/CICS screen enter EDIT followed by a REXX File System (RFS) file identifier and an edit session is issued for this file.

Note: If you specify REXX as a CICS transaction identifier with no exec name, the IBM supplied REXXTRY interactive utility (CICRXTRY exec) is issued. REXXTRY provides an interactive shell for performing REXX statements and commands.

While you are in the editor, you can start another edit session by entering EDIT fileid. The syntax for this method of invocation is defined in the EDIT command, section EDIT. When you write an exec, you can start the REXX/CICS editor session by issuing the CICS EDIT transaction identifier as a command. If a file ID is not specified when you invoke the editor, the file ID defaults to file NONAME in your current RFS directory. A fully qualified file ID is: poolid:\dir1\dir2\fn.ft

However, you can specify a partial file ID if the target file is in (or is going to be created in) your current directory (as specified by the CD command).

Examples of how you can call the editor:
EDIT TEST.EXEC (From terminal using CICS transaction ID EDIT)
EDIT TEST.EXEC (From within an edit session using the EDIT editor command)
'EDIT TEST.EXEC' (From within an exec using the EDIT command)
'EDIT TEST.EXEC' (From terminal in a REXX/CICS REXXTRY session)

This example shows four different ways to start an edit session. The first example starts a session from REXX/CICS. The second starts a new session from an existing session. The third starts a session from a REXX exec. The fourth starts a session from a REXX/CICS REXXTRY session.

Screen format

When you call the editor without a profile, the default screen definition is displayed as shown in the following figure.
EDIT ---- POOL1:\USERS\USER1\TEST ------------------------------- COLUMN 1 73
COMMAND ===>
00000 ***************************** TOP OF DATA ************************
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 **************************** BOTTOM OF DATA **********************







F1=HELP F2=LADD F3=FIL F4=SPLT F5=F F6=JN F7=BA F8=FWD F10=LFT F11=RGT F12=QUI
The first line is reserved for the title line that contains the following:
  • Fully qualified file ID
  • Column numbers
  • Displayed messages.

The informational lines that let you know where the top and bottom of the file is are the only lines that are displayed when you start a new edit session. These lines consist of a prefix area and a data area. The line where "*** TOP OF DATA ***" is displayed, in this example, is the current line. This is distinguished, from the rest, by being highlighted and it is the line most of the command line commands affect. The command line lets you interact with the editor on a high level basis. All of the screen lines, except for the title line, may be moved for convenience.

Prefix commands

Several prefix commands are provided by the editor. These commands are entered in the prefix area and give you the ability to copy, move, insert, delete, and replicate lines on either an individual or a consecutive block basis.

Individual line commands
The following commands work with individual lines and consist of one character:
/
Specify current line in file
I
Insert a line
D
Delete a line
C
Copy a line
M
Move a line
R
Replicate a line
"
Synonym for replicate

When you enter one of the previous commands in the prefix area of a line, the command performs its respective function on that line. If you enter an "I" in the prefix area of line 00000, the editor opens a new line just below it for input. You can also append a number to the end of the prefix command. This acts as a replication factor. If the number "5" is appended to the "I", five lines are opened for input instead of one.

Consecutive block commandsThe following commands work with consecutive blocks of lines and consist of two characters:
DD
Delete a block of lines
CC
Copy a block of lines
MM
Move a block of lines
RR
Replicate a block of lines
""
Synonym for replicate

Block commands are processed in pairs. You place one command in the prefix area of the first line of the block and place the same command in the prefix area of the last line of the block. For example, to delete a block of lines, you place a "DD" in the prefix area of line 00001 and another "DD" in the prefix area of line 00005. This deletes all lines between line 00001 and line 00005, inclusive. The only block prefix command that allows a replication factor is the replicate command. So, when you specify a number with the replicate block command you need to know how many times you want the block (not individual lines) replicated. The replication factor must be specified with the first RR replication command.

Destination commandsThe following commands are called destination prefix commands:
A
After
B
Before
F
Following
P
Preceding

These commands give the move and copy prefix commands a destination for a block of text. When you enter these in the prefix area, the text from a copy or a move is placed either before or after that line according to what destination command is specified. The replicate prefix command does not use a destination prefix command. Instead, it places its output immediately after the block that is to be replicated.

Macros under the REXX/CICS editor

The editor supports REXX macros, giving the macros the ability to alter the editor settings and display the editor screens. Macros can process all of the editor command line commands. Example:
/* Macro to alter the setting of the REXX/CICS editor */
ADDRESS EDITSVR
'SET NUMBERS OFF'
'SET CURLINE 10'
'SET MSGLINE 2'
'SET CMDLINE TOP'
'SET CASE MIXED IGNORE'

This example addresses the editor command environment and alters the editor settings.

Example:
/* Macro to use the REXX/CICS editor as an I/O interface */
ADDRESS EDITSVR
'INPUT Some'
'INPUT More'
'INPUT DATA'
'DISPLAY'


dfhrxar.html | Timestamp icon Last updated: Monday, 5 June 2017