|
Nothing specific, but try these general techniques: 1. Go to the API docs and see what the C parameters are 2. Those that say something like Char(8) directly translate to *CHAR 8 3. Those that say Char(*) will also translate to a *CHAR with some length - you need to determine what that length is, based on the API's "format name" that you are using. And you don't need to use the entire format if all you want to know is in the first part, don't ask it to give you more. 3-a. When you have that Char(*), there is often a length parameter that is defined as Binary(4) - in CL (before V5R3), this is a *CHAR 4, and use the %BIN function to set it to the length of whatever - probably the length you figured out in 3. 4. In this case you have a receiver variable - you will need to do a lot of substringing to pull out what you want to know. The C docs are based on offsets, so add 1 to any number you find there. 5. Also, there are some optional parameters - including an error code. You do not need to use any of these - errors will be handled as standard system messages. That's about it - not really too hard, just get down into the docs. HTH Vern Vern -------------- Original message -------------- > Do you have the syntax for using QUSRSPLA in a CL program? > > -----Original Message----- > From: midrange-l-bounces@xxxxxxxxxxxx > [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Simon Coulter > Sent: Friday, August 05, 2005 10:27 PM > To: Midrange Systems Technical Discussion > Subject: Re: RUNQRY Results > > > > On 06/08/2005, at 7:40 AM, Condon, Mike wrote: > > > No, I'm going to a spool file. Is there an API call to find out the > > size > > of a spool file? > > QUSRSPLA will give you size information (number of pages, number of > records, data stream size, file size (and multiplier)) > > Note that Query will always print a cover page plus 1 data page. If the > query retrieved no data then the second page will have text saying "No > records in query report." (from QRY1906 in QQRYMSG). > > You'd probably be better using the other spooled file APIs to check for > this line if the page count is 2 or less. > > There doesn't seem to be any way to force this message to the job log > when spooling the report. > > Regards, > Simon Coulter. > -------------------------------------------------------------------- > FlyByNight Software AS/400 Technical Specialists > > http://www.flybynight.com.au/ > Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ > Fax: +61 3 9419 0175 \ / > X > ASCII Ribbon campaign against HTML E-Mail / \ > -------------------------------------------------------------------- > > > -- > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing > list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. > > > -- > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. >
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.