Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Abt include of tablename in cobol pgm,

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

New User


Joined: 14 Jul 2006
Posts: 15
Location: New Delhi

PostPosted: Fri Oct 13, 2006 5:00 pm    Post subject: Abt include of tablename in cobol pgm,
Reply with quote

hi All

in Embedeed sql(cobol+sql) . is this necessary to include table name in cobol programe. if i dont want to include this using include statement . then how it is going to work.
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Sat Oct 14, 2006 3:39 am    Post subject: Re: Abt include of tablename in cobol pgm,
Reply with quote

Quote:
in Embedeed sql(cobol+sql) . is this necessary to include table name in cobol programe. if i dont want to include this using include statement . then how it is going to work.

Are you misreading between table and DCLGEN here. If yes, then removal of INCLUDE DCLGEN would cost you to declare host variables definitions hard coded in the program itself.
Back to top
View user's profile Send private message
shivsingla
Warnings : 1

New User


Joined: 14 Jul 2006
Posts: 15
Location: New Delhi

PostPosted: Thu Oct 19, 2006 11:30 am    Post subject: Re: Abt include of tablename in cobol pgm,
Reply with quote

hi all,

yes i m taking abt include dclgen in the table, if i donot want to include in cobol program , then waht will happen, is there any other way to do it.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1190
Location: Bangalore,India

PostPosted: Thu Oct 19, 2006 11:37 am    Post subject:
Reply with quote

Hi Shivsingla,

As answer prev by Priyesh u have to declare host variable defination hard codeed in ur program.
Back to top
View user's profile Send private message
shivsingla
Warnings : 1

New User


Joined: 14 Jul 2006
Posts: 15
Location: New Delhi

PostPosted: Thu Oct 19, 2006 11:39 am    Post subject: Re: Abt include of tablename in cobol pgm,
Reply with quote

thanx all
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Oct 19, 2006 12:05 pm    Post subject: Re: Abt include of tablename in cobol pgm,
Reply with quote

Hi,

I think while pre-compilation, table columns are checked with the DCLGEN Columns. If any column name is not mentioned correctly then compiler will give error.
If DCLGEN is not included this error will occur in Run time.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Oct 19, 2006 12:08 pm    Post subject: Re: Abt include of tablename in cobol pgm,
Reply with quote

Thats right, DCLGEN is just a mapping between DB2 fields and cobol variablaes, so that your COBOL program understands and identifes DB2 fields properly.

Just have a look into any of your DCLGEN member, it would serve enough to understand the things.
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 How to display offset thru cobol prog... tvinodkumar7 CICS 1 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us