View previous topic :: View next topic
|
Author |
Message |
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
We are sending a PS FB LRECL=80 file from Mainframe to a Unix FTP server. Mainframe is the client.
Currently the file has only LF X'OA' and is missing CR X'13' . We would want to have CR+LF on the file.
FTP parms:
Code: |
FTP.SERVER
USERID
PASSWORD
ASCII
LOCsite lrecl=80 blksize=27920
LOCSITE SBSENDEOL=CRLF
put 'WELLS.PS.FILE' "wells.txt"
quit |
When I tried LOCSITE SBSENDEOL=CR The destination file had neither CR or LF.
I tried QUOTE SITE HELP
Code: |
ftp> QUOTE SITE HELP
214- The following SITE commands are recognized (* =>'s unimplemented).
UMASK CHMOD BANDWIDTH PASV
IDLE HELP KEEPALIVE
|
Does this mean that only these commands are supported on QUOTE SITE command?
Thanks in advance,
Vasanth.S |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
QUOTE SITE HELP will tell you what the server SITE command supports -- but when FTP goes from the mainframe to the Unix machine, the mainframe is the client not the server. Did you try QUOTE LOCSITE HELP ?
I suggest using MODE S before the LOCSITE SBSENDEOL CRLF command. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
From z/OS V1R13.0 Comm Svr: IP User's Guide and Commands
Quote: |
SBSENDEOL
Specifies which end-of-line sequence to use when ENCODING is SBCS, the data transfer type is ASCII, and data is being sent to the server. The following are possible values: ... |
Personal opinion: I'm not sure how valuable this is. When you send ASCII data the sending site sends a standard TCPIP defined end of line to the receiving FTP site, which converts this end of line to the standard end of line for the receiving site. If, in fact, the receiving site is Unix, as you claim, inserting the CR LF is just going to confuse things since CR LF is the Windoze end of line; *nix uses a different end of line, particularly if the data is being sent to another site. The manual also suggests this is not universally supported. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Thank you both for your thoughts.
Quote: |
I suggest using MODE S before the LOCSITE SBSENDEOL CRLF command. |
Hi Robert,
Yes I did try MODE S. Still no joy. The file has only LF.
Quote: |
*nix uses a different end of line, particularly if the data is being sent to another site. |
Yes Steve, that is the problem. The file is FTP'ed to a NAS FTP server which runs Unix. The file is then accessed by multiple people from Windows machines.
So when they view the file in windows the file does not have CR and LF.
I wanted to know if there was a way to force CRLF from the sending side(Mainframe) and accept it as is on the receiving side(Unix). |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
If you created the dataset with ASCII coding instead of EBCDIC and ensured that the CRLF pair were properly appended then you could transfer the data set in binary mode. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
I've seen this problem before. I don't recall what the solution(s) were. I know one possibility would be to transfer the data to a Windows server, then to the Unix server (REXEC can help automate this solution) in binary -- which works well as long as there is a Windows server to transfer to. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Nic Clouston wrote: |
If you created the dataset with ASCII coding instead of EBCDIC and ensured that the CRLF pair were properly appended then you could transfer the data set in binary mode. |
A utility program to transform an EBCDIC data set to an ASCII data set with CR LF as an end of line suitable to send as binary data is relatively easy to write.
If you are interested, send me a PM with an E-mail and I can send you the utility. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Quote: |
If you created the dataset with ASCII coding instead of EBCDIC and ensured that the CRLF pair were properly appended then you could transfer the data set in binary mode. |
Thanks for the input Nic. I guess I got to do it the hard way.
Quote: |
I know one possibility would be to transfer the data to a Windows server, then to the Unix server (REXEC can help automate this solution) in binary |
Yes we do this as a work around currently.
Quote: |
If you are interested, send me a PM with an E-mail and I can send you the utility. |
Thank you Steve. |
|
Back to top |
|
|
|