Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
FTP from unix to Mainframe - change LF to CRLF

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

Active User


Joined: 29 Oct 2010
Posts: 187
Location: Toronto, ON, Canada

PostPosted: Thu Dec 19, 2013 11:19 pm    Post subject: FTP from unix to Mainframe - change LF to CRLF
Reply with quote

I am running an FTP client program on z/OS mainframe to to a GET from a unix server. Since unix ends each line with just a LF the ftp program doesn't recognize this. It wants CRLF.

Is there a ftp subcommand to tell unix ftp server to append CRLF to end of each line? I have searched on google and forums and the FTP manual but no luck. Thanks
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Dec 20, 2013 12:57 am    Post subject:
Reply with quote

Hi Jerry,

Suggest you try to preallocate the mainframe dataset to include the Unix control character. Long ago we did this and ignored the extra character that ended each record.

Hopefully, that would still work. We did this in the mid-90's.
Back to top
View user's profile Send private message
steve-myers

Active Member


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

PostPosted: Fri Dec 20, 2013 1:07 am    Post subject:
Reply with quote

You have two incorrect ideas here
  • Mainframe data sets do not use CR/LF to terminate a logical line like Windoze. Lines are terminated by the logical record length (for fixed length records) or a length specified in the record's RDW for variable length records.
  • When you use FTP to transmit text (not binary) data from Unix to Windoze, the FTP in Windows converts NL data to CR/LF. Similarly, when you use FTP to transmit text data from Unix to a mainframe data set, FTP removes the NL and terminates the logical record using mainframe rules.
When IBM defined the file systems for System/360, they looked at prior art, and decided the use of embedded control characters as was done with the 14xx line of machines was a bad idea and they did away with the whole rotten idea. It's a pity the desgners of Unix, in an effort to toss out bad ideas in OS/360, didn't realize that OS/360 had one most excellent good idea and retained it.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Dec 20, 2013 1:10 am    Post subject:
Reply with quote

Hello,

To add a little - i suspect the received data stair-steps when viewed. This is because of the not used/needed control characters.

Also, if you don't want to pre-allocate, the dcb info can be set in the FTP session.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Dec 20, 2013 3:26 am    Post subject: Reply to: FTP from unix to Mainframe - change LF to CRLF
Reply with quote

Does the Unix box have "unix2dos" avaiable:

unix2dos [ -ascii ] [ -iso ] [ -7 ] originalfile convertedfile

the -ascii option converts the data to Carriage-Return/Line-Feed.
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
No new posts How do I create a mainframe monitorin... anjali.bisht All Other Mainframe Topics 4 Fri Sep 01, 2017 2:20 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm
No new posts change string before sertan string anatol DFSORT/ICETOOL 8 Tue Aug 15, 2017 5:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us