Version 2.4.1
 —  Installation Manual for BS2000/OSD  —

INSTALLATION

Predict Version 3.4 or above is a prerequisite for the installation of Adabas Native SQL. Please check which version of Predict is installed.

The Adabas files and fields that will be used by Adabas Native SQL application programs must be defined in the data dictionary.

Version 2.2B of the COBOL compiler is a prerequisite for successful use of Adabas Native SQL. If you use an older version of the compiler, the object modules generated by your compiler may not be compatible with the Software AG-supplied routines RESPINT, PRTRACE and PRTFLOW; in this case, you must recompile these three routines from the source files supplied on the medium.

This document covers the following topics:


Copying the Medium Contents to Disk

If you are using System Maintenance Aid (SMA), refer to the SMA documentation (included on the current edition of the Natural documentation CD).

If you are not using SMA, use the procedure described below. In this procedure, the values specified below must be supplied. To copy the datasets from medium to disk, perform the following steps:

Step 1: Copy the Library SRVnnn.LIB from Medium to Disk

This step is not necessary if you have already copied the library SRVnnn.LIB from another Software AG medium. For more information, refer to the element #READ-ME in this library. The library SRVnnn.LIB is stored on the medium as the sequential file SRVnnn.LIBS containing LMS commands. The current version nnn can be obtained from the Software AG Product Delivery Report. To convert this sequential file into an LMS-library, execute the following commands:

/IMPORT-FILE  SUPPORT=*TAPE(FILE-NAME=SRVnnn.LIBS, -
/   VOLUME=<volser>, DEV-TYPE=<tape-device>)
/ADD-FILE-LINK  LINK-NAME=EDTSAM, FILE-NAME=SRVnnn.LIBS, -
/   SUPPORT=*TAPE(FILE-SEQ=3), ACC-METH=*BY-CAT, -
/   BUF-LEN=*BY-CAT, REC-FORM=*BY-CAT, REC-SIZE=*BY-CAT
/START-EDT 
@READ  '/'
@SYSTEM 'REMOVE-FILE-LINK  EDTSAM'
@SYSTEM 'EXPORT-FILE  FILE-NAME=SRVnnn.LIBS'
@WRITE  'SRVnnn.LIBS'
@HALT
/ASS-SYSDTA  SRVnnn.LIBS
/MOD-JOB-SW  ON=1
/START-PROG  $LMS
/MOD-JOB-SW  OFF=1
/ASS-SYSDTA  *PRIMARY

Where:

<tape-device> is the device-type of the tape, e.g. TAPE-C4.
<volser> is the VOLSER of the tape.

Step 2: Copy the Procedure COPY.PROC from Medium to Disk

To copy the procedure COPY.PROC to disk, call the procedure P.COPYTAPE in the library SRVnnn.LIB:

  /CALL-PROCEDURE  (SRVnnn.LIB,P.COPYTAPE), -
  /   (VSNT=<volser>, DEVT=<tape-device>)

If you use a TAPE-C4 device, you may omit the parameter DEVT.

Step 3: Copy all Product Files from Medium to Disk

To copy all Software AG product files from medium to disk, enter the procedure COPY.PROC:

/ENTER-PROCEDURE  COPY.PROC, DEVT=<tape-device>

If you use a TAPE-C4 device, you may omit the parameter DEVT. The result of this procedure 
is written to the file 'L.REPORT.SRV'. 

Top of page

Relinking Adabas Native SQL

If a different Adabas interface module is to be used instead of the standard module ADAUSER, Adabas Native SQL must be relinked. The procedure PLINK can be used to link ADASQL.

The prelinked Adabas Native SQL module is in SQLnnn.MOD, and it has the name SQLPRE.

The module ADAUSER reads ADARUN parameters via SYSDTA. If an alternative module is used, this dataset may not be needed.

Top of page

Modifying the Procedure PSQL

Modify (edit) the supplied procedure PSQL as required and then execute the example programs. The following specifications in the procedures should be adapted to suit the system environment. The names of the procedure parameters are given in square brackets [ ], and the default values are given in parentheses ( ).

Top of page

Modifying the Global Parameters

The global parameters for Adabas Native SQL, which are stored in the file D.ADAGLOB (FCBTYPE=SAM, RECFORM=V), must also be modified.

The error message texts for decoding preprocessor-time errors are typically stored in the Natural system file, specified by the global SYSFILE FNAT parameter.

The error messages for decoding run-time errors are typically stored in the data dictionary file. If this is not the case, use the global parameter ABORT FILE to specify the location (number) of this file.

See chapter Global Parameters in the Adabas Native SQL Reference Manual for further information.

Typical global parameter definitions:

SYSFILE FDIC=(1,11) FNAT=(1,8).
LANG COBOL.
XREF ON.
ABORT FILE=8.

Top of page

Testing Adabas Native SQL

Before testing the examples, check that the files EMPLOYEES and VEHICLES are loaded, and that they are documented in the Predict data dictionary. If the file definitions are not yet present in the data dictionary, they can be loaded from the file PRDnnn.DEMO, which can be found on the Predict installation medium. The notation nnn represents the Version, Release and SM level of Predict at your site. Ensure that the relationships for soft coupling are defined in the data dictionary. If you wish to use Adabas Native SQL to preprocess FORTRAN programs, ensure that the necessary language synonyms are defined in the data dictionary. See for example Appendix B in the Adabas Native SQL Reference Manual.

The procedure PSQL executes the following steps:

  1. Preprocess the program with Adabas Native SQL;

  2. Compile the preprocessed program (ADA, COBOL, FORTRAN or PL/I);

  3. Link-edit the program. The following modules may be called by the user program at runtime:

    COBOL PL/I Description
    RESPINT (C) RESPINT (C,P) Error handling routine.
    PRTRACE (C) PRTRACE (C,P) Runtime trace routine. Activated by the error handling routine if MODE TRACE is set.
    PRTFLOW (C) PRTFLOW (C,P) Runtime Adabas Native SQL statement printing. Activated if MODE FLOW is set.
    FINDCID (A) FINDCID (A) Generates dynamic Adabas command IDs. Activated if OPTION DYNAMCID is set.
    PRPABEND (A) PRPABEND (A) Terminates program execution. Called by the error handling routine.
    SQFRDATE (C) SQFRDATE (C) Routine which converts format D number to numeric date.
    SQFRTIME (C) SQFRTIME (C) Routine which converts format T number to numeric date and numeric time.
    SQTODATE (C) SQTODATE (C) Routine which converts numeric date to format D number.
    SQTOTIME (C) SQTOTIME (C) Routine which converts numeric date and numeric time to format T number.
    Ada FORTRAN Description
    RESPF (F) RESPF(F) Error handling routine.
    PRTRAC (F) PRTRAC (F) Runtime trace routine. Activated by the error handling routine if MODE TRACE is set.
    PRTFLO (F) PRTFLO (F) Runtime Adabas Native SQL statement printing. Activated if MODE FLOW is set.
    FCID (A) FCID (A) Generates dynamic Adabas command IDs. Activated if OPTION DYNAMCID is set.
    PRPABEND (A) -- Terminates program execution. Called by the error handling routine.
    SQFRDATE (C) SQFRDATE (C) Routine which converts format D number to numeric date.
    SQFRTIME (C) SQFRTIME (C) Routine which converts format T number to numeric date and numeric time.
    SQTODATE (C) SQTODATE (C) Routine which converts numeric date to format D number.
    SQTOTIME (C) SQTOTIME (C) Routine which converts numeric date and numeric time to format T number.

    Notes:

    1. The FORTRAN error handling routine RESPF always returns condition code 8 when the job step terminates. The other error handling routines return the Adabas response code.
    2. Note: The characters in parentheses indicate the language in which the routines are written (Assembler, COBOL, FORTRAN or PL/I). Only the Assembler and COBOL modules are supplied in object form; if you wish to use FORTRAN or PL/I modules, you must compile the source modules.
    3. The COBOL object modules of the routines RESPINT, PRTRACE and PRTFLOW supplied by Software AG can be linked with PL/I object modules to produce an executable load module. If you wish to use the PL/I versions of these routines, you must rename them: RESPPL1 - RESPINT, PRTRACP - PRTRACE, PRTFLOP - PRTFLOW, and then compile them, replacing the Software AG-supplied COBOL object modules by the PL/I object modules. The global parameter ABORT PLI should be coded. The procedure as supplied links the standard Adabas interface module ADAUSER to the application program. If a different module is used, the procedure must be modified accordingly.

    Finally, the linked program (load module) is stored with the name M.membername;

  4. Execute the program.

    All listings generated by this procedure are given names starting with L. (SYSLST, SRCLINK, ERRLINK).

    If the program is to be passed through other preprocessors in addition to Adabas Native SQL, the corresponding job step should be included in the procedure following the Adabas Native SQL step and preceding compilation.

Top of page

File Names

The files used by Adabas Native SQL are listed below:

Name Description
ADAGLOB The global parameter definitions.
ADAIN The source program to be preprocessed.
ADAMES Adabas Native SQL writes messages at preprocessing time to this dataset.
ADAOUT The output of the preprocessor. Embedded Adabas Native SQL statements in the source program appear in this file as comments and are followed by the generated Ada, COBOL, FORTRAN or PL/I code.
ADAOUT1 A temporary work file.
ADDOUT A temporary work file.
DDLNKPAR Defines the IDTNAME on which the Native SQL is running (for the ADALNK module.
SYSLST Adabas Native SQL writes messages to this file if it abends.

These files are defined in the procedure PSQL. Each file name is prefixed with "D", for example D.ADAMES.

At run time, the execution of the Adabas Native SQL program requires the presence of a link name DDLIB which points to the Adabas Library containing the ADALNK. Also present, must be a link name DDLNKPAR pointing to a file containing: ADALNK IDTNAME=<idtname> where <idtname> is the BS2000 IDTNAME on which the database data to be accessed is available. The application program generated by Adabas Native SQL uses the following file names to refer to files (in addition to any other user-defined files):

Name Description
SYSLST If the FLOW facility is used, the flow-tracing output is written to this file.
TSTDMP If the TRACE facility is used, the trace output is written to this file.

Top of page