Chapter Contents

Previous

Next
Running and Debugging SAS/C Programs in the CICS Environment

Using Run-Time Options

Because CICS applications communicate with the user via full-screen panels or displays, there is no command line in the CICS environment. This environmental restriction prohibits the normal specification of run-time library options and environment variables as well as any application parameters. However, using C, you can still use run-time options by specifying them using external variables, by using the $MAINO entry point, or by using environment variables.


Specifying Run-Time Options Using External Variables

You can code run-time options in your source code by using any of the following external variables:

Initialize the integer variable __options to specify general run-time options in your program. Use the integer variable __negopts to reset or turn off one or more options.

Use the character variable __linkage to specify linkage options that control which prolog and epilog code should be executed with your program. Specify initial stack or heap allocation, or both, by using the options __stack , __heap , and __mneed .

Note:    Pre-ESA versions of CICS do not allow an EXEC CICS GETMAIN request for greater than 65,504 bytes below the 16-megabyte line. In such an environment, for AMODE 24 programs, specifying an initial stack allocation size equal to or greater than 60K using the option __stack will result in a CICS ASCR abend. In other words, you can have more than 60K of stack allocated, but the initial stack allocation must be smaller than 60K.  [cautionend]

Besides these external variables, all run-time arguments available with the SAS/C compiler can be used in your application program under CICS. For more information on using run-time arguments in your SAS/C programs, see Chapter 8, "Run-Time Argument Processing" in the SAS/C Compiler and Library User's Guide.


Specifying Run-Time Arguments with $MAINO

Run-time arguments can also be passed from a calling program if you use the $MAINO entry point. The $MAINO entry point processes library run-time options and parameters. Consult Chapter 11, "Communication with Assembler Programs," in the SAS/C Compiler and Library User's Guide for details on how to communicate using $MAINO and other C entry points.


Environment Variable Support

By using SAS/C, it is possible to specify run-time options under CICS by using environment variables. Consult Chapter 4, "Environment Variables," and the function descriptions for getenv and putenv in the SAS/C Library Reference, Volume 1 for details on this support.


Chapter Contents

Previous

Next

Top of Page

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