Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

FTP from Mainframe to Unix - with CRLF

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1484
Location: Chennai

PostPosted: Thu Mar 23, 2017 5:12 am    Post subject: FTP from Mainframe to Unix - with CRLF
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8028
Location: Bellevue, IA

PostPosted: Thu Mar 23, 2017 8:35 am    Post subject: Reply to: FTP from Mainframe to Unix - with CRLF
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 506
Location: The Universe

PostPosted: Fri Mar 24, 2017 10:08 am    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1484
Location: Chennai

PostPosted: Sat Mar 25, 2017 12:37 am    Post subject:
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1767
Location: UK

PostPosted: Sat Mar 25, 2017 4:00 am    Post subject:
Reply with 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.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8028
Location: Bellevue, IA

PostPosted: Sat Mar 25, 2017 5:07 am    Post subject:
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 506
Location: The Universe

PostPosted: Sun Mar 26, 2017 7:50 am    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1484
Location: Chennai

PostPosted: Tue Mar 28, 2017 8:41 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Mainframe Opening in Allianz India- T... Rajesh Gopinathan Mainframe Jobs 0 Wed Apr 19, 2017 11:33 am
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Produce Mainframe Dash Board Reports ... sdcarlson53 All Other Mainframe Topics 2 Thu Jan 05, 2017 11:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us