Showing results for 
Search instead for 
Did you mean: 

Pascal compilation

Go to solution
Mark Battle

Pascal compilation

I am migtating old Pascal code from VMS 5.5 to VMS 8.2 and get the following error messages.


[INHERIT ('sys$library:decw$motif',
%PASCAL-F-FNF, file not found
at line number 1 in file xxx.pas


[INHERIT ('sys$library:decw$motif.pas',
%PASCAL-F-IVENVIRON, Environment sys$library:decw$motif.pas has illegal format, source analysis terminated
at line number 1 in file xxx2.pas

The file sys$library:decw$motif.pas exists and was created in 1993 according to the comments.

It appears that Environment files now have different formats. How do I procede.

Karl Rohwedder
Honored Contributor

Re: Pascal compilation

According to the help, you need a so-called environment format for INHERIT to work.
This can be created with PASCAL/NOOBJECT/ENVIRONMENT.




The INHERIT attribute indicates the environment file or files to
be inherited by a compilation unit. The environment files
specified by the INHERIT attribute must already have been
created in compilation units (by either the ENVIRONMENT
attribute or a compilation switch).


INHERIT( {name-string},... )

The compilation unit inherits one or more environment files
named by the file specifications in the name strings. The
default file type for an inherited environment file is .PEN.

regards Kalle
Kris Clippeleyr
Honored Contributor

Re: Pascal compilation


If I recall correctly, I ran into the same problem some years back. Apparently, when installing the PASCAL compiler, (some of) the necessary environment files are not generated from the source files.
As Karl hinted, you can brew your own by:
PASCAL/NOOBJECT/ENVIRONMENT sys$library:decw$motif.pas
This should give you a valid .PEN file that you can put in SYS$COMMON:[SYSLIB].
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
John Reagan
Respected Contributor

Re: Pascal compilation

The DECW$MOTIF.PAS/PEN files are not part of the Pascal kit. The DECW$MOTIF.PAS file is provied by DECwindows. Unfortunately, you have to compile it yourself into a PEN file.

$ pascal /noobj/env=sys$common:[syslib] sys$library:decw$motif.pas

BTW, the INHERIT attribute does not process .PAS source files, but only precompiled PEN files created with the /ENV qualifier. The formats for PEN files (at least on the same architecture) are upwards compatible. Newer compilers will always be able to handle old PEN files. As a point of trivia, I haven't changed the format since 1996.
Mark Battle

Re: Pascal compilation

Solution as described. Many thanks