|
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
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.