Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I compile my fortran program in vms 7.3-2?

SOLVED
Go to solution
Zagan Iulian
Occasional Visitor

How can I compile my fortran program in vms 7.3-2?

Hi,
I'm not very familiar with VMS, I've been supporting some jobs written in DCL & Fortan running on an Alpha VMS server. I know some basic VMS commands and several things about VMS operating system. Due to the job requirements, sometimes I have to modify the jobs and rebuild the fortran source files. So far, I succesfully used these lines:

orabld XX_FILE
lnprofor XX_FILE XX_FILE,lnk$library/lib,MIS_ENVIRO:[FOR]COMBLD/OPT

where XX_FILE is the file that needs to be rebuild into an EXE format. In folder MIS_ENVIRO:[FOR] I have some standard definitions used in the XX_FILE.FOR.

Recently, I tried to rebuild another fortran file, but I'm getting these lines:

Pro*FORTRAN: Release 1.8.52.4.0 - Production on Tue Jun 10 05:09:38 2008

(c) Copyright 2000 Oracle Corporation. All rights reserved.

System default option values taken from: ora_pcc:pccfor.cfg

Precompiling UNPLAN_WO_CLEANUP.FOR
Compiling UNPLAN_WO_CLEANUP.OUT
- Linking UNPLAN_WO_CLEANUP.EXE
%LINK-W-RECTYP, file MIS_ENVIRO:[EXE]UNPLAN_WO_CLEANUP.EXE;9 record 1 is illegal (3.)
%LINK-W-RECTYP, file MIS_ENVIRO:[EXE]UNPLAN_WO_CLEANUP.EXE;9 record 2 is illegal (1.)
%LINK-W-RECTYP, file MIS_ENVIRO:[EXE]UNPLAN_WO_CLEANUP.EXE;9 record 3 is illegal (0.)
%LINK-W-NOEOM, no end-of-module record found in module file MIS_ENVIRO:[EXE]UNPLAN_WO_CLEANUP.EXE;9
%LINK-W-SEQNCE, illegal record sequence in module file MIS_ENVIRO:[EXE]UNPLAN_WO_CLEANUP.EXE;9
%LINK-W-EMPTYFILE, no modules found in file MIS_ENVIRO:[EXE]UNPLAN_WO_CLEANUP.EXE;9
%LINK-W-USRTFR, image MIS_ENVIRO:[EXE]UNPLAN_WO_CLEANUP.EXE;10 has no user transfer address

I read some posts from this forum, I tried some of the solutions presented here, but, still unsuccesifull.
Can anyone offer my a hint?
Thank you in advance.
10 REPLIES
Richard Whalen
Honored Contributor
Solution

Re: How can I compile my fortran program in vms 7.3-2?

You haven't said what is in the linker option file (.OPT), but I suspect that you need to put a /SHARE on the line that references UNPLAN_WO_CLEANUP.EXE in the options file.
Jim_McKinney
Honored Contributor

Re: How can I compile my fortran program in vms 7.3-2?

Perhaps you have a logical name that points UNPLAN_WO_CLEANUP to the .EXE rather than the intended .OBJ when you execute the LINKer? If so, just deassign that logical or change your LINK command to explicitly reference UNPLAN_WO_CLEANUP.OBJ.
Phil.Howell
Honored Contributor

Re: How can I compile my fortran program in vms 7.3-2?

What is in your combld.opt ?
The linker is expecting an object file (.obj) containing object modules, but has found unplan_wo_cleanup.exe
something has told the linker to do this
maybe your options file?
if you SET VERIFY before running the command you should see what it is trying to do
Phil
Zagan Iulian
Occasional Visitor

Re: How can I compile my fortran program in vms 7.3-2?

Thanks guys for answering so quick, I was pleasantly surprised by that.
My option file looks like this:

MISCOM/SHARE
PSECT_ATTR=MISCOM,SHR
GSMATCH=ALWAYS,0,0

I'll try to use SET VERIFY before running the the command.
Robert Gezelter
Honored Contributor

Re: How can I compile my fortran program in vms 7.3-2?

Zagan,

I would also check for a logical name of UNPLAN_WO_CLEANUP. If such a logical name is pointing at a .EXE file, that could cause messages such as those cited in your post.

- Bob Gezelter, http://www.rlgsc.com
Zagan Iulian
Occasional Visitor

Re: How can I compile my fortran program in vms 7.3-2?

Hi guys,
there is indeed a logical name for UNPLAN_WO_CLEANUP, and it's pointing to the EXE file, thus, I checked the syntax of LNPROFOR and I changed the linking command to this:

$lnprofor UNPLAN_WO_CLEANUP.EXE UNPLAN_WO_CLEANUP.OBJ,lnk$library/lib,
MIS_ENVIRO:[FOR]COMBLD/OPT

so, right now, I'm explicity linking the OBJ file.

I've used the SET VERIFY option too, but my problem still persist. I've attached the output from my screen:
Phil.Howell
Honored Contributor

Re: How can I compile my fortran program in vms 7.3-2?

The link is showing a problem in the object file, is this from your fortran source? try
analyze /object unplan_wo_cleanup.obj

run the compile step with verify on

sometimes oracle expects object modules to be in libraries

Phil
Robert Gezelter
Honored Contributor

Re: How can I compile my fortran program in vms 7.3-2?

Zagan,

I am somewhat suspicious. Please check that the logical name is not interfering with the output of the compile. Deassign the logical name and try things again.

- Bob Gezelter, http://www.rlgsc.com
Zagan Iulian
Occasional Visitor

Re: How can I compile my fortran program in vms 7.3-2?

I still don't know what was the root-cause, but I took Phil Howell's advice and checked my source code file. I found no real issue (but I'm not a Fortran expert, so I might have missed it out) but I found a workaround. I took a previous version of the fortran file from another server, I re-modified it and after a new compliation and linking, no more error messages were listed on my screen.
Thus, my problem is solved, the root cause was probably some bad typing (syntax error, or a "space" char misplaced somewhere).
Thank you to all of you guys for finding time to address my problem and help me.

Regards,
Iulian Zagan
Zagan Iulian
Occasional Visitor

Re: How can I compile my fortran program in vms 7.3-2?

I took a previous version of the fortran source code file from another server, I re-modified it, and then, succesfully compiled and linked it.
I assume that the root cause was probably some bad typing (syntax error, or a "space" char misplaced somewhere).