gtpm2m1aMigration Guide: Program Update Tapes

C main() Support (APAR PJ24472)

The following section discusses the migration considerations for C main() support.

Prerequisite APARs

See the APEDIT for APAR PJ24472 for information about prerequisite APARs.

Functional Overview

C main() support allows you to use these additional ISO-C functions:

Architecture

The following architectural changes were made for C main() support:

Restart adds to reinitialization of C run-time data and ISO-C support is involved in all of these changes.

Operating Environment Requirements and Planning Information

There are no changes.

Interface Changes

The following section summarizes interface changes.

C/C++ Language

The following section summarizes C/C++ language changes. This information is presented in alphabetic order by the type of C/C++ language information. See the TPF C/C++ Language Support User's Guide and TPF Application Programming for more information about the C/C++ language.

Build Scripts

Table 259 summarizes changes to the build scripts used by the build tool. This information is presented in alphabetic order by the name of the build script.

Table 259. Changes to Build Scripts for C main() Support

Build Script Type New, Changed, or No Longer Supported? Description of Change
CEPIBS DLM New Not Applicable.
CISOBS DLM Changed Added atexit, strerror, system, and initialization support.

Dynamic Load Module (DLM) Stubs

Table 260 summarizes changes to the dynamic load module (DLM) stubs. This information is presented in alphabetic order by the name of the DLM stub. See TPF Application Programming for more information about the DLM stubs.

Table 260. Changes to Dynamic Load Module (DLM) Stubs for C main() Support

DLM Stub New, Changed, or No Longer Supported?
CBCSG003 New
CEEBETBL New
CEEMAIN New
CEEROOTA New
CEESG003 New
CEESTART New
EDCINPL New

General Use C Language Header Files

Table 261 summarizes the general use C language header file changes. This information is presented in alphabetic order by the name of the general use C language header file.

General use means these header files are available for your use.

Table 261. Changes to General Use C Language Header Files for C main() Support

General Use C Language Header File New, Changed, or No Longer Supported? Do You Need to Recompile Segments?
c$eb0eb.h Changed No
c$idsicd.h Changed No
c$idslst.h Changed No
c$proc.h Changed No
errno.h Changed No
errno.h Changed No
limits.h Changed No
stdarg.h Changed No
stdio.h Changed No
stdlib.h Changed No
string.h Changed No
tpfapi.h Changed No

Implementation-Specific C Language Header Files (IBM Use Only)

There are no changes.

Library Interface Scripts

Table 262 summarizes changes to the library interface scripts used by the library interface tool and the build tool. This information is presented in alphabetic order by the name of the library interface script.

Table 262. Changes to Library Interface Scripts for C main() Support

Library Interface Script New, Changed, or No Longer Supported? Description of Change
CISOXV Changed Support for atexit, strerror, and system functions.

Library Members (Object Files)

Table 263 summarizes the library member (object file) changes. This information is presented in alphabetic order by the name of the library member (object file).

Table 263. Changes to Library Members (Object Files) for C main() Support

Library Member (Object File) Library Module Name New, Changed, or No Longer Supported? Type Description of Change
CATEX CISO New Object Code Only The atexit function.
CBEPEG CISO New Object Code Only Internal error input/output (I/O) pegs.
CBKFCB CISO New Object Code Only Internal.
CBSERR CISO New Object Code Only The strerror function.
CBSTER CISO New C Language The internal strerror function.
CCINT CISO Changed Object Code Only Initialization.
CDMONT CISO New Assembler Internal $MONTC function.
CEXIT CISO Changed Assembler The exit function.
CEXITF CISO New C Language The abort function.
CFIXFP CISO New Assembler The internal atexit function.
CFSINT CISO New Object Code Only CFSINT, CFSTHINT support (initialization).
CFSZES CISO New Object Code Only The internal data structure sizes.
CGTLGD CISO New Assembler The internal get CMMLGD value.
CHDGFN CISO New Object Code Only Internal to DLL support.
CHDLOK CISO New Object Code Only Internal to DLL support.
CLMINT CISO Changed Assembler Preinitialization support.
CSIGDP CISO Changed C Language Support abort signal.
COPSTR CISO New C Language Open standard streams.
CPRSMA CISO New C Language Parse main arguments.
CPSWL CISO New Assembler The internal LPSW function.
CSTZDF CISO New Object Code Only The internal set time zone default.
CSYSTM CISO New C Language The system support.
CXXFUN CISO New Object-Only Internal for process cleanup.

Link-Edited Modules

There are no changes.

Members (Object Files)

Table 264 summarizes changes to members (object files). This information is presented in alphabetic order by the name of the member (object file).

Notes:

  1. You must recompile or reassemble a member (object file) if it has changed.

  2. You must prelink and link a dynamic link module (DLM) if it has changed.

Table 264. Changes to Members (Object Files) for C main() Support

Member (Object File) DLM/DLL New, Changed, or No Longer Supported? Type Description of Change
CEPI CEPI New Assembler Environment preinitialization data.

Object Code Only (OCO) Stubs

There are no changes.

Configuration Constant (CONKC) Tags

There are no changes.

Control Program Interface (CINFC) Tags

There are no changes.

Copy Members

Table 265 summarizes copy member changes. This information is presented in alphabetic order by the name of the copy member.

Table 265. Changes to Copy Members for C main() Support

Copy Member Type CSECT Where Copy Member Is Located New, Changed, or No Longer Supported? Description of Change
CCEB Control Program CCENBK Changed The atexit support; call to CXXFUN to clean up the environment.
CCED Control Program CCENBK Changed Increased the minimum stack size to 16 K.
CCE4 Control Program CCIISC Changed Removed process block allocation.
CHSZ Control Program CCNUCL Changed Updated to initialize the process block.
CICR Control Program CCNUCL Changed Updated to include the emergency unlock process block lock.
CIS0 Control Program CCISOC Changed Added the preinitialized data anchor.
CIS1 Control Program CCISOC Changed Changes were made to the TPF C implementation data (CID).
CIS2 Control Program CCISOC Changed Updated comments.
CPSL Control Program CCCPSE Changed Corrected the third base register setup.
CT38 Control Program CCCTIN Changed Removed the page write protection for segment tables.
CT40 Control Program CCCTIN Changed Updated to allocate the process blocks.

Fixed File Records

There are no changes.

Macros

The following section summarizes the macro changes. This information is presented in alphabetic order by the type of macro.

Advanced Program-to-Program Communications (APPC) Macros

There are no changes.

Communication Macros and Statements

There are no changes.

Data Macros

Table 266 summarizes the data macro changes. This information is presented in alphabetic order by the name of the data macro.

Table 266. Changes to Data Macros for C main() Support

Data Macro New, Changed, or No Longer Supported? Do You Need to Reassemble Programs Using This Data Macro?
IDSCID Changed No
IDSDSA Changed No
IDSICD Changed No
IDSLST Changed No
IDSTCA Changed No
IEQCE2 Changed No
IPROC Changed No
ISTSA New Not Applicable

General Macros

Table 267 summarizes the general macro changes. This information is presented in alphabetic order by the name of the general macro. See TPF General Macros for a complete description of all general macros.

Table 267. Changes to General Macros for C main() Support

General Macro New, Changed, or No Longer Supported? Do You Need to Reassemble Programs?
EXITC Changed No

Selected Equate Macros

There are no changes.

Structured Programming Macros (SPMs)

There are no changes.

System Initialization Program (SIP) Skeleton and Internal Macros (Inner Macros)

Table 268 summarizes the system initialization program (SIP) skeleton and internal macro changes. This information is presented in alphabetic order by the name of the SIP skeleton and internal macro. See TPF System Generation for a complete description of the SIP skeleton and internal macros. If the SIP skeleton and internal macro (inner macro) is changed, you must reassemble the SIP Stgae I deck and run the appropriate job control language (JCL) jobs from the SIP Stgae II deck.

Table 268. Changes to SIP Skeleton and Internal Macros for C main() Support

SIP Skeleton and Internal Macro New, Changed, or No Longer Supported?
SPPGML Changed

System Initialization Program (SIP) Stage I Macros and Statements

There are no changes.

System Initialization Program (SIP) Stage II Macros

Table 269 summarizes system initialization program (SIP) Stage II macro changes. This information is presented in alphabetic order by the name of the SIP Stage II macro. See TPF System Generation for a complete description of the SIP Stage II macros. If IBMPAL is changed, you must run the system allocator (SALO) and load the new program allocation table (PAT) to the TPF 4.1 system.

Table 269. Changes to SIP Stage II Macros for C main() Support

SIP Stage II Macro New, Changed, or No Longer Supported?
IBMPAL Changed

System Communication Keypoint (SCK) Generation Macros

There are no changes.

System Macros

There are no changes.

System Macros (IBM Use Only)

Table 270 summarizes system macro changes that are for IBM use only. This information is presented in alphabetic order by the name of the system macro.

Table 270. Changes to System Macros (IBM Use Only) for C main() Support

System Macro (IBM Use Only) New, Changed, or No Longer Supported? Do You Need to Reassemble Programs?
CFMDC Changed No

Segments

Table 271 summarizes segment changes. This information is presented in alphabetic order by the name of the segment.

Table 271. Changes to Segments for C main() Support

Segment Type Link-Edit Module (Where Offline Segment Is Linked) New, Changed, or No Longer Supported? Description of Change
CEPI Real-Time Assembler Not Applicable New Added environment preinitialization data.
CLIB Real-Time Assembler Not Applicable Changed Added support for main.
CSTRTD Real-Time Assembler Not Applicable Changed Changed C initialization linkage.
CSTRTL Real-Time Assembler Not Applicable Changed Changed C initialization linkage.
NLDT Offline C Language TPFLDR Changed Added main support.

System Equates

There are no changes.

User Exits

There are no changes.

Functional and Operational Changes

The following section summarizes functional and operational changes. This information is presented in alphabetic order by the functional or operational change.

See Appendix A, "PUT 2-15 Interface Changes by Authorized Program Analysis Report (APAR)" for a summary of functional and operational changes by APAR.

Commands

There are no changes.

Messages and System Errors

Table 272 summarizes message (offline and online messages) and system error changes.

The message IDs or system error numbers are listed in numeric order preceded by their alphabetic prefix. Some offline and online messages do not have a standard message ID. For these, the messages are presented in alphabetic order based on the initial message text; or for those messages that begin with variable information, the initial message text that follows that variable information. See Messages (System Error and Offline) and Messages (Online) for a complete description of all messages and system errors.

Attention: Changes to offline messages, online messages, and system errors may impact any automation programs you are using in your complex.

Table 272. Changes to Messages and System Errors for C main() Support

Message ID or System Error Number Message Type New, Changed, or No Longer Supported?
007101 System Error New
007102 System Error New
007106 System Error New
007200 System Error New

Performance or Tuning Changes

There are no changes.

Storage Considerations and Changes

There are no changes.

System Initialization Program (SIP) and System Generation Changes

There are no changes.

Loading Process Changes

There are no changes.

Online System Load Changes

There are no changes.

Publication Changes

Table 273 summarizes changes to the publications in the TPF library. This information is presented in alphabetic order by the publication title. See the TPF Library Guide for more information about the TPF library.

Table 273. Changes to TPF Publications for C main() Support

Publication Title Softcopy File Name Description of Change
TPF Application Programming GTPAPP06 Updated with information about support for the main and system functions.
TPF C Language Support User's Guide GTPCLU06 Updated with information about the use of the abort, atexit, exit, system, and strerror functions.
TPF Library Guide GTPDOC06 Updated with definitions for new terminology in the master glossary.
Messages (System Error and Offline) and Messages (Online) Not Applicable Updated with information about system errors that were added for C main() support.
TPF Migration Guide: Program Update Tapes GTPMIG06 Updated with migration considerations for C main() support.

Host System Changes

There are no changes.

Application Programming Interface (API) Changes

The application programming interface (API) has changed with the addition of support for the main, atexit, system, and strerror C functions.

Database Changes

There are no changes.

Feature Changes

There are no changes.

Installation Validation

There are no changes.

Migration Scenarios

Keep in mind the following during migration: