/* rexx from a.keáler */ address isredit "macro" address isredit "reset" address isredit "(oben) = display_lines" address isredit "(last) = linenum .zlast" texta = " keine, oder falsche Jobkarte vorhanden !" textb = " es ist schon ein gueltiger NOTIFY-Eintrag vorhanden !" textc = " Fehler in der Jobkartenfortfuehrung !" not = "// NOTIFY=" use = userid() notify = not""use do v=1 to last address isredit "(jobc) = line" v len=length(strip(jobc)) if len=80 then do jobc=substr(jobc,1,72) len=length(strip(jobc)) end parse var jobc w1 w2 w3 /* searching for the jobcard */ if v=1 then do slashes=substr(w1,1,2) third_column=substr(w1,3,1) if third_colum=" " ! third_column="*" ! , slashes^="//" then no_jobcard=1 if no_jobcard=1 then call nojob else no_jobcard=0 if w2 ^= "JOB" then no_jobcard=1 if no_jobcard=1 then call nojob end /* searching for valid NOTIFY-card */ fy_found=pos(",NOTIFY=",jobc) st_found=pos("//*",jobc) if fy_found=0 & st_found=0 then fy_found=pos(" NOTIFY=",jobc) st_found=pos("//*",jobc) if fy_found>0 & st_found=0 then do call oknot exit end /* searching for valid continuation */ if v>1 & komma>0 then do slashes=substr(w1,1,2) third_column=substr(w1,3,1) if third_colum=" " ! slashes="//" then no_jobcard=0 else do call error exit end end /* find a comment card */ com_card=substr(w1,1,3) /* find a valid continuation */ if no_jobcard=0 then call komma else call nojob if komma=0 & com_card^="//*" then leave end /* change the cards */ if no_jobcard=0 then do sjc=strip(jobc) new_jobc='"'sjc',"' address isredit "line" v" ="new_jobc address isredit "line_after" v" = dataline" "'"notify"'" end exit /* find comma on last position */ komma: komma=lastpos(",",jobc) if komma