/dev/pts/1 is your "terminal window". It should generally have permissions like this (allowing you - and only you - to read from it and write to it):
ls -l /dev/pts/1
crw------- 1 paulsm tty 136, 1 2005-10-01 20:14 /dev/pts/1
So it sounds like you're trying to do a FORTRAN "write(*,*)" to FORTRAN unit 5, and the system isn't letting you (e.g. you don't have write permission).
Please try this:
1. Be sure you're running "a.out" as the same user you're logged in as.
2. Run the command "ls -l /dev/pts" and verify a) that /dev/pts/1 actually exists, b) that it's owned by you, and c) that it has both "r" (read) and "w" (write) permissions.
'Hope that helps .. PSM