|
The procedure below produces correct results. For example, the following code causes the DSPLIBL screen to be displayed. /free Command('DSPLIBL'); /end-free CmdStr is defined as a varying string (2 leading bytes containing the string length followed by 4096 data bytes). Question: Does the address of CmdStr point to the first byte of the two byte string length? If so, what rule tells the compiler that the unprototyped call to QCMDEXC is to have the address of the CmdStr parameter offset by the two bytes? Would it be more efficient to define CmdStr with OPTIONS(*VARSIZE) instead of VARYING? Why? *-------------------------------------------------------------------------- P Command B export D Command PI D CmdStr 4096A value varying *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * some error trapping should be implemented here at some point * like a return code, job log message, errorlog file msg, etc. C callp(e) QCMDEXC( CmdStr : %Len(CmdStr)) C return P Command E *-------------------------------------------------------------------------- Thanks, Dave David Keck NBTY, Inc Phone (631) 200-5809 DavidKeck@xxxxxxxx
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.