ADACALL Utility - Issuing Adabas Direct Calls

The utility ADACALL can be used to issue Adabas direct calls (native commands) to an Adabas database for learning and testing and for analyzing problems.

The utility ADACALL is contained in the library SYSADA.

The ADACALL Utility - Issuing Adabas Direct Calls documentation covers the following topics:


Invoking ADACALL

Beginn der Anweisungsliste To invoke ADACALL

  • Enter the following system command:

    SYSADA

    An ADACALL main screen similar to the example screen below is displayed:

    15:53:32             ***** NATURAL ADACALL UTILITY *****             2006-12-14
     User SAG                  - ADABAS Direct Calls -                             
     Mode Char                                                    Call No. 45      
     *** Control Block ***         First Byte 30                                   
      Cmd L3        Cmd ID SAG           File 316             Database 10          
     Resp 0            ISN 382            ISQ 0                    ISL 0           
      FBL 210          RBL 980            SBL 140     VBL 140      IBL 0           
     COP1             COP2          User Area                 Cmd Time 4           
     Addition1        Addition2  Addition3        Addition4        Addition5       
     AA]?             227  48                                                      
     *** Buffer Areas ***                                                          
     Format  AA,AC,AE.                                                             
                                                                                   
     Record  11111003ARTHUR               DENT                                     
                                                                                   
     Search                                                                        
                                                                                   
      Value                                                                        
                                                                                   
        ISN                                                                        
    Command ===>                                                                   
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
          Help  Main  Exit              Char  Hex   View  Prnt  Run   Init  Canc

On the ADACALL main screen, specify the necessary parameter values and execute the Adabas command by either choosing PF10 (Run) or entering the ADACALL command EXEC in the Command line.

In the example screen above, the Adabas command L3 was executed for a logical read of the employees file.

Except for the control block, which is shown in full, only a part of the buffer is displayed. You can view the buffers in their entirety by using any of the ADACALL direct commands or PF keys listed below.

ADACALL Parameters

The parameters which can be specified on the ADACALL main screen are listed below. You can use the ADACALL online help function to obtain a summarized explanation of the parameters.

Beginn der Anweisungsliste To invoke the online help function

  • Place the cursor in the field for which you require help and enter a question mark (?) or choose PF1. (For read-only fields, only PF1 applies.)

For detailed information, see the Adabas documentation Command Reference and Messages and Codes.

Parameter Explanation
Mode
Indicates the display mode of the buffer contents:
   
Char Character values.
   
Hex Hexadecimal values.
   
To change modes, see the ADACALL commands CHAR and HEX.
Call No. Number of commands executed since the start of the session.
First Byte The first byte of the Adabas control block.

Indicates whether 1-byte or 2-byte database IDs (DBID) and file numbers (FNR) are used:

H'00' = 1-byte DBID, FNR (file numbers 1 - 255)
H'30' = 2-byte DBID, FNR (file numbers greater than 255)

Cmd

Adabas command.

Enter and execute the Adabas OP command to specify the parameters described in the relevant section below.

Cmd ID Command ID.
File File number.

If First Byte is set to H'00':
3-digit file number, Database not equal to 0.

If First Byte is set to H'30':
5-digit file number.

Database Database ID (DBID). Defaults to the DBID of the FUSER file of the current Natural session (see File above).

If First Byte is set to H'30', then the database number will be moved to the response code field of the Adabas control block at execution time.

Resp Response code returned after the command is executed.
ISN Internal sequence number.
ISQ ISN quantity.
ISL Lowest ISN value for ISN lists.
FBL Format buffer length in bytes (maximum 210).
RBL Record buffer length in bytes (maximum 980).
SBL Search buffer length in bytes (maximum 140).
VBL Value buffer length in bytes (maximum 140).
IBL ISN buffer length in bytes (maximum 200).
COP1 Command option 1.
COP2 Command option 2.
User Area User area for the control block.
Cmd Time The time taken to execute the command, converted to 1/100th seconds for convenience.
Addition1 Additions 1.
Addition2 Additions 2. If the call was successful, it displays the compressed length of the record being read and the decompressed length of the data requested via the format buffer. If a non-zero response is returned and the error was a result of an invalid format buffer, the field in error and its offset into the format buffer are displayed.
Addition3 Additions 3.
Addition4 Additions 4. If a VSAM file is being read, this field is set to VSAM if initialized.
Addition5 Additions 5.
Format Format buffer. (The final period is necessary.)
Record Record buffer.
Search Search buffer. (The final period is necessary.)
Value Value buffer.
ISN ISN buffer.

Adabas OP Command

When you execute the Adabas command OP (Open), ADACALL provides a window where you can specify the following parameters:

  • maximum ISNs to be stored in the internal ISN buffer,

  • maximum records permitted in hold status,

  • maximum CIDs (command IDs) which may be active,

  • maximum time permitted for execution of an Sx command.

In the window, enter the relevant information and choose ENTER.

For an explanation of the parameters and valid values, refer to the Adabas Command Reference documentation.

ADACALL Commands and PF Keys

The ADACALL direct commands listed below are provided to change ADACALL parameter settings or to switch between screens by either entering a command in the Command line or choosing a corresponding PF key.

In addition to ADACALL commands, from the Command line, you can also issue Natural system commands.

In the following table, an underlined portion of a command represents an acceptable abbreviation.

Command PF Key Function
  PF1 Invoke the help function for ADACALL. If the cursor is positioned on one of the various ADACALL parameters and PF1 is pressed, help information on this parameter is displayed.
  PF2 Return to the ADACALL main screen. Mode is set to CHAR.
BACK PF5 Page backward to the previous buffer when viewing the buffers in their entirety.

Valid only after the VIEW command has been applied, which means that the command is not applicable from the ADACALL main screen.

CB   Display the control block buffer entirely; valid in hexadecimal mode only.
CHAR PF6 Change the current mode to character mode (EBCDIC).
D   Display extended error message text for response code received. When an Adabas response other than 0 (zero) is returned, the corresponding short error message text is displayed in the message line. The extended text can be viewed by issuing this command.
EXEC

or

RUN

PF10 Execute the direct command with the parameters specified.
EXIT

or

STOP

or

Q

or

.

PF3

or

PF12

Exit. If pressed while on the ADACALL main screen, ADACALL is terminated. If one of the buffer screens is being viewed, the ADACALL main screen is displayed with Mode unchanged.
FB   Display the format buffer in its entirety.
FWD PF4 Page forward to the next buffer when viewing the buffers in their entirety.

Valid only after the VIEW command has been applied, which means that the command is not applicable from the ADACALL main screen.

HEX PF7 Change the current mode to hexadecimal.
IB   Display the ISN buffer in its entirety.
INIT PF11
Initialize/reset buffer(s). A window is displayed and one of the following values can be entered for the buffers indicated:
   
H Initialize the corresponding buffer(s) with binary zeroes (H'00').
   
any character
except H or blank
Initialize the corresponding buffer(s) with blanks (H'40').
   
blank character Do not initialize the corresponding buffer(s).
   
If you enter INIT ALL, all buffers except the control block are initialized with blanks. Alternatively, the command INIT FB RB SB VB IB (not all buffers need be listed) can be specified and all buffers in the list are initialized with blanks.

Anmerkung:
The ISN buffer is always initialized with binary zeroes.

PRINT PF9 Generate and display a report on the status of all buffers.

The Natural terminal command %H can be used to obtain a hardcopy.

RB   Display the record buffer in its entirety.
RUN   Same as EXEC.
SB   Display the search buffer in its entirety.
VB   Display the value buffer in its entirety.
VIEW PF8
Display all buffers in their entirety. The first buffer to be displayed is the record buffer. The FWD command can be used to page through the other buffers.

If you VIEW the record buffer in hexadecimal mode, the data are displayed on four pages:

To page forwards, enter the command FWD or choose PF4.
To page backwards, enter the command BACK or choose PF5.
To display a specific page, enter a page number from 1 to 4 in the field Specify next page number.

 
To view buffers individually, enter any of the following commands:
 
FB Format buffer
   
RB Record buffer
   
SB Search buffer
   
VB Value buffer
   
IB ISN buffer
   
CB Control block (default). Valid in hexadecimal mode only: change to HEX before executing VIEW.
VSAM   If VSAM has been defined for the current Natural session, this direct command can be issued to access or update VSAM files. When you issue this command, you are prompted by a window for the VSAM file name. When the command is executed, it is directed to the appropriate VSAM file.

User Exit ADAEXIT

ADACALL allows direct commands to be issued to any database. Therefore, as a means of security, a user exit is supplied. This user exit is called ADAEXIT and is contained in the library SYSADA. You can modify ADAEXIT as required. The Adabas control block is passed as a parameter to ADAEXIT. You can change the source code of the user exit so as to modify the contents of the control block. By simply changing the database ID or file number, or by setting the Command Code to XX, you can prevent database calls from being performed.