I'm not a COBOL programmer any more, per se. But a few years ago, as part
of an RBAC project, a client wanted to implement a new naming scheme for
their RACF groups; they hired me to analyze a whole raft of COBOL programs
(about 400 of them, I think) to see which ones were checking the user's RACF
groups to make security decisions. When you have to search 400 COBOL
programs for that sort of thing, yeah, Edit macros come in real handy. I
wrote a handful, with a bunch of different arguments to make each one do
various things: show only lines containing a specified string, go fetch code
from a copylib, etc. I was about to say it was 2012 so I don't have the
code any more, but I remember I saved it. Pretty specialized and maybe of
no use to you, but let's see ...
1) Here's a subroutine called by multiple Edit macros that simply finds the
beginning and end of the Data Division and marks them with two labels, .DDA
2) An Edit macro that searches through a module for certain key words. If
none are there, I can ignore the program; if it finds anything I can decide
whether I need to look at this program more closely. I can supply one or
more codes as arguments, each one representing a list of words I might be
interested in for this program.
3) I'd forgotten this: It looks like I also wrote a VBS program to work
under their Telnet emulator (Zephyr); it would go to 3.14 to search for a
number of tell-tale character strings in a number of COBOL source libraries,
and produce a list of hits. An Edit macro then read the SRCHFOR.LIST
dataset and created a list of member names, which is then fed to another
program or to me.
4) Here's a REXX that gets a member name from the caller (produced by the
previous routine, I think) and looks in a list of source and copybook
libraries for any member(s) of that name; any hits it displays to me.
5) WSFIND is an Edit macro to which I feed a working-storage variable name
or fragment of a name; it searches the current COBOL program for that
string, and then expands the COPY and INCLUDE statements in the Data
Division and looks there as well.
6) Oh, yeah, this one was good: Point it to a COBOL line in the
Working-Storage section and it would eXclude all lines except that
variable's definition and all its parents. What I mean is, say I put the
cursor on line 233 which is a level-20 value; the program Xed out all but
the 20, and its parent 15, and its parent 10, and its parent 5, and its
parent 1. This lets me easily identify where it fits in the structure, even
if there are scores or hundreds of other variables in the record. Yeah,
yeah, don't bother telling me that a programmer might not necessarily stick
to the 01-05-10-15-20-etc structure; the program knows better than to
7) The last one claims "This REXX Edit macro starts with a variable name in
working storage and displays in the current COBOL program all the places
where it or any of its subordinate variables are named." I'd forgotten that
***@gmail.com, cell 336 382-7313
/* Failure is the opportunity to begin again more intelligently. -ok, I
found it in a fortune cookie, but it's not bad */
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of
Roland J. Kinsman
Sent: Thursday, June 9, 2016 11:13
CLIST or REXX. I'm thinking about people editing COBOL source using the
regular ISPF editor. I've heard of people using ISPF Edit macros to
automate mundane tasks like marking changed code, inserting standard blocks
of code, etc.
No. Do you mean macros written in COBOL or macros written in Rexx?
Any guesses on percentage of COBOL Programmers who use ISPF Edit Macros
in their day-to-day work?
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX