View previous topic :: View next topic
|
Author |
Message |
sudhanaveenkumar
New User
Joined: 29 Apr 2010 Posts: 28 Location: chennai
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
sudhanaveenkumar
New User
Joined: 29 Apr 2010 Posts: 28 Location: chennai
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
sudhanaveenkumar
New User
Joined: 29 Apr 2010 Posts: 28 Location: chennai
|
|
|
|
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 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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
sudhanaveenkumar
New User
Joined: 29 Apr 2010 Posts: 28 Location: chennai
|
|
|
|
Hi Anuj Dhawan
Yes i am referring to the para you had mentioned above.
Thanks
naveen |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
sudhanaveenkumar
New User
Joined: 29 Apr 2010 Posts: 28 Location: chennai
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Without DB2 subsystem,how can we generate DCLGENs for the tables used in cobol/db2 pgm. |
you can't.! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
sudhanaveenkumar
New User
Joined: 29 Apr 2010 Posts: 28 Location: chennai
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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... |
|
Back to top |
|
|
sudhanaveenkumar
New User
Joined: 29 Apr 2010 Posts: 28 Location: chennai
|
|
|
|
Many thanks all of you for replying.
Now i am clarified.
Thanks
naveen |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Glad, we could help.
Good Lcuk. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
yes, you are welcome |
|
Back to top |
|
|
|