     	SUBROUTINE WDIMDI
C
C  PROGRAMMER:  R. L Snyder
C		ALFRED UNIVERSITY   Mar-1989
C
C	THIS ROUTINE WRITES OUT AN MDI DIFILE
C	FROM THE COMMON BLOCKS
C
     	INCLUDE 'FILECONV.CBS'

     	CLOSE( UNIT=IOUT )
     	OPEN( UNIT=IOUT, FILE=FILOUT, STATUS='NEW',
     	1 FORM='FORMATTED', CARRIAGECONTROL='LIST', ERR=888 )
C
C  WRITE THE FILE HEADER INFORMATION...
C
     	WRITE(IOUT,1001) SLID
1001	FORMAT(20A4)
     	write(iout,1003) NPKS
1003	FORMAT(I4)

     	DO I=1, NPKS
     	WRITE(IOUT,1100) FDSP(I), RELA(I)
1100	FORMAT(9X,F10.7,9X,F4.0)
     	ENDDO
     	go to 999
888	IERR = 2
999	RETURN
     	END
