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
 
Suppress Carriage Return Character during FTP

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

New User


Joined: 19 Feb 2008
Posts: 8
Location: Chennai

PostPosted: Tue Apr 26, 2011 3:32 am    Post subject: Suppress Carriage Return Character during FTP
Reply with quote

Hello Everyone!

Need your assistance on an FTP Issue.

The background:
We use FTP to transfer files from Unix system to Mainframe host. My Mainframe Job logs into Unix Server and GET the file onto a Mainframe flat file. The source for this Unix box is a "File System" box

The Issue:
One of the file at Unix uses x'0D' as a delimiter. (We at Mainframe host have no control on what could be sitting on the file). When I try extracting the file from the Unix box, the x'0D' is intepreted as Carriage Return(CR) character and the rest of the data is written on to the next line.

Help:
I tried the following locsite options:
UNICODEFILESYSTEMBOM=ASIS/NEVER/ALWAYS
SBSENDEOL=NONE
MBSENDEOL=NONE
NOREMOVEINBEOF

Can anyone please throw some light on how to stop interpreting the CR character, to avoid data being written to next line?.

I have set the TYPE as ASCII for FTP transfer. Even tried to change the format to Binary, but in vain. The extracted dataset looks holding bad data.

I have attached my input file and output file for your reference.

Appreciate your help.
Thanks,
Venu

[img][/img]
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8342
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 26, 2011 5:29 am    Post subject:
Reply with quote

MBSENDEOL and SBSENDEOL only have a bearing when sending data to the server -- using the GET command means neither of them will do anything.

What does the file have for end of line if X'0D' is used in other ways? You could try setting up a translate table to convert the X'0D' to spaces but you need to know what the end of line character is. Alternatively, you may have to reconstruct each line from the multiple lines on the mainframe.

The best solution would be to get the file on the Unix server to start using standards (like spaces instead of X'0D' for separators), but the best solution is not always possible.
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: Tue Apr 26, 2011 5:40 am    Post subject: Reply to: Suppress Carriage Return Character during FTP
Reply with quote

When confronting this situation in the past, dealing with ANSI EDI data that unfortunately used a LF as a segment terminator, the best solution I could come up with is to FTP the data in binary mode, wrapping the file into fixed-length records. Then, I'd use Unix System Services to convert the data from ASCII to EBCDIC, and then write a program to un-wrap the data disregarding and/or converting the LF to some other character. Sorry.
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 Removing spaces before the tab character V S Amarendra Reddy SYNCSORT 1 Thu Jun 14, 2018 8:45 am
No new posts JCL to set Return code when Time Out ... vinu78 JCL & VSAM 6 Wed May 30, 2018 11:27 am
No new posts Splitting one row into multiple Rows ... Rajan Moorthy DFSORT/ICETOOL 9 Mon May 14, 2018 10:58 pm
No new posts Getting GG return code abdulrafi IMS DB/DC 2 Tue Apr 10, 2018 12:31 pm
No new posts Invalid XML character while producing... nikhil.bhole IBM Tools 4 Tue Mar 20, 2018 1:24 am

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