NAG Library Manual, Mark 27.2
```    Program f11jrfe

!     F11JRF Example Program Text

!     Mark 27.2 Release. NAG Copyright 2021.

!     .. Use Statements ..
Use nag_library, Only: f11jrf, nag_wp
!     .. Implicit None Statement ..
Implicit None
!     .. Parameters ..
Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
Real (Kind=nag_wp)               :: omega
Integer                          :: i, ifail, n, nnz
Character (1)                    :: check
!     .. Local Arrays ..
Complex (Kind=nag_wp), Allocatable :: a(:), x(:), y(:)
Real (Kind=nag_wp), Allocatable  :: rdiag(:)
Integer, Allocatable             :: icol(:), irow(:), iwork(:)
!     .. Intrinsic Procedures ..
Intrinsic                        :: real
!     .. Executable Statements ..
Write (nout,*) 'F11JRF Example Program Results'
!     Skip heading in data file

Allocate (a(nnz),x(n),y(n),rdiag(n),icol(nnz),irow(nnz),iwork(n+1))

Do i = 1, nnz
End Do

!     Fill in the diagonal part

Do i = 1, nnz
If (irow(i)==icol(i)) Then
rdiag(irow(i)) = 1.E0_nag_wp/real(a(i))
End If
End Do

!     Solve Mx = b using F11JRF

!     ifail: behaviour on error exit
!             =0 for hard exit, =1 for quiet-soft, =-1 for noisy-soft
ifail = 0
Call f11jrf(n,nnz,a,irow,icol,rdiag,omega,check,y,x,iwork,ifail)

!     Output x

Write (nout,99999) x(1:n)

99999 Format (1X,'(',E16.4,',',E16.4,')')
End Program f11jrfe
```