On 09/06/2006, at 8:17 PM, Pierre-H wrote:

How can I call this program in a C/400 program and be able to know the value
of the sens parameter?

Just prototype it. Welcome to a real system that allows proper program-to-program calls and understands that there is more to an argument list than an array of strings.

#pragma linkage (the-program, OS, nowiden)
void the-program ( char * queue, char * queue_lib, char * sense );

Replace "the-program" with the real name of the program.

Note that CL doesn't understand null-terminated strings so you need to ensure you pass properly sized blank-padded character values. A peculiar (from a C perspective) but more obvious prototype would be:

#pragma linkage (the-program, OS, nowiden)
void the-program ( char queue[10], char queue_lib[10], char sense[1] );

Simon Coulter.
   FlyByNight Software         AS/400 Technical Specialists

   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175                                   \ /
                 ASCII Ribbon campaign against HTML E-Mail  / \

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 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.