Chapter Contents

Previous

Next
The CMS GENCSEG Utility

Renaming the Default Run-Time Library Segment

One method of installing a program in a segment is to include a copy of the SAS/C transient run-time library LOADLIB in the same segment. You can, for example, invoke GENCSEG with the following load parameters:

GENCSEG MYDCSS -lLSCRTL -lPROJECT

Since all C programs use the name LSCRTL as the default name of the run-time segment, you need to modify the default value to use MYDCSS instead. All C main load modules (that is, those with a main function) include a CSECT that contains the default run-time library name LSCRTL at offset 0. The CSECT name is L$C$SEGC. Use the CMS ZAP command to alter the default name in the main load module. Both the old (VER) name and the new (REP) name must be uppercase, left-adjusted, and padded with blanks to eight characters. For example, if the main load module is in MYPROG MODULE, the following zap changes the default segment name from LSCRTL to MYDCSS:

NAME MYPROG L$C$SEGC
VER  00 D3E2C3D9E3D34040  "LSCRTL  "
REP  00 D4E8C4C3E2E24040  "MYDCSS  "

Note:    Data in quotes are not to be included in the zap.  [cautionend]

After the zap is applied, MYPROG MODULE and any load modules loaded by it will use the run-time library in MYDCSS.


Chapter Contents

Previous

Next

Top of Page

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