Create a Procedure to Access FOCUS and Verify Adapter Installation

Reference:

Create a CLIST or JCL to run FOCUS with the Adapter for Db2, and run a sample request to test the adapter installation and connection.

Reference: Sample CLIST to Access Db2 From FOCUS Using an EDASERVE Configuration File

You can use this sample CLIST as a template. Edit it to conform to the standards of your site.

ALLOC F(FOCLIB)    DA('hlq.FOCLIB.LOAD') SHR REUSE 
ALLOC F(ERRORS)    DA('user.DB2CAF.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.
  • The data set user.DB2CAF.CFG in the allocation for DDNAME ERRORS contains the EDASERVE member.

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

If you disabled Direct SQL Passthru, instead of getting the report output, you will get the following message.

(FOC1570) DIRECT PASSTHRU DISABLED ON THIS SERVER.

You should then run the following version of the request that does not use Direct SQL Passthru.

CREATE SYNONYM _edatemp/SYSDUM1 DROP
   FOR SYSIBM.SYSDUMMY1
   DBMS DB2
END
TABLE FILE _edatemp/SYSDUM1
PRINT *
END

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

FIN

Reference: Sample CLIST to Access Db2 From FOCUS Using the RRSET Module

You can use this sample CLIST as a template. Edit it to conform to the standards of your site.

ALLOC F(FOCLIB)    DA('hlq.USE.FOCSQL.LOAD' -
                      'hlq.FOCLIB.LOAD') SHR REUSE
ALLOC F(ERRORS)    DA('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.
  • The data set hlq.USE.FOCSQL.LOAD in the FOCLIB allocation contains the RRSET module.

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

If you disabled Direct SQL Passthru, instead of getting the report output, you will get the following message.

(FOC1570) DIRECT PASSTHRU DISABLED ON THIS SERVER.

You should then run the following version of the request that does not use Direct SQL Passthru.

CREATE SYNONYM _edatemp/SYSDUM1 DROP
   FOR SYSIBM.SYSDUMMY1
   DBMS DB2
END
TABLE FILE _edatemp/SYSDUM1
PRINT *
END

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

FIN

Reference: Sample JCL to Access Db2 From FOCUS Using an EDASERVE Configuration File

You can use this sample JCL as a template. Edit it to conform to the standards of your site.

//job card goes here
//         CLASS=A,MSGCLASS=Q,REGION=64M,TIME=40,MSGLEVEL=(1,1)
//*
//FOCDB2  EXEC PGM=FOCUS
//STEPLIB  DD  DSN=hlq.FOCSQL.LOAD,DISP=SHR
//         DD  DSN=hlq.FOCLIB.LOAD,DISP=SHR
//         DD  DSN=DSNv10.SDSNLOAD,DISP=SHR
//ERRORS   DD  DSN=hlq.ERRORS.DATA,DISP=SHR
//         DD  DSN=user.DB2CAF.CFG,DISP=SHR
//MASTER   DD  DSN=user.MASTER.DATA,DISP=SHR
//         DD  DSN=hlq.MASTER.DATA,DISP=SHR
//FOCEXEC  DD  DSN=user.FOCEXEC.DATA,DISP=SHR
//         DD  DSN=hlq.FOCEXEC.DATA,DISP=SHR
//FOCSQL   DD  DSN=user.FOCSQL.DATA,DISP=SHR
//         DD  DSN=hlq.FOCSQL.DATA,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
SQL DB2 ?
SQL DB2
SELECT * FROM SYSIBM.SYSDUMMY1;
END
FIN
/*

where:

hlq

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

v

Is the version of Db2 you will use with FOCUS.

user

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

Note: The data set user.DB2CAF.CFG contains the EDASERVE member and must be allocated to DDNAME ERRORS.

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

If you disabled Direct SQL Passthru, instead of getting the report output, you will get the following message.

(FOC1570) DIRECT PASSTHRU DISABLED ON THIS SERVER.

You should then run the following version of the request that does not use Direct SQL Passthru.

CREATE SYNONYM _edatemp/SYSDUM1 DROP
   FOR SYSIBM.SYSDUMMY1
   DBMS DB2
END
TABLE FILE _edatemp/SYSDUM1
PRINT *
END

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

Reference: Sample JCL to Access Db2 From FOCUS Using the RRSET Module

You can use this sample JCL as a template. Edit it to conform to the standards of your site.

//job card goes here
//         CLASS=A,MSGCLASS=Q,REGION=64M,TIME=40,MSGLEVEL=(1,1)
//*
//FOCDB2  EXEC PGM=FOCUS
//STEPLIB  DD  DSN=hlq.USE.FOCSQL.LOAD,DISP=SHR
//         DD  DSN=hlq.FOCSQL.LOAD,DISP=SHR
//         DD  DSN=hlq.FOCLIB.LOAD,DISP=SHR
//         DD  DSN=DSNv10.SDSNLOAD,DISP=SHR
//ERRORS   DD  DSN=hlq.ERRORS.DATA,DISP=SHR
//MASTER   DD  DSN=user.MASTER.DATA,DISP=SHR
//         DD  DSN=hlq.MASTER.DATA,DISP=SHR
//FOCEXEC  DD  DSN=user.FOCEXEC.DATA,DISP=SHR
//         DD  DSN=hlq.FOCEXEC.DATA,DISP=SHR
//FOCSQL   DD  DSN=user.FOCSQL.DATA,DISP=SHR
//         DD  DSN=hlq.FOCSQL.DATA,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
SQL DB2 ?
SQL DB2
SELECT * FROM SYSIBM.SYSDUMMY1;
END
FIN
/*

where:

hlq

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

v

Is the version of Db2 you will use with FOCUS.

user

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

Note: The data set hlq.USE.FOCSQL.LOAD contains the RRSET module and must be in the allocation for DDNAME STEPLIB.

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

If you disabled Direct SQL Passthru, instead of getting the report output, you will get the following message.

(FOC1570) DIRECT PASSTHRU DISABLED ON THIS SERVER.

You should then run the following version of the request that does not use Direct SQL Passthru.

CREATE SYNONYM _edatemp/SYSDUM1 DROP
   FOR SYSIBM.SYSDUMMY1
   DBMS DB2
END
TABLE FILE _edatemp/SYSDUM1
PRINT *
END

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


Information Builders