      PROGRAM AMST2
      IMPLICIT INTEGER*4(I-N)
      COMMON  MAVAIL,IA(30000)
      MAVAIL = 30000
C
C ... AMS TEST PROGRAM 2
C
      CALL DBOPEN(1,'DB2.DAT','NEW')
      CALL DEFINE(1,'TS1',0,1,10,10,2,LOC)
      CALL DEFINE(1,'TS2',6,0,5,5,1,LOC)
      CALL DEFINE(1,'TS3',0,2,7,6,0,LOC)
      CALL DEFINE(1,'TS4',5,1,6,4,0,LOC)
      CALL DBOPEN(2,'DB1.DAT','OLD')
      CALL DIR(6)
      CALL DSORT
      CALL DIR(6)
      CALL DBCLOS(2,'DELETE')
      CALL DBCLOS(1,'DELETE')
      STOP 'DONE.'
      END
