- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftp stripping end-of-line characters
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 01:35 AM
01-17-2006 01:35 AM
I am ftpinf from HP-UX 11.0 to an IBM mainframe. And when I do the end of line characters from the file are missing!
Transfer type is ascii
any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 01:42 AM
01-17-2006 01:42 AM
Re: ftp stripping end-of-line characters
have you tried binary transfer?
Or it may be a EBCIDIC (sp?) problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 01:45 AM
01-17-2006 01:45 AM
Re: ftp stripping end-of-line characters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 01:45 AM
01-17-2006 01:45 AM
Re: ftp stripping end-of-line characters
The 3270 emulation software normally has an option to send or receive a file from the mainframe.
Have you tried this option yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 01:52 AM
01-17-2006 01:52 AM
Re: ftp stripping end-of-line characters
I believe that you need to toggle EBCDIC mode.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 02:19 AM
01-17-2006 02:19 AM
Re: ftp stripping end-of-line characters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 02:25 AM
01-17-2006 02:25 AM
Re: ftp stripping end-of-line characters
Is the file on the mainframe a fixed size record-oriented one?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 03:08 AM
01-17-2006 03:08 AM
Re: ftp stripping end-of-line characters
Other files transfer fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 03:25 AM
01-17-2006 03:25 AM
Re: ftp stripping end-of-line characters
thanks for this additional info.
There is a problem with ftping XML files. The problem is the translation of the end-of-line character(X13X10) to X85.
Quick solution appears to be a NFS mount?!
Other solution may be available via a friendly search engine of your choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 07:25 AM
01-17-2006 07:25 AM
Re: ftp stripping end-of-line characters
A lot depends on the file type sent and the received.
As James pointed out, if the file is going to sequential disk then a Blocksize, Record Size and Record Format must be specified. If the file is going to a mainframe library this is not necessary.
If going into an ESDS mainframe file, the Record Size must be specified, as well as the optional Reuse parameter.
FTP is not recommended for mainframe KSDS files as the keys do not translate properly.
We perform hundreds of these per day most of which are FB Sequential Disk files.
Most common mode of transfer in our shop is ascii.
Perhaps, if you gave us a bit more information on the file and maybe a sample of the first 10 lines, we could be more helpful.
Best of luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 12:28 PM
01-17-2006 12:28 PM
Re: ftp stripping end-of-line characters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 12:43 PM
01-17-2006 12:43 PM
Re: ftp stripping end-of-line characters
Rick brings up a good point.
The problem is the "mainframe" you mention. Speaking in IBM-ese, OS390 and VSE deal with EBCDIC characters and, thusly, their translation.
Aa well as not all shops have zip/unzip capability in OS390 and VSE.
While we perform zips and unzips in VSE I think your problem will lie in the application accessing this file once it is received by your "mainframe".
Zipping is certainly worth a try.
I really want to see a solution on this one.
Best of luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2006 12:16 AM
01-18-2006 12:16 AM
Re: ftp stripping end-of-line characters
It's interesting to note that I get an xml file via ftp. It also has no line breaks. But I have a tilde (~) at the end of every line. After I get the file, I do this:
cat myfile.txt | tr "~" | "\012" > myfile2.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 08:17 PM
01-22-2006 08:17 PM
Re: ftp stripping end-of-line characters
have these answers helped?
Can you please update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2006 01:15 AM
01-30-2006 01:15 AM
Re: ftp stripping end-of-line characters
are you transfering the file to a "normal " mainframe file or directly to a uss file if it is normal please include details of the lrecl and recfm valuse of the target file and in any case the output of quote stat
the ibm normal datasets have no concept of an eof /eol charcter it is all done by logical record length if this is too short you may loose the ends of lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2006 06:31 AM
01-30-2006 06:31 AM
Re: ftp stripping end-of-line characters
02# file hex85_rtn.pl
03# replace hex value 85 with a hard return.
04# file going in is stdin
05# file going out is stdout
06#
07while( <> ){ # read the whole big 45k line
08 @array=unpack("C*", $_); # convert it into a really big array
09 foreach $x ( @array ){ # go through each char in array
10 if ( $x == 133 ){ # if it's ascii value 133
11 print "\n"; # print a carriage return
12 } else { # otherwise
13 printf ("%c", $x); # print the Char of that ascii value
14 } # end of if
15 } # end of looping array
16} # end of loop each line (ONE big line though)
I don't know if there would be any problems with this program. Feel free to blow holes in it. I know one problem is I the file has one line of 45,000 characters. I would rather pull out 10 characters at a time, not 45,000.
steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2006 04:28 AM
02-10-2006 04:28 AM
Re: ftp stripping end-of-line characters
I worked out a simple solution for this.
Editing the data file before ftp'ing as follows:
fold -w80 [input file] > [output file]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2006 04:40 AM
02-10-2006 04:40 AM
SolutionA coworker gave me a fix the bug in MY perl script.
$sep_tmp="$/;
$/ = "\x85";
while (<>)
{ just like before. }
$/ = $sep_tmp;
My little dilemma was I didn't want to read one line of 45,000 characters. The $/ is the perl name for line separator. By using "\x85", the script automatically took the file in chunks broken up at each hex85. It termed these "chunks" to be lines.
I used $sep_tmp to hold the original value of perl's line separator.
Still.... I never knew about that fold command.