× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,
Im using the MATMATR example to retrieve the serial number, but I dont
understand how C returns parameters (to my RPG module):

The C program has int main(void) {

I know I can access incoming arguments with arg[] but how do I return the
serial number (and anything else) as a parm... I think I have to replace the
"void" with one or more parms

Has anyone got any pointers I can reference...

TIA,

nb example code i'm looking at is:
#include <QSYSINC/MIH/MATMATR>
#include <stdio.h>
 _MMTR_Template_T    machine_attributes;
 int main(void)

 machine_attributes.Options.Template_Size = 16;
  matmatr( &machine_attributes,  _MMTR_SERIAL );
   printf("Serial Number of this AS/400 is: %8.8s \n",
             machine_attributes.Options.Data.Serial );
  }

+---
| This is the C/400 Mailing List!
| To submit a new message, send your mail to C400-L@midrange.com.
| To subscribe to this list send email to C400-L-SUB@midrange.com.
| To unsubscribe from this list send email to C400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: bob@cstoneindy.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

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.