- From the main menu, click 
                  		  Tools > SQL Option for DB2 > Client > Declaration Generator. 
                  		
               
- On the XDB Declaration Generator window, specify the table you require in the 
                  		  Table group. 
                  		
               
- In the 
                  		  Declaration group, type a location and name for the copybook in the 
                  		  Output File field. 
                  		
               
- Optionally, in the 
                  		  Structure Name field, type a name for the group data item to be created. 
                  		
               
- Optionally, click 
                  		  Options to specify a level for the group data item to be created. 
                  		
               
- In the 
                  		  Field Prefix group, type a prefix to be added to the column names in the table to create host variables. For example, you might use EMP
                  as the column name prefix for a table called EMPLOYEES. 
                  		
               
- Select 
                  		  Text if you want the column name to be appended to the specified prefix to create the host variable name. 
                  		  
                  Alternatively, select 
                     			 Numbered if you want the column's numeric position in the table to be appended to the specified prefix to create the host variable
                     name. 
                     		  
                   
- In the 
                  		  Computation group, click the data format you require for the host variables. 
                  		
               
- Click 
                  		  Generate. 
                  		
               
A copybook containing host variables for accessing the specified table is created. 
               	 
            
 
            	 
            Tip:  
               		
               Click 
                  		  Save As to save the settings you made on the Declaration Generator window. You can use the .DGE file that is produced to run the
                  Declaration Generator in batch mode. For more information, see 
                  		  Running in Batch Mode in the Declaration Generator help.