.disable display,quiet
.enable substitution
.setn found 0
.if p2 = "" .goto disp
;
; For Logical Name containing "'p2'" .....
; Logical Name ===> Directory
;
.openr #1 lb:[1,2]syslogics.cmd
.;
.; The above file has system logicals set by the MCR ASN command
.; in the following manner, (for example): ASN DU0:[PLOTS]=PLOTS$/GBL
.; A parse of each line at space,=, and / will give the parameters
.; we need, specifically the second and third.
.;
.loop:
	.read #1 line
	.ift <eof> .goto end
	.parse line " =/" ASN direc logic GBL
	.test logic p2
	.if <strlen> = 0 .goto loop
	.inc found
	;'logic' ===> 'direc'
	.goto loop
.disp:
;
;Term.    Default     Login      Login times    Tsks     User Name
;-----    -------     -----      -----------    ----     ---------
.enable quiet
DEV /LOG
.disable quiet
; 
;Your active tasks are....
; 
.enable quiet
ACT
.disable quiet
.end:
;
.if p2 <> "" .if found = 0 ; ( None found like "'p2'" ! )
.EXIT
