WARNING! 16126 bare linefeeds received in ASCII mode


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting WARNING! 16126 bare linefeeds received in ASCII mode
# 1  
Old 02-10-2015
WARNING! 16126 bare linefeeds received in ASCII mode

I am doing FTP from a server and getting below ERROR:
Code:
WARNING! 16126 bare linefeeds received in ASCII mode
File may not have transferred correctly.

I looked into web and found that I may need to change the mode to binary, but when I do so the records are not in readable format...So need the file in ascii so that I can use it in our ETL.

below is the script:
Code:
ftp -n  $SERVER <<EOF>./ftp.log
user $USER $PASSWD
ascii
cd ..
cd $DIR
get $FTP_FILE $LOCAL_FILE
bye
EOF


Last edited by rbatte1; 02-10-2015 at 11:59 AM.. Reason: Added CODE tags for output
# 2  
Old 02-10-2015
What is the ftp server's O/S. What do you mean by unreadable? What is the ftp client's O/S. Did you try a different client like filezilla? Te ftp script is not the issue.
# 3  
Old 02-10-2015
The source server is mainframe server and the server where this script is running is Linux.. Not readable means something like below:

נסײענסץנסףנ@@@@ֳד׃נננננפרפףענסץנסעשננננננננננ@
# 4  
Old 02-10-2015
A "mainframe" might supply differently coded files, e.g. EBCDIC. Try to transfer the file in binary mode and then convert it using e.g. iconv or recode.
This User Gave Thanks to RudiC For This Post:
# 5  
Old 02-10-2015
dd has built in ASCII - EBCDIC conversion.

dd if=oldfile of=newfile conv=ascii gives you a file converted from EBCDIC to ASCII. The only caveat is: do you have packed decimal data (raw "binary" formatted numbers) coming in from the mainframe - dd will not handle that.
These 2 Users Gave Thanks to jim mcnamara For This Post:
# 6  
Old 02-11-2015
I tried dd but it is not converting the file correctly as it has few packed decimal columns in it..

---------- Post updated at 01:55 AM ---------- Previous update was at 01:12 AM ----------

I tried iconv and it says "iconv: conversion from EBCDIC unsupported" and recoded says "No manual entry for recode."....

Can anyone please help me here.. Smilie
# 7  
Old 02-11-2015
If you have packed data on the server, your best bet will be to unpack the data on the server to a straight text format either in ASCII (if you can which won't require any further conversion after you upload your data) or in EBCDIC (in which case you can then use dd to convert the EBCDIC to ASCII after you upload your data).
This User Gave Thanks to Don Cragun For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ascii Mode appending extra records to csv file

I am relatively new to this forum and Unix scripting. ksh script: part 1 :will call a PL\SQL program will create 3 CSV file at the unix directory. part 2 : will sftp the files to the EFT server. Once the EFT server receives these file , it will transfer them to a shared windows folders. ... (3 Replies)
Discussion started by: developerpa
3 Replies

2. Shell Programming and Scripting

Add missing linefeeds between formfeeds in reports

I need to take a report text file that is output from vendor software and there are some pages which have less then the normal amount of lines. I need to add these missing line feeds as there is a merge program that reads this file in fixed character and line mode template to output the final PDF... (6 Replies)
Discussion started by: rnygren
6 Replies

3. Shell Programming and Scripting

Help with removing embedded linefeeds

Greetings all, i have csv file with pipe separated columns SSN|NAME|ADDRESS|FILLER 123|abc|myaddress|xxx 234|BBB|my add ress broken up|yyy In the example above, the second record is broken into multiple lines. I need to keep going until I find a "|" since this issue is with the... (14 Replies)
Discussion started by: stayalive
14 Replies

4. Solaris

"lpr.error] Warning: Received SIGPIPE" continuously appearing in logs

On a Solaris 8 print server we're continuously (every 2 minutes or so) getting these messages in the logs: printd: Warning: Received SIGPIPE; continuing I've applied this patch and restarted the printd daemon, but it doesn't help: #109320-22: SunOS 5.8: lp patch Does anyone have any idea what... (4 Replies)
Discussion started by: aussieos
4 Replies

5. Shell Programming and Scripting

convert ascii values into ascii characters

Hi gurus, I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies

6. Shell Programming and Scripting

How to find whether a file is transferred thro bin or ascii mode?

Hi Gurus, I need to find out, if i have transferred a file from ftp thro bin mode or ascii mode. Say if i have a file called "dec.sh"( u shuld normally transfer thro ascii mode). How can i find out that dec.sh is tranferred from ftp server thro ascii mode or bin mode? Any help would be... (9 Replies)
Discussion started by: Ashok_oct22
9 Replies

7. Shell Programming and Scripting

SFTP in ASCII mode

Hi Copying a file from Unix (Solaris) to a windows server using sftp. File arrives with carriage returns and line feeds screwed (binary file transfer). Is there a way to get these to copy properly without having to edit or messa about with the file on the windows side. I know with FTP you can... (4 Replies)
Discussion started by: billy_mega
4 Replies

8. UNIX for Advanced & Expert Users

Converting ASCII to Binary mode

Dear All, Business Users are transfering ( FTP ) a CSV file into the IBM AIX box with transfer mode as ASCII. But I want to convert the CSV file from ASCII mode into binary mode, as my script expects file in binary mode. Is it possible to do through Unix commands? Thanks in Advance, RK (1 Reply)
Discussion started by: srajeshmca
1 Replies

9. SCO

compressed file was ftpied in ascii mode needs recovery

I am unbale to uncompress a file which was compress then moved to another pc in ascii mode instead of binary mode. Is there any way to recover it. Please help us. While uncompress it is giving corrupt input. (3 Replies)
Discussion started by: raj2610
3 Replies
Login or Register to Ask a Question