× 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: Simple List API Example
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Tue, 18 May 1999 09:25:57 -0400

D GENDS           DS                  INZ
D  USRARA                 1     64       
D  SIZHDR                65     68i 0    
D  RLSLVL                69     72       
D  UFMTNM                73     80       
D  APIUSE                81     90       
D  DATTIM                91    103       
D  INFSTS               104    104       
D  SIZUSE               105    108i 0    
D  OFFINP               109    112i 0    
D  SIZINP               113    116i 0    
D  OFFHDR               117    120i 0    
D  SIZHD1               121    124i 0    
D  OFFLST               125    128i 0    
D  SIZLST               129    132i 0    
D  NUMLST               133    136i 0    
D  SIZENT               137    140i 0    

C                   CALL      'QUSRTVUS'          
C                   PARM                    SPC   
C                   PARM                    SSTART
C                   PARM                    SLEN  
C                   PARM                    GENDS 
C                   PARM                    ERRRTC

I'm not sure what you're looking for, but here is some old converted code
that uses the user space API to read the results from one of the list APIs.
Basically, the call to QUSRTVUS will return SLEN bytes into the field
GENDS.  GENDS is a data structure that is mapped out to match the generic
list API header.  All the numbers are defined as binary in the
documentation, and use the signed integer data type in RPG IV.  You could
use the binary (B) data type, but that would artificially truncate the
numbers.  If you know that there won't be any negative numbers you may be
able to use the unsigned integer (U) data type.

I hope this helps,

Buck Calabro
Billing Concepts, Albany NY
> -----Original Message-----
> From: JFinney@Omnia.co.za 
> Sent: Tuesday, May 18, 1999 2:04 AM
> To:   RPG400-L@midrange.com
> Subject:      Simple List API Example
> 
> The problem, quite simply, is how to retrieve binary information from the
> user spaces into a field(char or num) in an RPGLE pgm.
> If anyone could perhaps provide a simple working example for me to refer
> to
> it would be greatly appreciated.
> 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  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.