EXTRACT
Purpose
Use the EXTRACT subcommand within a macro to get information about internal XEDIT variables or about file data. XEDIT returns the information in one or more variables, which the macro can then use or examine. A self-defining delimiter separates operands of the EXTRACT subcommand in the same fashion that string targets or operands are delimited.
Operands
- /(diagonal)
- signifies any delimiting character that does not appear in the “operand” string(s).
- operand
- may be any one of the following keywords. A complete description of each operand follows. For additional information on some of the operands, refer to its corresponding SET subcommand (if applicable).
|
ACTion
ALT APL ARBchar AUtosave BASEft BFSLine BRKkey CASE CMDline COLOR COLPtr COLumn CTLchar CURLine CURSor DISPlay EDIRName EFMode EFName EFType ENTer EOF EOL EPName ESCape ETARBCH |
ETMODE
FILler FLscreen FMode FName FType FULLread GUI HEX IMage IMPcmscp INPmode LASTLorc LASTmsg LENgth LIBName LIBType LIne LINENd LOCk LRecl LScreen MACRO MASK MEMber MSGLine MSGMode |
NAMetype
NBFile NBScope NONDisp NULls NUMber PA PACK PENDing PF PName Point PREfix RANge RECFm REMOte RESERved RING SCALe SCOPE SCReen SELect Seq8 SERial SHADow SIDcode SIZe |
SPAN
SPILL STAY STReam SYNonym TABLine TABS TARGet TERMinal TEXT TOF TOFEOF TOL TRANSLat TRunc UNIQueid UNTil UPDate VARblank Verify VERShift Width WINdow WRap Zone = |
The following is a list of the values EXTRACT returns for each of the settings. The variables are returned in the form name.n where name is the full name of the variable requested and n is a subscript that distinguishes the different values returned. An exception occurs in the case of =. Variables are returned as EQUALSIGN., followed by the number. In all cases the value of name.0 is the number of variables returned for that setting. An ampersand (&) precedes EXEC 2 variables that are returned.
- ACTion
- returns ON or OFF to
indicate whether any action other than displaying or scrolling has been taken on this file. This
includes any file ID change or file characteristic change (LRECL, RECFM, PACK, SERIAL, SIDCODE, or
ALT), as well as any other changes made to the file.
ACTION.0 number of variables returned .1 ON|OFF - ALT
- returns the number of
alterations that have been made to the file since the last AUTOSAVE and SAVE, or as specified in the
SET ALT subcommand.
ALT.0 number of variables returned .1 number of changes since last AUTOSAVE .2 number of changes since last SAVE - APL
- returns ON or OFF as defined
in the SET APL subcommand.
APL.0 number of variables returned .1 ON|OFF - ARBchar
- returns ON or OFF and the
arbitrary character specified in the SET ARBCHAR subcommand.
ARBCHAR.0 number of variables returned .1 ON|OFF .2 arbitrary character - AUtosave
- returns the current
setting defined in the SET AUTOSAVE subcommand: the AUTOSAVE count, file ID, the number of
alterations, and the disk or directory on which the autosave file is written.
AUTOSAVE.0 number of variables returned .1 OFF or autosave count .2 autosave file name .3 number of alterations since last autosave .4 autosave file mode (one character) - BASEft
- returns the base file type
specified in the LOAD subcommand or the XEDIT command (where the LOAD is implicit).
BASEFT.0 number of variables returned .1 file type specified in the LOAD subcommand or the XEDIT command (where the LOAD is implicit) when XEDIT is invokedNote: BASEFT.1 is blank if the file that was loaded was a BFS (byte file system) file. - BFSLine
- returns the values used by XEDIT to translate a byte file system (BFS) byte stream into records.
BFSLINE.0 number of variables returned .1 [lrecl|NL|CRLF|CRNL|/string/|/hexstring/] - BRKkey
- returns ON or OFF as the CP
terminal brkkey setting defines. If ON, then also returns the key.
BRKKEY.0 number of variables returned .1 ON|OFF .2 PAn|PFn - CASE
- returns the case setting as
defined in the SET CASE subcommand.
CASE.0 number of variables returned .1 MIXED|UPPER .2 RESPECT|IGNORE - CMDline
- returns ON, OFF, TOP, or
BOTTOM as specified in the SET CMDLINE subcommand and the line number designated as the command line
on the screen. CMDLINE.2 is not returned when CMDLINE.1=OFF.
CMDLINE.0 number of variables returned .1 ON|OFF|TOP|BOTTOM .2 line number on screen - COLOR
-
- COLOR field
- returns area of screen and its respective color, extended highlighting, highlighting, and
programmed symbol set options as specified in the SET COLOR subcommand. The
field may be specified as: Arrow, Cmdline, CUrline, Filearea, Idline,
Msgline, Pending, PRefix, Scale, SHadow, STatarea, Tabline, TOfeof. Note this operand may be
specified as COLOR or COLOUR.
COLOR.0 number of variables returned .1 color .2 extended highlighting .3 HIGH|NOHIGH .4 programmed symbol set - COLOR *
- returns the areas of the screen and their respective colors, extended highlighting,
highlighting, and programmed symbol set options as they have been specified in the SET COLOR
subcommand. Note, this operand may be specified as COLOR or COLOUR.
COLOR.0 number of variables returned .1 ARROW color exthi HIGH|NOHIGH PSs .2 CMDLINE color exthi HIGH|NOHIGH PSs .3 CURLINE color exthi HIGH|NOHIGH PSs .4 FILEAREA color exthi HIGH|NOHIGH PSs .5 IDLINE color exthi HIGH|NOHIGH PSs .6 MSGLINE color exthi HIGH|NOHIGH PSs .7 PENDING color exthi HIGH|NOHIGH PSs .8 PREFIX color exthi HIGH|NOHIGH PSs .9 SCALE color exthi HIGH|NOHIGH PSs .10 SHADOW color exthi HIGH|NOHIGH PSs .11 STATAREA color exthi HIGH|NOHIGH PSs .12 TABLINE color exthi HIGH|NOHIGH PSs .13 TOFEOF color exthi HIGH|NOHIGH PSs
- COLPtr
- returns ON or OFF as
defined in the SET COLPTR subcommand.
COLPTR.0 number of variables returned .1 ON|OFF - COLumn
- returns the column number
of the column pointer.
COLUMN.0 number of variables returned .1 current column number - CTLchar
-
returns the escape character and all control characters, if any, defined in the SET CTLCHAR subcommand. If CTLCHAR.1=OFF, CTLCHAR.2 and CTLCHAR.3 are not returned.
CTLCHAR.0 number of variables returned .1 ON|OFF .2 escape character .3 list of control characters (if any)- CTLchar char
- returns whether
char is in a protected status and the color, extended highlighting,
highlighting, and programmed symbol set associated with char as specified
in the SET CTLCHAR subcommand. When char is specified and CTLCHAR.1=OFF,
CTLCHAR.2 through CTLCHAR.5 are not returned. If SET CTLCHAR is not OFF (control characters are
defined) and this particular character is not defined, CTLCHAR.0 is 0 and no other variables are
returned.
CTLCHAR.0 number of variables returned .1 PROTECT|NOPROTECT|OFF (OFF means no "chars" defined) .2 color .3 extended highlighting .4 HIGH|NOHIGH|INVISIBLE .5 programmed symbol set
- CURLine
- If you are using a display
terminal, EXTRACT /CURLINE/ returns the line number of the current line as specified in the SET
CURLINE subcommand, the contents of the current line from column one through the truncation column
(excluding trailing blanks), and whether it has been changed or inserted during this editing
session.
CURLINE.0 number of variables returned .1 M [+n|-n] | [-] n (M = middle of screen) .2 actual line number on screen .3 contents of current line (or null if line pointer at TOF or EOF line) .4 ON|OFF (ON if CURLINE has been changed or inserted in this editing session) .5 OLD|OLD CHANGED|NEW|NEW CHANGED (OLD if CURLINE not inserted this session, NEW if CURLINE inserted this session, and CHANGED if CURLINE changed during this session)If you are using a typewriter terminal, EXTRACT /CURLINE/ returns the contents of the current line from column one through the truncation column (excluding trailing blanks), and whether it has been changed or inserted during this editing session.CURLINE.0 number of variables returned .1 -1 .2 -1 .3 contents of current line (or null if line pointer at TOF or EOF line) .4 ON|OFF (ON if CURLINE has been changed or inserted in this editing session) .5 OLD|OLD CHANGED|NEW|NEW CHANGED (OLD if CURLINE not inserted this session, NEW if CURLINE inserted this session, and CHANGED if CURLINE changed during this session) - CURSor
- returns the current and the original position of the cursor on the screen
(line number and column number), the current and the original position of the cursor in the file
(line number and column number), and the priority number (if assigned) as specified in the CURSOR
subcommand. The current position is the position where the cursor would be placed if the screen were
displayed at this time. The current position reflects relative changes due to additions/deletions of
lines resulting from prefix execution. It does not necessarily reflect where the cursor will
eventually be located when the screen is actually displayed. This is because cursor priority cannot
be resolved until the screen is displayed. The original position is the position of the cursor when
the screen was read, which has been updated with changes due to the execution of prefix subcommands
and macros. If the cursor is not in the file, CURSOR.3 and CURSOR.4=-1. Likewise, if the cursor was
not originally in the file, CURSOR.7 and CURSOR.8=-1. However, if the screen had not been displayed,
CURSOR.7 and CURSOR.8=0. This can occur if EXTRACT/CURSOR/ is issued from the profile macro.
CURSOR.0 number of variables returned .1 position of cursor on screen (line number) .2 position of cursor on screen (col. number) .3 position of cursor in file (line number) .4 position of cursor in file (col. number) .5 original .1--original position of the cursor on the screen (line number) .6 original .2--original position of the cursor on the screen (column number) .7 original .3--original position of the cursor in the file (line number) .8 original .4--original position of the cursor in the file (column number) .9 highest priority or zero - DISPlay
- returns the range of
selection levels included in the display, as specified in the SET DISPLAY subcommand.
DISPLAY.0 number of variables returned .1 start of display range .2 end of display range - EDIRName
- returns the name of the
SFS directory containing the file at the time the file was first loaded.
EDIRNAME.0 number of variables returned .1 entry directory name (directory name when the XEDIT environment is entered), or null for a minidisk file. - EFMode
- returns the two-character
file mode of the file at the time the file was first loaded.
EFMODE.0 number of variables returned .1 entry file mode (file mode when the XEDIT environment is entered)Note: EFMODE.1 is blank if the file that was loaded was a byte file system (BFS) file. - EFName
- returns the eight-character
file name of the file at the time the file was first loaded.
EFNAME.0 number of variables returned .1 entry file name (file name when the XEDIT environment is entered)Note: EFNAME.1 is blank if the file that was loaded was a byte file system (BFS) file. - EFType
- returns the eight-character
file type of the file at the time the file was first loaded.
EFTYPE.0 number of variables returned .1 entry file type (file type when the XEDIT environment is entered)Note: EFTYPE.1 is blank if the file that was loaded was a byte file system (BFS) file. - ENTer
- returns BEFORE, AFTER, ONLY,
or IGNORE and the ENTER key definition as specified in the SET ENTER subcommand. If the ENTER key is
undefined, ENTER.0=0 and no other variables are returned.
ENTER.0 number of variables returned .1 BEFORE|AFTER|ONLY|IGNORE .2 ENTER key definition - EOF
- returns ON or OFF as the
editor determines. EOF is ON when the line pointer reaches the End of File (or End of Range) line.
EOF.0 number of variables returned .1 ON|OFF - EOL
- returns ON or OFF as the
editor determines. EOL is ON when the column pointer reaches zone2+1.
EOL.0 number of variables returned .1 ON|OFF - EPName
- returns the byte file system (BFS) path name
at the time the file was loaded. Depending upon the BFS path name format used when the file was loaded, this can be a relative path name, an absolute path name, or a fully qualified path name. See Understanding Byte File System (BFS) Path Name Syntax for a description of the different forms of the BFS path name. EPNAME.0=0 if the file that was loaded was not a BFS file.
EPNAME.0 number of variables returned .1 number of characters in EPNAME.2 .2 pathname - ESCape
- returns ON or OFF and the
escape character defined in the SET ESCAPE subcommand.
ESCAPE.0 number of variables returned .1 ON|OFF .2 escape character - ETARBCH
- returns ON or OFF and the
extended arbitrary character specified in the SET ETARBCH subcommand.
ETARBCH.0 number of variables returned .1 ON|OFF .2 extended arbitrary character enclosed by a shift-out and a shift-in character - ETMODE
- returns ON or OFF as
specified in the SET ETMODE subcommand.
ETMODE.0 number of variables returned .1 ON|OFF - FILler
- returns the filler
character defined in the SET FILLER subcommand.
FILLER.0 number of variables returned .1 filler character - FLscreen
- returns the line numbers
of the first and last lines of the file displayed on the screen.
FLSCREEN.0 number of variables returned .1 line number of the first line of the file displayed on the screen .2 line number of the last line of the file displayed on the screen - FMode
- returns the two-character
file mode.
FMODE.0 number of variables returned .1 file modeNote: FMODE.1 is blank if the file originally edited was a BFS file and SET FMODE has not been entered. - FName
- returns the eight-character
file name.
FNAME.0 number of variables returned .1 file nameNote: FNAME.1 is blank if the file originally edited was a BFS file and SET FNAME has not been entered. - FType
- returns the eight-character
file type.
FTYPE.0 number of variables returned .1 file typeNote: FTYPE.1 is blank if the file originally edited was a BFS file and SET FTYPE has not been entered. - FULLread
- returns ON or OFF as
specified in the SET FULLREAD subcommand.
FULLREAD.0 number of variables returned .1 ON|OFF - GUI
- returns ON or OFF to indicate
whether the ring is being displayed in a GUI window rather than a terminal emulator screen.
GUI.0 number of variables returned .1 ON|OFF - HEX
- returns ON or OFF as specified
in the SET HEX subcommand.
HEX.0 number of variables returned .1 ON|OFF - IMage
- returns ON, OFF, or CANON as
specified in the SET IMAGE subcommand.
IMAGE.0 number of variables returned .1 ON|OFF|CANON - IMPcmscp
- returns ON or OFF as
specified in the SET IMPCMSCP subcommand.
IMPCMSCP.0 number of variables returned .1 ON|OFF - INPmode
- returns ON or OFF as
determined by whether you are in input mode.
INPMODE.0 number of variables returned .1 ON|OFF - LASTLorc
- returns the current
contents of the last locate or change buffer, as SET LASTLORC or the editor specifies.
LASTLORC.0 number of variables returned .1 contents of LASTLORC buffer or null - LASTmsg
- returns the last message
the editor issued. (Depending on the SET MSGMODE operands specified, this message may or may not
have been displayed.) If CP SET EMSG OFF is in effect, LASTMSG is not updated, even if SET MSGMODE
ON. Severe (S) and Terminating (T) messages are handled as if CP EMSG ON is in effect. The updating of the LASTMSG buffer is handled differently for the message COUNT issues containing the number of occurrences of a string. See COUNT for more information.
LASTMSG.0 number of variables returned .1 last message issued or null - LENgth
- returns the length of the
current line from column one through the truncation column (excluding trailing blanks).
LENGTH.0 number of variables returned .1 length of current line (Length of TOF and EOF lines is zero.) - LIBName
- returns the library file
name while editing a member of a CMS library.
LIBNAME.0 number of variables returned .1 library file name or blanks (if not editing a member of a library) - LIBType
- returns the library file
type while editing a member of a CMS library.
LIBTYPE.0 number of variables returned .1 library file type or blanks (if not editing a member of a library) - LIne
- returns the current line
number, relative to the beginning of the file.
LINE.0 number of variables returned .1 line number (in the file) of current line - LINENd
- returns ON or OFF and the
line-end character as defined in the SET LINEND subcommand.
LINEND.0 number of variables returned .1 ON|OFF .2 linend character - LOCk
- returns ON or OFF to indicate
whether the editor locked the file at the time it was first loaded. ON is returned even if the file
system has since dropped the lock.
LOCK.0 number of variables returned .1 ON|OFF - LRecl
- returns the logical record
length of the file.
LRECL.0 number of variables returned .1 lrecl of file - LScreen
- returns six integers: the
number of lines and the number of columns in the logical screen, the line number and the column
number defining the top left corner of the logical screen on the virtual screen, and the number of
lines and the number of columns of the virtual screen.
LSCREEN.0 number of variables returned .1 number of lines on logical screen .2 number of columns on logical screen .3 line number of top left of logical screen .4 column number of top left of logical screen .5 number of lines in virtual screen .6 number of columns in virtual screen - MACRO
- returns ON or OFF as
specified in the SET MACRO subcommand.
MACRO.0 number of variables returned .1 ON|OFF - MASK
- returns the current mask line
as defined in the SET MASK subcommand.
MASK.0 number of variables returned .1 mask definition - MEMber
- returns ON if you are
editing a member of a CMS library (you specified the MEMBER option when you entered XEDIT) or OFF if
you are not editing a member of a CMS library.
MEMBER.0 number of variables returned .1 ON|OFF - MSGLine
- returns ON or OFF, the
location of the message line, the number of lines the message line can expand to, and OVERLAY, if
specified, as defined in the SET MSGLINE subcommand. If MSGLINE.1=OFF, MSGLINE.2 through MSGLINE.4
are not returned.
MSGLINE.0 number of variables returned .1 ON|OFF .2 M [+n|-n] | [-] n (M = middle of screen) .3 number of lines the message line can expand to for displaying a message .4 OVERLAY or nulls - MSGMode
- returns ON or OFF and LONG
or SHORT as defined in the SET MSGMODE subcommand.
MSGMODE.0 number of variables returned .1 ON|OFF .2 LONG|SHORT - NAMetype
- returns
CMSorBFSas defined by the current NAMETYPE value.NAMETYPE.0 number of variables returned .1 CMS or BFS - NBFile
- returns the number of files
you are currently editing.
NBFILE.0 number of variables returned .1 number of files in XEDIT ring - NBScope
- returns the number of
lines in the file within the current scope setting and the position of the current line within that
number. If SCOPE is set to ALL, the size of the file and the number of the current line are
returned. If SCOPE is DISPLAY, then the number of lines that fall within the defined DISPLAY level
and the count of the current line within this set of lines are returned. For example, if the Top of
File line is the current line, NBSCOPE.2=0. If the End of File line is the current line,
NBSCOPE.2=NBSCOPE.1+1.
NBSCOPE.0 number of variables returned .1 number of lines within the current scope .2 position of the current line within the scope - NONDisp
- returns the character
defined in the SET NONDISP subcommand.
NONDISP.0 number of variables returned .1 nondisp character - NULls
- returns ON or OFF as
specified in the SET NULLS subcommand.
NULLS.0 number of variables returned .1 ON|OFF - NUMber
- returns ON or OFF as
specified in the SET NUMBER subcommand.
NUMBER.0 number of variables returned .1 ON|OFF - PA
-
- PA n
- returns BEFORE, AFTER, ONLY,
or IGNORE and the PAn key definition as specified in the SET
PAn subcommand. If the PAn key is undefined,
PAn.0=0 and no other variables are returned.
PAn.0 number of variables returned PAn.1 BEFORE|AFTER|ONLY|IGNORE PAn.2 PAn key definition - PA*
- returns BEFORE, AFTER, ONLY, or IGNORE and the PAn key definition as
specified in the SET PAn subcommands for all of the PA keys. If any PA key
is undefined, PAn.0=0 and no other variables are returned for that PA key.
PA1.0 number of variables returned for PA1 PA1.1 BEFORE|AFTER|ONLY|IGNORE PA1.2 PA1 key definition PA2.0 number of variables returned for PA2 PA2.1 BEFORE|AFTER|ONLY|IGNORE PA2.2 PA2 key definition PA3.0 number of variables returned for PA3 PA3.1 BEFORE|AFTER|ONLY|IGNORE PA3.2 PA3 key definition
- PACK
- returns ON or OFF as
specified in the SET PACK subcommand.
PACK.0 number of variables returned .1 ON|OFF - PENDing
-
returns information from the pending list (see SET PENDING) with respect to a particular subcommand or macro name or the first pending entry.
- BLOCK
- indicates the pending list is to be checked for BLOCK entries only and returns the word BLOCK if one is found. BLOCK is also returned if a block entry is the one found regardless of whether BLOCK was specified.
- OLDNAME
- indicates the name specified is the original name of the prefix subcommand or macro.
- name
- indicates the name of the prefix subcommand or macro for which you are searching. If OLDNAME is also specified, name must be the original name of the prefix subcommand or macro, regardless of whether a synonym has been assigned to that name. Otherwise, it is assumed to be a synonym (that is, a new name) or a name without a synonym.
- *
- indicates returning the first entry in the pending list. If BLOCK is also specified, * indicates returning the first block entry.
- target1 target2
- indicates the range in the file where the associated prefix subcommand or macro must be located.
If only target1 is specified, the search starts at
target1 and runs to the end of the file. Target1
is obtained relative to the top of the file. For example, EXTRACT /PENDING * +3 / starts at the top
of the file and goes 3 lines forward in the file to begin the search.
Target2 is obtained relative to target1. If
target1 is line 3 and you enter a +5 as target2,
the search is from line 3 through line 8, inclusive of both target lines. If
target2 is specified prior to target1, the
result is the same as if you had specified target1
target2. For example, EXTRACT /PENDING * :10 :2/ produces the same results
as EXTRACT /PENDING * :2 :10/. If no targets are specified, the entire pending list is searched,
that is, the entire file is searched, starting from the top of the file (:1).
If no pending entry is found, PENDING.0=0 and no other variables are returned. If a target is specified and is not found, the return code from EXTRACT is 2.
PENDING.0 number of variables returned .1 line number in the file .2 newname--the name entered in the prefix area .3 oldname--the original name of the prefix subcommand or macro, after synonym resolution .4 BLOCK|null--BLOCK is returned if a prefix block entry is located in the pending list; otherwise, nulls are returned. .5 op1|null--the first operand accompanying the subject prefix subcommand or macro .6 op2|null--the second operand accompanying the subject prefix subcommand or macro .7 op3|null--the third operand accompanying the subject prefix subcommand or macro
- PF
-
- PFn
- returns BEFORE, AFTER, ONLY,
or IGNORE and the PFn key definition as specified in the SET
PFn subcommand. If the PFn key is undefined,
PFn.0=0 and no other variables are returned.
PFn.0 number of variables returned PFn.1 BEFORE|AFTER|ONLY|IGNORE PFn.2 PFn key definition - PF*
- returns BEFORE, AFTER, ONLY, or IGNORE and the PFn key definition as
specified in the SET PFn subcommands for all of the PF keys. If any PF key
is undefined, PFn.0=0 and no other variables are returned for that PF key.
PF1.0 number of variables returned for PF1 PF1.1 BEFORE|AFTER|ONLY|IGNORE PF1.2 PF1 key definition PF2.0 number of variables returned for PF2 PF2.1 BEFORE|AFTER|ONLY|IGNORE PF2.2 PF2 key definition . . . . . . PF24.0 number of variables returned for PF24 PF24.1 BEFORE|AFTER|ONLY|IGNORE PF24.2 PF24 key definition
- PName
- returns the current active byte file system (BFS) path name. The total BFS path name can be up to 1023 characters in length.
Depending upon the path name format used on SET PNAME or when the file was loaded, this can be a relative path name, an absolute path name, or a fully qualified path name. See Understanding Byte File System (BFS) Path Name Syntax for a description of the different forms of the BFS path name. PNAME.0=0 if the file originally edited was a CMS file and SET PNAME has not been entered.
PNAME.0 number of variables returned .1 number of characters in PNAME.2 .2 BFS path name - Point
-
returns the symbolic name(s) associated with the current line. If no names have been assigned to the current line, POINT.0=0 and POINT.1 is not returned.
POINT.0 number of variables returned .1 line number and up to the last 100 names assigned to the current line- Point *
- returns all symbolic names that have been defined, starting at the top of the file. If no names
are defined, POINT.0=0 and no other variables are returned.
POINT.0 number of variables returned .1 line number and all names on first named line .2 line number and all names on second named line . . . . . . POINT.n line number and all names on nth named line
- PREfix
-
returns ON, OFF, or NULLS and RIGHT or LEFT as specified in the SET PREFIX subcommand.
PREFIX.0 number of variables returned .1 ON|OFF|NULLS .2 RIGHT|LEFT- PREfix Synonym name
- returns the original name associated with the prefix subcommand or macro, before synonym
resolution. If name is not in the prefix synonym table, then oldname=name.
PREFIX.0 number of variables returned .1 oldname - PREfix Synonym *
- returns both the old and the new names of the synonyms defined for the prefix subcommand(s) or
macro(s).
PREFIX.0 number of variables returned .1 newname oldname . . . . PREFIX.n newname oldname
- RANge
- returns the line numbers of
the top and bottom of the range defined in the SET RANGE subcommand.
RANGE.0 number of variables returned .1 line number of the first line in range .2 line number of the last line in range - RECFm
- returns the record format,
F, V, FP, or VP, defined in the SET RECFM subcommand.
RECFM.0 number of variables returned .1 record format of file - REMOte
- returns ON or OFF depending
upon whether a remote terminal is being used or upon the setting defined in the SET REMOTE
subcommand.
REMOTE.0 number of variables returned .1 ON|OFF - RESERved
-
returns a list of line numbers of screen lines currently reserved. If no RESERVED lines have been defined, RESERVED.0=0 and no other variables are returned.
RESERVED.0 number of variables returned .1 list of reserved line numbers- RESERved *
- returns the line numbers of the screen lines currently reserved and the colors, extended
highlighting, programmed symbol set, highlighting, and text associated with those reserved lines as
specified in the SET RESERVED subcommand. If no RESERVED lines have been defined, RESERVED.0=0 and
no other variables are returned.
RESERVED.0 number of variables returned .1 linenum color exthi PSs HIGH|NOHIGH text .2 linenum color exthi PSs HIGH|NOHIGH text . . . .n linenum color exthi PSs HIGH|NOHIGH text
- RING
- returns the number of files
you are editing and the file identification line for each file.
RING.0 number of variables returned .1 number of files in the ring .2 file identification line of the first file .3 file identification line of the second file . . . . . . .n file identification line of the nth-1 file - SCALe
- returns ON or OFF and the
position of the SCALE as specified in the SET SCALE subcommand (or SCALE prefix subcommand) and the
line number of the scale on the screen. If SCALE is OFF, only SCALE.0, SCALE.1, and SCALE.2 are
returned.
SCALE.0 number of variables returned .1 ON|OFF .2 M [+n|-n] | [-] n (M = middle of screen) .3 line number on screen - SCOPE
- returns DISPLAY or ALL as
specified in the SET SCOPE subcommand.
SCOPE.0 number of variables returned .1 ALL|DISPLAY - SCReen
- returns the attributes of
the screens as defined in the SET SCREEN subcommand.
SCREEN.0 number of variables returned .1 SIZE|WIDTH|DEFINE screen definition - SELect
- returns the selection level
of the current line and the maximum selection level for the file as specified in the SET SELECT
subcommand.
SELECT.0 number of variables returned .1 selection level of current line .2 maximum selection level in the file - Seq8
- returns OFF if the XEDIT
command or LOAD subcommand was issued with the NOSEQ8 operand; if not, returns ON.
SEQ8.0 number of variables returned .1 ON|OFF - SERial
- returns the serial
identification, the increment value, and the serial number starting value as defined in the SET
SERIAL subcommand.
SERIAL.0 number of variables returned .1 serial or OFF .2 increment .3 start number - SHADow
- returns ON or OFF as
specified in the SET SHADOW subcommand.
SHADOW.0 number of variables returned .1 ON|OFF - SIDcode
- returns the
eight-character string specified in the SIDCODE option of the XEDIT command, the LOAD subcommand, or
the SET SIDCODE subcommand.
SIDCODE.0 number of variables returned .1 eight-character sidcode string (if specified) or blanks - SIZe
- returns the number of records
in the file being edited.
SIZE.0 number of variables returned .1 number of records in file - SPAN
- returns ON or OFF, BLANK or
NOBLANK, and n as defined in the SET SPAN subcommand.
SPAN.0 number of variables returned .1 ON|OFF .2 BLANK|NOBLANK .3 n - number of consecutive file lines a character string can span - SPILL
- returns ON, OFF, or WORD as
defined in the SET SPILL subcommand.
SPILL.0 number of variables returned .1 ON|OFF|WORD - STAY
- returns ON or OFF as
specified in the SET STAY subcommand.
STAY.0 number of variables returned .1 ON|OFF - STReam
- returns ON or OFF as
specified in the SET STREAM subcommand.
STREAM.0 number of variables returned .1 ON|OFF - SYNonym
-
returns ON or OFF as specified in the SET SYNONYM subcommand.
SYNONYM.0 number of variables returned .1 ON|OFF- SYNonym name
- returns the synonym, its minimum abbreviation (returned as the number of letters in the minimum
abbreviation), the associated synonym definition, and the line-end character, if it has been
specified. If no synonym is defined, then SYNONYM.1 and SYNONYM.3 are set equal to the name of the
synonym, SYNONYM.2 is set to the length of the name, and SYNONYM.4 is set to null.
SYNONYM.0 number of variables returned .1 name .2 length of minimum abbreviation .3 definition .4 linend character (if specified) or null - SYNonym *
- returns for each defined synonym its name, its minimum abbreviation (returned as the number of
letters in the minimum abbreviation), and the associated synonym definition (that is, everything
that was specified in the SET SYNONYM subcommand).
SYNONYM.0 number of variables returned .1 name abbrev. [LINEND char] definition .2 name abbrev. [LINEND char] definition . . . . .n name abbrev. [LINEND char] definition
- TABLine
- returns ON or OFF and the
position of the TABLINE as specified in the SET TABLINE subcommand (or TABL prefix subcommand) and
the line number of the tabline on the screen. If TABLINE is OFF, only TABLINE.0 and TABLINE.1 are
returned.
TABLINE.0 number of variables returned .1 ON|OFF .2 M [+n|-n] | [-] n .3 line number on screen - TABS
- returns the tab column
numbers defined in the SET TABS subcommand.
TABS.0 number of variables returned .1 tab columns - TARGet
- returns the following
information about the character string that matches the last target located with a LOCATE or
CLOCATE: line and column number of the first character in the string and line and column number of
the last character in the string.
Returns the following information about targets that have been specified as an absolute line number, a relative displacement from the current line, or a line name: line number and current column position (twice).
If the last target located was specified with &, only information about the last string found is returned. For example, if the last target was located with the following command:LOCATE /a/ & /try/and the line located,
is on line 11 in the file and begins in column 1, EXTRACT /TARGET/ would return the following values.This try is even a better one |...+....1....+....2....+....3....+....4....+....5....+....6....+....7...TARGET.0=4 TARGET.1=11 (line number that contains "t") TARGET.2=6 (column number that contains "t") TARGET.3=11 (line number that contains "y") TARGET.4=8 (column number that contains "y")These values are returned because try is the last string found in the target.
Information EXTRACT/TARGET/ returns is guaranteed to be valid only when the EXTRACT immediately follows the LOCATE or CLOCATE of the target. Any XEDIT subcommand issued between the LOCATE or CLOCATE of the target and the EXTRACT has the potential to invalidate the TARGET information.TARGET.0 number of variables returned .1 line number of first character .2 column number of first character .3 line number of last character .4 column number of last character - TERMinal
- returns DISPLAY or
TYPEWRITER as defined in the SET TERMINAL subcommand.
TERMINAL.0 number of variables returned .1 DISPLAY|TYPEWRITER - TEXT
- returns ON or OFF as
specified in the SET TEXT subcommand.
TEXT.0 number of variables returned .1 ON|OFF - TOF
- returns ON or OFF as the
editor determines. TOF is ON when the line pointer reaches the Top of File (or Top of Range) line.
TOF.0 number of variables returned .1 ON|OFF - TOFEOF
- returns ON or OFF as
specified in the SET TOFEOF subcommand.
TOFEOF.0 number of variables returned .1 ON|OFF - TOL
- returns ON or OFF as the
editor determines. TOL is ON when the column pointer reaches zone1-1.
TOL.0 number of variables returned .1 ON|OFF - TRANSLat
- returns ON or OFF,
depending on whether the user has defined pairs of uppercase translate characters using the SET
TRANSLAT subcommand.
TRANSLAT.0 number of variables returned .1 ON|OFF - TRunc
- returns the truncation
column number as defined in the SET TRUNC subcommand.
TRUNC.0 number of variables returned .1 truncation column number - UNIQueid
- returns the unique
identifier associated with the file. The identifier has the form rrrnnnnn
where rrr is the number XEDIT associates with the ring and
nnnnn is the current autosave number. Note, when the ring number,
rrr, is less than 100, leading zeros are dropped. The UNIQUEID is also the
file name for the AUTOSAVE file.
UNIQUEID.0 number of variables returned .1 unique identifier associated with this file - UNTil
- returns the file type
through which updates have been applied as specified in the XEDIT command or LOAD subcommand.
UNTIL.0 number of variables returned .1 file type (if specified) or blanks - UPDate
- returns ON or OFF as the
editor determines. Update is ON when the XEDIT command or LOAD subcommand has been issued and the
UPDATE option was specified or implied.
UPDATE.0 number of variables returned .1 ON|OFF - VARblank
- returns ON or OFF as
specified in the SET VARBLANK subcommand.
VARBLANK.0 number of variables returned .1 ON|OFF - Verify
- returns H (if SET VERIFY
with the HEX option was previously issued), the verification columns, and ON or OFF as specified in
the SET VERIFY subcommand.
See Examples.VERIFY.0 number of variables returned .1 ON|OFF .2 [H]startcol endcol [...[H]startcol endcol] - VERShift
- returns
n or -n, which is the relative position of the
screen over the file, as a result of any LEFT or RIGHT subcommands.
VERSHIFT.0 number of variables returned .1 n|-n - Width
- returns the WIDTH value
specified in the XEDIT command or LOAD subcommand.
WIDTH.0 number of variables returned .1 width of file - WINdow
- is the name of the virtual
screen and window that XEDIT uses to display the file or files being edited.
WINDOW.0 number of variables returned .1 window name or blanks (for nondisplayable terminals) - WRap
- returns ON or OFF as
specified in the SET WRAP subcommand.
WRAP.0 number of variables returned .1 ON|OFF - Zone
- returns the left and right
zone column numbers specified in the SET ZONE subcommand.
ZONE.0 number of variables returned .1 left zone .2 right zone - =
- returns the string in the equal
(=) buffer. The = buffer contains the last executed subcommand, macro, CP/CMS command, or whatever
has been specified in the SET = subcommand.
EQUALSIGN.0 number of variables returned .1 the string in the = buffer
Notes for Macro Writers
- The number of variables EXTRACT returns may depend upon whether the setting is ON or
OFF or whether the settings were requested on a typewriter terminal. The following settings return a
value of name.0=0 on a typewriter terminal. No other variables associated with that setting
are initialized:
CMDLINE LSCREEN SCREEN CURSOR MSGLINE TABLINE FLSCREEN SCALE - If an error occurs while processing the request specified on the EXTRACT subcommand,
a nonzero return code is returned and an error variable, EXTRACT.n is set. EXTRACT.0 and EXTRACT.1
are set on return codes 2, 5, and 16 only. EXTRACT.0 is always set to the number of error variables
returned. If the return code is 2 or 5, EXTRACT.1 is set to the delimited string that was invalid
(return code 5) or the delimited string containing a target not found (return code 2) when EXTRACT
was invoked. All values prior to the one specified in EXTRACT.1 will have been processed, while
those following the one in error will not.
However, when the return code is 16, EXTRACT.1 is set to the name of the variable that was too long for the EXEC 2 restriction of a maximum value length of 255 characters. For example, if one is editing a file with a current line longer than 255 characters, and an EXTRACT /CURLINE/ is issued, EXTRACT.1 is set to CURLINE.3. The setting of any other variables resulting from that invocation of EXTRACT is unpredictable. EXTRACT.1 does not give an indication of what has or has not been set in this case.
- If EXTRACT is issued when an exec or XEDIT macro is not active, a return code of –3 is set and
the following error message is displayed:
If XEDIT is invoked from an EXEC or XEDIT macro, that EXEC or macro is active until you exit from XEDIT and subsequently from the EXEC or macro. Issuing EXTRACT from the XEDIT command line may set variables in the EXEC or macro that invoked XEDIT.631E EXTRACT can only be issued from an EXEC 2 or REXX exec. - EXTRACT/MASK/ issued from an EXEC 2 environment always results in return code 16 since the MASK has 256 characters. To obtain the same information, you can use TRANSFER MASK. Issuing EXTRACT/MASK/ from a REXX environment returns the mask properly, because REXX imposes no length restrictions.
- If SET HEX ON is in effect, you can specify targets in hexadecimal.
- Some EXTRACT operands return a value that reflects how the screen would look if it were displayed at the time that EXTRACT is being executed. The value returned reflects relative changes due to the execution of prefix subcommands and macros. It does not necessarily reflect the final content of the screen, which is eventually displayed.
Examples
The following are examples using the EXTRACT subcommand.
set lrecl 65 and then execute an XEDIT macro that issues:
extract /ACTION/ ACTION.0 = 1
ACTION.1 = ONextract ?COL?fname?pf3? COLUMN.0 = 1
COLUMN.1 = 1
FNAME.0 = 1
FNAME.1 = SAMPLE
PF3.0 = 2
PF3.1 = BEFORE
PF3.2 = QUITset pending block 3WW57
extract !pending block * :2 +5! PENDING.0 = 7
PENDING.1 = 6
PENDING.2 = WW
PENDING.3 = WW
PENDING.4 = BLOCK
PENDING.5 = 3
PENDING.6 = 57
PENDING.7 = nullset case mixed respect
extract ¢CASE¢COLOR ALL¢AUTOSAVE¢ CASE.0 = 2
CASE.1 = MIXED
CASE.2 = RESPECT
EXTRACT.0 = 1
EXTRACT.1 = COLOR ALLProfessor Twist could not but smile.extract %SCALE%CURLINE% SCALE.0 = 0
CURLINE.0 = 4
CURLINE.1 = -1
CURLINE.2 = -1
CURLINE.3 = Professor Twist could not but smile.
CURLINE.4 = ON
CURLINE.5 = NEWSET VERIFY 1 10 H 11 20 21 30 H 31 40EXTRACT /VERIFY/The VERIFY.2 variable is set to contain
pairs of columns. A column range displayed in hexadecimal is indicated by the letter H that prefixes
the starting column number. VERIFY.2 = 1 10 H11 20 21 30 H31 40 There is no
blank between the H and the starting column number.Messages and Return Codes
- 545E
- Missing operand(s) [RC=5]
- 622E
- Insufficient free storage [message] [RC=104]
- 631E
- EXTRACT can only be executed from an EXEC-2 or REXX EXEC [RC=-3]
where return codes are:
- –3
- Invalid when issued from an environment other than EXEC 2 or REXX
- 2
- Target not found
- 5
- Missing operand(s)
- 6
- Subcommand rejected in the profile due to LOAD error, or QUIT subcommand has been issued in a macro called from the last file in the ring
- 16
- EXEC 2 variable greater than 255 characters
- 104
- No storage is available
