Operating System - OpenVMS
1753786 Members
7772 Online
108799 Solutions
New Discussion юеВ

Unexpected TPU behaviour.

 
Willem Grooters
Honored Contributor

Unexpected TPU behaviour.

A collegue mentioned weird behaviour of TPU.

A logical A is defined as a searchlist:
A = disk1[a], disk2[b]

file A:X.X does not exist at all.

Interactively $ edit/tpu a:x.x should create this file as disk1:[A]X.X, since that is the first directory in the list; and it does.
In an interactive program however where TPU$EDIT is called with A:X.X as the file to edit/create, the file is created as disk2:[B}X.X - so on the SECOND directory.
Not exactly what is expected.
I could imagine that TPU$EDIT would search for the file and when not found, create the file in the last directory searched.
Is this a bug, or a feature?
Willem Grooters
OpenVMS Developer & System Manager
5 REPLIES 5
Willem Grooters
Honored Contributor

Re: Unexpected TPU behaviour.

Before I forget: VMS 7.3-1, and the program involveld is built in a smartstar/Dibol ebvironment. However, our idea is that the porblem lies within TPU$EDIT, not within the program.
Willem Grooters
OpenVMS Developer & System Manager
Volker Halle
Honored Contributor

Re: Unexpected TPU behaviour.

Willem,

I've used the simple TPU$EDIT example from chapter 8.2 of the utility routines manual and cannot confirm the behaviour described in your post.

TPU$EDIT uses 2 parameters, I've specified them both as A:X.X and defined a logical A as disk1:,disk1:

When I execute the example program, it writes the A:X.X output file into the first directory pointed to by the A logical.

Volker.

Kris Clippeleyr
Honored Contributor

Re: Unexpected TPU behaviour.

Willem,
Could you give the exact syntax of the call to TPU$EDIT. TPU$EDIT requires 2 arguments: the input file & the output file.
Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Kris Clippeleyr
Honored Contributor

Re: Unexpected TPU behaviour.

Willem,
Just tried to write a reproducer ( in C ).
But it doesn't do what you describe.
I've defined ADIR as "HOME$ROOT:[TMP35],HOME$ROOT:[TMP36]", and the input argument to TPU$EDIT is specified as ADIR:X.X, the length output argument is set to 0. The X.X file is created in the [TMP35] directory (as expected).
Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Willem Grooters
Honored Contributor

Re: Unexpected TPU behaviour.

The code sniplet is:

result = tpu$edit(bestand||"/SECTION = EXE:RBS.TPU$SECTION");

I will ask my collegue what's in the section file, since the outputfile (the second parameter) seems empty, I guess the source of the problem is in there.

(kept on hold)
Willem Grooters
OpenVMS Developer & System Manager