 <p>if <code>max_oms</code> is a <code>parameter</code> (i.e. a constant, and it probably is one) you can do:</p> <pre><code>CHARACTER(LEN=20) :: filename(max_xoms,2) = RESHAPE(SOURCE=(/'XobsXOM0.txt','XobsXOM1.txt','XobsXOM2.txt','XobsXOM3.txt','XobsXOM4.txt', &amp; 'XobsXOM5.txt','XobsXOM6.txt','XobsXOM7.txt','XobsXOM8.txt','XobsXOM9.txt', &amp; 'XobsXOS0.txt','XobsXOS1.txt','XobsXOS2.txt','XobsXOS3.txt','XobsXOS4.txt', &amp; 'XobsXOS5.txt','XobsXOS6.txt','XobsXOS7.txt','XobsXOS8.txt','XobsXOS9.txt'/), &amp; SHAPE=(/max_xoms,2/)) </code></pre> <p>otherwise move</p> <pre><code>filename = RESHAPE(SOURCE=(/'XobsXOM0.txt','XobsXOM1.txt','XobsXOM2.txt','XobsXOM3.txt','XobsXOM4.txt', &amp; 'XobsXOM5.txt','XobsXOM6.txt','XobsXOM7.txt','XobsXOM8.txt','XobsXOM9.txt', &amp; 'XobsXOS0.txt','XobsXOS1.txt','XobsXOS2.txt','XobsXOS3.txt','XobsXOS4.txt', &amp; 'XobsXOS5.txt','XobsXOS6.txt','XobsXOS7.txt','XobsXOS8.txt','XobsXOS9.txt'/), &amp; SHAPE=(/max_xoms,2/)) </code></pre> <p>to the position of a first executable statement.</p> <p>Generally, avoid <code>DATA</code> in Fortran 90 and later.</p>