Operating System - OpenVMS
1752805 Members
5346 Online
108789 Solutions
New Discussion юеВ

Re: FTP from DOS to Alpha VMS a File Containing CRLF

 
SOLVED
Go to solution
Steven Schweda
Honored Contributor
Solution

Re: FTP from DOS to Alpha VMS a File Containing CRLF

> so it is the fact and this is the RMS file.

Ok. DIRE /FULL. What is the "Record format"
of your file?

I can't say yet, but it's possible that the
FTP server (or client) can not create a file
with that record format.

> So i want to transfer my file to VMS system

Ok. If you can get all the bytes in your
file on the Windows system to agree with the
bytes in the the good file on the VMS system,
then you should be able to do a binary FTP
transfer, and then set the file attributes
(like record format) to what you need on the
VMS system.

> VMS version?

Still a mystery to me. Recent versions let
you SET FILE /ATTRIBUTES. On older versions,
it's harder, but still possible.

DUMP /BYTE (without /RECORD) will show you
all the actual bytes on the VMS side.
Ataikili
Frequent Advisor

Re: FTP from DOS to Alpha VMS a File Containing CRLF

>What is the "Record format"
Sequential

>If you can get all the bytes in your
file on the Windows system to agree with the
bytes in the the good file on the VMS system,
then you should be able to do a binary FTP
transfer, and then set the file attributes
(like record format) to what you need on the
VMS system.

When i get this file to PC binary i saw first line and second line has no char between them(HEADERMESSAGE)

When i get this file to PC ascii i saw first lineLFsecond line...
(HEADER
ABCD
EFGH
JKLM)


> VMS version?
OpenVMS Alpha 7.0 ds-15


>DUMP /BYTE (without /RECORD) will show you
all the actual bytes on the VMS side.
Hmm OK Steven let me send you original file's DUMP(created by VMS system)
Steven Schweda
Honored Contributor

Re: FTP from DOS to Alpha VMS a File Containing CRLF

> >What is the "Record format"
> Sequential

Look again.

Copy+paste the DIRE /FULL output?

> When i get this file to PC binary [...]

That's binary FTP?

> [...] i saw [...]

You "saw" _how_? If you want to see the
control characters, then you really should
use some kind of dump program, not a text
processing program (to which the control
characters have special meanings).

And I thought that the idea was to move a
file from the Windows system to the VMS
system. I don't think that I care what
happens to a file going the other way. Do
you?
Robert Gezelter
Honored Contributor

Re: FTP from DOS to Alpha VMS a File Containing CRLF

Ataikili,

First, welcome to the ITRC OpenVMS Forum!

Reading this thread, I think that there may be a misunderstanding.

- Where is the original file (Windows or OpenVMS)?
- What commands are used to FTP the file (and where is the FTP running, OpenVMS or Windows)?

Transferring files with embedded control characters between systems can pose challenges. CR LF FF are used as line/record terminators in some situations, and in the case of RMS, there is support for counted records [the most common] as well as the stream formats.

FTP between Windows and OpenVMS has two modes: BINARY and ASCII. ASCII interprets the control characters in the stream (per the RFC) and BINARY does nothing. Unfortunately, what would appear to be here is possible doing both, which would not be supported by FTP.

If one has to create a file on Windows that includes file control characters in the stream, and is otherwise a standard RMS file using character counts to delimit records, it would (theoretically be possible to do so, but it would be complicated).

A far better solution is to use a plain text format file on the PC for editing, and process it after arrival on OpenVMS into the file with embedded control characters. A DCL command file can read the original file and produce the file with the embedded control characters in a few lines of code.

- Bob Gezelter, http://www.rlgsc.com
Steven Schweda
Honored Contributor

Re: FTP from DOS to Alpha VMS a File Containing CRLF

> - Where is the original file (Windows or
> OpenVMS)?

As I understood things, it all works with
files created (somehow) on a VMS system, but
the desire was to create a file on the
Windows system, use FTP to transfer it to the
VMS system, and have an equivalent (working)
file on the VMS system.

> - What commands are used to FTP the file

Other than ASCII-binary, does it matter?

> (and where is the FTP running, OpenVMS or
> Windows)?

I assume that the FTP client is on the
Windows system, and the FTP server is on VMS.
Again, does it matter?

> [...] Unfortunately, what would appear to
> be here is possible doing both, which would
> not be supported by FTP.

Huh?

> [...] but it would be complicated).

That rather depends on how the source file is
being created on the Windows system. It's
probably hard using Notepad, but writing a
two-byte byte count at the beginning of every
"line" from a C program would be pretty easy,
I should think. (I could do it, so it must
be pretty easy.) Getting the SET FILE
/ATTRIBUTES command run on the VMS system
after the binary FTP transfer would seem to
me to be more complicated than putting out
the bytes for a "Record format: Variable
length, [...]" file on a non-VMS system.

> A far better solution [...]

Well, another possible solution, perhaps. As
usual, many things are possible.
Ataikili
Frequent Advisor

Re: FTP from DOS to Alpha VMS a File Containing CRLF

Hmm, Mr. Gezelter i think you clarify this beginner's problem best


>Where is the original file (Windows or OpenVMS)?
>>in OpenVMS

>What commands are used to FTP the file (and where is the FTP running, OpenVMS or Windows)?
>>ftp 192...
cd ...
asc
put myfile
Ftp running on Windows(BUT if you propose me to start it from vms , if there is special functions sure i can)


>Transferring files with embedded control characters between systems can pose challenges. CR LF FF are used as line/record terminators in some situations, and in the case of RMS, there is support for counted records [the most common] as well as the stream formats.
>>Hmm counted records... it turn me down:(



>FTP between Windows and OpenVMS has two modes: BINARY and ASCII. ASCII interprets the control characters in the stream (per the RFC) and BINARY does nothing. Unfortunately, what would appear to be here is possible doing both, which would not be supported by FTP.
If one has to create a file on Windows that includes file control characters in the stream, and is otherwise a standard RMS file using character counts to delimit records, it would (theoretically be possible to do so, but it would be complicated).
A far better solution is to use a plain text format file on the PC for editing, and process it after arrival on OpenVMS into the file with embedded control characters. A DCL command file can read the original file and produce the file with the embedded control characters in a few lines of code.
>>Then i must prepare a dcl script(it is not need any compilation i think). i read a record and write it to another...

>>OK I will send you DUMP of original RMS file that is created by VMS.
Let me summarize my question shortly again
I only want to create a file in PC side that has the same format with this original one.

Thanks for your help
Ataikili
Frequent Advisor

Re: FTP from DOS to Alpha VMS a File Containing CRLF

Mr. Schweda and Heuvel

Tomorrow morning For original VMS RMS file(created on VMS side)
i will attach DIRE /FULL originalfile output here
i will attach DUMP/BYTE originalfile output here
i will attach DUMP/RECORD originalfile output here
i will wrote VMS version

I have now a few dump program on my PC(xvi32,HexFrame,hworks32)

I will be ready tomorrow morning at console of Alpha VMS Server...

Best wishes see you all
Ataikili
Frequent Advisor

Re: FTP from DOS to Alpha VMS a File Containing CRLF

Hi all again,
pls see the attached file here containing DIRE/FULL DUMP/BLOCK and DUMP/BYTE
Ataikili
Frequent Advisor

Re: FTP from DOS to Alpha VMS a File Containing CRLF

OpenVms Alpha Operating System v7.3-2
Ataikili
Frequent Advisor

Re: FTP from DOS to Alpha VMS a File Containing CRLF

├Д┬▒ thinh that is enough to describe the original rms file.
Now how can i create a file like that