Operating System - OpenVMS
1835446 Members
2766 Online
110078 Solutions
New Discussion

Re: Openvms NFS <CR> in files

 
Jerry Lucas
New Member

Openvms NFS <CR> in files

We recently upgraded our alpha box to run OpenVMS V 7.3-1. We use NFS to connect a few of our PC's that map to OpenVMS TCIP exports to transfer files. We also have some pathworks (DOS) machines doing the same.

The problem is: The NFS (DOS and Windows versions) put a CR at the end of each line of text. This causes our Fortran program to not read it correctly. Is there a command or something I can do to have it not place the CR in the file? Thanks
7 REPLIES 7
Åge Rønning
Trusted Contributor

Re: Openvms NFS <CR> in files

Long time since I've done any NFS, But what are the export options?

Maybe
TCPIP ADD EXPORT /OPTION=NODATA_CONVERSION
could make a difference?
See TCPIP HELP ADD EXPORT/OPTIONS for more info.
VMS Forever
Jerry Lucas
New Member

Re: Openvms NFS <CR> in files

Thanks for the response. But, I tried that already and it deoes the same thing. I have tried saving the file locally and then copying back out to NFS and it didn't work.

The normal way we handle file writes (through pathworks) is writing out to the file on NFS and it works fine. When we do the same on the DOS and Windows NFS machines, the alpha box sees the "CR" at the end of the line.

Let me know if you have any suggestions please or if any of you have encountered similar problems.
Hein van den Heuvel
Honored Contributor

Re: Openvms NFS <CR> in files


I'm sure there is some setting in NFS to fix this for future transfers, or maybe use Pathworks instead

It is likely that you can fix the current file with a SET FILE/ATTR=RFM command, possibly followed by a convert. We need a little more detail: DIR/FULL and DUMP/BLOCK=COUNT=1

Please ATTACH that output as a .TXT file to a further reply, as this forum stuff mngles spaces.

A potential solution is:

SET FILE/ATTR=RFM=STM old
CONVERT/FDL=NL: old new

Or you can just use a perl/awk/dcl script to cut of the excess CR:

perl -e "while (<>) {chop; chop; print ""$_\n""}" < tmp.tmp > tt:


gawk /com="{gsub(/\r$/,"""");print}" old /outp=new

Jerry Lucas
New Member

Re: Openvms NFS <CR> in files

Thanks for your responses. I found a solution at
http://h71000.www7.hp.com/wizard/wiz_3707.html

One question..is there a way to forace all files in a directory to have certain attributes (i.e. /Attribute=(RFM=STM)).

Thanks again
Hein van den Heuvel
Honored Contributor

Re: Openvms NFS <CR> in files

As I indicated, I have not played much with NFS mounted disks on VMS, but I suspect you can not change the atrributes on the NFS side. I suspect you need to copy them over and just follow the copy with SET FILE... *.*.*

Hein.

Jerry Lucas
New Member

Re: Openvms NFS <CR> in files

We do the modification from the Windows/DOS side of the house and then read/process the data with OpenVMS.
Jerry Lucas
New Member

Re: Openvms NFS <CR> in files

I added a
set file/attribute=(RFM=STM)
when the existing RFM is STMLF to the batch jobs that process the files and it is now working.