- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Fortran examples using LIB$ and STR$ anyone ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2009 07:36 AM
тАО11-15-2009 07:36 AM
After five years of VMS blackout, I need to go back to Fortran. As I trashed all my stuff, I feel a bit naked.
Could someone give me some pointers to source code examples using the RTL and STR$ routines please ? (any versions, 77, 90, 95...)
Merci beaucoup.
DTL
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2009 08:03 AM
тАО11-15-2009 08:03 AM
Solutionhttp://www.mpp.mpg.de/~huber/util/
and
http://www.mpp.mpg.de/~huber/util/main/
in particular main/reduce_bookmarks.for, which does string manip in pure Fortran (INDEX,TRIM,LEN_TRIM), without using VMS STR$.
Otherwise use "search *.for str$" to finds its use.
When I have a choice to use Fortran or C for string handling, I prefer Fortran 77+, where strings are intrinsic.
Welcome back in VMS and Fortran!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2009 08:34 AM
тАО11-15-2009 08:34 AM
Re: Fortran examples using LIB$ and STR$ anyone ?
Bienvenue chez le Forum OpenVMS.
As per the C.O.V. comments I still suspect you are better of sticking with DCL or trying a language which can very readily do pattern matching, string manipulation and formating, like Perl.
( Vous voyez, vous ne pouvez pas m'├Г┬йchapper :-)
At any rate, attached a small, fairly practical, Fortan example with some string manipulations and LIB$ calls.
It implements a 'cd' command... migth be handy ?!
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2009 10:24 AM
тАО11-15-2009 10:24 AM
Re: Fortran examples using LIB$ and STR$ anyone ?
Thanks for the answers.
Will look at it.
@Hein :
Well, as I speak DCL as well as French, as soon as I am asked to solve big files processing, I start with DCL coding until the "algorithms" are fine and processing too.
For example, the stuff I'm working on took a bit more than 2 hours with my DCL code to process 20 000 input lines. I just finished a first draft of the Fortran code, doing the same, and run time went to... 7 minutes :-)
See ?
DCL DTL same fight.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2009 10:34 AM
тАО11-15-2009 10:34 AM
Re: Fortran examples using LIB$ and STR$ anyone ?
Fortran and BASIC are comparatively weak in the area of text-handling, and the OpenVMS RTLs are also relatively weak at these and related tasks, too; in aggregate, these tools are adequate for the task, but are not particularly effective.
Python and other and more recent languages are rather better suited for text handling in general. Even C (which features relatively weak text handling capabilities within the core language and the C standard library) has better regular expression (regex) support and a variety of tools and libraries including lex/yacc and flex/bison.
OpenVMS does have lib$table_parse (lib$tparse), if there's some sort of structured grammar in the files involved here. That's certainly callable from Fortran, and I and others have posted examples of using this RTL call on the OpenVMS Freeware and elsewhere.
As for your request for Fortran examples, there are few. HP appears to have discontinued access into the old DEC support databases. The (old) source code examples are apparently no longer directly available, unfortunately. There are various Fortran source code examples in the OpenVMS manuals. For instance:
http://h71000.www7.hp.com/doc/73final/5936/5936pro_007.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2009 10:42 AM
тАО11-15-2009 10:42 AM
Re: Fortran examples using LIB$ and STR$ anyone ?
Seriously, This stuff is supposed to be done by tomorrow.
Ah, btw, it was not 20 000 lines but 200 000 !
And the ton of mail I got from my posts (3) gave me inuf stuff to finish this nite.
Thanks to all.
(_@_)
O o
!
\_/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2009 10:18 AM
тАО11-16-2009 10:18 AM
Re: Fortran examples using LIB$ and STR$ anyone ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2009 11:41 AM
тАО11-16-2009 11:41 AM
Re: Fortran examples using LIB$ and STR$ anyone ?
What amounts to the OpenVMS port (a few lines of DCL to build and test the library) is here:
http://labs.hoffmanlabs.com/node/644
or there's the built-in or add-on libraries that are available in Perl or Python or such, and that were mentioned.
Using lib$table_parse would probably be analogous to nuclear weapon here (if you don't already know how to use it, that is) but would be entirely effective at this task, too. (Where I like this particular tool is around its ability at flagging bad data or bad record formats; it's _really_ good at allowing you to flag or potentially to fix bad data.)
And yes, learning a new language or new tool or a parser does almost certainly require more than DTL's allotted "tomorrow" schedule here.
But the effort spent learning new stuff (tools, languages, platforms, marketing, management skills, parsers, whatever) is good brain exercise and good career exercise, regardless.
And that old and slow DCL prototype? See if the performance problem there was a case of not setting the file allocation size and the file extent size sufficiently large. DCL will be slow, yes, but I've also seen small file extent allocations (which are inexplicably still the default on OpenVMS) severely hamper aggregate performance.)