/*rexx -- @edit patterned from SYSDSN also by D.McRitchie */ /* David McRitchie, "The REXX Macros Toolbox", 1994/03/21 */ address ISREDIT;macro "(member) = member" "(row,col) = cursor" if row = 0 | col = 0 then do ZEDSMSG = "CURSOR" ZEDLMSG = "CURSOR has not been positioned on a line at a member" address "ISPEXEC" "SETMSG MSG(ISRZ001)" return 0 end "(line) = line .zcsr" line = translate(line) arg col1 col2 if col2 <> " " then do line = name(line,col1,col2) from = col1 /* readjust cursor */ signal gotone end do i = COL to 1 by -1; L=verify(substr(line,i,1),'1234567890abcdefghijklmnopqrstuvwxyz'||, '_-ABCDEFGHIJKLMNOPQRSTUVWXYZ@#$().\:') if l \= 0 then leave from = i end line = STRIP(substr(line,from)) L=verify(line,'1234567890abcdefghijklmnopqrstuvwxyz'||, '_-ABCDEFGHIJKLMNOPQRSTUVWXYZ@#$.*%\:') if l >0 then do line=substr(line,1,l-1) if substr(line,l-1,1) = '.' then line=substr(line,1,l-2) end else if l <> 0 then do; /* spfpc would not accept null then */ ZEDSMSG = "no name" ZEDLMSG = "SYSDSN did not find a name at line" ROW ', col ' COL address "ISPEXEC" "SETMSG MSG(ISRZ001)" return 1 end /* c:\spfmacro\nxnx.spf */ gotone: parse version v1 v2 v3 v4 v5 if v1 = "REXXSAA" then Address "CMD" "CALL" "SPF2" line "/E" if v1 = "REXX/2" then /* note CALL only in OS/2 */ Address "CMD" "c:\spfpc40\SPFPC.exe" line "/E" row = row + 1 "cursor =" row from exit rc name: procedure; /* N -- nwork */ /* copied from REFORMAT.spf to add functionality to @EDIT.spf */ /* reconstruct name.ext from dir listing name ext */ /* preserving original area occupied by column pair */ arg str1,from,length FL = length - from + 1 B=0 str1 = strip(substr(str1,from,length),"b") nstr1="" do i = 1 to length(str1) if substr(str1,i,1) <> " " then do; b=0 nstr1 = nstr1||substr(str1,i,1) end else do if b = 0 then nstr1 = nstr1"." b=b+1 end end nstr = left(nstr1,length) return nstr /* test area -- @EDIT with cursor on filename or membername 1993/06/18 14:42 11898 A--R- C:\PSF2\DOSWORD.TXT 1993/06/18 14:42 63682 A--R- C:\PSF2\NOVELL.TXT 1993/06/18 14:42 42399 A--R- C:\PSF2\TT.TXT --- c:\is03\tsotrap.cmd --- c:\is03\DSWAP.cmd --- D:\spfmacro\@c.spf test area -- @EDIT 1 12 HTMLDOC SPF 3430 05/11/97 8:28p HTMLHYP SPF 2571 05/23/97 9:42p HTMLOL SPF 11734 05/10/97 9:41a HTMLSYN SPF 10940 05/22/97 4:30p JCLBOX SPF 2659 05/10/97 9:53a */