|
Thanks Elvis, but I am interesting in a way I can use a variable name of API itself in ILE/C , not in the OS version. Regards, Zvi --- Elvis Budimlic <ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote: > Here's one way to do it: > > =================================================================== > > #include <QSZRTVPR.H> > > #include <stdio.h> > #include <string.h> > > > void getOsRls(char * OsVersion) > > { > > Qsz_PRDR0100_t rcvr; > > Qsz_Product_Info_Rec_t prodInfo = {"*OPSYS ","*CUR > ","0000","*CODE > "}; > > > QSZRTVPR(&rcvr, sizeof(rcvr), "PRDR0100", > &prodInfo, "\0\0\0\0\0\0\0\0"); > > > memcpy(OsVersion,rcvr.Release_Level,sizeof(rcvr.Release_Level)); > > } > > > > void main(void) > > { > > char OsVersion[6]; > > getOsRls(OsVersion); > > if (memcmp(OsVersion,"V5R3M0",sizeof(OsVersion)) > printf("OsVersion = %0.6s", OsVersion); > else > printf("I'm not on V5R3M0 machine, but rather > on %0.6s machine", > OsVersion); > } > > > =================================================================== > > There are others, but this is "IBM sanctioned" > method. > > Elvis > > > -----Original Message----- > Subject: [C400-L] ILE/C variable name of API (as in > RPG) > > I like to call an API in ILE/C which exists only in > V5R3. > But I want to run the same program also in lower > version. > > In the same way as in RPG which means (in RPG): > VERSION IFEQ 'V5R3' > CALL 'V5R3_API' > PARM ... > ENDIF > If someone has an example in ILE/C for such a thing, > I shall appreciate it very much. > > Regards, > > Zvi > > > -- > This is the C programming iSeries / AS400 (C400-L) > mailing list > To post a message email: C400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: > http://lists.midrange.com/mailman/listinfo/c400-l > or email: C400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the > archives > at http://archive.midrange.com/c400-l. > > __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.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.