FTP/400 With Blank characters on the end field

710 pts.
Tags:
AS/400 Transfer
Hi Friends, Happy New Year to all. How can I send a file by FTP/400 with blank position on the end field ? Att; PutzGrilla
ASKED: January 3, 2012  9:17 PM
UPDATED: February 28, 2012  12:37 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

<pre>
My Global client receives all the sites the file with the 200 positions, that I may send “x” or “.” this client would need to modify their systems.

Environment that is only my AS/400 sends these positions blank, and they do not want to modify their systems because of one supplier.

Tks,
PutzGrilla</pre>

Discuss This Question: 11  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Do you want to add a blank at the end? Or is it that blanks are somehow disappearing from the end? What platform is the FTP server on? Are you sending a database file or a streamfile? Tom
    125,585 pointsBadges:
    report
  • PutzGrilla
    Hi Tom, Thanks for Your response. I have a file with 200 characters on the record, and when I send this file by FTP/400 to another AS/400 ou a Windows Server, the blanks positions on the end record disappear. Sametimes the record has 100 positions, but I have to send the record with the rest blank. Att; PutzGrilla
    710 pointsBadges:
    report
  • TomLiotta
    Are you sending a database file or a streamfile? That is, is it a PF or is it from an IFS directory? Tom
    125,585 pointsBadges:
    report
  • PutzGrilla
    Iam sending a PF
    DDS from file 
    A          R FILEPR                   TEXT('CREDIT FILE') 
    A            FILEP      200A      
    
    710 pointsBadges:
    report
  • Rajasekhar15
    may i know , why do you want to transfer with blank space......
    1,395 pointsBadges:
    report
  • Rajasekhar15
    i think u have delimited the extra space while using cpytoimpf cmd.... which has to be transfered?
    1,395 pointsBadges:
    report
  • deepu9321
    Hi, How you are trying to transfer the PF to another server? I mean, Are you trying to transfer the PF to another AS/400 Server using Save file in an interactive session? If you are having automated system(Program) for file transfer to another server, Mention the Code which you were having. There might be problem with parameters on CPYTOIMPF(or CPYTOSTMF, if you are using). Mention your procedure in brief. Pradeep.
    3,605 pointsBadges:
    report
  • philpl1jb
    Hi PutzGrilla I'm sure there is a better way, but this should work. Add a 1 char field or increase existing field to 201 Put a dummy character (like an 'X' or a '.') in that field on every line. DDS from file A R FILEPR TEXT(’CREDIT FILE’) A FILEP 200A A ENDC 1A You can receive the FTP into the original format with overflow warnings or add the column to the receiving file. Phil
    48,575 pointsBadges:
    report
  • PutzGrilla
    My Global client receives all the sites the file with the 200 positions, that I may send "x" or "." this client would need to modify their systems.
    
    Environment that is only my AS/400 sends these positions blank, and they do not want to modify their systems because of one supplier.
    
    Tks,
    PutzGrilla
    
    710 pointsBadges:
    report
  • PutzGrilla
    Friends, thanks for all.
    
    The solution is....
    
    LOCSITE TRIM 0
    
    "Regarding Line Wrapping in FTP Source Commands,
    Jane, from Florida wrote: "I am sending a 108 byte file to a UNIX box. The last 26 bytes are blank so when they get to the unix box they get lost. The customer wants it to be the full 108 bytes so I null filled the file and they complained because they want it blank and nulls are equal to a numeric. So my question is will STRUCT R keep my length of the file at 108 even though the last 26 bytes are blank. I have already been through asking to send a carriage return at 109 but they refused. Would using "STRUCT R" resolve my problem?"Response: This user actually solved the problem without help by using a combination of two FTP subcommands: LOCSITE TRIM 0
    ASCII The LOCSITE FTP subcommand specifies whether or not to transfer the trailing blanks in a database file to the remote server. The command can be used in three ways: 
    TRIM 0     Set Trim option to OFF. Trailing blanks of database records are sent. 
    TRIM 1     Set Trim option to ON.   Trailing blanks of database records are NOT sent. This is the default setting. 
    TRIM        Displays the current setting of the Trim option. Conversely, a client doing a get instruction targetted at an iSeries can use the following instructions to ensure the system will send trailing blanks: QUOTE SITE TRIM 0".
    
    Tks,
    PutzGrilla.
    710 pointsBadges:
    report
  • philpl1jb
    Thanks PutzGrilla. Great additon to our information base. "Notes: 1.Prior to the availability of this subcommand, trailing blanks of QSYS.LIB file system records were always removed before transferring the file to the FTP server." That's where my solution errr kluge came from .. from the land of "Prior to availability" Phil
    48,575 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following