The DB2 Query Access Method is used to read rows from an SQL select statement result set, and the DB2 DCLGN Access Method is used to generate the Data Control Language (DCL) that describes the query.
The DB2 Query and DCLGN are used to return rows from a result set and the DCL respectively of a given DB2 select statement. The DB2 Query access method returns a record with each column or field at a fixed offset from the start of the record. The DCLGN access method, on the other hand, returns Line Feed delimited text. This text can be supplied direct to the Code Magus dcl2book in order to generate a COBOL copy book to map the columns or to Code Magus dcl2load to create load statements to use the DB2 load facility for loading the data directly into (another) DB2 table. For the Query access method the caller can decide whether to place any null indicators before or after a nullable column and what character to use to identify that a column is null. The user is also required to supply the DB2 credentials to be used; these are the subsystem or instance name, the user ID, the password and the plan name (usually DB2QUERY or DB2DCLGN; decided at installation time).