Results 1 to 6 of 6
Hello:
I was wondering if someone can help me out with a FTP issue… I have a batch process setup that uploads data from my linux server to a mainframe. ...
- 09-27-2011 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 7
FTP Issue Linux to Mainframe
Hello:
I was wondering if someone can help me out with a FTP issue… I have a batch process setup that uploads data from my linux server to a mainframe. The data that I am uploading contains special char which are uploading incorrectly.
The chars I am uploading are: 䏿˜Ž
When the file lands on the mainframe it turns into: ??
Below is the current local char set:
echo $LANG
en_US.UTF-8
Below is the LFTP command I am using:
lftp $MAINFRAME <<-EOFtp
user FTPDXXX XXXX4MF
debug -o $logfile
site sbd=(IBM-037,ISO8859-1)
site LRECL=$reclength
set ftp:ssl-protect-data true
put -a ${filepath}${linuxfile} -o $mffile
set ftp:ssl-protect-data false
quit
EOFtp
Here is the data on the mainframe in HEX(post upload):
period.unknown =??My goal is to be able to transfer the file to the mainframe with the charset resembling the charset on the linux server....
9898984A9999A9476604
759964B45256650EFFD0
Just a FYI... I have swapped code pages and have had no luck... maybe I didnt try enough combinations but if someone could help that would be greatly appreciated. Thank you
- 09-27-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
I assume you are transferring the data as ASCII and not BINARY. That is probably the source of the problem.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-27-2011 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 7
Nope it didnt work.... after looking at the man page I saw that the default for a LFTP put was BINARY so I changed the put statement to:
lftp $MAINFRAME <<-EOFtpThe result on the mainframe was file with no readable text.
user FTPDXXX XXXX4MF
debug -o $logfile
site sbd=(IBM-037,ISO8859-1)
site LRECL=$reclength
set ftp:ssl-protect-data true
put ${filepath}${linuxfile} -o $mffile
set ftp:ssl-protect-data false
quit
EOFtp
EDIT TEST.UPLOAD.FILE Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001
000002 äÊÁ/ÈÁ ÃÑ%Á ÍËÑ>Å íèã Ã?Ê_/È ÄÇ/
000003 ÈÑ?>êÁË?ÍÊÄÁˬ:Ǭç. øÊ?øÁÊÈÑÁË
000004
000005 >Å Ï/Ê*ïáâ ñ+ã*Ä%/ËËÁË**øø%ÑÄ/ÈÑ?>êÁË?ÍÊÄÁˬ:Ǭç. íèã øÊ?øÁÊÈÑÁË à *áâñ
Thanks for the try.
- 09-27-2011 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Why not gzip the data into a .gz file and transfer that as binary data?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-27-2011 #5Just Joined!
- Join Date
- Jun 2010
- Posts
- 7
I still need a ASCII to EBCDIC conversion which the FTP transfer is supposed to be doing.... If I zipped the file on the linux server and transfered it as is I would loose that conversion.... I have also tried ICONV (iconv -f utf-8 -t iso8859-1 input.txt > output.txt) yet that blows up with an error of iconv: illegal input sequence.
- 09-27-2011 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Ah. I didn't realize that you needed to get an ascii to ebcdic conversion. That's not something I've had to deal with for FTP transfers. It may be that the characters in question do not have a responding character in ebcdic, resulting in the symbols you are seeing.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote