[Info-vax] VMS Python: Calling sys$trnlnm()
Jean-François Piéronne
jf.pieronne at laposte.net
Fri Mar 27 06:01:46 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)
>
You can try
itemList(LNM__ATTRIBUTES, dtype=il_unsignedLong)
JFP
--
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
More information about the Info-vax
mailing list