View previous topic :: View next topic
|
Author |
Message |
ragin
New User
Joined: 20 Feb 2005 Posts: 16
|
|
|
|
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 |
|
|
ovreddy
Active User
Joined: 06 Dec 2004 Posts: 211 Location: Keane Inc., Minneapolis USA.
|
|
|
|
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 |
|
|
shan1245
New User
Joined: 03 Jun 2005 Posts: 1 Location: bangalore
|
|
|
|
Hi All,
Can anyone send Xpeditor commands and document. I need it urgent. |
|
Back to top |
|
|
|