P.S. - I don't know if this address is for a mailing list. If so, I am not subscribed. Therefore, I would appreciate a direct reply. ----- Original Message ----- From: "Kevin Myers" <KMyers@xxxxxxxxxxxxx> To: <gcc-help@xxxxxxxxxxx> Sent: Sunday, January 01, 2006 11:47 PM Subject: Console I/O Help with g77 > Hello, > > I am new to g77, and am attempting to convert a program that ran under VS > Fortran on an IBM mainframe. I have converted most of the program without > difficulty, but am having some problems related to console I/O. I am using > g77 under Windows 2000. > > The mainframe version of the program to be converted contains a number of > lines similar to the following: > > CALL CMS(IRC,'CLRTERM ') > > These calls are used to clear the screen on IBM 3270 style terminals prior > to subsequent output. Is there an equivalent g77 command that be used to > clear the contents of the console (e.g. issue a form feed?)? > > > The mainframe version of the program also contains numerous chunks of code > similar to the following: > > 1315 REWIND 5 > 1411 WRITE(7,1412) PCS > 1412 FORMAT(' ','Surface casing pressure (psi): ',F6.0) > READ(5,*,ERR=1411,END=1415) PCS > > g77 doesn't seem to allow a REWIND for unit 5 (console input). Without the > REWIND there doesn't seem to be any way to detect and handle null input > (which is very important in this program to accept numerous default values). > Is there some way to do this that I am missing? > > > Finally, a portion of this program is intended to write output to a standard > text (ASCII) file that can be viewed or printed. The mainframe version of > the program includes traditional FORTRAN formatting characters for column 1 > of the output file (e.g. '0', '1', etc.). g77 doesn't seem to translate > these formatting commands into the appropriate ASCII characters for line > feed, form feed, etc. in the output file. Is there some way to get g77 to > automatically perform this translation? If not, what is the standard way of > writing form feeds and such for an ASCII output file under G77? > > Thanks in advance for any help. > > s/KAM > >