Description of PRFCOPY
Download count: 4 this month, 10966 altogether.
From Kris Buelens, IBM Belgium
PRFCOPY is an XEDIT macro extending the power of the PREFIX commands COPY and MOVE. The main purposes or PRFCOPY are:
- copy & move of lines between files
- insert of same line(s) in multiple places of a file
- collect multiple lines before inserting in a file
- work in columns (with OVERLAY, REPLACE and INSERT)
The basic commands created by PRFCOPY are very easy to use and to remember:
KM, KMM, KC, KCC, KF, KP (the same as standard XEDIT PREFIX commands, prefixed with a 'K') (but you can define your own synonyms)But there are more commands, such as
- to indicate a rectangular area to copy
- to insert the lines, but keep them in the GLOBAMV stack
- to overlay the lines onto existing lines
- to copy one or a few words
- and many more
PRFCOPY Version 4.1 highlights 27 March 1998
With version 4.1, all PRFCOPY commands can be called from XEDIT's command line. And, when the cusror is in the filearea, they use the cursor line as starting point instead of XEDIT's current line.
This makes PRFCOPY very useful when running with PREFIX OFF (such as in PEEK).
PRFCOPY Version 4.1.A highlights 23 March 1999
Avoid a "TAREGT NOT FOUND" message when a PRFCOPY Prefix command is cleared.
PRFCOPY Version 4.2 changes 8 September 2000
The maximum line length supported by the CMS STACK and GLOBALV is 255, hence PRFCOPY's HELPfile tells that it can only handle lines up to 255 chars.
With V4.2, PRFCOPY displays an error message when lines are truncated while added to the stack, and -for the KM(M) command- the lines will not be deleted in case of truncation.
PRFCOPY Version 4.2.a changes 26 March 2002
A nasty bug was discovered (and fixed) in this -already old- code:
When using KMM and some lines are excluded in
the KMM range, PRFCOPY removed more lines than it placed in the stack.
PRF011 LISTING F1 V 133 Trunc=133 Size=788 Line=10 Col=1 ====> Mini- On- 00010 Num- Volume Control disk line Plus 00011 ber Serial Type Unit Links Secs Count Rate Avoided 00012 00013 30A1 V2KRS1 3390-3 3990-6 111 3600 12093 3.4 16576 00014 30AE V2KPG1 3390-3 3990-6 1 3600 13247 3.7 13247 kmm -------------------- 2 line(s) not displayed ------------ 00016 307C V2K024 3390-3 3990-6 38 3600 290 0.1 338 00018 207C V2K036 3390-3 3990-6 4 3600 196 0.1 196 kmm 202C V2K029 3390-3 3990-6 10 3600 47 0.0 100 00020 303C V2K020 3390-3 3990-6 2 3600 55 0.0 87 00021 2070 V2K022 3390-3 3990-6 2 3600 12 0.0 12 00022 20A1 V2K033 3390-3 3990-6 2 3600 12 0.0 12 00023In the above example, the buggy PRFCOPY places three lines in the PRFCOPY stack (as expected), but it removes 5 lines: line 15, 18 and 19 (as expected), but also line 20 and 21.
PRFCOPY Version 4.2.b changes 2 April 2002When KM or KMM commands cause the delete of XEDIT's current line, a target not found message was displayed.
PRFCOPY Version 4.2.c changes 12 June 2002No code has been changed, only one typing error in this document has been corrected. A few lines earlier I wrote:
but it removes 5 lines: line 14, 18 and 19 (as expected), but also line 20 and 21.instead of
but it removes 5 lines: line 15, 18 and 19 (as expected), but also line 20 and 21.
PRFCOPY Version 4.2.d changes 28 May 2004
Due to demand, PRFCOPY is also packaged as a ZIP file.
PRFCOPY Version 4.2.e changes 7 Feb 2006
Avoid loop if issuing 'PRFCOPY' (to define synonyms) with pending KC (and alike) commands and excluded lines.
PRFCOPY Version 4.2.f changes 4 Apr 2006
Similar problem: avoid loop with "L 0 PRFCOPY" in CMS HELP