Link to home
Start Free TrialLog in
Avatar of weipat0
weipat0

asked on

Remove License users for a specific product.

Hi,

on my AS/400, i want to reduce the Usage count for a specific Product (WRKLICINF). For this, I have to delete some License users. A lot of this as has been deteted ( DLTUSRPRF) but the user is still registred as License User.
I tried to use the QLZARLS API but nothing happend.

Have anyone an idea:
   - how to reduce the Usage count value for a product using "normal" AS/400 commands ?
   - an example of a correct usage auf the QLZARLS API (if it could be a possible solution)

Thanks

Patrick
Avatar of Member_2_276102
Member_2_276102

Patrick:

For one of your own products? or is this an attempt to release a license that was requested for an IBM or 3rd-party product?

If you didn't code the initial call to the associated Request License (QLZAREQ) API, you might not be able to code the appropriate Release. The Request and Release must match. The "License user handle" would be a critical element for example. Multiple requests can be made from a single user.

There might be other possibilities, but start with the simple one.

Tom

Avatar of weipat0

ASKER

Hi Tom,

yes, it concerned my own product.
---------------------------------------------------------------------------------------------------
                            Work with License Users                    CHMVXZG4
                                                             03.11.06  09:30:19
 Product ID . . . . . . . . . :   0BMOVEX                                      
 License Term . . . . . . . . :   V1                                            
 Feature  . . . . . . . . . . :   5001                                          
 Description  . . . . . . . . :   Movex                                        
 Usage type . . . . . . . . . :   *REGISTERED                                  
                                                                               
 Type options, press Enter.                                                    
   5=Display Detail                                                            
                                                                               
       License                    Number   ------Request------                  
 Opt   User                        Uses    Date       Time       User          
       ARBSYB                       1,00   24.06.03   14:36:19   ARBSYB        
       ARNMAX                       1,00   01.07.03   10:44:52   ARNMAX        
       BAUPIU                       1,00   25.06.03   13:13:12   BAUPIU        
       DUMMY1                       1,00   07.07.03   10:44:52   DUMMY1        
       DUMMY2                       1,00   07.07.03   15:50:35   DUMMY2        
                                                                        More...
---------------------------------------------------------------------------------------------------

I tried to remove somes users with this little programm

=========================================================
IERROR       DS                                                
I                                    B   1   40BYTPRV          
I                                    B   5   80BYTAVA          
I                                        9  15 ERRID            
I                                       16  16 ERR###          
I                                       17 272 INSDTA          
I            DS                                                
I                                        1  17 #PR              
I                                        1   7 #PRID            
I                                        8  13 #REL            
I                                       14  17 #FEAT            
 ******************************************************        
C           *ENTRY    PLIST                            
C                     PARM           USER   10          
 *                                                      
C                     MOVEL'0BMOVEX '#PRID              
C                     MOVEL'V1    '  #REL              
C                     MOVEL'5001'    #FEAT              
C                     MOVEL'LICP0100'#FRMT   8          
C                     MOVELUSER      #USER  10          
C                     MOVEL'LICL0100'#FRMT2  8          
C                     MOVEL*BLANKS   #ERRFL 50          
 *                                                              
C                     CALL 'QLZARLS'                            
C                     PARM           #PR                        
C                     PARM           #FRMT                      
C                     PARM           #USER                      
C                     PARM           #FRMT2                    
C                     PARM           ERROR                      
 *                                                              
C                     DSPLY          ERRID                      
C                     SETON                     LR              

==========================================================

What is the trick ?
                                                                               
Patrick:

Before anything else, be aware that IBM's documentation for the Software Product APIs has many errors. These are not APIs that are used by many programmers, so there haven't been a lot of people reporting errors. Much of the documentation hasn't changed since the APIs were first made public.

And IBM itself doesn't actually use the APIs directly much -- like many companies who package products, IBM uses Systems Manager or similar to do the work. So, their support staff isn't familiar with the APIs. That can make support take a lot more time than expected.

If you haven't looked at Systems Manager, I recommend that you read through the product manual. Not to learn how to use the product, but because it teaches a lot about how products can be packaged and distributed.

With Systems Manager being important documentation, the API documentation has continued to suffer. In addition to actual errors, the documentation is inadequate in showing how the APIs and the values passed into and returned from the APIs should be used. That causes a lot of guesswork.

What that means is that I will be guessing too. I've done enough with the APIs to know a lot of the problems, but I haven't tried everything. With that in mind...

Without seeing the License Request, there might be a number of possibilities. The first question would simply be... Are you getting an error returned? You don't indicate any.

Beyond that, the first thing I see is that you have this line:

     C                     MOVEL'V1    '  #REL    

I haven't tried that, so this is a guess. The documentation states : "The release level must be a valid special value, or the release level must be in the format VxRyMz." I suspect that you defined your license term to be for the entire Version 1. I have created licenses by version, but I have always made my license requests specifically for the full VRM or for the allowed special value of '*ONLY'.

The first suggestion would be to change your code to always specify '*ONLY' unless you expect to have multiple releases on the same system at one time. If you can't use '*ONLY' then try to specify the full VxRyMz of your product.

You also show this:

  Usage type . . . . . . . . . :   *REGISTERED

The display then shows only the <5=Display Detail> option. It doesn't show an option to release licenses through WRKLICINF. That implies that you created your license information as [0=A use of the license cannot be released with the WRKLICINF command] for the "Allow a license to be released" attribute. That's also something I haven't tried, but it might be significant.

Next, you didn't initialize your BYTPRV field in the ERROR DS. That will make it tough to know what errors might be returned.

Finally, this is purely a suggestion... You coded your program in RPG/400. I would make sure that it was coded in RPG IV and probably ILE RPG. The APIs should work the same, but there are too many documentation bugs and you will want to create re-usable procedures for all of your license handling. You won't want to be making external calls for long. And minor differences can make trouble. It'll go better if all such coding stays in one location that isn't external.

Let me know if you have an error code to report.

Tom
Avatar of weipat0

ASKER

Hi Tom,

I create this "mini" program only to be able to launch the API. It's temporary and not used in an application.

I had initialized the fields with the same values displayed in the WRKLICINF.

Yes, i obtain a CPF9E11 message (License information not retrieved.)

With *ONLY as release level. it return CPF9E14 ( License user handle not correct.)

Patrick
Patrick:

CPF9E11 indicates that other possible problems would be noted in the joblog or there was a problem in the license itself. Without knowing if other messages were returned, the CPF9E14 would say that the original license request had a handle assigned that also needs to be supplied here.

Can you show the DSPLICKEY display for this product?

Tom
Avatar of weipat0

ASKER

Hi Tom,

DSPLICKEY ? yes, no problem.

Nothing interesting in the Joblog.

 4 > call lzarls ('ARBSYB')                                          
     License information not retrieved.                              
     Function check. CPF9E11 unmonitored by LZARLS at statement 3100,
       instruction X'003D'.                                          
     The call to program QLZARLS ended in error (C G S D F).          
   ? D                                                                
     The call to program QLZARLS ended in error (C G S D F).          
   ? D                                                                
     Error RPG0202 caused program LZARLS to stop.                


Patrick
Patrick:

Sorry, to be more clear, can you show the result of DSPLICKEY here?

Also, please show the detail from WRKLICINF (option 5).

Unless I see something unusual on those two displays, I'll need to see the call to QLZAREQ including the formats of the data structures.

BTW, your program got a function check even though the Error Code parameter was coded. The ERROR DS wasn't initialized before the call.

Tom
Avatar of weipat0

ASKER

Hi Tom,

DSPLICKEY
====================================================
                        Display License Key Information                NL03    
                                                             06.11.06  09:23:46
 Product identifier  . . . . :   0BMOVEX                                        
 License term  . . . . . . . :   V1                                            
 Feature . . . . . . . . . . :   5001                                          
 Description . . . . . . . . :   Movex                                          
                                                                               
 System serial number  . . . :    652073B                                      
                                                                               
 Processor group . . . . . . :   *ANY                                          
                                                                               
 License Key . . . . . . . . :   A289E3 C61241 83AD01                          
                                                                               
 Usage limit . . . . . . . . :   500                                            
                                                                               
 Expiration date . . . . . . :   *NONE                                          
                                                                               
 Vendor data . . . . . . . . :   *NONE                                          
                                                                               
                                                                         Bottom
 Press Enter to continue.                                                      
                                                                               
 F3=Exit   F12=Cancel                                                          
 (C) COPYRIGHT IBM CORP. 1980, 2000.                                            
====================================================


WRKLICINF (Option 5)
====================================================
                          Display License Information                  NL03    
                                                             06.11.06  09:22:38
 Product ID  . . . . . . . . :   0BMOVEX                                        
 License term  . . . . . . . :   V1                                            
 Feature . . . . . . . . . . :   5001                                          
 Description . . . . . . . . :   Movex                                          
                                                                               
 Compliance type . . . . . . :   *KEYED                                        
 Usage type  . . . . . . . . :   *REGISTERED                                    
                                                                               
 Usage limit . . . . . . . . :   500                                            
 Last update . . . . . . . . :   06.11.02  14:14:43                            
                                                                               
 Threshold . . . . . . . . . :   450                                            
                                                                               
 Usage count . . . . . . . . :   305.00                                        
                                                                               
 Peak Usage Information:                                                        
   Peak usage  . . . . . . . :   .00                                            
   Last peak . . . . . . . . :   01.11.06  08:59:09                            
                                                                               
 Log violations  . . . . . . :   *NO                                            
                                                                               
 Message queue/Library . . . :   *NONE                                          
                                                                               
 Keyed compliance information:                                                  
   Expiration date . . . . . :   *NONE                                          
   Grace period  . . . . . . :   30                                            
   Date grace period expires :   *NONE                                          
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                         Bottom
 F3=Exit   F5=Refresh   F12=Cancel                                              
                                                                                         
====================================================


I have no QLZAREQ in my short program !! Is it mandatory before the QLZARLS ??

I put a CLEAR of the DS.

Patrick


ASKER CERTIFIED SOLUTION
Avatar of Member_2_276102
Member_2_276102

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial