|
In the archives, I found an example of a program to retrieve the QSRLNBR.
Hacking my thru that, I was able to get it to pull the QUSRLIBL and
QSYSLIBL. Here it is:
h dftactgrp(*no) actgrp('QILE') bnddir('QC2LE')
********************************************************
* Prototype for QWCRSVAL API - Retrieve QUSRLIBL *
********************************************************
d QWCRSVALU pr ExtPgm('QWCRSVAL')
d p_Rcvr Like(u_Rcvr)
d p_RcvrLngth Like(u_RcvrLngth)
d p_NbrToRtv Like(u_NbrToRtv)
d p_SysVal Like(u_SysVal)
d p_Error Like(u_APIError)
********************************************************
* Prototype for QWCRSVAL API - Retrieve QSYSLIBL *
********************************************************
d QWCRSVALS pr ExtPgm('QWCRSVAL')
d p_Rcvr Like(s_Rcvr)
d p_RcvrLngth Like(s_RcvrLngth)
d p_NbrToRtv Like(s_NbrToRtv)
d p_SysVal Like(s_SysVal)
d p_Error Like(s_APIError)
d #QUSRLIBL pr 250a
d #QSYSLIBL pr 150a
d ds
d UsrLibl 250
d SysLibl 150
d USRLIBLDS ds inz
d u_Rcvr 278a
d u_RcvrLngth 9b 0 inz(%len(u_Rcvr))
d u_NbrToRtv 9b 0 inz(1)
d u_SysVal 10a inz('QUSRLIBL')
d u_APIError 1
d SYSLIBLDS ds inz
d s_Rcvr 178a
d s_RcvrLngth 9b 0 inz(%len(s_Rcvr))
d s_NbrToRtv 9b 0 inz(1)
d s_SysVal 10a inz('QSYSLIBL')
d s_APIError 1
********************************************************
* Program Mainline *
********************************************************
c/free
UsrLibl=#QUSRLIBL;
SysLibl=#QSYSLIBL;
*inlr=*on;
/end-free
********************************************************
* #QUSRLIBL - Retrieve the QUSRLIBL library list *
********************************************************
p #QUSRLIBL b Export
d #QUSRLIBL pi 250a
d DS_SysValTbl ds inz
d d_ValsRtn 9b 0
d d_Offset 9b 0
d d_SysVal 10a
d d_ValType 1a
d d_InfoSts 1a
d d_DtaLngth 9b 0
d d_Data 250a
c/free
reset u_APIError;
qwcrsvalu(u_Rcvr: u_RcvrLngth: u_NbrToRtv: u_SysVal: u_APIError);
ds_SysValTbl = u_Rcvr;
return %subst(d_Data:1:d_DtaLngth);
/end-free
p #QUSRLIBL e
********************************************************
* #QSYSLIBL - Retrieve the QSYSLIBL library list *
********************************************************
p #QSYSLIBL b Export
d #QSYSLIBL pi 150a
d DS_SysValTbl ds inz
d d_ValsRtn 9b 0
d d_Offset 9b 0
d d_SysVal 10a
d d_ValType 1a
d d_InfoSts 1a
d d_DtaLngth 9b 0
d d_Data 150a
c/free
reset s_APIError;
qwcrsvals(s_Rcvr: s_RcvrLngth: s_NbrToRtv: s_SysVal: s_APIError);
ds_SysValTbl = s_Rcvr;
return %subst(d_Data:1:d_DtaLngth);
/end-free
p #QSYSLIBL e
Tom <tomh=WgFEu9fVc9EAvxtiuMwx3w@public.gmane.org> wrote in
Xns92C655B2A4F2Btomh@80.91.224.249:">news:Xns92C655B2A4F2Btomh@80.91.224.249:
> 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/q
> wc 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?
>
>
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
> list To post a message email:
> RPG400-L=Zwy7GipZuJhWk0Htik3J/w@public.gmane.org To subscribe,
> unsubscribe, or change list options, visit:
> http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email:
> RPG400-L-request=Zwy7GipZuJhWk0Htik3J/w@public.gmane.org Before
> posting, please take a moment to review the archives at
> http://archive.midrange.com/rpg400-l.
>
>
>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.