Chapter Contents

Previous

Next
sysname

sysname



Get Operating System Name

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
CAUTION
EXAMPLE
RELATED FUNCTIONS


SYNOPSIS

#include <lclib.h>

char *sysname(void);


DESCRIPTION

sysname gets the operating system name from bytes 2 through 9 in the environment descriptor block.


RETURN VALUE

sysname returns a pointer to a string containing the operating system name.

Under OS/390, the string returned by sysname is "VS1" , "MVS" , or "MVS/SP" . Under CMS, "VM/SP" , "VM/XA SP" , "VM/HPO" , "VM/XA" , or "VM/ESA" is returned.


CAUTION

See "Caution" under The L$UENVR Routine.


EXAMPLE

#include <lclib.h>
#include <string.h>

char *pathname;

   if (strcmp(sysname(), "VM/SP") == 0)
      pathname = "PRINTER";
   else
      pathname = "SYSPRINT";
   .
   .
   .

sysname is also illustrated in the example for envlevel .


RELATED FUNCTIONS

uname


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.