I had many members with RACF commands within JCL, and wanted to rationalise them so the definitions were in a couple of files, one for userid information, one for define commands, one for permits etc.. I remembered someone once talking about ISPF cut and paste, and this proved to be very useful.
I had a member with
//S1 EXEC PGM=IKJEFT01,REGION=0M
//* EPLIB DD DISP=SHR,DSN=SYS1.MIGLIB
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *,SYMBOLS=(JCLONLY)
SETROPTS GENERIC(MFADEF) GENCMD(MFADEF)
RDEF MFADEF FACTOR.AZFSTC OWNER(IBMUSER)
SETROPTS RACLIST(MFADEF) CLASSACT(MFADEF)
/*
/*
and wanted to copy the bold text from each file into other files.
Cut
I used the edit command cut .a .b define append with
000007 //SYSTSIN DD *,SYMBOLS=(JCLONLY)
.a0008 SETROPTS GENERIC(MFADEF) GENCMD(MFADEF)
000009 RDEF MFADEF FACTOR.AZFSTC OWNER(IBMUSER)
.b0010 SETROPTS RACLIST(MFADEF) CLASSACT(MFADEF)
000011 /*
this copied the three lines into a clipboard called define.
You can also use the line commands cc..cc and mm..mm.
For a different file I used CUT add append
000006 //SYSTSIN DD *
cc ADDUSER AZFSTC DFLTGRP(SYS1) OWNER(SYS1) -
000008 OMVS(AUTOUID) -
000009 NAME('MFA STC') -
000010 NOPASSWORD NOOIDCARD -
cc RESTRICTED
/*
and so on for each file.
If you use the line commands mm … mm it will delete it from the current file after the data has been copied to the clip board.
With PF12 set to retrieve it was easy to recall the cut command in each member.
Paste
After I had finished cutting the text I edited a member ADD and used the paste command. The basic syntax is paste clipboard
Command ===> paste add
A ********************************* Top of Data ***...
****** ******************************** Bottom of Data *...
This takes all the data from the “add” clipboard, and puts it >A<fter the top line. Similarly I edited the DEFS file, and used the “paste defs” command to retrieve the data in the clipboard.