C***********************************************************************
C
C  THIS IS A SAMPLE MAIN PROGRAM WHICH HAS BEEN USED WITH THE ANALYSIS
C  PROGRAM "SYSTEM".  IT SHOWS HOW THE INPUT AND ANALYSIS/OUTPUT
C  SECTIONS ARE READ IN AND OUT BY THE USE OF THE OVERWRITING SYSTEM
C  AVAILABLE ON THE PDP-9.  WHEN THE INPUT SUBROUTINE "INSAEN" IS CALLED
C  THE ENTIRE INPUT SECTION IS READ IN.  WHEN THE ANALYSIS SUBROUTINE
C  "SYSTEM" IS CALLED, THE INPUT SECTION IS OVERWRITTEN BY THE ANALYSIS/
C  OUTPUT SECTION.
C
C***********************************************************************
      REAL V(60),C(60),PAR(60,6),OP(10),DRA(21)
      INTEGER M(20,60),NODE(60,12),ISEQ(60)
      COMMON PAR,OP,V,C,M,NODE,DRA,ICOM,INO,IBUS,ISEQ,ITL
      DATA P1,P2/5HINCAM,4H4BIN/
C                                   FIRST WE HAVE THE INITIALISATION
C                                   FOR THE INPUT SECTION.
      ICOM=0
      IBUS=0
      INO=0
      INOD=0
      CALL CLEAR(.TRUE.)
      IASK=4000
      CALL CRT(0,IASK,IGET)
    1 CALL INSAEN(INOD)
C                                   THE INPUT SECTION HAS NOW BEEN READ
C                                   IN.  WHEN COMPLETE IT RETURNS HERE.
C                                   FIRST READ IN OUTPUT MENU.
      CALL MENCRT(P1,P2,-1)
      ITL=2000
C                                   THEN ANALYSIS/OUTPUT SECTION.
      CALL SYSTEM
C                                   ANALYSIS/OUTPUT NOW COMPLETE.
C                                   THE MENU IS NO LONGER REQUIRED.
      CALL MENCRT(P1,P2,-2)
      CALL CLEAR(.TRUE.)
C                                   RETURN TO INPUT SECTION.
      GO TO 1
      END
