Need PPBMAIN Precompiler Help

Database

Need PPBMAIN Precompiler Help

I need to find a way to support mainframe COBOL Teradata precompile. The standard COBOL compile fails when SQL is encountered. Below is the JCL used and the Precompile output. Teradata DB is licensed on a different CPU than where the precompile needs to be done. There must be a way to bypass the validating of SQL calls at precompile time?

PRECOMPILER JCL:
//TDAPC EXEC PGM=PPBMAIN,COND=(4,LT),MAXRC=0,
//* PARM=('APOST,USERID(XXXXXXX,TDP424),
//* VERSION(COBOLII),TDP(TDP1)')
// PARM='TDPID(0),TDP(TDP1),SQLCHECK(NOSYNTAX)'
//STEPLIB DD DSN=HQ.DBC.TRLOAD,DISP=SHR
// DD DSN=HQ.DBC.APPLOAD,DISP=SHR
//SYSTERM DD DUMMY
//SYSLIB DD DUMMY
//SYSUT1 DD UNIT=&VIO,SPACE=(CYL,(1,3))
//SYSUT2 DD UNIT=&VIO,SPACE=(CYL,(1,3))
//SYSPRINT DD DISP=(MOD,PASS),DSN=&&SYSPR133,BUFNO=10
//SYSIN DD DISP=(OLD,PASS),DSN=&&PDS(ELMOUT) /*SOURCE CODE IN
//SYSPUNCH DD DSN=&PREPROC,DISP=(,PASS),UNIT=SYSDA, /*COMPILER INPUT
// SPACE=(TRK,(5,5)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=3600)

PRECOMPILER OUTPUT:
OPTIONS SPECIFIED

TDPID(0) TDP(TDP1) SQLCHECK(NOSYNTAX)
-OPTIONS USED

DATABASE(NULL)
TDPID(TDP1)

APOST NONULLSCAN BUFFERING(DOUBLE)
APOSTSQL NOTERM CHARSET(192)
OPTIONS CURPREFIX FROM PROGRAM
PRINT DATE(D)
PUNCH DYNPREFIX()
SOURCE FLAG(I)
XREF ISOLATION(RR)
LINECOUNT(60)
MARGINS(8,72)
SQLCHECK(NOSYNTAX)
SQLFLAGGER(NONE)
TRANSACT(COMMIT)
VERSION(COBOL)

SPP9980 Fatal Error:
Unexpected CLI return 280 on DBCHINI call
SPP9981 Fatal Error:
(NO TEXT SUPPLIED BY CLI2)

2 REPLIES
Fan

Re: Need PPBMAIN Precompiler Help

Sorry Dana, it looks like you are out of luck

In the Teradata Preprocessor2 for Embedded SQL Programmer Guide (November 2007), it states:

Note: In a mainframe environment, a TDP module must be started prior to PP2 performing
the precompile step, even if no data access is required (that is, using NOSYNTAX).


Teradata Employee

Re: Need PPBMAIN Precompiler Help

You don't need to have a Teradata system connected to the mainframe where you do the compile, but you do have to start a TDP on that system. The TDP does not need to ATTACH or START any IFPs, it just has to initialize and build a global control block in CSA.

SQLCHECK(NOSYNTAX) does bypass the CONNECT at precompile time but the program initialization unfortunately always wants to validate the TDPID parameter you specify or determine the system default TDPID - even if it never connects using that ID.