Solved

FTP Will strip all trailing blanks, Why?

Posted on 2001-08-27
7
2,425 Views
Last Modified: 2008-03-04
Hi,

I have a PF where in some cases the last 2 fields (2x12 characters) are filled with blanks. During FTP from AS/400 to an ASCII machine, all the records are truncated after the last non blank character. So I'm missing the last two fields. This give some problems for the program that has to process the retrieved data.

How can I prevent this truncation without changing the contents of the resultfile??
Is there any EBCDIC character that will replaced during translation to ASCII by a blank, without stripping the trailing blanks??
0
Comment
Question by:theo kouwenhoven
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 13

Expert Comment

by:samic400
ID: 6429539
Are you doing a bin first before doing a GET? A bin should do the trick if you are retrieving it from the AS400 to your PC.

Or try this.

FTP

then sign on

then type  -  QUOTE SITE TRIM 0 - this should stop the trimming.

Hope this helps!



0
 
LVL 16

Author Comment

by:theo kouwenhoven
ID: 6431146
Samic400,

Using BIN, command is not the solution, it wil stop to convert EBCDIC to ASCII.

The QUOTE option is not supported (I think), when I send the file from the AS400 to the PC the following message appears in the FTP-log file:
"202 Command not implemented, superfluous at this site."


0
 
LVL 13

Expert Comment

by:samic400
ID: 6431356
I'm sorry. I should have read your original question better - 400 to pc not assuming pc to 400.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 3

Accepted Solution

by:
P_S_Price earned 100 total points
ID: 6435511
If You Read The AS/400 manual on TCP/IP confguration you will see in there (Chapter 7 I think) quite clearly that the AS/400 strips trailing Blanks from text files.

There are a couple of routes round this. One is to send the file in Binary mode as mentioned earlier, but initilly converting to ASCII, but a much tidier solution is to use the following sub command: -

LOCSIte Trim 0

0
 
LVL 16

Author Comment

by:theo kouwenhoven
ID: 6435593
Thanx a lot,P_S_Price !!!
It worx
0
 
LVL 16

Author Comment

by:theo kouwenhoven
ID: 6435598
Hey P_S_Price,

Can you tell me why this option is not listed in the FTP helpfunction.
Are there more fo this "Secret" options, where can I find them.

Regards
Murphey
0
 
LVL 3

Expert Comment

by:P_S_Price
ID: 6435670
Ask IBM!!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Programmer 26 575
AS/400 Printout WTR status 2 550
iSeries (AS400) Spool file issue 17 139
Secure coding guides/standards for Cobol programming 10 491
Determining the an SCCM package name from the Package ID
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question