MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQL statement coprocessor

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
nivedita
Beginner


Joined: 04 Nov 2003
Posts: 22
Topics: 15

PostPosted: Tue Jan 20, 2004 4:53 am    Post subject: SQL statement coprocessor Reply with quote

Hi,

I would like to know how to use coprocessor in compile jcl
Any JCL format>?? Do i need to make any changes to the appilcation
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue Jan 20, 2004 6:27 am    Post subject: Reply with quote

Nivedita,

Are you talking about the PL/I Sql preprocessor? You need to post as many details as possible to avoid the guesswork and get the right answer.

Check this link for SQL PREPROCESSOR in PL/I

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IBM3PG10/2.0?DT=20020918091353#HDRPREPRO

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nivedita
Beginner


Joined: 04 Nov 2003
Posts: 22
Topics: 15

PostPosted: Tue Jan 20, 2004 11:18 pm    Post subject: Reply with quote

No, I want the DB2 coprocessor which will be used instead of precompiler

DB2 coprocessor integration, which is to say you no longer need to use the DB2 precompiler for COBOL programs that contain SQL statements. If the coprocessor is used, the compiler will process the SQL statements along with the COBOL source code.

How to use this in JCL for compilation?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Jan 21, 2004 6:30 am    Post subject: Reply with quote

Nivedita,

Check this link for a detailed explanation of DB2 COPROCESSOR.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG10/3.2.2.3?SHELF=&DT=20020923143836&CASE=

check this link for an example of specifying the SQL Compiler option

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG10/2.4.47?DT=20020923143836

Hope this helps...

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Fri Jan 23, 2004 9:39 am    Post subject: Reply with quote

kolusu,

I need clarification on the following lines which I found in the first link/url....

Quote:
Although the use of a separate precompile step continues to be supported, use of the coprocessor is recommended. Interactive debugging with Debug Tool is enhanced when you use the coprocessor because you see the SQL statements in the listing (and not the generated COBOL source). However, you must have DB2 for OS/390 Version 7 or later.


My confusion here is ..with Precompiler used ..and a Debugging tool like Expeditor ...we still do see the SQL statements although cannot change other than the Host values. What then is the advantage of a co-processor as far as debugging is concerned ?!!

Thnks
vini
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Jan 23, 2004 9:56 am    Post subject: Reply with quote

Vini,

The DB2 precompiler translates your original program into modified source code. Source language debuggers(xpeditor, debug tool ...) use that modified source code as input. However, when the compiler includes an SQL statement coprocessor, you can use your original source code as input to the debugger.

Prior to the release of COPROCESSOR option Xpeditor is basically doing all the work in the background which is not visible to you.

Using an SQL statement coprocessor has the following advantages over using the DB2 precompiler:


  • An SQL statement coprocessor removes restrictions on DB2 host
    variables.

    The DB2 precompiler does not allow you to fully qualify the names of
    structured host variables. With an SQL statement coprocessor, a
    structured host language variable can be fully qualified.

  • An SQL statement coprocessor makes debugging a program easier.


  • The format of the source file no longer has special restrictions other
    than the restrictions of the compiler.

    The DB2 precompiler places restrictions on the source file. For
    example, the record length of the source file can be no more than 80
    bytes. When you use an SQL statement coprocessor, the compiler
    controls the source file format.

  • Include SQL statements at any level of a nested COBOL program, instead
    of in only the top-level source file.

  • Use nested SQL INCLUDE statements.

  • Use COBOL REPLACE statements to replace text strings in SQL
    statements.




Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nivedita
Beginner


Joined: 04 Nov 2003
Posts: 22
Topics: 15

PostPosted: Wed Jan 28, 2004 9:08 am    Post subject: Reply with quote

Hi,
I have removed the preprocessor statements in my JCL and have replaced it with corresponding SQL parameters in compile step, I am getting the system dump- ABEND U3002

Below is the JCL:

Code:
                                                                 
 //*-----------------------------------------------------------------* 
 //COBDB2   PROC WSPC=300,                                             
 //         MEMBER='PGM2BAT',                                           
 //         SRCE='TEST.SCRE',                                 
 //         LOADLIB='TEST.LOAD',                               
 //         DBRMLIB='TEST.DBRM',                               
 //         CPARM1='SOURCE,LIB,APOST,NOSEQ,NODYNAM,XREF,MAP,LIST',     
 //         CPARM2='SQL("APOSTSQL STDSQL(NO)")'                         
 //*                                                                   
 //*-----------------------------------------------------------------* 
 //*                                                                   
 //*-----------------------------------------------------------------* 
 //*                COMPILE STEP                                     * 
 //*-----------------------------------------------------------------* 
 //COBDB    EXEC PGM=IGYCRCTL,                                         
 // PARM=('&CPARM1,&CPARM2')                                           
 //STEPLIB  DD  DSN=IGY.SIGYCOMP,DISP=SHR                               
 //         DD  DSN=DSN710.SDSNLOAD,DISP=SHR                           
 //         DD  DSN=DSN710.SDSNEXIT,DISP=SHR                           
 //DBRMLIB  DD  DSN=&DBRMLIB(&MEMBER),DISP=SHR                         
 //SYSLIB   DD  DSN=TEST.INCLUDE,DISP=SHR                       
 //SYSIN    DD  DSN=&SRCE(&MEMBER),DISP=SHR                             
 //SYSLIN   DD  DSN=&&BATCHLD,DISP=(NEW,PASS),UNIT=3390,               
 //             SPACE=(3200,(&WSPC,&WSPC)),                             
 //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=2960,BUFNO=10)           
 //SYSLIB   DD  DSN=TEST.INCLUDE,DISP=SHR                       
 //SYSPRINT DD  SYSOUT=*                                               
 //SYSTERM  DD  SYSOUT=*                                               
 //SYSUDUMP DD  SYSOUT=*                                               
 //SYSUT1   DD  SPACE=(100,(&WSPC,&WSPC),,,ROUND),UNIT=3390             
 //SYSUT2   DD  SPACE=(100,(&WSPC,&WSPC),,,ROUND),UNIT=3390             

//*LINK-EDIT STEP---------------------

Error:
Code:

IEA995I SYMPTOM DUMP OUTPUT  824                                               
  USER COMPLETION CODE=3002                                                     
 TIME=11.17.48  SEQ=00550  CPU=0000  ASID=0100                                 
 PSW AT TIME OF ERROR  078D1F00   80009DDA  ILC 2  INTC 0D                     
   ACTIVE LOAD MODULE           ADDRESS=00007B00  OFFSET=000022DA               
   NAME=IGYCRCTL                                                               
   DATA AT PSW  00009DD4 - 00181610  0A0D9110  4C244780                         
   GR 0: C0000000   1: C0000BBA                                                 
      2: 175607A7   3: 62F490B4                                                 
      4: 0011DE30   5: 115124CE                                                 
      6: 11511200   7: 00000000                                                 
      8: 0C5E9216   9: 00014958                                                 
      A: 0006FA27   B: 8006EA28                                                 
      C: 001107C0   D: 00014958                                                 
      E: 00FE1E88   F: 80009D2A                                                 
 END OF SYMPTOM DUMP                                                           
IEA848I NO DUMP WAS PRODUCED FOR THIS ABEND, DUE TO SYSTEM OR INSTALLATION REQUE
IEF450I COMPILE COBDB DB2COB - ABEND=S000 U3002 REASON=00000000  826           
        TIME=11.17.48                 


Please let me know how to proceed further??
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Jan 28, 2004 10:28 am    Post subject: Reply with quote

Nivedita,

There are a few problems with SQL COPROCESSOR and there are a few APAR's available to fix the problem.

Check this link for the available APAR's

PQ53911: ABENDU3002 IN IGYCRCTL COBOL/DB2 SQL COPROCESSOR WHEN SIGYCOMP IS APF'ED OR IN LPA.

PQ44669: PRE-REQUISITE FIX FOR COBOL SQL COPROCESSOR

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group