Adabas Write Examples

The following examples access the EMPLOYEES-WRITE data source.


Top of page

Example: Sample Adabas Write Master File

This Master File provides write access to the Adabas EMPLOYEES-WRITE data source:

FILENAME=EMPWRITE,SUFFIX=ADBSIN,$
SEGNAME=S01     ,SEGTYPE=S0,$
 FIELD= EMPLOYEE_ID              ,ALIAS= AA      ,A8    ,A8  ,  INDEX=I,$
 GROUP= FULL_NAME                ,ALIAS= AB      ,A60   ,A60 ,$
  FIELD=FIRST_NAME               ,ALIAS= AC      ,A20   ,A20 ,$
  FIELD=LAST_NAME                ,ALIAS= AE      ,A20   ,A20 ,  INDEX=I,$
  FIELD=MIDDLE_NAME              ,ALIAS= AD      ,A20   ,A20 ,$
  FIELD=ADDRESS_LINE_CNT         ,ALIAS= AIC     ,I4    ,I1  ,$
  FIELD=CITY                     ,ALIAS= AJ      ,A20   ,A20 ,  INDEX=I,$
  FIELD=ZIP_CODE                 ,ALIAS= AK      ,A10   ,A10 ,$
  FIELD=POST_CODE                ,ALIAS= AK      ,A10   ,A10 ,$
  FIELD=COUNTRY                  ,ALIAS= AL      ,A3    ,A3  ,$
  FIELD= DEPT                    ,ALIAS= AO      ,A6    ,A6  ,  INDEX=I,$
  FIELD= INCOME_CNT              ,ALIAS= AQC     ,I4    ,I1  ,$
 GROUP= LEAVE_DATA               ,ALIAS= A3      ,A16   ,A4  ,$
  FIELD=LEAVE_DUE                ,ALIAS= AU      ,P2    ,Z2  ,$
  FIELD=LEAVE_TAKEN              ,ALIAS= AV      ,P2    ,Z2  ,$
  FIELD= LEAVE_BOOKED_CNT        ,ALIAS= AWC     ,I4    ,I1  ,$
  FIELD= DEPARTMENT              ,ALIAS= S1      ,A4    ,A4  ,  INDEX=I,$
 GROUP= DEPT_PERSON              ,ALIAS= S2      ,A26   ,A26 ,  INDEX=I,$
  FIELD=DEPT_S03                 ,ALIAS= AO      ,A6    ,A6  ,  INDEX=I,$
  FIELD=NAME_S03                 ,ALIAS= AE      ,A20   ,A20 ,  INDEX=I,$
SEGNAME=AI0101  ,SEGTYPE=S0,PARENT=S01   ,OCCURS=AIC,$ MAX=  8
 FIELD= ADDRESS_LINE             ,ALIAS= AI      ,A20   ,A20 ,$
 FIELD= AI0101_OCC               ,ALIAS= ORDER   ,I4    ,I1  ,$
SEGNAME=AQ0201  ,SEGTYPE=S0,PARENT=S01   ,OCCURS=AQC,$ MAX= 40
$PEMU = INCOME                   ,ALIAS= AQ      ,A19   ,A13 ,$
  FIELD=CURR_CODE                ,ALIAS= AR      ,A3    ,A3  ,$
  FIELD=SALARY                   ,ALIAS= AS      ,P9    ,P5  ,$
  FIELD=BONUS_CNT                ,ALIAS= ATC     ,I4    ,I1  ,$
  FIELD= AQ0201_OCC              ,ALIAS= ORDER   ,I4    ,I1  ,$
SEGNAME=AT0301  ,SEGTYPE=S0,PARENT=AQ0201,OCCURS=ATC,$ MAX= 12
 FIELD= BONUS                    ,ALIAS= AT      ,P9    ,P5  ,$
 FIELD= AT0301_OCC               ,ALIAS= ORDER   ,I4    ,I1  ,$
SEGNAME=AW0401  ,SEGTYPE=S0,PARENT=S01   ,OCCURS=AWC,$ MAX= 20
 GROUP= LEAVE_BOOKED             ,ALIAS= AW      ,A16   ,A12 ,$
  FIELD=LEAVE_START              ,ALIAS= AX      ,P6    ,Z6  ,$
  FIELD=LEAVE_END                ,ALIAS= AY      ,P6    ,Z6  ,$
  FIELD= AW0401_OCC              ,ALIAS= ORDER   ,I4    ,I1  ,$

Top of page

Example: Sample Adabas Write Access File

The following Access File corresponds to the Master File illustrated in Sample Master File:

RELEASE=6.2, OPEN=YES,$
$ ADABAS FILE = EMPLOYEES_WRITE                   DICTIONARY =
SEGNAM=S01   ,ACCESS=ADBS,FILENO=042,DBNO=1,CALLTYPE=FIND,   
 UNQKEYNAME=EMPLOYEE_ID                                     ,$
 FIELD= DEPARTMENT                          ,TYPE=NOP       ,$
 FIELD= DEPT_PERSON                         ,TYPE=SPR       ,$
  FIELD=DEPT_S03                            ,TYPE=DSC,NU=NO ,$
  FIELD=NAME_S03                            ,TYPE=DSC,NU=NO ,$
SEGNAM=AI0101,ACCESS=MU  ,FILENO=042,DBNO=1,$ ADDRESS_LINE
SEGNAM=AQ0201,ACCESS=PE  ,FILENO=042,DBNO=1,$ INCOME
SEGNAM=AT0301,ACCESS=MU  ,FILENO=042,DBNO=1,$ BONUS
SEGNAM=AW0401,ACCESS=PE  ,FILENO=042,DBNO=1,$ LEAVE_BOOKED

Information Builders