Operating System - OpenVMS
1753808 Members
8310 Online
108805 Solutions
New Discussion юеВ

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

 
SOLVED
Go to solution
Ataikili
Frequent Advisor

FTP from DOS to Alpha VMS a File Containing CRLF

I don't know anything about VMS systems.
Sure Unix,AS400,Windows.

I Want To Transfer A File(a text file) to VMS from WinXP-DOS like that
1. Line EUROPA(CRLF)AFRICA
2. Line AMERICA
I Can't Find Any Character that means EOL for RMS...(I read it there is no)
If I transfer in Ascii it executes oll CRLFs
like
EUROPA
AFRICA
AMERICA
If I transfer in Binary it only look a string with 512 lenght...
like EUROPAAFRICAAMERICA

May be read hundreds of documents and forum entries especially here but i cant fix it.
I Think it is impossible.
Because RMS seems keeps file lines as diff records.
I may run a script(with DCL may be ) on VMS side after transferring the file?

I have 3 days to solve it...
Thanks a lot for your replies.
22 REPLIES 22
Steven Schweda
Honored Contributor

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

VMS version?

What are the bytes in the original file?
What defines an EOL in that file?

I thought that CR was a line delimiter on
DOS+Windows, so I don't understand how you
can get a CR in the middle of a line there.

> I Can't Find Any Character that means EOL
> for RMS...(I read it there is no)

It depends on the file's record format. In a
StreamCR file, it's CR. In a StreamLF file,
it's LF. In a (plain) Stream file, it's
CRLF. In some other formats, there is none,
but record lengths are included in the file,
to establish the record boundaries. Many
things are possible. What would you like?

> If I transfer in Binary it only look a
> string with 512 lenght...
> like EUROPAAFRICAAMERICA

What did you do to get this display? DUMP
/BYTE could tell you what's really in the
file.

ASCII FTP transfers tend to try to interpret
line endings according to the FTP RFC. As I
recall, CRLF is used to mark an EOL, so I
doubt that you can do an ASCII FTP transfer
and preserve a CRLF pair. The receiving
program will interpret it as an EOL. Which
agrees with your report.

> I have 3 days to solve it...

So you probably have less than that to
explain what's in the file you're trying to
transfer, and what you would like to see on
the VMS side.
Ken Robinson
Valued Contributor

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

The line terminator in VMS is CRLF.

I believe that's true for DOS, also, so I'm surprised that DOS doesn't treat this as 3 lines, as well.

How is this file being generated?

BTW, can you tell us what version of VMS and which TCP/IP package/version are being used.

Ken
Steven Schweda
Honored Contributor

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

> The line terminator in VMS is CRLF.

Sigh. No, it's not. If it were, then you'd
be able to find a CR and an LF in this file:

alp $ pipe write sys$output "aaaa" > eol.txt
alp $ dump /byte eol.txt

Dump of file ALP$DKA0:[SMS]EOL.TXT;1 on 15-AUG-2008 15:48:57.66
File ID (264693,333,0) End of file block 1 / Allocated 69

Virtual block number 1 (00000001), 512 (0200) bytes

00 00 00 00 00 00 FF FF 61 61 61 61 8D 01 00 06 ....aaaa........ 000000
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000010
[...]

Q: Where are they? (A: I don't see them.
Perhaps they're not there.)

As DIRE /FULL will show, this is one of the
more exotic formats, VFC (Variable-length
records with Fixed-length Control), with a
record byte count of 6, which includes the
two bytes of "noise" (01, 8D, the "Control"
stuff) at the front of the record, plus the
four "a" characters (and some more noise at
the end).
Ataikili
Frequent Advisor

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

In VMS side there is a 3. party program FASTWIRE(a payment system program developed by logica). Then you can get incoming payment messages by creating a file from this programs's menu.
Also if you put a file in the same format , in the same directory then you can force it from a menu to read this messages.
Case is this...
I can create this file for incoming messages from FASTWIRE's menu and look it with EDIT.
I saw that
HEADER
MESSAGE1(it contains CR, LF, FF s and it seems as "CR" "LF" "FF")
TRAILER

Also i looked it with DIR/FULL
saw that sequential and carriage return carriage control on it

So sure in DOS side i can put CR LF FF to file and saw it as 3,4,5 lines... it is not a problem.
After i transfer my file i must see it as 3 record LIKE
HEADER
PAYMENT MESSAGE
TRAILER
Ken Robinson
Valued Contributor

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

Sorry, wrong information.

Ken
Hein van den Heuvel
Honored Contributor

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

How do you get, how can you see, the in the middle of 'a line' on the PC side? How can you tell? Can you show us a (binary/hex dump).
It the file behave as you like on the PC?

You may want to apply some editting sequence for a known to be unique string (for example %CR%LF% at the PC side (perl?), tranfer, and un-edit back to real CR-LF., again with perl, or an editor, or a DCL loop.

Now on the VMS side of the house such a file is easy enough to create, but it may be harder to 'recognize' it. Because when typed, with will LOOK like 3 records, but there are just 2.
I'm curious as to who/what the consumer of the file might be?!

Example:

$ crlf = f$fao("!/")
$ create/fdl=nl: test.tmp ! FDL is optional really, all defaults applied
$ open/write test test.tmp
$ write test "EUROPA",crlf,"AFRICA"
$ write test "AMERICA"
$ close test
$ type test.tmp
EUROPA
AFRICA
AMERICA
$ dump /record test.tmp

Record number 1 (00000001), 14 (000E) bytes, RFA(0001,0000,0000)

4143 49524641 0A0D4150 4F525545 EUROPA..AFRICA.................. 000000

Record number 2 (00000002), 7 (0007) bytes, RFA(0001,0000,0012)
414349 52454D41 AMERICA......................... 000000



Enjoy,
Hein
Ataikili
Frequent Advisor

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

May be question is wrong...
Question is that how the magic that RMS keeps only one line displaying as CR LF FF(not executing)
Because if a get this incoming message file from alpha-vms if i put it ascii then executing CR LF FF and it is not same with original
if i put it binary then REAL END OF RECORDS destroyed :)
Steven Schweda
Honored Contributor

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

> What are the bytes in the original file?
> What defines an EOL in that file?

Still a mystery to me.

> [...] what you would like to see on
> the VMS side.

Also not yet clear.

> MESSAGE1(it contains CR, LF, FF s and it
> seems as "CR" "LF" "FF")

I don't understand this. DUMP /BYTE
[/RECORD] could be more helpful.

> After i transfer my file i must see it as 3
> record LIKE

_You_ must see it, or _FASTWIRE_ must see it
that way? What FASTWIRE sees can depend on
the file's record format and on how the
program opens the file.
Ataikili
Frequent Advisor

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

OK.
Let me say that there is a file on VMS created by VMS utilities.
After I login to system i wrote
EDIT filename
I saw that
HEADER
MESSAGE
TRAILER
There is 3 line.
Second line i.e. the payment message details
shown like that ABCDcrEFGHlfJKLMffNOPRSYT
so it is the fact and this is the RMS file.
So i want to transfer my file to VMS system
in the same display.
But when i transfer i need any other character to put END OF LINE to separate line 2 from line 1...