Compile and Link Reference for Supported Platforms | |||||
|
Pre-Linking (COOL) Information |
When any one of the conditions specified in When to Use COOL applies, you must use COOL to preprocess your object code. For more information, see The COOL Object Code Processor. Notes:
For detailed information on linking C programs, including COOL options, see Linking C Programs. |
OS/390 |
The product installation process creates a PDS called Below are various samples using the cataloged procedures and JCL requirements necessary for executing the compiler under OS/390 batch. The following JCL demonstrates compile, pre-Link, link, and execution for a C program: ********************************* Top of Data ************************** //CRG JOB … // JCLLIB ORDER=your.prefix.PROCLIB //CLG EXEC PROC=LC370CRG, // PARM.C='OMD', // PARM.GO='=V', //C.STEPLIB DD DISP=SHR,DSN=your.LOAD //C.SYSIN DD DISP=SHR,DSN=your.source.C(HELLO) //C.SYSLIN DD DISP=SHR,DSN=your.OBJ(HELLO) ******************************** Bottom of Data ************************ The following JCL demonstrates executing individual procedures used for each step: ********************************* Top of Data ************************** //HELLO JOB … // JCLLIB ORDER=your.prefix.PROCLIB //******************** //* COMPILE //******************** //C EXEC PROC=LC370C,PARM.C='OMD' //C.SYSIN DD DSN=your.source.C(HELLO),DISP=SHR //C.SYSLIN DD DSN=your.OBJ(HELLO),DISP=SHR //* //******************** //* PRE-LINK and LINK //******************** //LKED EXEC PROC=LC370LR,COND=(4,LT) //LKED.SYSIN DD DSN=your.OBJ(HELLO),DISP=SHR //LKED.SYSLMOD DD DSN=your.LOAD(HELLO),DISP=SHR //LKED.SYSTERM DD SYSOUT=* //* //******************** //* GO //******************** //GO EXEC PGM=HELLO,COND=(4,LT) //STEPLIB DD DSN=your.LOAD,DISP=SHR //SYSTERM DD SYSOUT=* //SYSPRINT DD SYSOUT=* //* // ******************************** Bottom of Data ************************ For C++ programs, the procedures start with LCXX. To compile, pre-link, link, and go, use procedure LCXXCLG. For CICS C programs, use procedure LCCCPCLR to invoke the CICS translator, and to compile, pre-link, and link. For CICS C++ programs, use procedure LCCPCXXL to invoke the CICS translator and C++ translator and to compile, pre-link, and link. |
CMS/ESA |
The following steps demonstrate compile, pre-link, link, and execution for a C program:
The following steps demonstrate compile, pre-link, link, and execution for a C++ program:
|
WIN/NT |
When using the Cross-Platform compiler, you can compile and pre-link on the cross-platform and then you must transfer the resulting object file to the mainframe for the final linking and execution. Getting Started with the SAS/C Cross-Platform Compiler under Windows This Programmer’s Report is intended to help you get started as quickly as possible with the SAS/C Cross-Platform Compiler under the Windows operating system. It provides a simple tutorial that demonstrates how to build the ftoc.c and ftoc.cxx sample p rograms from both the DOS shell and Microsoft’s Developer Studio. Using SAS/C and C++ from the DOS Shell This exercise shows you how to compile and prelink C and C++ applications from the DOS shell. It also demonstrates how to use NMAKE to build your applications.
Using SAS/C and C++ with Developer Studio This exercise walks you through the steps of setting up two simple projects with the Microsoft Developer Studio using the SAS/C Cross-Platform compiler. It builds the ftoc.c and ftoc.cxx sample applications that are distributed with the SAS/C product.< /p> |
UNIX |
When using the Cross-Platform compiler, you can compile and pre-link on the cross-platform and then you must transfer the resulting object file to the mainframe for the final linking and execution. Notes:
For more information on compiling C and C++ programs using the Cross-Platform compiler, click here.
Notes for CICS applications:
For more detailed information on how to pre-process and compile CICS applications using the Cross-Platform compiler, see Using the SAS/C CICS Command Preprocessor. |