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
 

 

DB2 to be up for PRECOMPILE?

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

New User


Joined: 29 Apr 2010
Posts: 28
Location: chennai

PostPosted: Mon Jul 05, 2010 12:46 pm    Post subject: DB2 to be up for PRECOMPILE?
Reply with quote

could any one let me know whether DB2 subsystem has to be up for precompilation?

Can we genearate DCLGENs without db2 SUBSYSTEM?


Many Thanks
naveen
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Jul 05, 2010 12:57 pm    Post subject:
Reply with quote

Your DB2 doesn't have to be up for precompile. Note that you will need it for bind, however.

Since DCLGEN is a DSN subcommand, you have to supply a subsystem name in the DSN command. If you omit it, a default (usually DSN) is used.

O.
Back to top
View user's profile Send private message
sudhanaveenkumar

New User


Joined: 29 Apr 2010
Posts: 28
Location: chennai

PostPosted: Mon Jul 05, 2010 2:25 pm    Post subject:
Reply with quote

Thanks a lot for your reply.

Whats that DSN means?

I heard that without a DB2 subsystem on your mainframe system we can precompile a cobol db2 program.But how are they generating DCLGENs
before precompile without having DB2 subsystem.

Could any one clarify can we generate DCLGENs and precompile a cobol/db2 Pgm without having DB2 subsystem on mainframe.



Thanks
naveen
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Jul 06, 2010 7:17 pm    Post subject:
Reply with quote

DSN is the DB2 command processor and executes as a TSO command processor. All of the DSN subcommands, except SPUFI, run under DSN in either the foreground or background.

Quote:
I heard that without a DB2 subsystem on your mainframe system we can precompile a cobol db2 program.But how are they generating DCLGENs before precompile without having DB2 subsystem
What is your source of information for this? I don't think that this can be done. If that was true, how would the SQL-statements be resolved then?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jul 06, 2010 7:24 pm    Post subject:
Reply with quote

This I know for fact:
db2 pre-compile does not require db2 to be active.

Quote:
SQL-statements be resolved then?


the COBOL generated by the pre-compiler is based purely on the data and sql within the program.

now the DB2 BIND does require db2 to be active,
and during the bind process, all table references are resolved.
one of the reasons you can receive a 'good' (rc=0) precompile
yet fail in the bind step.


This is an assumption by me:
since dclgen's are based on table definitions,
which are stored in tables,
and the only access to tables is thru DB2,
I would assume that dclgen's require db2 to be active.
Back to top
View user's profile Send private message
sudhanaveenkumar

New User


Joined: 29 Apr 2010
Posts: 28
Location: chennai

PostPosted: Tue Jul 06, 2010 7:36 pm    Post subject:
Reply with quote

Hi All,

Many Thanks for Anuj Dhawan and Dick Brenholtz.
The source for the above said stmt is:

Plans + DBRMS + Packages + Collections + Versions = Confusion.pdf

You can find this pdf in the mainframe forum as well http://ibmmainframes.com/about23965.html.

The above pdf says we need not have DB2 subsystem to precompile as well as cobol/db2 pgm development(First chapter).

Now,Can anybody answer my question:
I heard that without a DB2 subsystem on your mainframe system we can precompile a cobol db2 program.But how are they generating DCLGENs before precompile without having DB2 subsystem????

Thanks
Naveen
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Jul 06, 2010 7:46 pm    Post subject:
Reply with quote

Quote:
COBOL was the language of choice in the old days; however, companies rarely had a COBOL license on
the production machine. So, DB2 had to allow development on one box with a COBOL compiler but
without a DB2 subsystem and allow production runs on a different box with a DB2 subsystem but
without a COBOL compiler. That's how the concepts of the DB2 Precompiler and the database request
module (DBRM) were born — out of necessity.
Are you referring to the above quoted para, from page 1 of pdf?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jul 06, 2010 7:46 pm    Post subject:
Reply with quote

Quote:
But how are they generating DCLGENs before precompile without having DB2 subsystem????


well, since creation/definitions of tables (as well as dclgen of copybooks) is a dba function, and it is all done around the same time,
that is before a coder starts,
the part of the development phase that does not involve a coder,
and since they can only be generated with an active db2 system,
maybe, the dba's are on another system with an active db2.

that is why the copybooks exist without an active db2 system.
Back to top
View user's profile Send private message
sudhanaveenkumar

New User


Joined: 29 Apr 2010
Posts: 28
Location: chennai

PostPosted: Tue Jul 06, 2010 7:53 pm    Post subject:
Reply with quote

Hi Anuj Dhawan


Yes i am referring to the para you had mentioned above.

Thanks
naveen
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Jul 06, 2010 7:59 pm    Post subject:
Reply with quote

Ok, read the text again with emphasis added by me:
Quote:
COBOL was the language of choice in the old days; however, companies rarely had a COBOL license on
the production machine. So, DB2 had to allow development on one box with a COBOL compiler but
without a DB2 subsystem and allow production runs on a different box with a DB2 subsystem but
without a COBOL compiler. That's how the concepts of the DB2 Precompiler and the database request
module (DBRM) were born
— out of necessity.
And please read again what Dcik has said in his recent post.

So when you said:
Quote:
I heard that without a DB2 subsystem on your mainframe system ..
Precompiler did what your application needed to get it ready for execution.
Back to top
View user's profile Send private message
sudhanaveenkumar

New User


Joined: 29 Apr 2010
Posts: 28
Location: chennai

PostPosted: Tue Jul 06, 2010 10:07 pm    Post subject:
Reply with quote

Thanks.

I am sorry for the confusion.
My question is not answered yet.

Without DB2 subsystem,how can we generate DCLGENs for the tables used in cobol/db2 pgm.

Even my previous post says:

But how are they generating DCLGENs before precompile without having DB2 subsystem????

We need DCLGENs for precompilation and during development,precompilation there is no db2 on your system as per the stmt in confusion.pdf.Then,how can we generate DCLGENs without DB2 subsystem?


Thanks
naveen
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jul 06, 2010 10:37 pm    Post subject:
Reply with quote

Quote:
Without DB2 subsystem,how can we generate DCLGENs for the tables used in cobol/db2 pgm.


you can't.!
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Jul 06, 2010 10:41 pm    Post subject: Reply to: DB2 to be up for PRECOMPILE?
Reply with quote

DCLGEN is not needed at all ( a nice to have, but not needed )

if Your organization standards ask for the DCLGEN approach to be used
no reason not to run it right after the create table has been done
( the dclgen output is stored in a normal PDS )
and the person responsible for the table creation and surroundings should do it

Just a timing issue
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jul 06, 2010 10:53 pm    Post subject:
Reply with quote

You don't need DB2 for DCLGEN. In fact, you don't have to generate a DCLGEN, you can simply type the declarations in your favorite editor.

In my company, during conversion from ADABAS to DB2, our product generates DCLGENs based on database design only.

O.
Back to top
View user's profile Send private message
sudhanaveenkumar

New User


Joined: 29 Apr 2010
Posts: 28
Location: chennai

PostPosted: Wed Jul 07, 2010 11:50 am    Post subject:
Reply with quote

Many thanks for all of you for responding on my query.

I have understood from the above that we need not generate DCLGENs for cob/db2 pgm development.Straight away,code the structures in the pgm itself.


Thanks
Naveen
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 07, 2010 1:18 pm    Post subject:
Reply with quote

sudhanaveenkumar wrote:
I have understood from the above that we need not generate DCLGENs for cob/db2 pgm development.


true

sudhanaveenkumar wrote:
I have understood from the above that we need not generate DCLGENs for cob/db2 pgm development.Straight away,code the structures in the pgm itself.


not true, no one advocated that.

create and put them into a pds/pdse used to contain copybooks.
if no include member is generated,
and instead hardcoded in a program,
means every program with sql associated with the table must have hardcoded table defs.

not a good practice and no one here would advocate such a thing.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Jul 07, 2010 5:10 pm    Post subject:
Reply with quote

Why DCLGEN had been of so interest so far, I'm not sure. It's just declaration generation! The declarations generator (DCLGEN) produces an SQL DECLARE TABLE statement and a COBOL, PL/I, or C data declaration for a table or view named in the catalog... icon_neutral.gif
Back to top
View user's profile Send private message
sudhanaveenkumar

New User


Joined: 29 Apr 2010
Posts: 28
Location: chennai

PostPosted: Wed Jul 07, 2010 5:31 pm    Post subject:
Reply with quote

Many thanks all of you for replying.
Now i am clarified.

Thanks
naveen
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Jul 07, 2010 7:47 pm    Post subject:
Reply with quote

Glad, we could help.

Good Lcuk.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 07, 2010 7:58 pm    Post subject:
Reply with quote

yes, you are welcome
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 Pre-compile: Assembler - DB2 precompi... dick scherrer JCL & VSAM 2 Mon Aug 27, 2012 2:04 pm
No new posts DB2 precompile error when using CTE's... Satya Poola DB2 2 Thu Dec 30, 2010 11:31 am
No new posts COBOL-DB2 program precompile/Bind opt... Rijit DB2 4 Wed Aug 11, 2010 12:40 am
No new posts Precompile Problem ibmmainframe1 Compuware & Other Tools 5 Thu Nov 05, 2009 9:50 pm
No new posts db2 precompile arunshan04 DB2 2 Wed Nov 04, 2009 10:20 pm


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