IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ZIP and FTP: control M character


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 82
Location: United States

PostPosted: Tue May 10, 2011 9:11 pm
Reply with quote

Hello All,

We are doing something like this. On MVS we are doing ZIP of a file and FTP'ng the file to a unix server. The end users are complaining that there is a ^M at the end of every line. This can probably be taken care of at unix end. But, is there anyhing, any parameter that we can use at ZIP or FTP end on MVS so that it doesnt come up?

Thanks for your help.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue May 10, 2011 9:40 pm
Reply with quote

If you're using the PKZIP for zSeries product, then please note my comment in this previous topic:

www.ibmmainframes.com/viewtopic.php?t=54400&postdays=0&postorder=asc&start=15
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue May 10, 2011 9:41 pm
Reply with quote

Check your manual for the ZIP product. There's nothing you can do in the FTP since a ZIP file must be transferred in binary and therefore the data is preserved exactly as it was on the mainframe.

If you weren't transferring a ZIP file, there is an option in FTP to change the line terminator being sent -- but that only affects text files, not binary ones.
Back to top
View user's profile Send private message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 82
Location: United States

PostPosted: Tue May 10, 2011 9:50 pm
Reply with quote

Thanks SuperK and Robert. We are using ZIP390 and the issue is voming when the zipped and ftp'd file is being unzipped at linux end.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue May 10, 2011 10:13 pm
Reply with quote

What do the programs that these end-users use expect?

Do they want the ASCII data as text or binary (i.e. no EOL or EOF)?
If text, what values do they need for EOL? What values do they need for EOF?
What are you specifying? Does the ZIP/390 product allow you to change those values?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed May 11, 2011 12:27 am
Reply with quote

For ZIP390, you need to use parameter CRLF=LF to indicate not to use the CR/LF line termination sequence but the Unix LF line terminator.

CR is hex '0D' and LF is hex '0A' on a Unix or PC machine. The default for ZIP390 is CRLF=CRLF which is why the Unix people are seeing ^M (x'0D') on each line.
Back to top
View user's profile Send private message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 82
Location: United States

PostPosted: Wed May 11, 2011 11:18 pm
Reply with quote

Brilliant Robert! It worked. Appreciate your help and thanks.

SuperK>> You asked the right questions. Thanks a million.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed May 11, 2011 11:24 pm
Reply with quote

Glad to hear it's working! icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Help with C character vs C string All Other Mainframe Topics 3
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
No new posts Help Control-R IBM Tools 2
No new posts String has hex character need to conv... COBOL Programming 3
Search our Forums:

Back to Top