IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

USE OF DCLGEN


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ragin

New User


Joined: 20 Feb 2005
Posts: 16

PostPosted: Thu Mar 10, 2005 9:54 am
Reply with quote

HELO FRNDZ,
CAN U PLZ TELL ME WHT IS THE EXACT USE OF DCLGEN IN DB2 AFTER CREATING A TABLE?
SO ENTERING INTO 8.2 OPTION(DCLGEN) IT ASKS FOR THE TABLE NAME,SUFFIX,PREFIX ECT........WHAT SOULD I GIVE THERE?
Back to top
View user's profile Send private message
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Thu Mar 10, 2005 11:14 am
Reply with quote

Hi Ragin,

DCLGEN is a subcomponent of DB2. It is used to generate Host variable declarations for a table. If we want to use a DB2 table in COBOL program we must declare Host variables which holds the data retrieved from DB2 table. This declarations can be automatically generated by using DCLGEN.

In DCLGEN we need to give the following options... Most of the options are optional...

Enter table name for which declarations are required:
1 SOURCE TABLE NAME ===> (Table name Table name for which we need host variables)
2 TABLE OWNER ..... ===> (Optional)
3 AT LOCATION ..... ===> (Optional)

Enter destination data set: (Can be sequential or partitioned)
4 DATA SET NAME ... ===> (Dataset name where we want to store this declarations)
5 DATA SET PASSWORD ===> (If password protected)

Enter options as desired:
6 ACTION .......... ===> ADD (ADD - adds to existing declarations if already exists, or REPLACE old declarations if exists)
7 COLUMN LABEL .... ===> NO (Enter YES for column label)
8 STRUCTURE NAME .. ===> (Optional)
9 FIELD NAME PREFIX ===> (HV-) (Optional)
10 DELIMIT DBCS .... ===> YES (Enter YES to delimit DBCS identifiers)
11 COLUMN SUFFIX ... ===> NO (Enter YES to append column name)
12 INDICATOR VARS .. ===> NO (Enter YES for indicator variables)

We can include the generated COPYBOOK into our cobol program as follows in working storage section...
EXEC SQL INCLUDE
EMPDCL
END-EXEC.

Bye,
Reddy.
Back to top
View user's profile Send private message
shan1245

New User


Joined: 03 Jun 2005
Posts: 1
Location: bangalore

PostPosted: Tue Jun 07, 2005 3:39 pm
Reply with quote

Hi All,

Can anyone send Xpeditor commands and document. I need it urgent.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Unable to view Unloaded file using DC... DB2 4
No new posts Expand COBOL copybooks and DCLGEN COBOL Programming 17
No new posts DCLGEN change DB2 1
No new posts USING DCLGEN as INPUT LAYOUT but will... Mainframe Interview Questions 2
No new posts Generating Multiple DCLGEN's DB2 4
Search our Forums:

Back to Top