Calling ADABAS with ACBX

Example program ASMADA9 calls ADABAS version 8.5 with ACBX and multi-fetch to read the sample “Employee” file number 2.

The ACBX copybook is unchanged however a small modification has been made to the ADABDX macro to allow equates to be expanded and the different ABD’s for format buffer, record buffer, search buffer, value buffer, etc. to be coded (see modified ADABDX).

The file is read using descriptor AA (A8) employee number retrieving chunks of 100 records per call. This is unblocked after calling ADABAS by examining each 16 byte entry of the multi-fetch buffer for response code zero, or three (EOF). The number of records returned in the call is indicated in (MBCOUNT), the first full word of the multi-fetch data area.

The JCL to run the assembled/linked program is as follows, with the ADARUN card specifying PROG=RENTUSER to indicate the fully reentrant ADABAS link module is to be used. The calling parameters to do this are shown in the source of ASMADA9, see contents of nine full words stored into ADAPAL:

//NRUNADA9 JOB (0010),'RUN ASMADA9',                                   
//          NOTIFY=&SYSUID.,                                           
//          REGION=0M,                                                 
//          CLASS=A,                                                   
//          MSGLEVEL=(1,1),                                            
//          MSGCLASS=X                                                 
//         EXPORT SYMLIST=*                                            
//         SET HLQ=<TSO-ID>                                              
//         SET MLQ=<PROJECT>                                             
//JOBLIB   DD DISP=SHR,DSN=&HLQ..&MLQ..LOAD                         
//SYSOUT    DD   SYSOUT=*                                              
//SYSPRINT  DD   SYSOUT=*                                   
//DDPRINT   DD   SYSOUT=*                                   
//DDDRUCK   DD   SYSOUT=*                                   
//DDCARD    DD   *                                          

Sample output is show below:

ASMADA: OPEN DONE                                                          
ASMADA: READ DONE 11100102EDGAR               PETER               SCHINDLER
ASMADA: READ DONE 11100105CHRISTIAN                               SCHIRM   
.. many records ..
ASMADA: READ DONE 60016228SONIA               JACOTOT             MARTINEZ     
ASMADA: READ DONE 60016231ARTURO              DE LA HOZ           SERRANO      
ASMADA: READ DONE 60016233JORGE               BELTRAN             DE LA IGLESIA
ASMADA: READ DONE 60016287ROBERTO                                 OSEA         
ASMADA: END OF DATA                                                            
ASMADA: CLOSE DONE                                                             
ASMADA9: Records read:   1107                                                  
ASMADA9: Using L3 commands:     12