× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Error using CL API QRZRRSI
  • From: "Mike Silvers" <msilvers@xxxxxxxxxxx>
  • Date: Fri, 5 Jan 2001 07:55:48 -0500
  • Organization: Hainey Business Systems

Simone,
 
I appreciate the help with this problem.  I received a response yesterday and that pointed out the same problem with the binary representations.  I got it working last night.  To get the processor feature code, the key to be used is 150. 
 
Thanks for the help!
 
Mike
 
 
================================
 
Mike Silvers
AS/400 Senior Programmer/Analyst
AS/400 IBM Certified RPG IV Developer
AS/400 IBM Certified Expert
Hainey Business Systems
8 E. Canal St
Dover, PA 17315
Branch Office:  (410) 397-8739
Phone:  (800) 932-3380
Fax:  (717) 292-9474
Web: http://www.hbs-inc.com
________________________________
Providing E-Commerce, EDI, AS/400
Development and related services
nationwide.
================================
----- Original Message -----
Sent: Thursday, January 04, 2001 6:51 PM
Subject: Re: Error using CL API QRZRRSI


Hello Mike,

You wrote:
>In the job log the message is just that a reserved area is not set to binary
>zeros.  The API looks rather straight forward and I did not see any
>positions marked as reserved in the documentation.  My request criteria
>variable is set to the following value:
>
>&FCINFO            *CHAR                64        'CEC01'
>                               +26                '000000000000000000'
>                               +51                '0100570150    '

>I know that my error variables are set correctly because I use them in other
>API calls in the same program.  Does anyone have any ideas?

Firstly, it doesn't appear that QRZRRSI can retrieve the processor feature
code because it is not listed as one of the data keys.  You should probably be
using one of the software product APIs.

Secondly, the request criteria structure does not look correct.  It looks like
&FCINFO contains character data when most of it is supposed to be binary
numbers. 

Thirdly, since the length of &FCINFO is 64 bytes I assume you are requesting
information for a single data key:
32-bytes for resource name
16-bytes for handle
4-bytes for search request
4-bytes for key offset
4-bytes for number of keys
4-bytes for the key itself
--------
64-bytes total

however the values displayed in the dump don't fit the layout.  You have the
resource name as 'CEC01                    0000000' which means the handle is
'0000000000001005' and that is the field I think it is complaining about.

It appears from the contents of &FCINFO that you want 16 zeros for the handle,
0001 for number of keys, 0057 for offset to first key, and 0150 as the number
of keys, followed by blanks where the key value should be.  The first key must
be in offset 60, you only have room for 1 key, and blanks is not a valid key
identifer.  You have specified these values as character but they should be
binary numbers.

Assuming that you do still want to use the QRZRRSI API here is a CLLE example:

pgm                                                                            
                                                                               
dcl &rcvvar *char 1024                                                         
dcl &rcvvarlen *char 4                                                         
dcl &request *char 256                                                         
dcl &format *char 8 value('RTVI0100')                                          
dcl &errcode *char 8 value(X'0000000000000000')                                
                                                                               
dcl &resource *char 32 value('CEC01')                                          
dcl &handle *char 16 value(x'00000000000000000000000000000000')                
dcl &schrqs *char 4                                                            
dcl &offset *char 4                                                            
dcl &nbrkeys *char 4                                                           
dcl &keys *char 16 value(x'00000000000000000000000000000000') /* Room for 4  
*/
                                                              /* although API
*/
                                                              /* supports 1  
*/
                                                              /* key only !!!
*/
                                                                               
chgvar %bin(&rcvvarlen) 1024                                                   
chgvar %bin(&schrqs) 1          /* First search */                             
chgvar %bin(&offset) (32 + 16 + 4 + 4 + 4)  /* 32-byte resource name  */       
                                            /* 16-byte handle         */
                                            /*  4-byte search request */
                                            /*  4-byte key offset     */
                                            /*  4-byte key count      */
chgr %bin(&nbrkeys) 1                                              
chgvar %bin(&keys 1 4) 5                    /* Model number */         
                                                                        
chgvar &request (&resource *cat &handle *cat &schrqs *cat &offset +     
*cat &nbrkeys *cat &keys)                                               
                                                                        
call qrzrrsi (&rcvvar &rcvvarlen &format &request &errcode)             
                                                                        
endpgm                                                                  

Regards,
Simon Coulter.

«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software         AS/400 Technical Specialists       «»
«» Eclipse the competition - run your business on an IBM AS/400.  «»
«»                                                                «»
«» Phone: +61 3 9419 0175      Mobile: +61 0411 091 400           «»
«» Fax:   +61 3 9419 0175      mailto: shc@flybynight.com.au      «»
«»                                                                «»
«» Windoze should not be open at Warp speed.                      «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.