Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Precompilation Error for DSNTEP2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Thu Mar 04, 2010 9:37 pm    Post subject: Precompilation Error for DSNTEP2
Reply with quote

Hi,
I am working on DB2 for z/os 9.1.

I am trying to compile and bind DSNTEP2 program.I took the compilation JCL(DSNHPLIP) from our sys lib.
While precompilation step i am getting the following error-:
DSNH644I E DSNHLEXP LINE 1381 COL 41 INVALID VALUE SPECIFIED FOR KEYWORD "MAXBUFFER@" IN SQL TYPE IS" STATEMENT
DCL STMTBUF
DSNH5037I E DSNHSQLA LINE 1410 COL 28 DECLARE VARIABLE STATEMENT FOUND WITH ONE-PASS PRECOMPILATION
DECLARE : HVDUMMY VARIABLE CCSID EBCDIC

DSNH644I E DSNHLEXP LINE 1381 COL 41 INVALID VALUE SPECIFIED FOR KEYWORD "MAXBUFFER@" IN SQL TYPE IS" STATEMENT
DCL STMTBUF

SOURCE STATISTICS
SOURCE LINES READ: 5808
NUMBER OF SYMBOLS: 501
SYMBOL TABLE BYTES EXCLUDING ATTRIBUTES: 25112
THERE WERE 3 MESSAGES FOR THIS PROGRAM.
THERE WERE 0 MESSAGES SUPPRESSED BY THE FLAG OPTION.
308724 BYTES OF STORAGE WERE USED BY THE PRECOMPILER.
RETURN CODE IS 8

Going to the respective line (1381) in DSNTEP2 -
DCL STMTBUF SQL TYPE IS CLOB(MAXBUFFER); /* SQL STATEMENT BUFFER */
DCL PSTMT PTR INIT(ADDR(STMTBUF)); /* ANCHOR TO STMTBUF */
DCL STMTMAX FIXED BIN(31) STATIC /* SQL STMT UPPER LIMIT */
INIT(MAXBUFFER); /* (must be static) */

And line no 1410 --
EXEC SQL DECLARE :HVDUMMY VARIABLE CCSID EBCDIC; /*@14*/

/* -- begin @34 */

I exactly don't have any idea of PLi, but in DSNTEP2 prog MAXBUFFER has been defined as --
%DCL ( RECLEN, MAXBUFFER ) CHAR;
% RECLEN = '72'; /* Length of input records */
% MAXBUFFER = '2097152'; /* Maxlength of SQL buffers */


Do i need to make any changes in the program and then compile?
The source for DSNTEP2 has been taken from DSN!!!.SDSNSAMP
Please help and correct me if wrong.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Thu Mar 04, 2010 11:19 pm    Post subject: Reply to: Precompilation Error for DSNTEP2
Reply with quote

the %... stuff are PLI macro statements

and looks like the macro processing has not been done
if the macro processing had been done the statement in questions should have been transformed to ...

Code:
DCL STMTBUF SQL TYPE IS CLOB(2097152)


see what options were specified for the PLI steps and add a MACRO option
Back to top
View user's profile Send private message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Fri Mar 05, 2010 1:54 pm    Post subject:
Reply with quote

Thanx enricho.
As u told,i found that the macro process step was commented in the DSNHPLI procedure.
So i uncommented it..The step looks something like-:
//PPLI EXEC PGM=IBMZPLI,PARM='MACRO,NOSYNTAX,MDECK,NOINSOURCE'
//STEPLIB DD DSN=IEL320.SIBMZCMP,DISP=SHR
//SYSLIN DD DUMMY
//SYSPRINT DD SYSOUT=* ,
// DCB=(RECFM=VBA,LRECL=125,BLKSIZE=629)
//SYSPUNCH DD DSN=&&DSNHIN,DISP=(MOD,PASS),UNIT=SYSDA,
// SPACE=(CYL,(5,2),RLSE)
//SYSUDUMP DD SYSOUT=*
//SYSUT1 DD SPACE=(1024,(60,60),,CONTIG),UNIT=SYSDA,
// DCB=BLKSIZE=1024
//*

But now i am facing the following error for the PPLI step-:

IBM1984I U File DD:SYSIN could not be opened.
and job terminates with maxcc 16
IEF236I ALLOC. FOR CALLPROC PPLI UTIL
IEF237I 0DD9 ALLOCATED TO STEPLIB
IEF237I DMY ALLOCATED TO SYSLIN
IEF237I JES2 ALLOCATED TO SYSPRINT
IGD100I VIO ALLOCATED TO DDNAME SYSPUNCH DATACLAS ( )
IEF237I JES2 ALLOCATED TO SYSUDUMP
IEF142I CALLPROC PPLI UTIL - STEP WAS EXECUTED - COND CODE 0016

The member IBMZPLI of the dataset IEL320.SIBMZCMP opens from my ID.Following are the details of IEL320.SIBMZCMP-:
Device type . . . . : 3390
Organization . . . : PO
Record format . . . : U
Record length . . . : 0
Block size . . . . : 32760
1st extent blocks . : 313
Secondary blocks . : 500
Searching the manuals for the error-
IBM1984I S File filename could not be opened. Explanation: The named file could not be opened. Make sure that the file is named correctly, that it exists, that it has the proper attributes and that you have the needed permissions to access it.

Do i need to add something in the step?
Please help and correct if i am wrong.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Fri Mar 05, 2010 2:33 pm    Post subject: Reply to: Precompilation Error for DSNTEP2
Reply with quote

did You change the sysin to ...
//PPLI.SYSIN DD DISP=SHR,DSN910.SDSNSAMP(DSNTEP2)

and override the dsnhpc parms with the twopass option ??
Back to top
View user's profile Send private message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Fri Mar 05, 2010 3:29 pm    Post subject:
Reply with quote

Hi Enricho,
I was using sysin the way u said but i was not passing the twopass option
Now the parameters i am passing are
DB2 SQL PRECOMPILER VERSION 9 REL. 1.0
OPTIONS SPECIFIED: HOST(PLI),TWOPASS,SOURCE,XREF
DSNHDECP LOADED FROM - (DSN910.DB9M.SDSNEXIT(DSNHDECP))
OPTIONS USED - SPECIFIED OR DEFAULTED
APOST
APOSTSQL
ATTACH(TSO)
CCSID(1047)
NOPADNTSTR
CONNECT(2)
DEC(15)
FLAG(I)
HOST(PLI)
FLOAT(S390)
LINECOUNT(60)
MARGINS(2,72)
NEWFUN(YES)
OPTIONS
PERIOD
SOURCE
STDSQL(NO)
SQL(DB2)
TWOPASS
XREF
Now it is giving maxcc=8 with the error-:
DSNH644I E DSNHLEXP LINE 1381 COL 41 INVALID VALUE SPECIFIED FOR KEYWORD "MAXBUFFER@" IN SQL TYPE IS" STATEMENT
DCL STMTBUF
DSNH644I E DSNHLEXP LINE 1381 COL 41 INVALID VALUE SPECIFIED FOR KEYWORD "MAXBUFFER@" IN SQL TYPE IS" STATEMENT
DCL STMTBUF

1DB2 SQL PRECOMPILER STATISTICS
0SOURCE STATISTICS
SOURCE LINES READ: 5808
NUMBER OF SYMBOLS: 501
SYMBOL TABLE BYTES EXCLUDING ATTRIBUTES: 25112
-THERE WERE 2 MESSAGES FOR THIS PROGRAM.
THERE WERE 0 MESSAGES SUPPRESSED BY THE FLAG OPTION.
308724 BYTES OF STORAGE WERE USED BY THE PRECOMPILER.
RETURN CODE IS 8
Do i need to override some other parameters?
Please help.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Fri Mar 05, 2010 3:42 pm    Post subject: Reply to: Precompilation Error for DSNTEP2
Reply with quote

Your proc should have five steps...
Code:
//PPLI    EXEC PGM=IBMZPLI,PARM='MACRO,NOSYNTAX,MDECK,NOINSOURCE'

Code:
//PC      EXEC PGM=DSNHPC,COND=(8,LT,PPLI),
//             PARM='HOST(PLI),TWOPASS'
Code:
//PLI     EXEC PGM=IBMZPLI,COND=((4,LT,PC),(8,LT,PPLI)),
//             PARM='OBJ,SOURCE,OP,LIMITS(EXTNAME(7))'

Code:
//PLKED   EXEC PGM=EDCPRLK,COND=((8,LT,PPLI),(4,LT,PC),(4,LT,PLI))

Code:
//LKED     EXEC PGM=IEWL,PARM='XREF',
//             COND=((8,LT,PPLI),(4,LT,PC),(8,LT,PLI),(4,LT,PLKED))


I just tested and everything was ok
Code:
// JCLLIB ORDER=(DSN910.PROCLIB)
//TEP4    EXEC DSNHPLI,USER=IBMUSER,MEM=DSNTEP4
//PPLI.SYSIN  DD DISP=SHR,DSN=DSN910.SDSNSAMP(DSNTEP4)
Back to top
View user's profile Send private message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Fri Mar 05, 2010 8:56 pm    Post subject:
Reply with quote

Thanx Enricho for all your suggestions.
I started everything from zero taking a new PDS and making all the necessary changes in the proc and the job.And it worked fine.May be i was missing something somewhere icon_eek.gif .Also in between the error came for exceeded virtual memory by the compiler, so i just increased the region size and it worked fine.
Thanx Again..
Back to top
View user's profile Send private message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Sat Mar 06, 2010 3:30 pm    Post subject:
Reply with quote

Hi Enricho,
Can I change the record length parameter in the DSNTEP2 program which is by default set to 72?

I need to increase the record length so that i can pass long SQL statements through DSNTEP2.

At present i can give only 72 record length SQL statements.
Please help and correct me if wrong.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Sat Mar 06, 2010 4:07 pm    Post subject: Reply to: Precompilation Error for DSNTEP2
Reply with quote

if You had looked at the dsntep2/dsntep4 sources You would have found that ...

Code:
  *         3. The maximum length of SQL statements that this        *  02560000
  *            program can handle is STMTMAX, due to its allocation  *  02570000
  *            of space (STMTBUF).  The first RECLEN characters of   *  02584990
  *            each input record are inserted into this buffer.      *  02590000


the SQL statement can become pretty long!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us