|
Tom: I'm including a simple CL program that retrieves both QSYSLIBL and QUSRLIBL in a single call to QWCRSVAL. Although not written in RPG, it will actually translate easily; and in the meantime, it'll execute and provide a dump to give you something to compare against the documentation so you can see what the API is doing, particularly how to interpret the returned variable content. Note that CL doesn't directly support binary integer variables, so those are declared as *char(4). You'll likely define them as 10U 0 instead. Also note that there is no error handling. I have no idea how you'll choose, so I'm just going the default route. Hope it helps. Tom Liotta Test QWCRSVAL: pgm dcl &rcvvar *char 999 dcl &lenrcvvar *char 4 dcl &nbrsysval *char 4 dcl &sysvalnam *char 80 dcl &errcod *char 8 chgvar %bin( &lenrcvvar ) ( 999 ) chgvar %bin( &nbrsysval ) ( 2 ) chgvar &sysvalnam ( + 'QSYSLIBL ' *cat + 'QUSRLIBL ' + ) call QWCRSVAL ( + &rcvvar + &lenrcvvar + &nbrsysval + &sysvalnam + &errcod + ) dmpclpgm return endpgm rpg400-l-request@midrange.com wrote: > 2. How do I use QWCRSVAL API to retrieve QUSRLIBL? (Tom) > >I'm a true novice to API programming. I would like to retrieve the >system value QUSRLIBL using the QWCRSVAL API. I found this page on the >IBM site: >http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/qwc >rsval.htm > >It explains how to use this API, but I got lost very quickly. Can one >of you API-savants decode it for me? Perhaps include a free-form >example? -- -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 x313 Fax 253-872-7904 http://www.powertechgroup.com __________________________________________________________________ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
As an Amazon Associate we earn from qualifying purchases.
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.