From: Tom Linden [tom@kednos.company]
Sent: Tuesday, November 13, 2007 12:26 AM
To: Info-VAX@Mvb.Saic.Com
Subject: Re: SYS$GRANT_LICENSE output codes

On Mon, 12 Nov 2007 19:53:34 -0800, Larry Kilgallen  
<Kilgallen@SpamCop.net> wrote:

> In article <op.t1porrzghv4qyg@murphus.hsd1.ca.comcast.net>, "Tom Linden"  
> <tom@kednos.company> 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.

-- 
PL/I for OpenVMS
www.kednos.com