|
Œ Hello Steve, You wrote: >it is kind of odd that qxxchgda is not documented in the api reference. But >since there are C pgms that call it, I assume that access to it cannot be >revoked in the future. This is no longer an MI question but I'll answer it here. Further discussion on these specific questions should be directed to the MIDRANGE-L, RPG400-L, or C400-L lists. The C interface is unlikely to be revoked although the QWCRDTAA API is a better choice for retrieving the contents of a data area than QXXRTVDA. What may happen is that IBM might alter the #pragma definition such that function calls to QXXCHGDA actually invoke a completely different program. Since the QXXCHGDA program itself has never been a documented API they can do this although that would require a recompile to pick up the new linkage so I doubt it would actually happen. >note the following in the doc of qxxchgda: > "QXXCHGDA can only be used to change character data. " That is a limitation of the specific program. QXXRTVDA allows retrieval of character data areas only so at least they are consistent. Save yourself some effort. QXXRTVDA and QXXCHGDA only support character data areas but they do support DDM character data areas. Because they invoke the underlying command processing programs which do normal parameter validation they are restircted to character data areas. QXXRTVDA calls QCLRTVDA which is the CPP for RTVDTAARA. QXXCHGDA calls QWCCCHVC which is the CPP for CHGDTAARA. One of the rules imposed by the CPPs is that you cannot substring a decimal or logical data area. The QXX???DA programs always build the call to the CPP using substring information (i.e., position and length). It wouldn't have taken much effort to build the call like the command analyzer does, using special values (e.g., -1) to indicate no substring and then these programs would work with all data areas. I suspect these functions were added at the request of a customer, business partner, or other IBM unit, and therefore do only the minimum required function. >I am going to find out myself, but if anyone knows, does the rpg in and out >have the same restriction? does rpg ile also use IN and OUT? RPG IV allows all the data area types to be used directly. IN and OUT are still the method for handling data areas unless you want RPG to automatically read the data area at program initialisation and update it at program termination (however, data areas are a quick and dirty solution and should be avoided). >also, does the rpg IN and OUT handle a *ddm data area? Yes. >how does a C pgm chg a *ddm or logical data area? does it have to call a cl >pgm that runs ChgDtaAra? Well it could call an RPG IV program ..... :) If you just need a 'data area' rather than a *DTAARA then use a space instead. Regards, Simon Coulter. «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«» «» FlyByNight Software AS/400 Technical Specialists «» «» Eclipse the competition - run your business on an IBM AS/400. «» «» «» «» Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ «» «» Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au \ / «» «» X «» «» ASCII Ribbon campaign against HTML E-Mail / \ «» «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«» +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.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.