TRANSFER
Purpose
The TRANSFER subcommand is used within a macro to access specified editing variables, for example, the current line number, the file name of the file being edited, and so forth. The values transferred are placed in the console stack, and subsequent EXEC 2 &READ control statements can read them. You can specify more than one keyword in one TRANSFER subcommand, placing the values last-in-first-out (LIFO) on the console stack.
Operands
- operand
- will be any one of the following keywords. For additional information on some of the operands, refer to its corresponding SET subcommand (if applicable).
|
|
|
- APL
- transfers ON or OFF as defined in the SET APL subcommand.
- ARBchar
- transfers ON or OFF and the arbitrary character specified in the SET ARBCHAR subcommand.
- AUtosave
- transfers the current AUTOSAVE setting: the AUTOSAVE count, file ID, and number of alterations.
- CASE
- transfers two values: the case setting (U or M) and R or I as defined in the SET CASE subcommand.
- CMDline
- transfers an integer (n), which is the screen command line number defined with the SET CMDLINE subcommand. If SET CMDLINE TOP, n=2. If SET CMDLINE ON, the number is the logical screen size minus one. If SET CMDLINE BOTTOM, n is the number of the last line on the logical screen. If SET CMDLINE OFF, n=0.
- COLPtr
- transfers ON or OFF as defined in the SET COLPTR subcommand.
- COLumn
- transfers the column number of the column pointer.
- CTLchar
-
With char omitted (TRAnsfer CTLCHAR), transfers the control character identifier and all characters defined in the SET CTLCHAR subcommand, in the form CTLCHAR ON ESCAPE char CTL c1 c2 c3 c4 and so forth. If no control characters are defined, transfers CTLCHAR OFF.
With char specified (TRAnsfer CTLCHAR char), the attributes of that character are transferred, in the form CTLCHAR char attribute1 PROTECT|NOPROTECT attribute2 HIGH|NOHIGH|INVISIBLE. If no attributes were defined for the character, transfers CTLCHAR.
If the TRANSFER subcommand specifies multiple operands, the operand that follows CTLCHAR is interpreted as follows: if it is one character in length, it is interpreted as the char operand of CTLCHAR; if it is longer than one character or is not specified, it is handled normally.
For example:
transfer fn ft fm ctlchar lrecl recfmCTLCHAR is treated as if it were specified without the char operand. LRECL and RECFM are handled normally.
transfer ctlchar ¢ ctlchar " ctlchar % lrecl recfmtransfers the attributes of ¢, “, and %.
- CURLine
- transfers the line number of the current line relative to the top of the screen, as defined in the SET CURLINE subcommand.
- CURSor
- transfers four integers: the current position of
the cursor on the screen (line number and column number) and the position of the cursor in the file
(line number and column number). If the cursor is in a protected area, two negative numbers (–1) are
transferred for the position of the cursor in the file. The top and bottom of the range are
considered to be in the file.
The current position of the cursor is the location where the cursor would be placed if the screen were displayed at this time.
- EOF
- transfers ON or OFF as the editor determines. EOF is ON when the line pointer reaches end of file.
- ESCape
- transfers ON or OFF and the escape character (one-character string) defined in the SET ESCAPE subcommand. This character may be blank.
- FILler
- transfers the filler character (one-character string) defined in the SET FILLER subcommand. This character may be blank.
- FMode
- transfers the two-character file mode.
- FName
- transfers the eight-character file name.
- FType
- transfers the eight-character file type.
- HEX
- transfers ON or OFF as specified in the SET HEX subcommand.
- IMage
- transfers ON, OFF, or CANON as specified in the SET IMAGE subcommand.
- IMPcmscp
- transfers ON or OFF as specified in the SET IMPCMSCP subcommand.
- LASTmsg
- transfers the last message the editor issued. This message may or may not have been displayed, depending on the SET MSGMODE subcommand operands.
- LENgth
- transfers the length of the current line from column one through the truncation column, excluding trailing blanks.
- LIne
- transfers the current line number, relative to the beginning of the file.
- LINENd
- transfers ON or OFF and the line-end character as defined in the SET LINEND subcommand.
- LRecl
- transfers the logical record length.
- LScreen
- transfers six integers: the number of lines and the number of columns of the logical screen; the line number and column number defining the top left corner of the logical screen on the virtual screen; the number of lines and number of columns of the virtual screen.
- MACRO
- transfers ON or OFF as specified in the SET MACRO subcommand.
- MASK
- transfers the current mask line as defined in the SET MASK subcommand. The line may be all blanks.
- MSGMode
- transfers ON or OFF and LONG or SHORT as defined in the SET MSGMODE subcommand.
- NBFile
- transfers the number of files being edited.
- NONDisp
- transfers the character defined in the SET NONDISP subcommand. The character may be blank.
- NULls
- transfers ON or OFF as specified in the SET NULLS subcommand.
- NUMber
- transfers ON or OFF as specified in the SET NUMBER subcommand.
- PACK
- transfers ON or OFF as specified in the SET PACK subcommand.
- PFn
- transfers the string associated with a specified PF key, as defined in SET PFn. The string can be null or blank.
- Point
- transfers the symbolic name associated with the current line, as defined in the SET POINT subcommand or the .xxxx prefix subcommand, or transfers a blank string if no name has been defined.
- PREfix
- transfers ON, OFF, or NULLS and RIGHT or LEFT as specified in the SET PREFIX subcommand.
- RANge
- transfers two integers, which are the line numbers of the top and bottom of the range defined in the SET RANGE subcommand.
- RECFm
- transfers the record format, F, V, FP, or VP, defined in the SET RECFM subcommand.
- RESERved
- transfers as one line the line numbers of reserved lines.
- SCALe
- transfers ON or OFF and the scale line number as specified in the SET SCALE subcommand.
- SCReen
- transfers SIZE n1 n2. . ., where n1 is the number of lines in the first logical screen, n2 is the number of lines in the second logical screen, and so forth, as defined in the SET SCREEN subcommand.
- Seq8
- transfers OFF if the XEDIT command was issued with the NOSEQ8 operand; if not, transfers ON.
- SERial
- transfers the serial identification or OFF, the increment value, and the serial number starting value as defined in the SET SERIAL subcommand.
- SIDcode
- transfers the eight-character string specified in the SIDCODE option of the XEDIT command (or subcommand) or the LOAD subcommand.
- SIZe
- transfers the number of records in the file being edited.
- SPAN
- transfers three values: ON or OFF, B or N, and n, as defined in the SET SPAN subcommand.
- STAY
- transfers ON or OFF as specified in the SET STAY subcommand.
- STReam
- transfers ON or OFF as specified in the SET STREAM subcommand.
- SYNonym
-
- TRANSFER SYNONYM
- transfers ON or OFF as specified in the SET SYNONYM subcommand. TRANSFER SYNONYM
name transfers the name, its minimum abbreviation, and the associated
synonym definition (that is, everything that was entered in the SET SYNONYM subcommand after the
minimum abbreviation size). Note: In a TRANSFER subcommand with multiple keyword operands, SYNONYM must be the last one; otherwise, the keyword after SYNONYM is interpreted as its operand and not as an independent keyword.
- TABLine
- transfers ON or OFF and n, as defined in the SET TABLINE subcommand.
- TABS
- transfers the tab column numbers defined in the SET TABS subcommand.
- TARGet
- transfers two pairs of integers pertaining to the character string that matches the last target located: line and column number of the first character in the string; line and column number of the last character in the string.
- TERMinal
- transfers DISPLAY or TYPEWRITER as defined in the SET TERMINAL subcommand.
- TEXT
- transfers ON or OFF as specified in the SET TEXT subcommand.
- TOF
- transfers ON or OFF as the editor determines. TOF is ON when the current line pointer reaches the top of file.
- TOFEOF
- transfers ON or OFF as specified in the SET TOFEOF subcommand.
- TRunc
- transfers the truncation column number as defined in the SET TRUNC subcommand.
- UPDate
- transfers ON or OFF as the editor determines. Update is ON when the XEDIT command has been issued with the UPDATE or CTL operands.
- VARblank
- transfers ON or OFF as specified in the SET VARBLANK subcommand.
- Verify
- transfers ON or OFF, H (if SET VERIFY with the HEX option was previously issued), and the verification columns as specified in the SET VERIFY subcommand.
- VERShift
- transfers +n or –n, which is the relative position of the screen over the file as a result of any LEFT or RIGHT subcommands.
- Width
- transfers the WIDTH value as specified in the XEDIT command or LOAD subcommand or as the editor determines.
- WRap
- transfers ON or OFF as specified in the SET WRAP subcommand.
- Zone
- transfers the left and right zone column numbers specified in the SET ZONE subcommand.
- =
- transfers one line (up to 130 characters) that corresponds to the content of the equal (=) buffer. The equal buffer contains the last executed subcommand or macro or CP/CMS command, or whatever has been specified in the SET = subcommand.
Notes for Macro Writers
- One TRANSFER subcommand can transfer several values. For example:
The macro can then read the values. For example:transfer line size trunc
The variables in the macro now contain the current line number, the size of the file, and the truncation column, respectively.&read vars &line &size &trunc - Remember some TRANSFER keywords are associated with a set of values (like CURSOR and TABS), or a character that can be blank (like ESCAPE), or a text line of varying length (like LASTMSG). When using TRANSFER with one of these keywords, it may be preferable not to specify multiple keywords in one TRANSFER and to make proper use of the &READ VARS, &READ ARGS, or &READ STRING control statements.
Messages and Return Codes
- 545E
- Missing operand(s) [RC=5]
where return codes are:
- 0
- Normal
- 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
