1753359 Members
6507 Online
108792 Solutions
New Discussion юеВ

Re: TNSNAMES File.

 
SOLVED
Go to solution
Hein van den Heuvel
Honored Contributor

Re: TNSNAMES File.

It all depends on the editor you use.
Most OpenVMS editor will create a variable length record file, which will fail unless the output file is re-converted

VIM works, and can be handy in the parenthesis matching.

Also if you used say 'perl' to script an edit, that would work.

Hein.

The Brit
Honored Contributor

Re: TNSNAMES File.

Hein,
Does this mean that I am ok if I edit with "$ edit/tpu", i.e. use EVE editor. Or do you recomment converting after every edit anyway.

Dave.
Steven Schweda
Honored Contributor

Re: TNSNAMES File.

> you would need to be careful every time.

I'm not, and I have very little trouble
(except with new files).

> Try editing a stream_lf version of a file
> [...]

Yes. Let's do that. (Did you?)

1. Create a file using an editor:

alp $ edit /tpu orig.txt
[...]

2. Notice that it's not Stream_LF:

alp $ write sys$output f$file_attributes( "orig.txt", "rfm")
VAR

3. Convert it to Stream_LF (under a different
name):

alp $ write sys$output f$file_attributes( "orig.txt", "rfm")
VAR
alp $ convert orig.txt stmlf.txt /fdl = sys$input:
RECORD
FORMAT stream_lf
Exit <--- Ctrl/Z

4. Verify the format of the converted file:

alp $ write sys$output f$file_attributes( "stmlf.txt", "rfm")
STMLF

5. Edit the Stream-LF file, and save it under
yet another name (so it can't inherit any
attributes from a previous version):

alp $ edit /tpu stmlf.txt /output = stmlf_2.txt
[...]

6. See what happened:

alp $ write sys$output f$file_attributes( "stmlf_2.txt", "rfm")
STMLF

7. Act amazed.


That's on VMS V7.3-2 (Alpha), but find me a
system where it fails.


> Or do you recomment converting after every
> edit anyway.

I recommend running a quick test, and then
relaxing. DIRE /FULL is a quick (if noisy)
way to check a file's record format, too.
Duncan Morris
Honored Contributor

Re: TNSNAMES File.

Dave,

EDIT/TPU should be fine.

I created a dummy file using an FDL to set the STREAM_LF format.

Record format: Stream_LF, maximum 0 bytes, longest 0 bytes
Record attributes: Carriage return carriage control

Then I used edit/tpu to modify the file, and checked the file attributes with DIR/FULL

Record format: Stream_LF, maximum 0 bytes, longest 37 bytes
Record attributes: Carriage return carriage control

After you do any work on your TNSNAMES.ORA file, just make sure that you check that the file still has the correct record format.

Duncan
The Brit
Honored Contributor

Re: TNSNAMES File.

Thanks to you all for your help and comments on this problem.

Dave.