Version 2.4.1
 —  Adabas Native SQL Reference Manual  —

APPENDIX I - EXAMPLE OF FORTRAN CODE GENERATED BY ADABAS NATIVE SQL

      PROGRAM FEX1                                                      00000010
C       AN EXAMPLE OF SOFT COUPLING WITH A SEARCH CRITERION WHICH       00000020
C       CONTAINS FIELDS TAKEN FROM TWO FILES. THE FIELDS PERSONNEL-ID   00000030
C       NAME, FIRST-NAME, BIRTH AND SEX (FROM THE MAIN FILE,            00000040
C       PERSONNEL-ID) ARE PRINTED FOR RECORDS THAT SATISFY THE          00000050
C       FOLLOWING CONDITION:                                            00000060
C           PERSONNEL-ID BETWEEN 10000001 AND 19999999                  00000070
C           MODEL-YEAR-MAKE >                                           00000080
C           CLASS = 'C'                                                 00000090
      CHARACTER*22  STARTS                                              00000100
      CHARACTER*20  STARTM  /'MERCEDES BENZ'/                           00000110
      CHARACTER*2   STAYM   /'86'/                                      00000120
      EQUIVALENCE  (STARTS,STARTM)                                      00000130
      EQUIVALENCE  (STARTS(21:21),STAYM)                                00000140
C                                                                       00000150
*                                                                       00000160
*          EXEC ADABAS                                                  00000170
*     BEGIN DECLARE SECTION                                             00000180
*          END-EXEC                                                     00000190
*                                                                       00000200
      INTEGER*2 SQLCOD /0/                                               ADABAS
      CHARACTER*     2 SQC000                          /'AS'   /         ADABAS
      CHARACTER*     2 SQCC00                          /' '    /         ADABAS
      CHARACTER*     4 SQCI00                          /'OPEN' /         ADABAS
      INTEGER*       2 SQCF00                          /     0 /         ADABAS
      INTEGER*       2 SQCR00                          /     0 /         ADABAS
      INTEGER*       4 SQCS00                          /     0 /         ADABAS
      INTEGER*       4 SQCL00                          /     0 /         ADABAS
      INTEGER*       4 SQCQ00                          /     0 /         ADABAS
      INTEGER*       2 SQC300                          /     0 /         ADABAS
      INTEGER*       2 SQC400                          /     0 /         ADABAS
      INTEGER*       2 SQC500                          /     0 /         ADABAS
      INTEGER*       2 SQC600                          /     0 /         ADABAS
      INTEGER*       2 SQC700                          /     4 /         ADABAS
      CHARACTER*     1 SQC100                          /' '    /         ADABAS
      CHARACTER*     1 SQC200                          /' '    /         ADABAS
      CHARACTER*     8 SQCM00                          /' '    /         ADABAS
      CHARACTER*     4 SQCN00                          /' '    /         ADABAS
      CHARACTER*     8 SQCO00                          /' '    /         ADABAS
      INTEGER*       2 SQCE00                          /     0 /         ADABAS
      INTEGER*       2 SQCH00                          /     0 /         ADABAS
      INTEGER*       2 SQCJ00                          /     0 /         ADABAS
      INTEGER*       2 SQCK00                          /     0 /         ADABAS
      INTEGER*       4 SQC800                          /     0 /         ADABAS
      INTEGER*       4 SQCT00                          /     0 /         ADABAS
      CHARACTER*     4 SQCU00                          /'AS  ' /         ADABAS
      CHARACTER*     4 SQC900                          /' '    /         ADABAS
      CHARACTER*     1 SQCD00                                            ADABAS
      CHARACTER*     2 SQCV00                                            ADABAS
      CHARACTER*     4 SQCW00                                            ADABAS
      CHARACTER*     8 SQCP00                                            ADABAS
      CHARACTER*     7 SQCG00                                            ADABAS
      CHARACTER*     1 SQCZ00                                            ADABAS
      CHARACTER*    80 SQCB00                                            ADABAS
      INTEGER*       2 SQCY00                                            ADABAS
      CHARACTER*     1 SQCA00(00080)                                     ADABAS
      EQUIVALENCE     (SQCA00(00001),SQCB00)                             ADABAS
      EQUIVALENCE     (SQCA00(00001),SQC000)                             ADABAS
      EQUIVALENCE     (SQCA00(00003),SQCC00)                             ADABAS
      EQUIVALENCE     (SQCA00(00005),SQCI00)                             ADABAS
      EQUIVALENCE     (SQCA00(00009),SQCF00)                             ADABAS
      EQUIVALENCE     (SQCA00(00009),SQCD00)                             ADABAS
      EQUIVALENCE     (SQCA00(00011),SQCR00)                             ADABAS
      EQUIVALENCE     (SQCA00(00013),SQCS00)                             ADABAS
      EQUIVALENCE     (SQCA00(00017),SQCL00)                             ADABAS
      EQUIVALENCE     (SQCA00(00021),SQCQ00)                             ADABAS
      EQUIVALENCE     (SQCA00(00025),SQC300)                             ADABAS
      EQUIVALENCE     (SQCA00(00027),SQC400)                             ADABAS
      EQUIVALENCE     (SQCA00(00029),SQC500)                             ADABAS
      EQUIVALENCE     (SQCA00(00031),SQC600)                             ADABAS
      EQUIVALENCE     (SQCA00(00033),SQC700)                             ADABAS
      EQUIVALENCE     (SQCA00(00035),SQC100)                             ADABAS
      EQUIVALENCE     (SQCA00(00036),SQC200)                             ADABAS
      EQUIVALENCE     (SQCA00(00037),SQCM00)                             ADABAS
      EQUIVALENCE     (SQCA00(00037),SQCV00)                             ADABAS
      EQUIVALENCE     (SQCA00(00037),SQCY00)                             ADABAS
      EQUIVALENCE     (SQCA00(00041),SQCW00)                             ADABAS
      EQUIVALENCE     (SQCA00(00045),SQCN00)                             ADABAS
      EQUIVALENCE     (SQCA00(00049),SQCO00)                             ADABAS
      EQUIVALENCE     (SQCA00(00057),SQCP00)                             ADABAS
      EQUIVALENCE     (SQCA00(00057),SQCE00)                             ADABAS
      EQUIVALENCE     (SQCA00(00059),SQCH00)                             ADABAS
      EQUIVALENCE     (SQCA00(00061),SQCJ00)                             ADABAS
      EQUIVALENCE     (SQCA00(00063),SQCK00)                             ADABAS
      EQUIVALENCE     (SQCA00(00065),SQC800)                             ADABAS
      EQUIVALENCE     (SQCA00(00065),SQCZ00)                             ADABAS
      EQUIVALENCE     (SQCA00(00066),SQCG00)                             ADABAS
      EQUIVALENCE     (SQCA00(00069),SQC900)                             ADABAS
      EQUIVALENCE     (SQCA00(00073),SQCT00)                             ADABAS
      EQUIVALENCE     (SQCA00(00077),SQCU00)                             ADABAS
      CHARACTER*     1 SQFB00                                            ADABAS
      CHARACTER*     1 SQSB00                                            ADABAS
      CHARACTER*     1 SQVB00                                            ADABAS
      CHARACTER*     1 SQDS00                                            ADABAS
      CHARACTER*   500 SQRB00                                            ADABAS
      CHARACTER*    10 SQDK00                                            ADABAS
      CHARACTER*     3 SQDD00                          /'030'  /         ADABAS
      CHARACTER*     8 SQDA00                                            ADABAS
      CHARACTER*    40 SQDB00(00020)                                     ADABAS
      CHARACTER*    40 SQDC00(00020)                                     ADABAS
      CHARACTER*     7 SQDE00                                            ADABAS
      INTEGER*       2 SQDG00                                            ADABAS
      INTEGER*       2 SQLRSP                                            ADABAS
      INTEGER*       4 SQLQTY                                            ADABAS
      INTEGER*       4 SQLISN                                            ADABAS
      CHARACTER*     8 SQDL00                                            ADABAS
      INTEGER*       2 SQDN00                                            ADABAS
      INTEGER*       4 SQDO00                                            ADABAS
      REAL*          4 SQDP00                                            ADABAS
      REAL*          8 SQDQ00                                            ADABAS
      CHARACTER*     1 SQDM00(00008)                                     ADABAS
      EQUIVALENCE     (SQDM00(00001),SQDL00)                             ADABAS
      EQUIVALENCE     (SQDM00(00001),SQDN00)                             ADABAS
      EQUIVALENCE     (SQDM00(00001),SQDO00)                             ADABAS
      EQUIVALENCE     (SQDM00(00001),SQDP00)                             ADABAS
      EQUIVALENCE     (SQDM00(00001),SQDQ00)                             ADABAS
      INTEGER*       2 SQDR00                                            ADABAS
      CHARACTER*     1 SQDF00                                            ADABAS
      CHARACTER*     1 SQDT00(00002)                                     ADABAS
      EQUIVALENCE     (SQDT00(00001),SQDR00)                             ADABAS
      EQUIVALENCE     (SQDT00(00002),SQDF00)                             ADABAS
      CHARACTER*    37 SQFB01                                            ADABAS
      CHARACTER*     1 SQFA01(00037)                                     ADABAS
      EQUIVALENCE     (SQFA01(00001),SQFB01)                             ADABAS
      CHARACTER*37 SQFC01/'AA,8,A,AE,20,A,AC,20,A,AH,6,U,AG,1,A.'/       ADABAS
      EQUIVALENCE     (SQFA01(00001),SQFC01)                             ADABAS
      CHARACTER*    59 SQSB01                                            ADABAS
      CHARACTER*     1 SQSA01(00059)                                     ADABAS
      EQUIVALENCE     (SQSA01(00001),SQSB01)                             ADABAS
      CHARACTER*40 SQSC01/'(22,AA,24,AC)/22/AA,8,A,S,AA,8,A,D,/24/A'/    ADABAS
      EQUIVALENCE     (SQSA01(00001),SQSC01)                             ADABAS
      CHARACTER*19 SQSD01/'O,22,A,GT,D,AH,1,A.'/                         ADABAS
      EQUIVALENCE     (SQSA01(00041),SQSD01)                             ADABAS
      EQUIVALENCE     (SQRA01(00001),SQRB01)                             ADADATA
      EQUIVALENCE     (SQRA01(00001),EMPLOY)                             ADADATA
      CHARACTER*     8 PID                                               ADADATA
      EQUIVALENCE     (SQRA01(00001),PID   )                             ADADATA
      CHARACTER*    20 NAME                                              ADADATA
      EQUIVALENCE     (SQRA01(00009),NAME  )                             ADADATA
      CHARACTER*    20 FIRSTN                                            ADADATA
      EQUIVALENCE     (SQRA01(00029),FIRSTN)                             ADADATA
      CHARACTER*     6 BIRTH                                             ADADATA
      EQUIVALENCE     (SQRA01(00049),BIRTH )                             ADADATA
      CHARACTER*     1 SEX                                               ADADATA
      EQUIVALENCE     (SQRA01(00055),SEX   )                             ADADATA
      CHARACTER*    55 EMPLOY                                            ADADATA
      CHARACTER*    55 SQRB01                                            ADADATA
      CHARACTER*     1 SQRA01(00055)                                     ADADATA
      EQUIVALENCE     (SQVA01(00001),SQVB01)                             ADABAS
      CHARACTER*     8 SQVC01                          /' '    /         ADABAS
      EQUIVALENCE     (SQVA01(00001),SQVC01)                             ADABAS
      CHARACTER*     8 SQVD01                          /' '    /         ADABAS
      EQUIVALENCE     (SQVA01(00009),SQVD01)                             ADABAS
      CHARACTER*    22 SQVE01                          /' '    /         ADABAS
      EQUIVALENCE     (SQVA01(00017),SQVE01)                             ADABAS
      CHARACTER*     1 SQVF01                          /' '    /         ADABAS
      EQUIVALENCE     (SQVA01(00039),SQVF01)                             ADABAS
      CHARACTER*    39 SQVB01                                            ADABAS
      CHARACTER*     1 SQVA01(00039)                                     ADABAS
      INTEGER*       4 SQDS01(00001)                                     ADABAS
      CHARACTER*     2 SQC001                          /'AS'   /         ADABAS
      CHARACTER*     2 SQCC01                          /' '    /         ADABAS
      CHARACTER*     4 SQCI01                          /'EMPL' /         ADABAS
      INTEGER*       2 SQCF01                          /    22 /         ADABAS
      INTEGER*       2 SQCR01                          /     0 /         ADABAS
      INTEGER*       4 SQCS01                          /     0 /         ADABAS
      INTEGER*       4 SQCL01                          /     0 /         ADABAS
      INTEGER*       4 SQCQ01                          /     0 /         ADABAS
      INTEGER*       2 SQC301                          /    37 /         ADABAS
      INTEGER*       2 SQC401                          /    55 /         ADABAS
      INTEGER*       2 SQC501                          /    59 /         ADABAS
      INTEGER*       2 SQC601                          /    39 /         ADABAS
      INTEGER*       2 SQC701                          /     4 /         ADABAS
      CHARACTER*     1 SQC101                          /' '    /         ADABAS
      CHARACTER*     1 SQC201                          /' '    /         ADABAS
      CHARACTER*     8 SQCM01                          /' '    /         ADABAS
      CHARACTER*     4 SQCN01                          /' '    /         ADABAS
      CHARACTER*     8 SQCO01                          /' '    /         ADABAS
      CHARACTER*     8 SQCP01                          /' '    /         ADABAS
      INTEGER*       4 SQC801                          /     0 /         ADABAS
      INTEGER*       4 SQCT01                          /     0 /         ADABAS
      CHARACTER*     4 SQCU01                          /'AS  ' /         ADABAS
      CHARACTER*     4 SQC901                          /' '    /         ADABAS
      CHARACTER*     1 SQCD01                                            ADABAS
      CHARACTER*     2 SQCV01                                            ADABAS
      CHARACTER*     4 SQCW01                                            ADABAS
      CHARACTER*     7 SQCG01                                            ADABAS
      CHARACTER*     1 SQCZ01                                            ADABAS
      CHARACTER*    80 SQCB01                                            ADABAS
      INTEGER*       2 SQCY01                                            ADABAS
      CHARACTER*     1 SQCA01(00080)                                     ADABAS
      EQUIVALENCE     (SQCA01(00001),SQCB01)                             ADABAS
      EQUIVALENCE     (SQCA01(00001),SQC001)                             ADABAS
      EQUIVALENCE     (SQCA01(00003),SQCC01)                             ADABAS
      EQUIVALENCE     (SQCA01(00005),SQCI01)                             ADABAS
      EQUIVALENCE     (SQCA01(00009),SQCF01)                             ADABAS
      EQUIVALENCE     (SQCA01(00009),SQCD01)                             ADABAS
      EQUIVALENCE     (SQCA01(00011),SQCR01)                             ADABAS
      EQUIVALENCE     (SQCA01(00013),SQCS01)                             ADABAS
      EQUIVALENCE     (SQCA01(00017),SQCL01)                             ADABAS
      EQUIVALENCE     (SQCA01(00021),SQCQ01)                             ADABAS
      EQUIVALENCE     (SQCA01(00025),SQC301)                             ADABAS
      EQUIVALENCE     (SQCA01(00027),SQC401)                             ADABAS
      EQUIVALENCE     (SQCA01(00029),SQC501)                             ADABAS
      EQUIVALENCE     (SQCA01(00031),SQC601)                             ADABAS
      EQUIVALENCE     (SQCA01(00033),SQC701)                             ADABAS
      EQUIVALENCE     (SQCA01(00035),SQC101)                             ADABAS
      EQUIVALENCE     (SQCA01(00036),SQC201)                             ADABAS
      EQUIVALENCE     (SQCA01(00037),SQCM01)                             ADABAS
      EQUIVALENCE     (SQCA01(00037),SQCV01)                             ADABAS
      EQUIVALENCE     (SQCA01(00037),SQCY01)                             ADABAS
      EQUIVALENCE     (SQCA01(00041),SQCW01)                             ADABAS
      EQUIVALENCE     (SQCA01(00045),SQCN01)                             ADABAS
      EQUIVALENCE     (SQCA01(00049),SQCO01)                             ADABAS
      EQUIVALENCE     (SQCA01(00057),SQCP01)                             ADABAS
      EQUIVALENCE     (SQCA01(00065),SQC801)                             ADABAS
      EQUIVALENCE     (SQCA01(00065),SQCZ01)                             ADABAS
      EQUIVALENCE     (SQCA01(00066),SQCG01)                             ADABAS
      EQUIVALENCE     (SQCA01(00069),SQC901)                             ADABAS
      EQUIVALENCE     (SQCA01(00073),SQCT01)                             ADABAS
      EQUIVALENCE     (SQCA01(00077),SQCU01)                             ADABAS
      INTEGER*       4 SQDH01                                            ADABAS
      INTEGER*       4 SQDJ01                                            ADABAS
      INTEGER*       2 SQDI01                                            ADABAS
      LOGICAL*       1 SQEF01                          /.FALSE./         ADABAS
      INTEGER*       2 SQDR01                                            ADABAS
      CHARACTER*     1 SQDF01                                            ADABAS
      CHARACTER*     1 SQDT01(00002)                                     ADABAS
      EQUIVALENCE     (SQDT01(00001),SQDR01)                             ADABAS
      EQUIVALENCE     (SQDT01(00002),SQDF01)                             ADABAS
C                                                                       00000210
*                                                                       00000220
*          EXEC ADABAS                                                  00000230
*     DECLARE EMPL CURSOR FOR                                           00000240
*     SELECT PERSONNEL-ID, NAME, FIRST-NAME, BIRTH, SEX                 00000250
*     FROM EMPLOYEES, VEHICLES                                          00000260
*     WHERE EMPLOYEES.PERSONNEL-ID = VEHICLES.PERSONNEL-ID              00000270
*           AND PERSONNEL-ID BETWEEN '10000001' AND '19999999'          00000280
*           AND VEHICLES.MODEL-YEAR-MAKE > :STARTS                      00000290
*           AND VEHICLES.CLASS = 'C'                                    00000300
*          END-EXEC                                                     00000310
*                                                                       00000320
C                                                                       00000330
      WRITE (6,10)                                                      00000340
C                                                                       00000350
*                                                                       00000360
*          EXEC ADABAS                                                  00000370
*     OPEN EMPL                                                         00000380
*          END-EXEC                                                     00000390
*                                                                       00000400
           SQVC01 ='10000001'                                            ADABAS
           SQVD01 ='19999999'                                            ADABAS
           SQVE01 =STARTS                                                ADABAS
           SQVF01 ='C'                                                   ADABAS
      SQDA00='00000400'                                                  ADABAS
      SQDB00(01)='           EXEC ADABAS                  '              ADABAS
      SQDC00(01)='                                        '              ADABAS
      SQDB00(02)='      OPEN EMPL                         '              ADABAS
      SQDC00(02)='                                        '              ADABAS
      SQDB00(03)='           END-EXEC                     '              ADABAS
      SQDC00(03)='                                        '              ADABAS
      SQDG00=03                                                          ADABAS
      SQDH01=SQC701 / 4                                                  ADABAS
      SQDI01=1                                                           ADABAS
      SQCL01=0                                                           ADABAS
      SQCQ01=0                                                           ADABAS
      SQC201=' '                                                         ADABAS
      SQC101=' '                                                         ADABAS
      SQC701=0                                                           ADABAS
      SQDR01=188                                                         ADABAS
      SQCD01=SQDF01                                                      ADABAS
      SQCC01='S1'                                                        ADABAS
      CALL  ADABAS    (                                                  ADABAS
     1  SQCB01,SQFB01,SQRB01,SQSB01,SQVB01,                              ADABAS
     1  SQDS01                                            )              ADABAS
      SQLRSP=SQCR01                                                      ADABAS
      SQLQTY=SQCQ01                                                      ADABAS
      SQLISN=SQCS01                                                      ADABAS
      IF (SQCR01 .NE. 0                                                  ADABAS
     1  ) THEN                                                           ADABAS
       CALL RESPF  (                                                     ADABAS
     1  SQCB01,SQDD00,SQDA00,SQFB01,SQRB01,SQSB01,                       ADABAS
     1  SQVB01,SQDB00,SQDC00,SQDE00,SQDG00)                              ADABAS
           END IF                                                        ADABAS
      SQDJ01=SQCQ01                                                      ADABAS
      IF (SQDJ01 .GT. 0) THEN                                            ADABAS
          SQEF01=.FALSE.                                                 ADABAS
        ELSE                                                             ADABAS
          SQEF01=.TRUE.                                                  ADABAS
        END IF                                                           ADABAS
      IF (SQDJ01 .LT. SQDH01) SQDH01=SQDJ01                              ADABAS
      SQDI01=0                                                           ADABAS
C                                                                       00000410
*                                                                       00000420
*          EXEC ADABAS                                                  00000430
*     FETCH EMPL                                                        00000440
*          END-EXEC                                                     00000450
*                                                                       00000460
      SQDA00='00000460'                                                  ADABAS
      SQDB00(01)='           EXEC ADABAS                  '              ADABAS
      SQDC00(01)='                                        '              ADABAS
      SQDB00(02)='      FETCH EMPL                        '              ADABAS
      SQDC00(02)='                                        '              ADABAS
      SQDB00(03)='           END-EXEC                     '              ADABAS
      SQDC00(03)='                                        '              ADABAS
      SQDG00=03                                                          ADABAS
      IF (SQDI01 .EQ. SQDJ01) SQEF01=.TRUE.                              ADABAS
      IF (.NOT. SQEF01) THEN                                             ADABAS
      SQEF01=.FALSE.                                                     ADABAS
      SQC201='N'                                                         ADABAS
      SQC101=' '                                                         ADABAS
      SQDR01=188                                                         ADABAS
      SQCD01=SQDF01                                                      ADABAS
      SQCC01='L1'                                                        ADABAS
      CALL  ADABAS    (                                                  ADABAS
     1  SQCB01,SQFB01,SQRB01,SQSB01,SQVB01,                              ADABAS
     1  SQDS01                                            )              ADABAS
      SQLRSP=SQCR01                                                      ADABAS
      SQLQTY=SQCQ01                                                      ADABAS
      SQLISN=SQCS01                                                      ADABAS
      IF (SQCR01 .EQ. 3) THEN                                            ADABAS
        SQEF01=.TRUE.                                                    ADABAS
      ELSE                                                               ADABAS
     1IF (SQCR01 .NE. 0                                                  ADABAS
     1  ) THEN                                                           ADABAS
       CALL RESPF  (                                                     ADABAS
     1  SQCB01,SQDD00,SQDA00,SQFB01,SQRB01,SQSB01,                       ADABAS
     1  SQVB01,SQDB00,SQDC00,SQDE00,SQDG00)                              ADABAS
           END IF                                                        ADABAS
      END IF                                                             ADABAS
      IF (SQEF01) THEN                                                   ADABAS
         SQLCOD=003                                                      ADABAS
      ELSE                                                               ADABAS
         SQLCOD=0                                                        ADABAS
      END IF                                                             ADABAS
C                                                                       00000470
    1 IF (SQLCOD .EQ. 3) GOTO 2                                         00000480
C                                                                       00000490
         WRITE (6,20) PID,NAME,FNAME,BIRTH,SEX                          00000500
C                                                                       00000510
*                                                                       00000520
*             EXEC ADABAS                                               00000530
*        FETCH EMPL                                                     00000540
*             END-EXEC                                                  00000550
*                                                                       00000560
      SQDA00='00000560'                                                  ADABAS
      SQDB00(01)='              EXEC ADABAS               '              ADABAS
      SQDC00(01)='                                        '              ADABAS
      SQDB00(02)='         FETCH EMPL                     '              ADABAS
      SQDC00(02)='                                        '              ADABAS
      SQDB00(03)='              END-EXEC                  '              ADABAS
      SQDC00(03)='                                        '              ADABAS
      SQDG00=03                                                          ADABAS
      IF (SQDI01 .EQ. SQDJ01) SQEF01=.TRUE.                              ADABAS
      IF (.NOT. SQEF01) THEN                                             ADABAS
      SQEF01=.FALSE.                                                     ADABAS
      SQC201='N'                                                         ADABAS
      SQC101=' '                                                         ADABAS
      SQDR01=188                                                         ADABAS
      SQCD01=SQDF01                                                      ADABAS
      SQCC01='L1'                                                        ADABAS
      CALL  ADABAS    (                                                  ADABAS
     1  SQCB01,SQFB01,SQRB01,SQSB01,SQVB01,                              ADABAS
     1  SQDS01                                            )              ADABAS
      SQLRSP=SQCR01                                                      ADABAS
      SQLQTY=SQCQ01                                                      ADABAS
      SQLISN=SQCS01                                                      ADABAS
      IF (SQCR01 .EQ. 3) THEN                                            ADABAS
        SQEF01=.TRUE.                                                    ADABAS
      ELSE                                                               ADABAS
     1IF (SQCR01 .NE. 0                                                  ADABAS
     1  ) THEN                                                           ADABAS
       CALL RESPF  (                                                     ADABAS
     1  SQCB01,SQDD00,SQDA00,SQFB01,SQRB01,SQSB01,                       ADABAS
     1  SQVB01,SQDB00,SQDC00,SQDE00,SQDG00)                              ADABAS
           END IF                                                        ADABAS
      END IF                                                             ADABAS
      IF (SQEF01) THEN                                                   ADABAS
         SQLCOD=003                                                      ADABAS
      ELSE                                                               ADABAS
         SQLCOD=0                                                        ADABAS
      END IF                                                             ADABAS
C                                                                       00000570
      GOTO 1                                                            00000580
C                                                                       00000590
    2 CONTINUE                                                          00000600
C                                                                       00000610
*                                                                       00000620
*          EXEC ADABAS                                                  00000630
*     CLOSE EMPL                                                        00000640
*          END-EXEC                                                     00000650
*                                                                       00000660
      SQDA00='00000660'                                                  ADABAS
      SQDB00(01)='           EXEC ADABAS                  '              ADABAS
      SQDC00(01)='                                        '              ADABAS
      SQDB00(02)='      CLOSE EMPL                        '              ADABAS
      SQDC00(02)='                                        '              ADABAS
      SQDB00(03)='           END-EXEC                     '              ADABAS
      SQDC00(03)='                                        '              ADABAS
      SQDG00=03                                                          ADABAS
      SQC101='I'                                                         ADABAS
      SQC201='S'                                                         ADABAS
      SQDR01=188                                                         ADABAS
      SQCD01=SQDF01                                                      ADABAS
      SQCC01='RC'                                                        ADABAS
      CALL  ADABAS    (                                                  ADABAS
     1  SQCB01,SQFB01,SQRB01,SQSB01,SQVB01,                              ADABAS
     1  SQDS01                                            )              ADABAS
      SQLRSP=SQCR01                                                      ADABAS
      SQLQTY=SQCQ01                                                      ADABAS
      SQLISN=SQCS01                                                      ADABAS
      IF (SQCR01 .NE. 0                                                  ADABAS
     1  ) THEN                                                           ADABAS
       CALL RESPF  (                                                     ADABAS
     1  SQCB01,SQDD00,SQDA00,SQFB01,SQRB01,SQSB01,                       ADABAS
     1  SQVB01,SQDB00,SQDC00,SQDE00,SQDG00)                              ADABAS
           END IF                                                        ADABAS
C                                                                       00000670
*                                                                       00000680
*          EXEC ADABAS                                                  00000690
*     DBCLOSE                                                           00000700
*          END-EXEC                                                     00000710
*                                                                       00000720
      SQDA00='00000720'                                                  ADABAS
      SQDB00(01)='           EXEC ADABAS                  '              ADABAS
      SQDC00(01)='                                        '              ADABAS
      SQDB00(02)='      DBCLOSE                           '              ADABAS
      SQDC00(02)='                                        '              ADABAS
      SQDB00(03)='           END-EXEC                     '              ADABAS
      SQDC00(03)='                                        '              ADABAS
      SQDG00=03                                                          ADABAS
      SQC400=0500                                                        ADABAS
      SQC200=' '                                                         ADABAS
      SQDR00=188                                                         ADABAS
      SQCD00=SQDF00                                                      ADABAS
      SQCC00='CL'                                                        ADABAS
      CALL  ADABAS    (                                                  ADABAS
     1  SQCB00,SQFB00,SQRB00,SQSB00,SQVB00,                              ADABAS
     1  SQDS00                                            )              ADABAS
      IF (SQCR00 .NE. 0                                                  ADABAS
     1  ) THEN                                                           ADABAS
       CALL RESPF  (                                                     ADABAS
     1  SQCB00,SQDD00,SQDA00,SQFB00,SQRB00,SQSB00,                       ADABAS
     1  SQVB00,SQDB00,SQDC00,SQDE00,SQDG00)                              ADABAS
           END IF                                                        ADABAS
C                                                                       00000730
   10 FORMAT ('1PERSONNEL-ID',8X,'NAME',13X,'FIRST-NAME',8X,            00000740
     *        'BIRTH',1X,'SEX' / 1X,64('*') / )                         00000750
   20 FORMAT (3X,A8,3X,A20,1X,A20,1X,A6,1X,A1)                          00000760
C                                                                       00000770
      END                                                               00000780

Top of page