![]() Chapter Contents |
![]() Previous |
![]() Next |
| ossysinfo |
| Portability: | SAS/C extension |
| SYNOPSIS | |
| DESCRIPTION | |
| RETURN VALUE | |
| DIAGNOSTICS | |
| EXAMPLE | |
| PORTABILITY | |
| IMPLEMENTATION | |
| RELATED FUNCTIONS |
| SYNOPSIS |
#include <os.h> int ossysinfo(struct SYSINFO * sysinfo);
| DESCRIPTION |
The header file defines the structure SYSINFO. The structure is defined as follows:
struct SYSINFO {
int seqnumber;
char name[16];
char version[2];
char release[2];
char level[2];
char _ _reserved[38];
};
seqnumbernameversionreleaselevel
| RETURN VALUE |
| DIAGNOSTICS |
errno
is set to EARG.
errno is set to ENOSYS.
| EXAMPLE |
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <lclib.h>
#include <os.h>
struct SYSINFO sysinfo;
void main()
{
char *sysptr, sysstr[16];
char SysInfo[9] = {'\0'};
char OSName[17] = {'\0'};
int rc;
quiet(1); /* Suppress library message */
rc = ossysinfo(&sysinfo);
quiet(0); /* Allow messages again */
if (rc != -1)
{
/*-----------------------------------------------------------+
| Get OS/390 Information |
+----------------------------------------------------------*/
memcpy(OSName, sysinfo.name, 16);
sprintf(SysInfo, "%.2s.%.2s.%.2s",
sysinfo.version, sysinfo.release, sysinfo.level);
printf("System Sequence Number is %d(%#0.8x)\n",
sysinfo.seqnumber, sysinfo.seqnumber);
printf("System Name is %s\n", OSName);
printf("System Information is %s\n", SysInfo);
}
else
{
/*-----------------------------------------------------------+
| Get System Information |
+----------------------------------------------------------*/
sysptr = syslevel();
sprintf(sysstr, "%02x.%02x.%02x.%02x",
*sysptr, *(sysptr + 1), *(sysptr + 2), *(sysptr + 3));
printf("System Name is %-8s\n", sysname() );
printf("System Information is %s\n", sysstr);
}
}
| PORTABILITY |
The ossysinfo
function is only available for the OS/390 operating system.
| IMPLEMENTATION |
| RELATED FUNCTIONS |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.