The syntax and description for each of the command line commands follows.
>>-ARBCHAR--arbchar--------------------------------------------><
ARBCHAR sets the arbitrary characters.
'ARBCHAR .'
This example defines the character "." as being the arbitrary character.
The arbitrary character takes the place of text in a string. The default value for the arbchar is a ".". For more information, on how you can do searches with the arbitrary character, see the FIND command, section FIND.
(1) .-----------. >>-ARGS--+-----------+----------------------------------------->< '-arguments-'
ARGS stores the default parameters to be passed to the program being edited when invoked with the text editor EXEC command.
'ARGS A B C'
'EXEC'
'ARGS'
The first line of this example defines the arguments to be passed as A, B, and C. The second line executes the last saved copy of the file that is currently being edited, passing it the arguments defined in line one. The last line deletes the arguments.
.-1-----. >>-BAckward--+-------+----------------------------------------->< +-+---+-+ | '-n-' | '-*-----'
BACKWARD scrolls backward toward the beginning of a file for a specified number of screen displays.
'BACKWARD'
This example scrolls one screen toward the top of the file.
The editor, by default, sets PF7 to BACKWARD and PF8 to FORWARD.
>>-BOTTOM------------------------------------------------------><
BOTTOM scrolls to the bottom of the file.
'BOTTOM'
This example scrolls to the bottom of the file.
>>-CANCEL------------------------------------------------------><
CANCEL ends the current edit session without saving the changes.
'CANCEL'
This example quits the current editor session unconditionally, without saving any file changes.
(1) .-----------------------. >>-CASE--+-----------------------+----------------------------->< +-MIXED--+-RESPECT----+-+ | '-+--------+-' | | '-IGNORE-' | '-UPPER--+-RESPECT----+-' '-+--------+-' '-IGNORE-'
CASE sets the case translation and interpretation preferences.
'CASE MIXED RESPECT'
This example sets the case to MIXED and the sensitivity to RESPECT. For more information on sensitivity, see the FIND command, section FIND.
>>-CHANGE--/string1/string2/--+-----+-------------------------->< '-ALL-'
CHANGE changes a string in the file.
'CHANGE /noeditor/editor/'
This example replaces the first occurrence of noeditor with editor.
The CHANGE command respects the sensitivity settings of the editor when locating string1 and when changing string2 as defined by the CASE command or the system default.
>>-CMDLINE--+-TOP----+----------------------------------------->< '-BOTTOM-'
CMDLINE sets the command line display preferences.
'CMDLINE TOP'
This example places the command line on the second line of the screen.
>>-CTLCHAR--+-character-+--+-ESCAPE----+----------------------->< '-OFF-------' +-PROTECT---+ +-NOPROTECT-+ '-OFF-------'
CTLCHAR sets a control character's function.
'CTLCHAR ! ESCAPE'
'CTLCHAR % PROTECT'
'RESERVED 20 HIGH !% Important Info'
This example defines ! as the escape character and % as the field protection character. After you enter these commands, the screen line 20 will be protected and contain the text that follows the control characters, !%.
>>-CURLINE--number---------------------------------------------><
CURLINE sets the current line display preferences.
'CURLINE 3'
This example sets the current display line to screen line 3.
The current line is displayed at the screen line number specified in this command. However, the current line cannot be displayed on line 1 because line 1 is reserved for the title line.
>>-DISPLAY-----------------------------------------------------><
DISPLAY shows the current edit screen.
'DISPLAY'
This example displays the current edit screen.
The DISPLAY command is only useful when it runs from a macro. It displays the current edit session's screen. When it runs from a normal terminal edit session there is no noticeable effect.
.-1------. >>-DOWN--+--------+-------------------------------------------->< '-number-'
DOWN scrolls forward in the file.
'DOWN 5'
This example scrolls forward through the file five lines.
.-NONAME--------------------. >>-EDIT--+---------------------------+--------------------------> +-fileid--------------------+ '-lib.sublib(mem.type)--LIB-' >--+---------------------+------------------------------------->< '-(--MACRO--macroname-'
EDIT opens a new edit session.
'EDIT TEST.EXEC'
This example opens an edit session for the file TEST.EXEC.
(1) .-----------------------------. >>-EXEC--+-----------------------------+----------------------->< '-REXX_program--+-----------+-' '-arguments-'
EXEC executes a REXX program within an editor session.
'EXEC TEST1.EXEC X Y Z'
This example executes program TEST1.EXEC and passes X, Y, and Z as arguments.
(1) .------------. >>-FILe--+------------+---------------------------------------->< '-+--------+-' '-fileid-'
FILE saves the current file being edited.
'FILE'
This example saves the current file being edited, using the current file ID specification for the edit session. The current file ID is initially taken from the file ID specified on the edit command, when an edit session is created.
.-previous_searcharg-. >>-Find--+--------------------+-------------------------------->< '-searcharg----------'
FIND locates a string of text in the file.
'FIND REDT'
This example finds the first occurrence of REDT.
'FIND Redt'
If CASE is set to RESPECT then this example will not find the first occurrence of REDT. It will find the first occurrence of Redt. For more information, see the CASE command, section CASE.
The searcharg can contain the arbitrary character, in which case the arbitrary character represents any text string which might be imbedded at the arbitrary character's location.
'FIND ONE.THREE'
This example finds the first occurrence of any string with ONE and THREE joined by another string.
.-1-. >>-FORward--+---+---------------------------------------------->< +-n-+ '-*-'
FORWARD scrolls forward toward the end of the file for a specified number of screen displays.
'FORWARD'
This example scrolls one screen toward the end of the file.
The editor, by default, sets PF7 to BACKWARD and PF8 to FORWARD.
>>-GET--+--------+--------------------------------------------->< '-fileid-'
GET imports an RFS file into the current edit session.
'GET POOL1:\USERS\USER1\TEST.EXEC'
This example pulls the REXX File System file TEST.EXEC in after the current line.
>>-GETLIB--lib.sublib(mem.type)--------------------------------><
GETLIB imports a member from a VSE Librarian sublibrary into the current edit session. The file is inserted after the current line.
'GETLIB MYSLIB.PROJ1(MEM1.PROC)'
This example gets member MEM1.PROC from sublibrary MYSLIB.PROJ1 and puts it after the current line in an edit session.
(1) .-------. >>-Input--+-------+-------------------------------------------->< '-text--'
INPUT inserts a new line after the current line.
'INPUT Test Input Data'
This example places the text Test Input Data on a newly inserted line after the current line.
>>-JOIN--------------------------------------------------------><
JOIN joins two lines into one.
'JOIN'
This example joins the line that the cursor is on with the line immediately following it.
.-1------. >>-LEFT--+--------+-------------------------------------------->< '-number-'
LEFT scrolls left in the file.
'LEFT 20'
This example scrolls 20 characters to the left.
>>-LINEADD-----------------------------------------------------><
LINEADD adds a blank line after the cursor line.
'PFKEY 2 LINEADD'
This example causes the addition of a blank line after the line where the cursor resides (if it is a file line) whenever PF2 is pressed.
LINEADD is mainly useful when assigned to a program function (PF) key. It is by default assigned to PF2.
>>-LPREFIX--prefix---------------------------------------------><
LPREFIX enters a prefix command into the current line prefix area.
'LPREFIX D'
This example causes the deletion of the current file line.
LPREFIX is provided to let you use the prefix commands from within edit macros.
>>-MACRO--fileid-----------------------------------------------><
MACRO calls a macro.
'MACRO POOL1:\USERS\USER1\TEST'
This example calls the macro, POOL1:\USERS\USER1\TEST.EXEC.
Macros have the ability to make calls to the REXX/CICS editor server. Any command that you can enter from the command line of the editor can be run from a macro.
>>-MSGLINE--+-+--------+-+------------------------------------->< | '-number-' | +-OFF--------+ '-INFO-------'
MSGLINE sets the message line display preferences.
'MSGLINE 2'
This example places the message line on screen line 2.
>>-NULLS--+-ON--+---------------------------------------------->< '-OFF-'
NULLS controls whether the fields on the screen will be written with trailing blanks or trailing nulls.
'NULLS ON'
This example causes trailing nulls on the fields of the screen.
>>-NUMbers--+-ON--+-------------------------------------------->< '-OFF-'
NUMBERS sets the prefix area display preferences.
'NUMBERS ON'
This example displays sequential numbers in the prefix area.
Line number sequencing is not done on the data within the edit session, but are pseudo line numbers associated with the file lines during the edit session only.
(1) .-------. >>-PFkey--number--+-------+------------------------------------>< '-text--'
PFKEY sets or processes a program function (PF) key.
'PFKEY 3 quit'
'PFKEY 3'
This example first sets PFKEY 3 to quit and then processes the PF key.
>>-PFKLINE--+-TOP----+----------------------------------------->< +-BOTTOM-+ +-number-+ '-OFF----'
PFKLINE sets the program function (PF) key line display preferences.
'PFKLINE BOTTOM'
This example places the PF key line on the bottom line of the screen.
>>-QQuit-------------------------------------------------------><
QQUIT ends the current edit session without saving changes.
'QQUIT'
This example quits the current editor session unconditionally, without saving any file changes.
>>-QUERY--+-CHANGES-+------------------------------------------>< +-CMDLINE-+ +-COLUMN--+ +-DIR-----+ +-FILEID--+ +-MSGLINE-+ +-NULLS---+ +-NUMBERS-+ +-PFKLINE-+ +-PFKEY.n-+ '-RECORDS-'
QUERY displays the current settings of the editor.
'QUERY PFKEY.1'
This example displays the command that is processed when PFKEY 1 is pressed.
>>-QUIT--------------------------------------------------------><
QUIT ends the current edit session.
'QUIT'
This example exits the editor.
When the current file has been changed, the editor does not let you exit until either a save is done or you enter the QQUIT command.
>>-REServed--line--+-HIGH---+--+------+------------------------>< +-NOHIGH-+ '-text-' '-OFF----'
RESERVED reserves a line on the screen for your output.
'CTLCHAR ! ESCAPE'
'CTLCHAR % PROTECT'
'RESERVED 20 HIGH !% Important Info'
This example displays Important Info in a high intensity, protected field on screen line 20.
>>-RESET-------------------------------------------------------><
RESET terminates any pending prefix commands.
'RESET'
This example cancels all pending prefix commands.
.-1------. >>-RIght--+--------+------------------------------------------->< '-number-'
RIGHT scrolls right in the file.
'RIGHT 20'
This example scrolls 20 characters to the right in the file.
If the value you specified causes a target outside of the record, scrolling stops at the right side of the record.
(1) .--------. >>-Save--+--------+-------------------------------------------->< '-fileid-'
SAVE saves a file to an RFS file or VSE Librarian sublibrary member.
'SAVE SYSTEM:\USERS\USER1\TEST.EXEC'
This example saves the current file to the RFS and names it, SYSTEM:\USERS\USER1\TEST.EXEC.
.-A-----. .-1-------. >>-SORT--+-*-------+--+-------+--+---------+------------------->< '-+-----+-' '-+---+-' +-fromcol-+ '-num-' '-D-' '-tocol---'
SORT sorts the lines from the current line on down.
'SORT * A 5 10'
This example sorts all lines in the file from the current line down and is sorted on columns 5 to 10.
If you sort a large number of lines, the sort will work very slowly.
>>-SPLIT-------------------------------------------------------><
SPLIT splits a line into two lines.
'SPLIT'
This example splits the line, that the cursor is on, into two lines. One line contains all the text on that line to the left of the cursor and the line following contains the remaining text (under and to the right of the cursor).
>>-STRIP-------------------------------------------------------><
STRIP strips the trailing blanks off all file lines.
'STRIP'
This example strips all trailing blanks of each file line.
>>-SYNONYM--syn--+---------+----------------------------------->< '-command-'
SYNONYM assigns a command action to any other valid command.
'SYNONYM GL GETLIB'
This example makes GL equivalent to the command GETLIB.
>>-TOP---------------------------------------------------------><
TOP scrolls to the top of the file.
'TOP'
This example scrolls to the top of the file.
>>-TRUNC--column-----------------------------------------------><
TRUNC truncates each line in the file to the given length.
'TRUNC 72'
This example truncates all lines in the file to a length of 72 characters.
This command is useful when you are working with data sets that have sequence numbers that require removing. The editor does not currently have support for placing or maintaining sequence numbers in a file.
.-1------. >>-UP--+--------+---------------------------------------------->< '-number-'
UP scrolls backward in the file (towards the top of the file).
'UP 20'
This example scrolls 20 lines backward in the file.