Chapter Contents

Previous

Next
envlevel

envlevel



Get Subenvironment Information

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
CAUTION
EXAMPLE


SYNOPSIS

#include <lclib.h>

char *envlevel(void);


DESCRIPTION

envlevel gets the subenvironment version number, release number, modification level, and submodification level. This information is stored in bytes 22 through 25 of the environment descriptor block. If no subenvironment is active, envlevel contains the same information as syslevel .

A null character is stored for any piece of information that is not meaningful on the current system.


RETURN VALUE

envlevel returns a pointer to a character sequence containing four pieces of information: subenvironment version number, release number, modification level, and submodification level.

The type of information returned by envlevel is site-dependent. For example, under TSO/E, the release number field contains the release of TSO/E. Under CMS, it typically contains the CMS release number. None of the other bytes are meaningful.


CAUTION

See "Caution" under The L$UENVR Routine.


EXAMPLE

This example formats and prints the envname / envlevel and sysname / syslevel information.

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

main()
{
   char  *sysptr, *envptr, sysstr[16], envstr[16];

   envptr = envlevel();
   sprintf(envstr, "%02x %02x %02x %02x",
           *envptr, *(envptr + 1), *(envptr + 2), *(envptr + 3));
   printf("Envname/Envlevel  =  %-8s %s\n", envname(), envstr);

   sysptr = syslevel();
   sprintf(sysstr, "%02x %02x %02x %02x",
           *sysptr, *(sysptr + 1), *(sysptr + 2), *(sysptr + 3));
   printf("Sysname/Syslevel  =  %-8s %s\n", sysname(), sysstr);
}


Chapter Contents

Previous

Next

Top of Page

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