Chapter Contents |
Previous |
Next |
Preprocessing, Compiling, and Linking |
As noted in Handling Files, the SAS/C Compiler supports development of C language application programs that contain Structured Query Language (SQL) statements. Such programs must first be precompiled with an SQL preprocessor (not provided by SAS Institute) that translates the EXEC SQL statements to valid C code. Sample JCL for SQL provides a sample of JCL for such applications.
Sample JCL for SQL
//JOB CARD INFO //JOBLIB DD DISP=SHR,DSN=db2.library.DSNLOAD //********************************************************************** //* STEP 1 : PRECOMPILE * //********************************************************************** //PC EXEC PGM=DSNHPC, // PARM='HOST(C),STDSQL(NO),SOURCE,XREF,MARGINS(1,72)' //DBRMLIB DD DSN=db2.dataset.DBRMLIB.DATA(member),DISP=SHR //STEPLIB DD DSN=db2.library.DSNEXIT,DISP=SHR // DD DSN=db2.library.DSNLOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSTERM DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSCIN DD DSN=&&DSNHOUT,DISP=(MOD,PASS),UNIT=SYSDA // SPACE=(800,(500,500)) //SYSLIB DD DSN=db2.library.SRCLIB.DATA,DISP=SHR //SYSUT1 DD SPACE=(800,(500,500),,,ROUND),UNIT=SYSDA //SYSUT2 DD SPACE=(800,(500,500),,,ROUND),UNIT=SYSDA //SYSIN DD DSN=your.sample.program(member),DISP=SHR //******************************************************************* //* STEP 2 : TRANSLATE, COMPILE AND LINK * //******************************************************************* //TCL EXEC LCCCPCL //CCP.SYSIN DD DSN=&&DSNHOUT,DISP=(OLD,DELETE) //LKED.SYSLIB DD // DD // DD // DD DSN=db2.library.DSNLOAD,DISP=SHR //LKED.SYSLMOD DD DSN=your.cics.application.loadlib(member),DISP=SHR //LKED.SYSIN DD * INCLUDE SYSLIB(DSNCLI) //******************************************************************* //* STEP 3 : BIND * //******************************************************************* //BIND EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(4,LT) //DBRMLIB DD DISP=SHR,DSN=db2.dataset.DBRMLIB.DATA //SYSTSPRT DD SYSOUT=* //SYSTERM DD SYSOUT=* //SYSPRINT DD SYSOUT=* //CEEDUMP DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSOUT DD SYSOUT=* //REPORT DD SYSOUT=* //SYSIN DD * //SYSTSIN DD * DSN SYSTEM(yoursystem) BIND PLAN(yourplan) MEMBER(member) ACT(REP) ISOLATION(CS) END //
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.