Path: utzoo!attcan!uunet!lll-winken!lll-lcc!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!BKNLVMS.BITNET!SMITH
From: SMITH@BKNLVMS.BITNET
Newsgroups: comp.os.vms
Subject: Pascal V3.7 query
Message-ID: <8806060356.AA24436@ucbvax.Berkeley.EDU>
Date: 2 Jun 88 20:35:00 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 41

We recently upgraded VMS Pascal from V3.5 to V3.7.  When I recompiled one of
my programs, it stopped working.  It began to blow up with a call to reset
a file variable, and returned the error code INVFILVAR (Invalid file variable).
Through experimentation and sheer luck, I discovered that the presence of a
call to the $CrePrc System Service is what is causing the problem.  The
following is a simplified version of the program.  Compiling as is will show
the error, and commenting out the $CrePrc call will cause the program to
behave as expected (in this case, to report a missing file).  Compiling with
and without NoOp makes no difference.  Can anyone tell me what I'm doing
wrong/what the difference is/why this is happening?  Any help will be greatly
appreciated!  Thanks in advance,

Greg Smith  
Bucknell Computer Services



[inherit('SYS$LIBRARY:STARLET')]
Program Junk(input,output,indcb);

Var
   indcb : text;
   PrcName : Packed array [1..8] of char;
   Stats : integer;
   pid : Unsigned;

{**********************************************************************}

Begin   { M A I N }
   stats:=1;
   reset( indcb );     {death line}
   PrcName:='FooBar';

{ comment out the following call, and all works well }
   Stats := $CrePrc( pid, 'SYS$SYSTEM:LOGINOUT.EXE',
                     'DRA0:[MAILER]COMFILE.COM','DRA0:[MAILER]COMFILE.LOG',
                     'DRA0:[MAILER]COMFILE.ERR',,,PrcName,7,
                     ,,PRC$M_NOUAF );

   $Exit( Stats );

End.