From: VAXman-@SendSpamHere.ORG Sent: Tuesday, November 13, 2007 7:55 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: SYS$GRANT_LICENSE output codes In article , "Tom Linden" writes: > > >On Mon, 12 Nov 2007 19:53:34 -0800, Larry Kilgallen > wrote: > >> In article , "Tom Linden" >> writes: >> >>> The LMF System Service Manual indicate two possible, optional >>> output codes, LMF$_PROD_TOKEN and LMF$_HW_ID. I am unable to get >>> either to work. I created an appropriate license pak in a >>> separate testing lmf database and loaded the license. But >>> when running the test, the status which should be 1 if the call >>> is successful, got 12. When I comment out the item_list for the >>> HW_ID it returns 1, so it clearly found the license. >> >> 12 is SS$_ACCVIO. so without looking at the book I would say you >> have something wrong in by-reference/by-value land. I would say >> you should remove a dot, but I do not believe you used Bliss. >> >>> Anyone have experience with this call? I am not convinced it >>> works as documented. >> >> LJK/Security licenses use both of those fields, but I don't believe >> you programmed it in Ada either. > >Quite right, this is the declaration >declare 1 license_items, > 2 prod_date, > 3 length fixed bin(15) initial (8), > 3 item fixed bin(15) initial (lmf$_prod_date), > 3 bufadr pointer initial (addr(binary_date)), > 3 retlen fixed bin(31) initial (0), > 2 prod_version, > 3 length fixed bin(15) initial (4), > 3 item fixed bin(15) initial (lmf$_prod_version), > 3 bufadr pointer initial (addr(compiler_version)), > 3 retlen fixed bin(31) initial (0), > 2 hw_id, > 3 length fixed bin(15) initial (31), > 3 item fixed bin(15) initial (lmf$_hw_id), > 3 bufadr pointer initial (addr(hardware_id)), > 3 retlen fixed bin(31) initial (0), > 2 endlist, > 3 length fixed bin(15) initial (0), > 3 item fixed bin(15) initial (0), > 3 bufadr pointer initial (null()), > 3 retlen fixed bin(31) initial (0); >where > >declare compiler_version(2) fixed bin(15) static readonly > initial (MINOR_VERSION, MAJOR_VERSION); >declare binary_date bit(64) aligned static; >declare hardware_id char(31) static init( ''); > >The call works if I commented out the hw_id substructure. As far as >I can tell this definition conforms to the documentation, which requires >the bufadr to be a pointer to a buffer of storage for sending/receiving >data to/from the call. 2 hw_id, 3 length fixed bin(15) initial (lmf$k_hw_idlen), 3 item fixed bin(15) initial (lmf$_hw_id), 3 bufadr pointer initial (addr(hardware_id)), 3 retlen fixed bin(31) initial (0), <===<<< (*) SYS$GRANT_LICENSE will want to return the length of the retrieved HW ID. (*) Is this specified properly? Sorry, my PL/I is rusty. -- VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)COM "Well my son, life is like a beanstalk, isn't it?" http://tmesis.com/drat.html