Operating System - OpenVMS
1829103 Members
2688 Online
109986 Solutions
New Discussion

File types after Pathworks copies a file to my XP machine

 

File types after Pathworks copies a file to my XP machine

Let's say I have a file of fixed length records, say 50 bytes long. Now I drag the file to my local c: drive. PW puts a CR-LF at the end of each record, to make it a stream file.

Now I drag the file back. The file is marked STREAM. So I use
"set file /attr=(org:seq, rfm:fix, lrl:52)

Notice the lrl is 52, not 50. I need to do this because the CR-LF is still there.

Is there a way around this? Can I tell PW to just copy the file itself, wo/ the CR-LF? And can I do this on a file by file basis, or do I set a default somewhere?

Dom
5 REPLIES 5
Andy Bustamante
Honored Contributor

Re: File types after Pathworks copies a file to my XP machine

You don't say what version of Pathwors (or Advanced Server) you're using, but Pathworks will only properly handle fixed length files with a record length of 512. This is to maintain compatability with the Microsoft spec and is not considered a "bug" according to HP's Pathworks support group. If you need to move the file with a PC, you could consider using Zip/Unzip.
If you don't have time to do it right, when will you have time to do it over? Reach me at first_name + "." + last_name at sysmanager net
John Gillings
Honored Contributor

Re: File types after Pathworks copies a file to my XP machine

Dom,

Instead of SET FILE, it would probably be better to CONVERT the file back to fixed length.

$ CONVERT/FDL=SYS$INPUT infile outfile
record
format fixed
size 50

Unfortunately the Windows & Unix worlds don't have a concept of "file type". The upshot is, no matter what is done to a file to translate the file, it will be wrong for someone!

On the other hand... if the program reading your file is using RMS services and not actually specifying the record format, it shouldn't matter. RMS will return the same record regardless of the record format.
A crucible of informative mistakes
Hein van den Heuvel
Honored Contributor

Re: File types after Pathworks copies a file to my XP machine

Dominic,

If the original file, as you suggest, indeed had the 'FIXED' record format, then I agree with Andy that pathworks should leave it alone. An other file type it should leave alone is 'user defined, aka undefined' as in SET FILE/ATTR=RFM=UDF. It would be interesting to try that, but of course for any prior transfer the damage is already done.
If, back on the VMS side, the record access is through simple RMS gets (like TYPE or SEARCH or an HLL read) then as John observe, then file will work transparently as RMS will eat the CR-LF as record seperator.

If direct access is done (RAB$_RAC==RA$C_KEY) then you can either change the file attributes as you did and accept the CR LR as databytes, or you will have to convert the file to get rid of them.

As John shows the command for that would be :
$ CONVERT/FDL=SYS$INPUT infile outfile
record; format fixed; size 50

btw: This would be a great example of the requested new covert DCL option to just pass an FDL file as a string!

If you leave the file 'RAC=STM' as it was, then this is all that is needed. But after that set file /attr=(org:seq, rfm:fix, lrl:52) you would have to add the /TRUN switch to toss the excess CRLF chars.

You may also want to check out the EXCHANGE/NET conversion options to recorver the file.

hth,
Hein.
Antoniov.
Honored Contributor

Re: File types after Pathworks copies a file to my XP machine

Hi Dom,
new file created by PC have stream attribute by default.
I guess you can change this defalt as follow:
$ ADMIN MOD SHARE -
/HOST=(RMS:SEQUENTIAL)
or else
$ ADMIN MOD SHARE -
/HOST=(RMS:UNDEF)
I think if you set UNDEF after copy you have to set file attribute with SET FILE command.
Warning: I never tryed this command, it's appear to me by the help.

Antonio Vigliotti

Antonio Maria Vigliotti
Doug Phillips
Trusted Contributor

Re: File types after Pathworks copies a file to my XP machine

Dom,

What is your goal? Apparently, the file is being created on VMS. Do you need to use the file on Windows, VMS or both?

Windows files are /attr=(org:seq, rfm:stm, lrl:0, mrs:0) and if you are creating fixed length records for a Windows application, you must create the RMS file with those attributes (plus rat:none if you wish). I've not found a way to $convert or $set file the RMS file to get it to the correct Windows format.

If PW detects records in a file, then it will convert those RMS records into something it thinks Windows needs.

-Doug