For a long time, i am trying to write a Rexx/Clist program that will work inside COBOL programs to automatically put my user-id (8 chars long) in the 73-80 columns for all the new lines and modified lines.. But have not succeeded still .. :-(
Here is wat i wrote and the error its throwing.. i dont know much abt Rexx or macros.. so please help..
Code:
Code:
ISREDIT MACRO
ISREDIT CAPS ON
COL=73
CNST=USERID01
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
If you are referring to editing a library member in ISPF and entering a single REXX/CLIST command to place your userid in positions 73-80 of that member, you could use the following code (if stored in a REXX library).
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
in the event that MASK lines is too difficult,
you can invoke a script (edit macro) that:
Excludes ALL
loops thru 'locate change next' until RC <> 0
chg all '========' 'userid48' 73 nx
Interesting. I tried that but it didn't work. according to the help, LOC CHANGE looks for --CHG> lines which are only existing after a CHANGE command. So it does not flag typed in changes.
A google search for ISPF changed lines came up with a good macro called tag. Kind of old (1999) but it worked for me.
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
Might want to play with this one
Code:
/* REXX edit macro to get information about line changes */
/*** trace ?r ***************************************************** \| *
* (C) Copyright Robert AH Prins, 2001-2001 *
************************************************************************
* ------------+------+---------------------------------------------- *
* | Date | By | Changes | *
* |------------+------+----------------------------------------------| *
* | | | | *
* |------------+------+----------------------------------------------| *
* | 2001-05-15 | RAHP | Initial version | *
* |------------+------+----------------------------------------------| *
************************************************************************
* ELS is an edit macro that uses the 'line_status' command to display *
* information about datalines in the member currently being edited. *
************************************************************************
* Send questions, suggestions and/or bug reports to: *
* *
* robert(a)prino(d)org *
* *
* Robert AH Prins *
* Taboralaan 46 *
* 8400 Oostende *
* Belgium *
************************************************************************
* This program is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/> *
***********************************************************************/
"isredit macro"
"ispexec control errors return"
"isredit (LS) = line_status .ELS"
if rc \= 0 then
do
zedsmsg = ''
zedlmsg = 'Mark the line for which you want to get information ' ||,
'with the label ''.ELS'''
"ispexec setmsg msg(ISRZ001)"
exit 1
end
if substr(ls, 1, 1) = '1' then
line = ' - Line is an original line'
else
if substr(ls, 2, 1) = '1' then
line = ' - Line was created using the M(ove) line command'
else
if substr(ls, 3, 1) = '1' then
line = ' - Line was created using the C(opy) or R(epeat) ' ||,
'line command'
else
if substr(ls, 4, 1) = '1' then
line = ' - Line was created using the M(ove) primary ' ||,
'or macro command'
else
if substr(ls, 5, 1) = '1' then
line = ' - Line was created using the C(opy) primary ' ||,
'or macro command'
else
if substr(ls, 6, 1) = '1' then
line = ' - Line was created using the TE line command'
else
if substr(ls, 7, 1) = '1' then
line = ' - Line was created using the I(nsert) ' ||,
'line command'
"isredit line_before .ELS = noteline (LINE)"
if substr(ls, 8, 1) = '0' then
do
line = ' - Line was not changed'
"isredit line_before .ELS = noteline (LINE)"
end
else
do
if substr(ls, 9, 1) = '1' then
do
line = ' - Data on line was typed over'
"isredit line_before .ELS = noteline (LINE)"
end
if substr(ls, 10, 1) = '1' then
do
line = ' - Data on line was changed by the C(hange) or ' ||,
'O(verlay) command'
"isredit line_before .ELS = noteline (LINE)"
end
if substr(ls, 11, 1) = '1' then
do
line = ' - Data on line was changed by the (, ((, ) or ' ||,
')) command'
"isredit line_before .ELS = noteline (LINE)"
end
if substr(ls, 12, 1) = '1' then
do
line = ' - Data on line was changed by the <, <<, > or ' ||,
'>> command'
"isredit line_before .ELS = noteline (LINE)"
end
if substr(ls, 13, 1) = '1' then
do
line = ' - Data on line was changed by the TE, TF or ' ||,
'TS command'
"isredit line_before .ELS = noteline (LINE)"
end
if substr(ls, 14, 1) = '1' then
do
line = ' - The line was renumbered'
"isredit line_before .ELS = noteline (LINE)"
end
end
exit 1