<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>
Last Wiki Answer Submitted: January 4, 2012 6:01 pm by PutzGrilla670 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
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.
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.
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
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
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.
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
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
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
Are you sending a database file or a streamfile?
That is, is it a PF or is it from an IFS directory?
Tom
Iam sending a PF DDS from file A R FILEPR TEXT('CREDIT FILE') A FILEP 200Amay i know , why do you want to transfer with blank space……
i think u have delimited the extra space while using cpytoimpf cmd…. which has to be transfered?
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.
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
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