What about gcc Fortran? Does that run on OMVS? Linux on Z?
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Frank Swarbrick [frank.swarbr...@outlook.com] Sent: Tuesday, June 9, 2020 10:22 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Here's the question I have about Fortran support. Why does IBM support modern Fortran on platforms like Linux and AIX, but mainframe Fortran (IBM VS FORTRAN) is still at FORTRAN 77 level and seems to have had no enhancements other than Language Environment support since...1993? I know if I were a Fortran developer this would piss me off greatly. ________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Evans-Young, Darren <dar...@ua.edu> Sent: Monday, June 8, 2020 8:16 PM To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU> Subject: Re: COBOL Question FORTRAN 90 was a significant upgrade over previous standards. Mainly, free-form input source statements. Also, increase the length of identifiers from 6 characters to 31 characters, and upper/lowecase keywords/identifiers. The latest standard is Fortran 2018. I still teach Fortran to my Honor students. It's easy to learn for a first programming language, very forgiving, and you can do a lot with it. I still get flack from uninformed individuals, you know, the ones that say no one uses mainframes anymore, no one uses Fortran anymore, no on uses COBOL anymore. Every year, a couple of my students email me back to say how having Fortran experience on their resume helped them land a job or internship; companies like NASA, NOAA, Lockheed-Martin, etc. They are usually the only applicants out of hundreds that list Fortran experience. Darren ________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of lenru...@gmail.com <lenru...@gmail.com> Sent: Monday, June 8, 2020 8:52 PM To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU> Subject: Re: COBOL Question On, long ago and on some DOS/VS Cobol compiler, after a compiler upgrade, there was a problem with a statement something like this: READ some-file AT END do somethingMOVE A TO B. See the problem? The period after the AT END was omitted. The old compiler only allowed one statement after AT END (maybe a bug) but after it honored the period. It was a bear to find. It worked before and for a long time after the compiler change, until it was complied again. On Monday, June 8, 2020, 08:22:18 PM CDT, Frank Swarbrick <frank.swarbr...@outlook.com> wrote: I've been teaching myself (modern) Fortran the last few weeks. Just because. It has an interesting behavior that I kind of like. Normal IF statement: if (something) then <statement 1> <statement 2> end if But it also has a "one line IF" (not sure offhand of the Fortran "name" for this): if (something) <single statement> <single statement> must be on the same line as the if and the condition (unless you specify the "line continuation character"), and of course only one statement is allowed. Kind of like the C/Java if statement with out a statement block, but less dangerous because of the "on the same line" requirement. Here is one way I've used it in practice. call get_command_argument(1, host) if (inet_addr(host) .lt. 0) call error_stop("Host must be in dotted decimal format.") call get_command_argument(2, port_str) read (port_str, '(i5)', iostat = iostat) port ! convert string 'port_str' to integer 'port' if (iostat .ne. 0 .or. port .le. 0) call error_stop("Port must be positive numeric (0-32767).") Using "if/then" instead of just "if" I'd have had this: call get_command_argument(1, host) if (inet_addr(host) .lt. 0) then call error_stop("Host must be in dotted decimal format.") end if call get_command_argument(2, port_str) read (port_str, '(i5)', iostat = iostat) port ! convert string 'port_str' to integer 'port' if (iostat .ne. 0 .or. port .le. 0) then call error_stop("Port must be positive numeric (0-32767).") end if Given by absolute druthers I would have the then clause part of the single line if instead of the if/end if, but its still pretty nice regardless, as it doesn't cause as much "clutter" as error handling often does. On a side note, I think Fortran has done a much better job than COBOL of adding "modern" features (starting with Fortran 90 in 1990). If only the COBOL "designers" had followed in their footsteps. And in my mind Fortran had even more to "make up" for in regards to it's less than ideal beginnings. Which Fortran can even be forgiven for then, being I believe about five years older than COBOL (Cobol?). ________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Bob Bridges <robhbrid...@gmail.com> Sent: Sunday, June 7, 2020 12:35 PM To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU> Subject: Re: COBOL Question The only language I can think of off-hand that doesn't require some sort of END to close a DO (I'm sure there are others) is ISPF. But, in REXX at least, I never use single-statement DOs. I see them all the time, and I don't get it. Like this: if x=0 then do x=x+1 end Or, more painfully: select when idx="T" then do countt=countt+1 end when idx="U" then do countu=countu+1 end when idx="V" then do countv=countv+1 end when idx="W" then do countw=countw+1 end otherwise do countx=countx+1 end end Why? If it were easier to read, I might sympathize. But it's harder, not easier. --- Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313 /* It's a good thing Lincoln wrote the Gettysburg Address the year that he did, or else that "fourscore and seven years" part would have just been plain wrong. -Paul Paternoster */ -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Saturday, June 6, 2020 14:40 But in Rexx similarly, END is required even for a single-statement DO. Good for Rexx. I like strong closure. >--- On 6 Jun 2020 10:53:44 -0700, (Bob Bridges) wrote: >>Oh, you need an END-IF even for a single-statement IF? I forgot; I've been >>thinking in REXX too long. In that case you're close; I guess I really meant ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN