cQLP ;Change reference port for local printers ;cQLP; Q ;Get current reference port B D JOBS^cQSYS s i=0 f s i=$O(JOB(0,i)) q:i="" s job=JOB(0,i) d . S N=$$JP^cQJOB(job,"nspace") I (N="%SYS")!(N="") Q . S IP=$$JP^cQJOB(job,"ip") w !,IP I (IP="") Q . D V^cQ14(job,"S") s j="" . f s j=$O(^TEMP($J+.01,"VAR",job,j)) q:j="" i ^(j)="io" s io=^(j+.01) Q . W !,io . s ^mf(IP)=io BZ Q ; YZ Q ; ;Set new reference port in ^mfdata(0,"SYS.LP" C s IP="" f s IP=$O(^mf(IP)) Q:IP="" d . S CP=^(IP),RP=1000+$P(IP,".",4),OLD(CP)=RP . S j="" . f s j=$O(^DATA(0,"SYS.LP",j)) Q:j="" S A=^(j,0),o=0 d .. f s o=$O(OLD(o)) q:o="" d ... i $P(A,"\",3)=o s ^mfdata(0,"SYS.LP",j,0)=A,$P(^(0),"\",3)=OLD(o) CZ Q ; ZZ ; 17.01.2012 - 15:58 * Cache-r6.4.9