[Info-vax] Notable VMS "feature"

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Thu Jan 7 14:28:31 EST 2016


In article <aec0b901-1099-48bb-899c-70d9952e1010 at googlegroups.com>, Tom Adams <tadamsmar at gmail.com> writes:
>I have defined a logical name that I cannot deassign
>
>A logical name that is 255 characters long that ends with a colon.
>
>Here's a command procedure than will do it.
>
>$A = "X"
>$A = A+A
>$A = A+A
>$A = A+A
>$A = A+A
>$A = A+A
>$A = A+A
>$A = A+A
>$A = A+A
>$A = F$EXTRACT(0,254,A)
>$A = A+":"
>$WRITE SYS$OUTPUT "''F$LENGTH(A)'"
>$DEFINE 'A FOOBAR
>$!Cannot deassign using the name because the colon is stripped
>$ON ERROR THEN CONTINUE
>$DEASS 'A
>$!Cannot deassign by adding a extra colon because the name it too long
>$B = A+':'
>$DEASS 'B
>
>Is there anyway to get rid of this logical name other than logging out?
>

	PROGRAM MY_TERMINAL
	IMPLICIT NONE

	INCLUDE '($DSCDEF)'
	INCLUDE '($JPIDEF)'
	INCLUDE '($STSDEF)'
	INCLUDE '(LIB$ROUTINES)'
	INCLUDE '(STR$ROUTINES)'

	INTEGER*4 STATUS

	RECORD	/DSCDEF1/ LOGICAL

	LOGICAL.DSC$W_MAXSTRLEN = 0
	LOGICAL.DSC$B_DTYPE = DSC$K_DTYPE_T
	LOGICAL.DSC$B_CLASS = DSC$K_CLASS_D
	LOGICAL.DSC$A_POINTER = 0

	STATUS = STR$DUPL_CHAR(LOGICAL,254,%REF('X'))
	IF (.NOT.(STATUS.AND.STS$M_SUCCESS)) THEN
	  CALL SYS$EXIT(%VAL(STATUS))
	ENDIF

	STATUS = STR$APPEND(LOGICAL,%DESCR(':'))
	IF (.NOT.(STATUS.AND.STS$M_SUCCESS)) THEN
	  CALL SYS$EXIT(%VAL(STATUS))
	ENDIF

	STATUS = LIB$DELETE_LOGICAL(LOGICAL,)
	CALL SYS$EXIT(%VAL(STATUS))

	END
-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.



More information about the Info-vax mailing list