Create a Procedure to Access FOCUS and Verify Adapter Installation

Reference:

In order to access DB2 from FOCUS using CLI, you must create a CLIST or job that allocates all of the required FOCUS and DB2 data sets and has access to the configuration files.

The EDASERVE and FOCPROF members can either be placed directly in the user.CONF.CFG data set or they can be placed in a separate Partitioned DataSet (PDS) which you must concatenate to the hlq.ERRORS.DATA data set in the allocation for DDNAME ERRORS in your CLIST or JCL.


Top of page

x
Reference: Sample CLIST to Access DB2 From FOCUS Using CLI

You can use the following CLIST as a sample after editing it to meet the standards at your site. In this example, user.DB2CLI.CFG in the allocation for DDNAME ERRORS contains the members EDASERVE and FOCPROF:

ALLOC F(FOCLIB)  DA('hlq.FOCLIB.LOAD') SHR REUSE   
ALLOC F(ERRORS)  DA('user.DB2CLI.CFG' -                     
                    'hlq.ERRORS.DATA') SHR REUSE   
ALLOC F(MASTER)  DA('user.MASTER.DATA' -                         
                    'hlq.MASTER.DATA') SHR REUSE   
ALLOC F(FOCSQL)  DA('user.FOCSQL.DATA' -                         
                    'hlq.FOCSQL.DATA') SHR REUSE   
ALLOC F(FOCEXEC) DA('user.FOCEXEC.DATA' -                       
                    'hlq.FOCEXEC.DATA') SHR REUSE 
CALL 'hlq.FOCLIB.LOAD(FOCUS)'                     

where:

hlq

Is the high-level qualifier for your FOCUS production data sets.

user

Is the high-level qualifier for the private version of a data set.

Note: Before executing your CLIST, you must be sure that your DB2 load libraries are available either by allocating them to DDNAME STEPLIB or by having them in the LINKLIST.

Execute the CLIST to invoke FOCUS and issue the following commands at the FOCUS prompt, pressing Enter after each line.

SQL DB2 ?                                               
SQL DB2                                                 
SELECT * FROM SYSIBM.SYSDUMMY1;              
END                                                     

If the adapter settings and the request output displayed, the installation and connection were successful. Issue the following command to exit FOCUS.

FIN

Top of page

x
Reference: Sample JCL for Accessing DB2 From FOCUS Using CLI

You can use the following JCL as a sample for creating a job that meets the standards at your site. In this example, user.DB2CLI.CFG in the allocation for DDNAME ERRORS contains the members EDASERVE and FOCPROF:

//FOCUSDB2  EXEC PGM=FOCUS,REGION=64M                                  
//STEPLIB  DD DSN=DSNn10.SDSNEXIT,DISP=SHR 
//         DD DSN=DSNn10.SDSNLOAD,DISP=SHR 
//         DD DSN=hlq.FOCLIB.LOAD,DISP=SHR           
//         DD DSN=hlq.FUSELIB.LOAD,DISP=SHR 
//ERRORS   DD DSN=user.DB2CLI.CFG,DISP=SHR                    
//         DD DSN=hlq.ERRORS.DATA,DISP=SHR              
//FOCLIB   DD DSN=hlq.FOCLIB.LOAD,DISP=SHR          
//SYSPRINT DD SYSOUT=*                                               
//SYSTSPRT DD SYSOUT=*                                               
//FOCEXEC  DD DSN=hlq.FOCEXEC.DATA,DISP=SHR                    
//MASTER   DD DSN=hlq.MASTER.DATA,DISP=SHR                 
//FOCSQL   DD DSN=user.FOCSQL.DATA,DISP=SHR    
//SYSIN DD *                                                     
  SQL DB2 ?  
  SQL DB2                                                 
  SELECT * FROM SYSIBM.SYSDUMMY1;              
  END
  FIN                                              
/*

where:

n

Is your version of DB2, for example, 9.

hlq

Is the high-level qualifier under which you installed FOCUS. In this example, hlq.FOCUS.DB2CLI.CFG contain the members EDASERVE and FOCPROF.

user

Is the high-level qualifier for a library allocated under the user ID of a specific user.

If the adapter settings and the request output displayed, the installation and connection were successful.


Information Builders