[Info-vax] VMS Python: Calling sys$trnlnm()

ergamenes at gmail.com ergamenes at gmail.com
Fri Mar 27 05:26:16 EDT 2020


Possibly trnlnm could be fixed to coerce the return value to an int. I'll leave that to smarter people than me. However, the struct module is what you need to solve the immediate problem.

from struct import unpack

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)
                )
              )

attrib = d[LNM__ATTRIBUTES]
attrib = unpack('<I', attrib)[0]
print(attrib & LNM_M_TERMINAL)



More information about the Info-vax mailing list