I want to merge 94 trajectory files, but this cannot be done in one script without exceeding 99 unit numbers. I merged into 3 parts and then tried to merge the 3 parts. The default skip is 2ooo, but I changed it to 8ooo because I want it compressed.

I get an error when combining the files:
"At line 959 of file dynio.f
Fortran runtime error: End of file"

The script to combine


stream toppar.str

read psf card name "/export/lustre_1/dpc/sim1/w-dpc-1.psf"
open unit 2 card read name "/export/lustre_1/dpc/sim1/w-dpc-1.pdb"
read coor pdb resid unit 2

! put reference coordinates into comparison set as well
coor copy comp

open unit 50 read unform name traj_part1.cor
open unit 51 read unform name traj_part2.cor
open unit 52 read unform name traj_part3.cor

open unit 40 write unform name traj_part1_2_3.cor

merge first 50 nunit 3 output 40 skip 8000