× 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: USERSPACE
  • From: "Rick DuVall" <R_C_DuVall@xxxxxxxxxx>
  • Date: Wed, 11 Apr 2001 09:33:23 -0500

 

Zdenko Said:

What I want to do is: 1. to create *USRSPC

    Creating a user index might be the best way.  It will sort itself based on the key you define. Sorting a User Space Would have to be done manually as far as I know, but using a User Index is Pretty nifty.

CrtUsIApi       PR                  ExtPgm('QUSCRTUI')    
D  IndexName                    20A                         
D  ExtndAttr                    10A                         
D  LngthAttr                     1A                         
D  Length                       10I 0                       
D  KeyInsert                     1A              These two field values determine how the index will be sorted           
D  KeyLen                       10I 0                        <===== To the best of my recollection...
D  ImmUpd                        1A                           I would certainly drag out the old docs for a good perusal before proceeding
D  Optimiz                       1A                         
D  PubAuth                      10A                         
D  Descript                     50A                         
D  Replace                      10A                         
D  IndexErrC                          Like(ErrorCode)       
D  IndexDom                     10A                          
 *----------------------------------------------------------------    
 * Error Parm Definition For API Calls                                
 *----------------------------------------------------------------    
D ErrorParm       DS                                                  
D  BytPrv                       10I 0 INZ(*ZERO)   OverLay(ErrorParm:1)
D  BytAvl                       10I 0 INZ(*ZERO)   OverLay(ErrorParm:5)
D  MsgId                         7A   INZ(*BLANKS) OverLay(ErrorParm:9)
D  Rsrvd                         1A   INZ(*BLANKS) OverLay(ErrorParm:16
D  MsgDta                      512A   INZ(*BLANKS) OverLay(ErrorParm:17
D ErrorCode                    528    OverLay(ErrorParm:1)             

2. to fill *USRSPC with data (records vary, for instance let it be 20)

  * -------------------------------------------------------
  *                 Api (QUsAddUi) ProtoTypes             
  * -------------------------------------------------------
 D AddUsIApi       PR                  ExtPgm('QUSADDUI') 
 D  RetLibName                   10A                      
 D  NumEntAdded                  10I 0                    
 D  UserIndName                  20A                      
 D  InsertTyp                    10I 0                    
 D  Entries                     120A                      
 D  EntLen                       10I 0                    
 D  EntArr                        8A   Dim(100)           
 D  EntNum                       10I 0                    
 D  IndexErrC                          Like(ErrorCode)    

 

3. to sort *USRSPC (if possible by – cInvName+dInvDate)

See above key reference

4. to read sorted data from *USRSPC and put them on *SPLF

  * ---------------------------------------------------------------
  *                 Api (QUsRtvUi) ProtoTypes                      
  * ---------------------------------------------------------------
  * From the IBM manual "OS/400 Object APIs V4R3" :                
  *  Receiver Variable size is 8 + (max # of entries * max entry length)
 D RtvUsIApi       PR                  ExtPgm('QUSRTVUI')          
 D  Receiver                    128A                               
 D  RcvLen                       10I 0                             
 D  EntArr                        8A   Dim(1)                      
 D  EntLen                       10I 0                             
 D  EntNum                       10I 0                             
 D  RtnLibNam                    10A                               
 D  IndexName                    20A                               
 D  Format                        8A                               
 D  MaxRcv                       10I 0                             
 D  SearchTyp                    10I 0                             
 D  SearchCri                   120A                               
 D  CriLen                       10I 0                             
 D  SearchOS                     10I 0                             
 D  IndexErrC                          Like(ErrorCode)             

5. to clear *USRSPC

    There are also apis to clear a user index.
 
----- Original Message -----
Sent: Wednesday, April 11, 2001 5:47 AM
Subject: USERSPACE

Need help for using *USRSPC
 

What I want to do is: 1. to create *USRSPC

2. to fill *USRSPC with data (records vary, for instance let it be 20)

3. to sort *USRSPC (if possible by – cInvName+dInvDate)

4. to read sorted data from *USRSPC and put them on *SPLF

5. to clear *USRSPC

Thanks in advance
 
 
 
Zdenko

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.