Chapter Contents

Previous

Next
Systems Programming with the SAS/C Compiler

Introduction

This chapter discusses the C Systems Programming Environment (SPE). SPE is an implementation of the C execution framework that is designed to be used for IBM 370 operating systems programming.


Intended Audience

This chapter is written for systems programmers experienced with the IBM 370 OS/390 operating system, the CMS component of VM, or the CICS teleprocessing monitor. No attempt is made to explain terms and concepts that are generally used in systems programming. Also, this section assumes that you are familiar with assembler language programming, programming using the C language in general, and the SAS/C implementation of the C language, specifically.


Related Documentation

Refer to the following chapters in this book for more information:

The SAS/C Library Reference, Volume 2 also contains the following related information:

Also, refer to the appropriate IBM documentation for your operating system.


Source Code Files

The programmer can modify the SPE library. Therefore, all of the elements that interact with the operating system are delivered in both source code and object code format. Also, sample programs are included as part of SPE. These samples are intended merely to illustrate SPE programming techniques but can in some cases be useful in particular applications.

The names of the samples and the source and object code files begin with the characters L$U. The source code can be found in the SASC.SOURCE data set (under OS/390) or the LSU MACLIB (under CMS). The object code is in SASC.SPEOBJ (under OS/390) or LC370SPE TXTLIB (under CMS). The object code for CICS is in SASC.CICS.SPEOBJ (under OS/390) or LC370SPC TXTLIB (under CMS). Ask your SAS Software Representative for C compiler products for more information about these files.

Assembler language macros

The assembler language macros used in SPE source code files can be found in the SASC.MACLIBA data set (under OS/390) or in LCUSER MACLIB (under CMS). The ABORT, GETSTG, FREESTG, LOADM, and UNLOADM macros accept a SYS= parameter to indicate the target operating system. If SYS=CMS is specified, the macro expands to use a standard CMS interface (such as DMSFREE). If SYS=BI is specified, the macro expands to use a CMS XA interface (such as CMSSTOR). If you specify CICS, the macro expands to use a CICS interface, such as EXEC CICS GETMAIN. Any other parameter causes the macro to use an OS/390 interface (such as GETMAIN). The default value depends on the operating system under which the program is assembled, either OS/390 or CMS. The LOADM and UNLOADM macros are not supported for CICS. Instead, code the corresponding EXEC CICS LOAD and RELEASE commands; the SPE loadm and unloadm functions are fully supported for CICS.

Code generation for XA and 370 Mode CMS

Some SPE C header and source files need to generate different code in XA and 370 mode CMS. These files test whether the symbol BIMODAL is defined in order to decide what code to generate.


Chapter Contents

Previous

Next

Top of Page

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