sponsored links

Collapse

Announcement

Collapse
No announcement yet.

QUSLOBJ example in free-format?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • QUSLOBJ example in free-format?

    Does anyone have any example code using QUSLOBJ in free-format code? Google hasn't been helping me much.

    I've looked through Jamief's examples, but I'm rubbish at reading fixed format, having been working with RPG almost exclusively in free format.

  • #2
    Re: QUSLOBJ example in free-format?

    cant someone using that new fangled gui editor thing convert one for him?
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: QUSLOBJ example in free-format?

      I already ran it through the latest version of RDI's fixed to free format converter, but it left the majority of the code in fixed format. Sadly, this has been my experience with it most times I've tried it.

      Comment


      • #4
        Re: QUSLOBJ example in free-format?

        edit: nevermind, wrong api
        Last edited by MichaelCatalani; July 29th, 2010, 03:29 PM.
        Michael Catalani
        IS Director, eCommerce & Web Development
        Acceptance Insurance Corporation
        www.AcceptanceInsurance.com
        www.ProvatoSys.com

        Comment


        • #5
          Re: QUSLOBJ example in free-format?

          An example working with QGYOLOBJ would work too - I can't even find a good fixed-format on that one, much less a free format one.

          I really just need a good way to make a list of all objects in a library available to my code.

          Comment


          • #6
            Re: QUSLOBJ example in free-format?

            Hi vitaemachina:

            Craig Rutledge has some nice utilities
            Have a look here:
            http://home.windstream.net/craigru/jcrapi2.html

            In addition to qulsobjd (JCRLOBJ)
            Some of them assist in the conversion of fixed to free
            He has really done a great job but you have to download the entire package not just one utility

            Best of Luck
            GLS
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment


            • #7
              Re: QUSLOBJ example in free-format?

              or.... ignore the binary (Tom I love u)

              PHP Code:
                   H Option(*SrcStmt: *NoDebugIODftActGRP(*No)
                   
              *
                   
              *  Field Definitions.
                   
              * ~~~~~~~~~~~~~~~~~~~~~~~~
                   
              D ObjNam          s             10a
                   D ObjLib          s             10a
                   D ObjTyp          s             10a
                   
              **-- Api error data structure:  ----------------------------------
                   
              D ApiError        Ds
                   D  AeBytPro                     10i 0 Inz
              ( %SizeApiError ))
                   
              D  AeBytAvl                     10i 0 Inz
                   D  AeMsgId                       7a
                   D                                1a
                   D  AeMsgDta                    128a
                   
              **-- Object description structure OBJD0200:  ---------------------
                   
              D RoData          Ds
                   D  RoBytRtn                     10i 0
                   D  RoBytAvl                     10i 0
                   D  RoObjNam                     10a
                   D  RoObjLib                     10a
                   D  RoObjTypRt                   10a
                   D  RoObjLibRt                   10a
                   D  RoObjASP                     10i 0
                   D  RoObjOwn                     10a
                   D  RoObjDmn                      2a
                   D  RoObjCrtDts                  13a
                   D  RoObjChgDts                  13a
                   D  RoExtAtr                     10a
                   D  RoTxtDsc                     50a
                   D  RoSrcF                       10a
                   D  RoSrcLib                     10a
                   D  RoSrcMbr                     10a

                   dTheData          DS
                   d QUSBR05                 1      4B 0
                   d QUSBA05                 5      8B 0
                   d QUSJN08                 9     18
                   d QUSUN07                19     28
                   d QUSJNBR07              29     34
                   d QUSIJID05              35     50
                   d QUSJS14                51     60
                   d QUSJT08                61     61
                   d QUSJS15                62     62
                   d QUSJS16                63     70
                   d QUSES00                71     71
                   d QUSSN00                72     81
                   d QUSSL06                82     91
                   d QUSCUN                 92    101
                   d QUSDE                 102    102
                   d QUSEK                 103    103
                   d QUSCK00               104    104
                   d QUSPRC                105    108B 0
                   d QUSURC                109    112B 0
                   d QUSPGMRC              113    116B 0
                   d QUSSE02               117    126
                   d QUSDN                 127    136
                   d QUSGPN                137    146
                   d QUSGRP                        10    DIM
              (00015)
                   
              d  QUSGN00                      10    OVERLAY(QUSGRP:00001)
                   
              d QUSJUID               297    306
                   d QUSJUIDS              307    307
                    
              *
                    *  
              Field Definitions.
                    *
                   
              d AllText         s             10    Inz('*ALL')
                   
              d CmdString       s            256
                   d CmdLength       s             15  5
                   d Count           s              4  0
                   d Format          s              8
                   d GenLen          s              8
                   d InLibrary       s             10
                   d InType          s             10
                   d ObjectLib       s             20
                   d SpaceVal        s              1    inz
              (*BLANKS)
                   
              d SpaceAuth       s             10    inz('*CHANGE')
                   
              d SpaceText       s             50    inz(*BLANKS)
                   
              d SpaceRepl       s             10    inz('*YES')
                   
              d SpaceAttr       s             10    inz(*BLANKS)
                   
              d UserSpaceOut    s             20
                   d Worktype        s             10    inz
              ('*OUTQ')
                   *                                                                                            
                   
              GenHdr                                                                                     
                   
              *                                                                                            
                   d GenHdr          ds                  inz
                   d  OffSet                 1      4B 0
                   d  NumEnt                 9     12B 0
                   d  Lstsiz                13     16B 0
                   
              *                                                                                            
                   
              *  Data structures                                                                           
                   
              *                                                                                            
                   d GENDS           ds
                   d  OffsetHdr              1      4B 0
                   d  NbrInList              9     12B 0
                   d  SizeEntry             13     16B 0
                    
              *
                   
              d HeaderDs        ds
                   d  OutFileNam             1     10
                   d  OutLibName            11     20
                   d  OutType               21     25
                   d  OutFormat             31     40
                   d  RecordLen             41     44B 0
                    
              *
                    * 
              API Error Data Structure
                    
              *
                   
              d ErrorDs         DS                  INZ
                   d  BytesPrv               1      4B 0
                   d  BytesAvl               5      8B 0
                   d  MessageId              9     15
                   d  ERR
              ###                16     16
                   
              d  MessageDta            17    116
                    
              *
                   
              d                 DS
                   d  StartPosit             1      4B 0
                   d  StartLen               5      8B 0
                   d  SpaceLen               9     12B 0
                   d  ReceiveLen            13     16B 0
                   d  MessageKey            17     20B 0
                   d  MsgDtaLen             21     24B 0
                   d  MsgQueNbr             25     28B 0
                    
              *
                    * 
              Date structure for retriving userspace info
                    
              *
                   
              d InputDs         DS
                   d  UserSpace              1     20
                   d  SpaceName              1     10
                   d  SpaceLib              11     20
                   d  InpFileLib            29     48
                   d  InpFFilNam            29     38
                   d  InpFFilLib            39     48
                   d  InpRcdFmt             49     58
                    
              *
                   
              d ObjectDs        ds
                   d  Object                       10
                   d  Library                      10
                   d  ObjectType                   10
                   d  InfoStatus                    1
                   d  ExtObjAttrib                 10
                   d  Description                  50

                   
              **-- Retrieve object description:  -------------------------------
                   
              d RtvObjD         Pr                  ExtPgm'QUSROBJD' )
                   
              d  RoRcvVar                  32767a         Options( *VarSize )
                   
              d  RoRcvVarLen                  10i 0 Const
                   
              d  RoFmtNam                      8a   Const
                   
              d  RoObjNamQ                    20a   Const
                   
              d  RoObjTyp                     10a   Const
                   
              d  RoError                   32767a         Options( *VarSize )
                   **-- List 
              objects:   ---------------------------------------------
                   
              d $ListObjects    Pr                  ExtPgm'QUSLOBJ' )
                   
              d  userspace                    20a   Const
                   
              d  format                        8a   Const
                   
              d  objectlib                    20a   Const
                   
              d  type                         10a   Const
                   **-- 
              Userspace pointer: ------------------------------------------
                   
              d $Userspace      Pr                  ExtPgm'QUSRTVUS' )
                   
              d  userspace                    20a   Const
                   
              d  start                        10i 0 Const
                   
              d  Length                       10i 0 Const
                   
              d  Returned                  32767a         Options( *VarSize )
                   **-- 
              Create Space:   ---------------------------------------------
                   
              d $CreateSpace    Pr                  ExtPgm'QUSCRTUS' )
                   
              d  UserSpaceOut                 20a   Const
                   
              d  SpaceAttr                    10    Const
                   
              d  SpaceLen                     10i 0 Const
                   
              d  SpaceVal                      1a   Const
                   
              d  SpaceAuth                    10a   Const
                   
              d  SpaceText                    50a   Const
                   
              d  SpaceRepl                    10a   Const
                   
              d  ErrorDs                   32767a         Options( *VarSize )

                    /
              free
                               exsr $QUSCRTUS
              ;
                               
              ObjectLib =  '*ALL      ' '*LIBL';
                       
              //
                       // List all the outqueues to the user space
                       //
                               
              Format 'OBJL0200';
                               
              $ListObjectsUserspace Format ObjectLib WorkType);
                       
              //
                       // Retrive header entry and process the user space
                       //
                               
              StartPosit 125;
                               
              StartLen   16;
                               
              $UserSpaceUserspace StartPosit StartLen GENDS);

                               
              StartPosit OffsetHdr 1;
                               
              StartLen = %size(ObjectDS);
                       
              //
                      // Do for number of outqueues in the userspace                            
                       //

              B1               for count 1 to  NbrInList;
                                
              $UserSpaceUserspace StartPosit StartLen ObjectDs);
                                
              StartPosit += SizeEntry;
                               endfor;
                               *
              INLR = *On;

                      
              //--------------------------------------------------------
                      // $QUSCRTUS - create userspace
                      //--------------------------------------------------------
                               
              begsr $QUSCRTUS;

                                
              BytesPrv 116;
                                
              Spacename 'LISTOUTQS';
                                
              SpaceLib 'QTEMP';

                             
              //
                             // Create the user space
                             //
                                
              $CreateSpaceUserspace SpaceAttr 4096 :
                                              
              SpaceVal SpaceAuth SpaceText SpaceRepl:
                                              
              ErrorDs);
                               
              endsr;
                    /
              End-Free 
              Attached Files
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #8
                Re: QUSLOBJ example in free-format?

                Sheesh, so much for me thinking I'd be able to decipher it in free format any better.

                How do I actually work with the data retrieved? Like, for example if I just wanted to use dsply to list the object names?

                Comment


                • #9
                  Re: QUSLOBJ example in free-format?

                  put it in debug....


                  Code:
                  d Worktype        s             10    inz('*OUTQ')
                  The above could include, but is not limited to
                  *ALL *CSI
                  *ALRTBL *CSPMAP
                  *AUTL *CSPTBL
                  *BNDDIR *CTLD
                  *CFGL *DEVD
                  *CHTFMT *DOC
                  *CLD *DTAARA
                  *CLS *DTADCT
                  *CMD *DTAQ
                  *CNNL *EDTD
                  *COSD *EXITRG
                  *CRG *FCT
                  *CRQD *FILE
                  This is the loop that reads (in this case) all the outq's
                  PHP Code:
                   for count 1 to  NbrInList;
                                    
                  $UserSpaceUserspace StartPosit StartLen ObjectDs);
                                    
                  StartPosit += SizeEntry;
                                   endfor; 
                  NbrInList = total number of items in list...

                  place cursor on ObjectDs this is the data structure with all the data in it....




                  jamie
                  All my answers were extracted from the "Big Dummy's Guide to the As400"
                  and I take no responsibility for any of them.

                  www.code400.com

                  Comment


                  • #10
                    Re: QUSLOBJ example in free-format?

                    Originally posted by vitaemachina View Post
                    Sheesh, so much for me thinking I'd be able to decipher it in free format any better.

                    How do I actually work with the data retrieved? Like, for example if I just wanted to use dsply to list the object names?
                    List api's are good candidates for using call back procedures. Create a wrapper for the api, and send it a procedure address to call each time it retrieves an item from the user space. This way, you can isolate the api into a service program, and not have to deal with mounds of code inside the actual program.
                    Michael Catalani
                    IS Director, eCommerce & Web Development
                    Acceptance Insurance Corporation
                    www.AcceptanceInsurance.com
                    www.ProvatoSys.com

                    Comment


                    • #11
                      Re: QUSLOBJ example in free-format?

                      I made a couple of changes to Jamie's / Tom's program to separate the api into a subprocedure. You can then move this into it's own service program and bind to it from the program, but for simplicity, I kept it in the program.

                      Code:
                      H Option(*SrcStmt: *NoDebugIO) DftActGRP(*No)               
                       
                      d CallBackPTR     S               *   ProcPtr               
                       
                      d ObjectDs        ds                  Qualified             
                      d  Object                       10                          
                      d  Library                      10                          
                      d  ObjectType                   10                          
                      d  InfoStatus                    1                          
                      d  ExtObjAttrib                 10                          
                      d  Description                  50                          
                       
                      d ProcessList     pr              n                         
                      d   Data                              LikeDS( ObjectDS )    
                       
                      d RetrieveObjectList...                                     
                      d                 pr                                        
                      d   ObjectName                  10a   Const                 
                      d   LibraryName                 10a   Const                 
                      d   TypeObject                  10a   Const                               
                      d   CallBackPTR                   *   ProcPtr Const                       
                       
                      /free                                                                    
                       
                      RetrieveObjectList( '*ALL' : 'QGPL' : '*FILE' : %paddr(ProcessList));
                      *inlr = *on;                                                            
                       
                      /end-free                                                                
                       
                      p ProcessList     b                                                       
                      d ProcessList     pi              n                                       
                      d   Data                              LikeDS( ObjectDS )                  
                      /free                                                                    
                      dsply Data.Object;                                                    
                      return *on;                                                           
                      /end-free                                                                
                      P                 E                                                       
                       
                      p RetrieveObjectList...                                                   
                      p                 b                                                 
                      d RetrieveObjectList...                                             
                      d                 pi                                                
                      d   ObjectName                  10a   Const                         
                      d   LibraryName                 10a   Const                         
                      d   TypeObject                  10a   Const                         
                      d   CallBackPTR                   *   ProcPtr  Const                
                       
                       
                      D CallBack        pr              n   ExtProc( CallBackPTR )        
                      d   Data                              LikeDS( ObjectDS )            
                      *                                                                  
                      *  Field Definitions.                                              
                      * ~~~~~~~~~~~~~~~~~~~~~~~~                                         
                      D ObjNam          s             10a                                 
                      D ObjLib          s             10a                                 
                      D ObjTyp          s             10a                                 
                      **-- Api error data structure:  ----------------------------------  
                      D ApiError        Ds                                                
                      D  AeBytPro                     10i 0 Inz( %Size( ApiError )) 
                      D  AeBytAvl                     10i 0 Inz                           
                      D  AeMsgId                       7a                                 
                      D                                1a                                 
                      D  AeMsgDta                    128a                                 
                      **-- Object description structure OBJD0200:  ---------------------  
                      D RoData          Ds                                                
                      D  RoBytRtn                     10i 0                               
                      D  RoBytAvl                     10i 0                               
                      D  RoObjNam                     10a                                 
                      D  RoObjLib                     10a                                 
                      D  RoObjTypRt                   10a                                 
                      D  RoObjLibRt                   10a                                 
                      D  RoObjASP                     10i 0                               
                      D  RoObjOwn                     10a                                 
                      D  RoObjDmn                      2a                                 
                      D  RoObjCrtDts                  13a                                 
                      D  RoObjChgDts                  13a                                 
                      D  RoExtAtr                     10a                                 
                      D  RoTxtDsc                     50a                                 
                      D  RoSrcF                       10a  
                      D  RoSrcLib                     10a     
                      D  RoSrcMbr                     10a     
                       
                      dTheData          DS                    
                      d QUSBR05                 1      4B 0   
                      d QUSBA05                 5      8B 0   
                      d QUSJN08                 9     18      
                      d QUSUN07                19     28      
                      d QUSJNBR07              29     34      
                      d QUSIJID05              35     50      
                      d QUSJS14                51     60      
                      d QUSJT08                61     61      
                      d QUSJS15                62     62      
                      d QUSJS16                63     70      
                      d QUSES00                71     71      
                      d QUSSN00                72     81      
                      d QUSSL06                82     91      
                      d QUSCUN                 92    101      
                      d QUSDE                 102    102      
                      d QUSEK                 103    103      d QUSCK00               104    104                                 
                      d QUSPRC                105    108B 0                              
                      d QUSURC                109    112B 0                              
                      d QUSPGMRC              113    116B 0                              
                      d QUSSE02               117    126                                 
                      d QUSDN                 127    136                                 
                      d QUSGPN                137    146                                 
                      d QUSGRP                        10    DIM(00015)                   
                      d  QUSGN00                      10    OVERLAY(QUSGRP:00001)        
                      d QUSJUID               297    306                                 
                      d QUSJUIDS              307    307                                 
                      *                                                                 
                      *  Field Definitions.                                             
                      *                                                                 
                      d AllText         s             10    Inz('*ALL')                  
                      d CmdString       s            256                                 
                      d CmdLength       s             15  5                              
                      d Count           s              4  0                              
                      d Format          s              8                                 
                      d GenLen          s              8                                 d InLibrary       s             10                    
                      d InType          s             10                    
                      d ObjectLib       s             20                    
                      d SpaceVal        s              1    inz(*BLANKS)    
                      d SpaceAuth       s             10    inz('*CHANGE')  
                      d SpaceText       s             50    inz(*BLANKS)    
                      d SpaceRepl       s             10    inz('*YES')     
                      d SpaceAttr       s             10    inz(*BLANKS)    
                      d UserSpaceOut    s             20                    
                      d Worktype        s             10    inz('*OUTQ')    
                      *                                                    
                      * GenHdr                                             
                      *                                                    
                      d GenHdr          ds                  inz             
                      d  OffSet                 1      4B 0                 
                      d  NumEnt                 9     12B 0                 
                      d  Lstsiz                13     16B 0                 
                      *                                                    
                      *  Data structures                                   
                      *                                        
                      d GENDS           ds                          
                      d  OffsetHdr              1      4B 0         
                      d  NbrInList              9     12B 0         
                      d  SizeEntry             13     16B 0         
                      *                                            
                      d HeaderDs        ds                          
                      d  OutFileNam             1     10            
                      d  OutLibName            11     20            
                      d  OutType               21     25            
                      d  OutFormat             31     40            
                      d  RecordLen             41     44B 0         
                      *                                            
                      * API Error Data Structure                   
                      *                                            
                      d ErrorDs         DS                  INZ     
                      d  BytesPrv               1      4B 0         
                      d  BytesAvl               5      8B 0         
                      d  MessageId              9     15            
                      d  ERR###                16     16            
                      d  MessageDta            17    116                                                           
                      *                                                       
                      d                 DS                                     
                      d  StartPosit             1      4B 0                    
                      d  StartLen               5      8B 0                    
                      d  SpaceLen               9     12B 0                    
                      d  ReceiveLen            13     16B 0                    
                      d  MessageKey            17     20B 0                    
                      d  MsgDtaLen             21     24B 0                    
                      d  MsgQueNbr             25     28B 0                    
                      *                                                       
                      * Date structure for retriving userspace info           
                      *                                                       
                      d InputDs         DS                                     
                      d  UserSpace              1     20                       
                      d  SpaceName              1     10                       
                      d  SpaceLib              11     20                       
                      d  InpFileLib            29     48                       
                      d  InpFFilNam            29     38                       
                      d  InpFFilLib            39     48                       
                      d  InpRcdFmt             49     58                       
                      *                                                                 
                       
                      **-- Retrieve object description:  ------------------------------- 
                      d RtvObjD         Pr                  ExtPgm( 'QUSROBJD' )         
                      d  RoRcvVar                  32767a         Options( *VarSize )    
                      d  RoRcvVarLen                  10i 0 Const                        
                      d  RoFmtNam                      8a   Const                        
                      d  RoObjNamQ                    20a   Const                        
                      d  RoObjTyp                     10a   Const                        
                      d  RoError                   32767a         Options( *VarSize )    
                      **-- List objects:   --------------------------------------------- 
                      d $ListObjects    Pr                  ExtPgm( 'QUSLOBJ' )          
                      d  userspace                    20a   Const                        
                      d  format                        8a   Const                        
                      d  objectlib                    20a   Const                        
                      d  type                         10a   Const                        
                      **-- Userspace pointer: ------------------------------------------ 
                      d $Userspace      Pr                  ExtPgm( 'QUSRTVUS' )         
                      d  userspace                    20a   Const                        
                      d  start                        10i 0 Const                        
                      d  Length                       10i 0 Const                         
                      d  Returned                  32767a         Options( *VarSize )     
                      **-- Create Space:   ---------------------------------------------  
                      d $CreateSpace    Pr                  ExtPgm( 'QUSCRTUS' )          
                      d  UserSpaceOut                 20a   Const                         
                      d  SpaceAttr                    10    Const                         
                      d  SpaceLen                     10i 0 Const                         
                      d  SpaceVal                      1a   Const                         
                      d  SpaceAuth                    10a   Const                         
                      d  SpaceText                    50a   Const                         
                      d  SpaceRepl                    10a   Const                         
                      d  ErrorDs                   32767a         Options( *VarSize )     
                       
                      /free                                                              
                              exsr $QUSCRTUS;                                         
                              ObjectLib =  ObjectName + LibraryName;                  
                      //                                                              
                      // List all the outqueues to the user space                     
                      //                                                              
                              Format = 'OBJL0200';                                    
                              $ListObjects( Userspace : Format : ObjectLib : TypeObject);  
                      //                                                                   
                      // Retrive header entry and process the user space                   
                      //                                                                   
                              StartPosit = 125;                                            
                              StartLen   = 16;                                             
                              $UserSpace( Userspace : StartPosit : StartLen : GENDS);      
                              StartPosit = OffsetHdr + 1;                                  
                              StartLen = %size(ObjectDS);                                  
                      //                                                                   
                      // Do for number of outqueues in the userspace                       
                      //                                                                   
                       
                              for count = 1 to  NbrInList;                                 
                               $UserSpace( Userspace : StartPosit : StartLen : ObjectDs);  
                               if NOT CallBack( ObjectDS );                                
                               return;                                                     
                               endif;                                                      
                               StartPosit += SizeEntry;                                    
                              endfor;                                                      
                              return;                                                      
                       
                      //--------------------------------------------------------            
                      // $QUSCRTUS - create userspace                                       
                      //--------------------------------------------------------            
                              begsr $QUSCRTUS;                                             
                       
                               BytesPrv = 116;                                             
                               Spacename = 'LISTOUTQS';                                    
                               SpaceLib = 'QTEMP';                                         
                       
                            //                                                             
                            // Create the user space                                       
                            //                                                             
                       
                       
                                         $CreateSpace( Userspace : SpaceAttr : 4096 :      
                                                       SpaceVal : SpaceAuth : SpaceText :  
                       SpaceRepl:                                                          
                                                       ErrorDs);                           
                                        endsr;                    
                      /End-Free                                      
                      p                 e                                                                                           
                      

                      Wrapping the api with a callback procedure can greatly simplifiy the program by isolating the ugly api code stuff outside of our program.


                      Some changes need to be made to this subprocedure to make it better. Instead of the ObjectDS data structure, we should be passing the Format Data Structure to ensure all of the fields in the format can be accessed.

                      The callback procedure passes back a logical return value. This is so that we can stop the list api at any point. So if the list api returns a few thousand items, but we get what we need on the 5th item, we can return an *off to the subprocedure, and it will terminate looping thru the entries.

                      If we encapsulated the subprocedure into a service program, and utilizzed copy members for the prototype and format data structure, then any program that utilized this api could be simplified down to the following:


                      Code:
                      H Option(*SrcStmt: *NoDebugIO) DftActGRP(*No)               
                       
                      d CallBackPTR     S               *   ProcPtr               
                       /copy The format data structure ProcessList     pr              n                         
                       /copy The prototype for the subprocedure that contains the QUSRLOBJ api
                       
                      d   Data                              LikeDS( Format Data Structure )    
                       
                      /free                                                                    
                       
                      RetrieveObjectList( '*ALL' : 'QGPL' : '*FILE' : %paddr(ProcessList));
                      *inlr = *on;                                                            
                       
                      /end-free                                                                
                       
                      p ProcessList     b                                                       
                      d ProcessList     pi              n                                       
                      d   Data                              LikeDS( Format Data Structure )                  
                      /free     
                      // ******* Do stuff with the list entries                                                               
                       
                      if we are done;                                               
                        return *off; 
                      else;
                        return *on;
                      endif;                   
                       
                      /end-free                                                                
                      P                 E    
                      
                      Last edited by MichaelCatalani; July 29th, 2010, 07:02 PM.
                      Michael Catalani
                      IS Director, eCommerce & Web Development
                      Acceptance Insurance Corporation
                      www.AcceptanceInsurance.com
                      www.ProvatoSys.com

                      Comment


                      • #12
                        Re: QUSLOBJ example in free-format?

                        it's not my code...that's all Jamie's. he was mentioning me simply because i always give him a hard time about using the "B" data type instead of integer.

                        for all list APIs that return data in a user space i use a service program designed specifically for the user space API's. that service program can be downloaded from my website (in the downloads section of course) http://tommyholden.com and there's no "B" data types used
                        I'm not anti-social, I just don't like people -Tommy Holden

                        Comment


                        • #13
                          Re: QUSLOBJ example in free-format?

                          I really appreciate the help, Michael.

                          On this same subject - how would I list the members inside source files? I would assume a different API would be required, but a quick romp through the info center isn't turning up any likely candidates.

                          Comment


                          • #14
                            Re: QUSLOBJ example in free-format?

                            QUSLMBR API is what you are looking for. http://publib.boulder.ibm.com/infoce...is/quslmbr.htm
                            I'm not anti-social, I just don't like people -Tommy Holden

                            Comment


                            • #15
                              Re: QUSLOBJ example in free-format?

                              So it is! I got thrown by how it was described. Looks like Scott Klement has a bit of code that uses it amidst his pointer tutorial, so off I go to see if I can integrate them.

                              http://www.scottklement.com/rpg/pointers.html#topic7

                              Comment

                              sponsored links

                              Collapse

                              Working...
                              X