C	E X A M P L E     F M S R O W
C
C	Program name:
	CHARACTER*9 MYNAME
	PARAMETER (MYNAME='EXAMPLE_8')
C
	PARAMETER   (NMAX = 1000)
	COMMON      A(NMAX), X(NMAX)
	COMPLEX*16  A, X, ZERO, ONE, ALPHA(1)
	REAL*8      EI, ERROR
	INTEGER     LUA(25), LUX(25), LUS0(25), LUA0(25)
C
C	Profile vector for a full matrix:
	INTEGER     LOWEQ(1)
	DATA LOWEQ/-1/
	DATA ZERO /(0.D0,0.D0)/
	DATA ONE  /(1.D0,1.D0)/
	DATA ALPHA/(1.D0,0.D0)/
	DATA LUA0(1)/0/
	DATA LUS0(1)/0/
C
C (1)	Initialize FMS:
	CALL FMSINI
	CALL FMSPSH(MYNAME)
	N = NMAX
C
C (2)	Open FMS files:
	CALL CNDI (LOWEQ, N, 'LUA', LUA)
	CALL FMSOV2 (N, 2, 1, X, N, LUX)
	DO 21 I = 1,N
	   X(I) = ZERO
   21	CONTINUE
	X(1) =  ONE
C
C (3)	Write data to FMS files:
C	Initialize FMSROW
	CALL FMSROW (0, A, LUA)
C	Write first row
	DO 31 I = 2,N
	   A(I) = -ONE
   31	CONTINUE
	A(1) = DCMPLX(N,N)
	CALL FMSROW (1, A, LUA)
C	Write remaining rows
	DO 32 I = 2,N
	   A(I) = ZERO
   32	CONTINUE
	A(1) = -ONE
	DO 33 I = N,2,-1
	   A(I) = ONE
	   CALL FMSROW (I, A, LUA)
	   A(I) = ZERO
   33	CONTINUE
C	End FMSROW
	CALL FMSROW (N+1, A, LUA)
C
C (4)	Perform matrix algebra:
	CALL CNDAF (LUA, ALPHA, 1, LUS0, 0, LUA0,
     1	 LUA, LUX, LUX, 0)
	CALL CNDS  (LUA, LUX, LUX, 1, 0)
C
C (5))	Read data from FMS files:
C	(Not required).
C
C	Check the answer:
	ERROR = 0.0D0
	DO 50 I = 1,N
	   EI = ABS(X(I) - 1.0D0)
	   IF(EI .GT. ERROR) ERROR = EI
   50	CONTINUE
	WRITE(6,*) 'MAXIMUM ERROR =', ERROR
C
C	Close FMS files:
	CALL FMSCM (LUA)
	CALL FMSCV (LUX)
	CALL FMSPOP(MYNAME)
	CALL FMSEND
	END