Here's a code fragment showing the technique we use to check if a line label exists in another program. Earlier code (not shown) checks that the file named in _program$ exists and is a ProvideX/PxPlus program file.
Matt.
->\`2100,2160
2100 if _label$>""
: then call pgn+";aim_llcheck_label",_program$,_label$,_lno;
: if _lno=0
: then let aim_syobjresult=3,aim_syobjreturn$="no line label "+_label$+" in program "+_program$
2110 AIM_LLCHECK_PGM_DONE:
2120 return
2130 AIM_LLCHECK_LABEL:
2140 enter (_program$),(_label$),_lno,err=*end
2150 let _lno=0
2160 execute "load "+quo+_program$+quo+"; _lno = lno("+_label$+"); exit",err=*end
->
Matt.