- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: F$ENVIRONMENT("PROCEDURE") within Fortran
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
Forums
Discussions
Discussions
Discussions
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
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
03-01-2007 03:58 AM
03-01-2007 03:58 AM
I am looking for the system service (or the like) that would return the name of the executing command file.
I know that, in DCL, I could use the F$ENVIRONMENT("PROCEDURE") lexical.
Is there anything that would do the same in Fortran[-77] ??
Many thanks.
-Howard-
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 04:22 AM
03-01-2007 04:22 AM
Re: F$ENVIRONMENT("PROCEDURE") within Fortran
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 04:31 AM
03-01-2007 04:31 AM
Re: F$ENVIRONMENT("PROCEDURE") within Fortran
If you want to look for supervisor-mode code related to the cited hackery, you'll want to search for the (undocumented) sys$cli call, and at various of the tools that look at or dump DCL symbols and such. There have been various examples posted around the 'net over the years.
It's certainly also possible to provide a way for the DCL to tell the Fortran its name; to have the DCL pass in data that the Fortran code can use. That's little effort, and there are various documented means to pass along that information. If you combine this work with some DCL batch restart-related DCL symbols for instance, you can create a quite robust process management environment.
There are cases when there is no DCL present in the process, and I've certainly written and maintained Fortran code that runs as a fully detached process. A CLI-related callback in this run-time environment would return the classic NOCLI error.
There are ways to directly acquire information related to a batch job, if that is of interest. That involves calls into the sys$getqui system service. There are examples of that (mildly hairy) system service (and its associated DCL f$getqui lexical) posted at various spots around the 'net.
Stephen Hoffman
HoffmanLabs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 04:47 AM
03-01-2007 04:47 AM
Re: F$ENVIRONMENT("PROCEDURE") within Fortran
pass what it knows to the Fortran program.
Now, if you wanted the program to identify
its own _executable_, you should be able to
get that from SYS$GETJPI() with item code
JPI$_IMAGNAME (which I know I can do in C,
and I could probably puzzle out in Fortran,
eventually).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 02:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 05:07 AM
03-05-2007 05:07 AM
Re: F$ENVIRONMENT("PROCEDURE") within Fortran
-H-