![]() Chapter Contents |
![]() Previous |
![]() Next |
| storck |
| Portability: | SAS/C extension |
| SYNOPSIS | |
| DESCRIPTION | |
| RETURN VALUE | |
| CAUTION | |
| USAGE NOTES | |
| EXAMPLE | |
| EXAMPLE OUTPUT IN DDN:STGRPT |
| SYNOPSIS |
#include <lclib.h> int storck (unsigned options, char * path, char * title);
| DESCRIPTION |
usage
report be created for Heap storage.
The path argument specifies
the output path for the messages and report produced by storck. This value must be specified. It can be NULL to request
a default value determined by the operating system. For details, see the
information on general filename specification in I/O Functions. Following are the default values when NULL
is specified:
DDN:DBGSTG
DSN:userid.pgmname.DBGSTG
HFS:dbgstg.report
CMS:pgmname DBGSTG A
| RETURN VALUE |
storck
returns 0 if no corruption is detected and a nonzero value if corruption is
detected.
| CAUTION |
| USAGE NOTES |
To call
storck in all-resident
applications you must code
#define ALLOW_TRANSIENT
before including resident.h.
| EXAMPLE |
#include <stdio.h>
#include <lclib.h>
#include <time.h>
int main ()
{
int exit_rc = 0;
unsigned options = 0;
char title_buffer[80];
char * envarg;
time_t current;
envarg = getenv("CHECK_STOR");
if ( envarg != NULL)
{ /* user wants storage check on this run */
time(¤t); // current time
sprintf(title_buffer,"Storage Report - TimeStamp: %s\n",
ctime(¤t)); // build title with current time
options = STORCK_HEAP_CHECK+STORCK_STACK_CHECK+STORCK_FREE_CHECK;
exit_rc = storck(options, "DDN:STGRPT", title_buffer);
if (exit_rc != 0) fprintf(stderr,"Storage corrupted!");
};
exit(exit_rc);
}
| EXAMPLE OUTPUT IN DDN:STGRPT |
Storage Report - TimeStamp: Mon Feb 21 13:11:17 2000 No corruptions found in heap. No corruptions found in free heap storage. No corruptions found in stack.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.