# Collection of code snippets by Arne Vajhøj 
# (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
from vms.itemList import *
from vms.lnmdef import *
from vms.starlet import trnlnm

attr=0
s, d = trnlnm (attr,
               "LNM$FILE_DEV",
               "MYLOGICAL",
               None,
               ( itemList(LNM__STRING), itemList(LNM__ATTRIBUTES, dtype=il_unsignedLong) ) )

print('%d %s %s' % (s, d[LNM__STRING], (d[LNM__ATTRIBUTES] & LNM_M_TERMINAL) != 0))
