Macro names. CUT, PASTE, APPEND,
and on the PC side using SPF/PC CUTR, PASTER, APPENDR | Edit macro CUT and PASTE | |
users. | PDF EDIT users | Author: David McRitchie The REXX Macros Toolbox Rewrite of NaSPA tape file 004 |
type. | Edit Macro resides in SYS1.TSOCLIST, and in IS03.SPF2.MACROS and d:\spfmacro\ Datasets and locations will vary from one user to another. | |
CUT | Edit macro CUTs data | |
Related | cut, append, paste, cutd, cutdd, reformat, @ICOPY | |
This version of CUT & PASTE had started out from use of NaSPA tape file 004 with revisions providing additional function, including note and message lines, multiple cut and paste processes, paste from a permanent dataset, and later conversion to REXX. In other words it bears little resemblance to it's forbearer. Please read on. Our version of CUT and PASTE uses comment lines to indicate copied or removed material. APPEND is used instead of CUT to add additional material to the paste dataset. PASTE KEEP will paste but not delete the paste dataset, and PASTE EDIT will edit the paste dataset. CUT DOC and APPEND DOC will include a designation of where material was cut from. CC-range is used for CUT or APPEND. For PASTE the destination is indicated by A (after) or B (before) on the line number. |
CUT |
will Copy/move selected lines from your dataset in edit to a new
work dataset to be pasted at a later time.
Use CC CC or C99999 or C<<n>> line command(s) with CUT, or
Use MM MM or M99999 or M<<n>> line command(s) with CUT.
( The use of the M type line commands removes data from workspace
)
===> CUT |
APPEND |
will Copy/move selected lines to your existing work dataset to be
pasted at a later time.
Use CC CC or C99999 or C<n> line command(s) with APPEND, or Use MM MM or M99999 or M<n> line command(s) with APPEND. ===> APPEND DOC |
PASTE |
will copy the lines from your work dataset to your edit
workspace, and then delete the work dataset. The ability to keep the
work dataset is optional.
Use A or B line command with PASTE
===> PASTE |
The CUTR, APPENDR, and PASTER macros can be used with SPF/PC. The content is virtually identical. Different names are required so as not to interfere with the CUT and PASTE options already in SPF/PC, DOS, and OS/2. Differences between them involve bugs in SPF/PC and I/O operational differences between TSO and SPF/PC versions of REXX. |
ISREDIT CUT [nn] ISREDIT APPEND [DOC] [nn] ISREDIT PASTE [KEEP | EDIT] [nn] [COL(n) VALUE(string)]
| |
DOC |
An option available with CUT and APPEND to include a two line
header showing source of data. The two lines generated are in
the form of SCRIPT comments. After pasting the comments can be
modified to conform to other comment usage.
e.g.
|
KEEP | An option of PASTE to keep the data in your userid.CUTDSN.LIST work dataset. The default is to delete the file when pasted. The CUTDSN dataset may be edited and modified at any time until pasted. |
EDIT | An option of PASTE to edit the data in your userid.CUTDSN.LIST work dataset for change or review. |
COL(nn) | An option of PASTE to include only those lines from userid.CUTDSN.LIST work dataset that have VALUE(specified) in column nn or the lines with blank for the value immediately after. The use of COL implies KEEP. |
VALUE(value) | An option of PASTE, see COL(nn) for details. The length of value is determined by your use of parentheses. When using COL() the CUTDSN dataset can include ".INCLUDELINE" in positions 1-12 to cause the next line to be included with any other paste selections. Suggested placement is at top and at bottom. |
(member) | An option of PASTE, the member specified within parentheses will be pasted from userid.LIBR.PASTE. The use of KEEP is implied and is not specified when PASTE is invoked. Use the edit command CREATE or REPLACE to add/replace material in your permanent userid.LIBR.PASTE dataset. userid.LIBR.PASTE should be created as RECFM=VB LRECL=255 BLKSIZE=6233, with 15 tracks, and 30 directory blocks to start with. |
nn | A number in the range 0-99 as an option of CUT, APPEND and PASTE to create a variation in the name of the CUT/PASTE dataset. userid.CUTDSNnn.LIST will be used rather than the standard userid.CUTDSN.LIST. See also (member). |
Line commands | |
C, Cn, CC | Copy lines is an option with CUT and APPEND, either the copy or move line command(s) must be used. |
M, Mn, MM | Move lines is an option with CUT and APPEND, the normal choice would be to copy lines. |
A | Specify an "After" destination. Used with PASTE. Either After or Before must be with PASTE, except when pasting to an empty dataset. |
B | Specify a "Before" destination. Used with PASTE. Either Before or After must be with PASTE, except when pasting to an empty dataset. |
EDIT ---- IS03.LIBR.CNTL(Z) - 01.10 ---------------------------------- COLUMNS 0 COMMAND ===> CUT SCROLL == ****** ********************************* TOP OF DATA *************************** 000001 /********************************************************************/ 000002 /* OBTAINED FROM NASPA TAPE 004 */ 000003 /* AUTHOR UNKNOWN -- CALL TECHNICAL SUPPORT STAFF FOR HELP */ 000004 /********************************************************************/ MM 005 /* MODIFICATIONS HAVE BEEN MADE AT Our Company */ 000006 /* Our Company SUPPORT -- DAVID MCRITCHIE */ MM 07 /**************************** ORIGINAL CLIST FROM NASPA TAPE 004 ****/ 000008 /* THIS EDIT MACRO CLIST AND ITS COMPANIONS */ 000009 /* */ 000010 /* PASTE -------- ** THIS MACRO CLIST ** ----------- */If the data is never pasted, and another CUT is taken from another data set your data set may start to look like the following
EDIT ---- IS03.LIBR.CNTL(Z) - 01.10 ---------------------------------- COLUMN COMMAND ===> PASTE SCROLL ****** ********************************* TOP OF DATA ************************ 000001 /********************************************************************/ 000002 /* OBTAINED FROM NASPA TAPE 004 */ 000003 /* AUTHOR UNKNOWN -- CALL TECHNICAL SUPPORT STAFF FOR HELP */ 000004 /********************************************************************/ =NOTE= 20:44:49 CUT -- 3 ORIGINAL LINES REMOVED AND PLACED INTO WORK FILE 000005 /* THIS EDIT MACRO CLIST AND ITS COMPANIONS */ A 006 /* */ 000007 /* PASTE -------- ** THIS MACRO CLIST ** ----------- */ 000008 /* TAKE THE OUTPUT DATASET CREATED BY CUT AND MOVE IT TO */ 000009 /* ANYWHERE IN THE CURRENT DATASET BEING EDITED. */After the PASTE take place, your data set would appear as follows:
EDIT ---- IS03.LIBR.CNTL(Z) - 01.10 ---------------------------------- COLUMNS 0 COMMAND ===> SCROLL ===> CSR ****** ********************************* TOP OF DATA *************************** ==MSG> LINE RANGE 5 TO 7 MOVED 000001 /********************************************************************/ 000002 /* OBTAINED FROM NASPA TAPE 004 */ 000003 /* AUTHOR UNKNOWN -- CALL TECHNICAL SUPPORT STAFF FOR HELP */ 000004 /********************************************************************/ =NOTE= 20:44:49 CUT -- 3 ORIGINAL LINES REMOVED AND PLACED INTO WORK FILE 000005 /* THIS EDIT MACRO CLIST AND ITS COMPANIONS */ 000006 /* */ =NOTE= 20:46:29 START OF PASTE 000007 /* CUT ---------- ** COMPANION EDIT MACRO ** ------- */ 000008 /* TAKE SELECTED LINES SPECIFIED BY THE USER AND COPY/MOVE */ 000009 /* THEM TO A SEQUENTIAL WORK DATASET USED LATER BY THE PASTE */ 000010 /* COMMAND. */ 000011 /* APPEND ------- ** COMPANION EDIT MACRO ** ------- */ 000012 /* WILL APPEND ADDITIONAL INFORMATION A HEADER WILL BE CREATED, */ 000013 /* AND INFORMATION WILL BE APPENDED TO YOUR CUT DATASET. */ =NOTE= 20:46:29 -END- OF PASTE 000014 /* PASTE -------- ** THIS MACRO CLIST ** ----------- */ 000015 /* TAKE THE OUTPUT DATASET CREATED BY CUT AND MOVE IT TO */ 000016 /* ANYWHERE IN THE CURRENT DATASET BEING EDITED. */
MVS source files: CUT, APPEND, and PASTE.
PC source files for SPF/PC and SPF/2: CUTR, APPENDR, and PASTER.
The dataset created for use with cut/paste/append is userid.CUTDSN.LIST. This name differs from the original clist on the NaSPA tape. Several other changes were made to these clists since the NaSPA tape and include changing commands to allow cut and paste of datasets with ampersands and datasets with quotes. Have also added notelines so text copied and pasted can be seen on the screen. This facilitates deleting unwanted lines and code realignment within the pasted text area. All options have been added. The original had no options.
The APPEND edit macro is new and was created as a separate edit macro to avoid loss of data already in the CUTDSN dataset. The loss of data already in the CUTDSN dataset could result in a lot of lost effort and so a separate edit macro was created to keep fingers from using CUT when not appropriate. When the CUTDSN dataset does not exist, APPEND will invoke CUT. APPEND will always function without destruction of data already in CUTDSN. CUT will always create a new CUTDSN dataset.
Other versions exist that use make use of your PROFILE dataset (CBT file 095). This practice would not be tolerable as you would quickly fill up the VARIABLE pool with otherwise useless information, even after you have done your PASTE operation. A slightly faster speed is a poor trade off for poor performance in TSO later on. Eight thousand lines added to a profile would become a nuisance, but 8,000 lines added to a dataset would not present a problem.
APPEND will Copy/move selected lines to your existing work dataset Use CC CC or C99999 or C<n> line command(s) with APPEND.
PASTE will move the lines from your work dataset to your edit workspace Paste can now process fixed record length data having sequence numbers. Use A or B line command with PASTE (1994/06/28) will check incoming data for non caps and change current member to CAPS OFF if incoming data has non caps.
The CUT, APPEND, and PASTE edit macros have been modified to allow optional multiple datasets to be in use. An additional option has been added to identify a separate unique dataset.
CUT, APPEND, and PASTE default to using dataset userid.CUTDSN.LIST with the enhancements the following datasets can also be created userid.CUTDSNxx.LIST where xx is a 1-2 digit number.
CUT 3 will create userid.CUTDSN3.LIST PASTE 3 EDIT will allow editing the cut 3 dataset PASTE 3 KEEP will paste dataset into workspace, and retain CUT 3 dsn. PASTE 3 will paste dataset and delete the cut 3 dsn.This solves a problem of not being able make additional CUTs from a CUT dataset and allows creating distinct datasets for multiple purposes.
PASTE (member)
This option has been around but perhaps has not been mentioned lately.
For those who wish to keep a permanent file of CUT material. You
may create a userid.LIBR.PASTE PDS dataset suggest using
DCB=(LRECL=255,BLKSIZE=6233,RECFM=VB,DSORG=PO)
You may PASTE from the permanent dataset by enclosing the membername in parenthesis. You cannot CUT directly into this dataset. You may edit a member in it and then paste into it (for integrity of data). I have provided for multiple permanent PDS datasets just to be consistent with possible parameter usage, though I only currently use the default.
PASTE (member) -- default from userid.LIBR.PASTE(member) PASTE 4 (member) -- would use userid.LIBR.PASTE4(member)
COPY Ctr-C copies without removal CUT Ctr-X removes material PASTE Ctr-V pastes material
In Attachments same as above, also available on EDIT toolbar.
In Communications Manager/2 you may have assigned keys such as
COPY Ctr-pad Ins copies without removal CUT Shift-pad Del removes material PASTE Shift-pad Ins pastes material
CUT and PASTE use C,Cn,CC or M,Mn,MM on the command lines to CUT, and A (After), or B (Before) to PASTE.
SCUT and SPASTE use material based on PC methods to cut out a block of highlighted text, or to paste into the file at the cursor position. If the clipboard contents were not created by SPF/PC they are pasted with "insert" and "stream" modes.
SPASTE <INSERT | OVERLAY > <LINE | STREAM | BLOCK >
Don't forget that the material described here is available in SPF/PC versions using the names CUTR, APPENDR, and PASTER.
Please send your comments concerning my pages or materials to: David using send email comments
Disclaimer and site usage: Material at The REXX Macros Toolbox is available without warranty of any kind. Redistribution of source, coding and documentation other than from this site is prohibited.
Copyright © 1995 - 2006, F. David McRitchie, All Rights Reserved