|
> -----Original Message----- > From: Bob Cozzi [mailto:cozzi@xxxxxxxxx] > Sent: Friday, November 05, 2004 1:09 PM > To: 'RPG programming on the AS400 / iSeries' > Subject: RE: Why no header files for RPG? > > > On V5R1, I've been doing this: > > D MbrList DS LikeDS(QUSM0200) > D MbrDesc DS LikeDS(QUSL010000) I've been doing stuff like: d t_ApiErrCode ds qualified based( t_Ptr ) d minimum likeds( t_ApiErrCdMin ) d overlay( t_ApiErrCode ) d fmt100 likeds( t_ApiErrCd100 ) d overlay( t_ApiErrCode ) d fmt200 likeds( t_ApiErrCd200 ) d overlay( t_ApiErrCode ) // Having bytes provided = 0 causes most APIs to throw an exception d t_ApiErrCdMin ds qualified based( t_Ptr ) d bytesProvided like( t_Int4 ) d t_ApiErrCd100 ds qualified based( t_Ptr ) d bytesProvided like( t_Int4 ) d bytesAvail like( t_Int4 ) d exceptID 7a d 1a d exceptData like( t_Buffer32k) d t_ApiErrCd200 ds qualified based( t_Ptr ) d key like( t_Int4 ) d bytesProvided like( t_Int4 ) d bytesAvail like( t_Int4 ) d exceptID 7a d 1a d dataCCSID like( t_Int4 ) d dataOffset like( t_Int4 ) d dataLength like( t_Int4 ) d exceptData like( t_Buffer32k ) Thus, my API prototype reference t_ApiErrCode. But the actual DS I'm going to use will reference t_ApiErrCdMin, t_ApiErrCd100, or t_ApiErrCd200. Hm, as I read that....I've decided that maybe I should have used names better than ApiErrCd100 & ApiErrCd200 <grin> > > Granted the IBM subfield names suck but that's another reason > for a really > good source code editor. Too bad CODE and that WDSc hog > doesn't autocomplete > things when I type MbrDesc.________ by adding a list of > subfield names that > I can pick from. Or does it? Yes, WDSc does. Just press 'Ctrl-space'. Quite handy. The only "catch" is that the outline view must be up to date. In other words, if you add a new DS and then go to use it somewhere you must refresh the outline view before the auto complete will help you out. > In reality IBM should recreate a new set of the data > structures using only > qualified DS names. That way, the member name in the DS could > be MBRNAME > instead of QUSMN01 > -Bob > > YES!!!!!! It amazes me that IBM pushes modernization, then ships such archaic includes for the RPG people. Charles
This mailing list archive is Copyright 1997-2026 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.