/*rexx*/ address "ISREDIT";"macro" /*********************************************************************/ /* David McRitchie, "The REXX Macros Toolbox", April 2, 1997 */ /* HTMLHYP -- Create hypertext entry for word at cursor --- */ /* Creats hypertext entry for the */ /* word located at the cursor. User can supply suffix, or */ /* prefix and suffix. Default is .htm suffix. Hypertext entries */ /* are created in lowercase to meet AOL and UNIX conventions. */ /* The cursor upon exit will be located on the next NX line at */ /* the corresponding position of the start of the character string. */ /*********************************************************************/ "(dataset) = dataset" dataset = translate(dataset) "(member) = member" pHTM = pos('\HTM\',dataset); arg hpref hsuff hlink hp = translate(hpref) if hp = "#" then do hpref = "#" hsuff = "" end /*- This coding specific for The REXX Macros Toolbox website */ else if hp = "H" | hp = "HTM" then do hpref = "htm/" hsuff = ".htm" if pHTM /= 0 then hpref="" end else if hp = "R1" | hp = "TXT" then do hpref = "../rexx01txt/" if pHTM /= 0 then hpref="../"hpref hsuff = ".txt" end else if hp = "R2" | hp = "TSO" then do hpref = "../rexx02tso/" if pHTM /= 0 then hpref="../"hpref hsuff = ".txt" end else if hp = "R3" | hp = "SPF" then do hpref = "../rexx03spf/" if pHTM /= 0 then hpref="../"hpref hsuff = ".txt" end if hpref||hsuff = "" then hsuff = ".htm" "(row,col) = cursor" /* wwwww abc */ "(line) = line" row line = translate(line," ","+%^&*()_+={}[]|\:;""'<>,.?/")||" " /* could be more inclusive but didn't bother. # cannot be used in the hyperlink itself as it would be confused with a local link. You will have to modify anyway. @ can give problems for membernames outside of SPF/PC when DOS utilities think it means something else. For ZIP/UNZIP use ? as a place holder for @. At "The REXX Macros Toolbox" we generally used prefixes of @ for macros, and $ for TSO clists and executes (so now you know). word word WORD word WORD *********/ i = index(substr(line,col)," ") - 1 k=col do j = col to 1 by -1 if " " = substr(line,j,1) then leave; k=j end; word = substr(line,k,col-j+i-1) zedlmsg = """"word"""" k col i zedsmsg = "" "line_before .zcsr = noteline (word)" col = k "ispexec" "setmsg msg(isrz000)" "cursor =" row col /***********************************/ "(line) = line" row wordlc = translate(word,'abcdefghijklmnopqrstuvwxyz',, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') hpref = translate(hpref,'abcdefghijklmnopqrstuvwxyz',, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') hsuff = translate(hsuff,'abcdefghijklmnopqrstuvwxyz',, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') "c word .zcsr .zcsr" col "'"word"'", "'"word"'" if hpref="#" then do line = "'
" "'" "line_after .zcsr = noteline (line)" end row = row + 1 /* prepare to place cursor for next line */ "cursor =" row col /*"find next p'=' nx" col*/ "up 2" exit