FTP negative numbers from a flat text file to the iSeries. We use Reflections 5250 terminal

155 pts.
Tags:
Development
We are trying to FTP a flat text file from windows into our AS/400 (iSeries). Position 52 to 58 of the text file represents a number that is put into a AS/400 field that is signed 7.2. How would you put a negative number into the AS/400 field using FTP? Whatever are in the seven position in the text file is exactly placed in the AS/400 field. If we put a negative sign in front of the number, the negative is also in front on the field in the AS/400. The negative sign must be behind the number. If we File Transfer the text file to the AS/400, the negative number is dispayed correctly. We want to automate the process so File Transfer will not work for us. Appreciate any help you can give.

Answer Wiki

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

Try it in 2 steps. FTP to flat file file on iSeries then CPYFRMIMPF to defined file. Translation should be taken care of automatically.

Discuss This Question: 3  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
  • 14mesavista
    My suggestion is similar to the 1st one. You could write a pgm that intercepts the data after it lands on the 400 and before it gets to the final destination file. The pgm can look for the negative sign and decimal point and translate the value accordingly.. It's an extra step, but it works and can still be automated, so who cares in the end? Good Luck :)
    0 pointsBadges:
    report
  • Jaicee
    If you're using the file transfer in Client Access you can automate using the RFROMPCB command. This is run from a command prompt or in a batch file. If not make sure the product you're using doesn't have a batch feature. You could also store the file on the IFS and then access it using CL commands or you could write a program to read the file directly (or use any other iSeries tool or method). If you wanted to keep the file on a Windows server, i believe you can use the QNTC file system to link to the server and read it from there. Many solutions, depending on what you are doing. I had originally written this in more detail, but my PC crashed and... well... you know... that's why we have an iSeries. B) If you need more of an explanation don't hesitate to ask!
    0 pointsBadges:
    report
  • Maam
    Hello there: I have a similar issue, where I have to send in packed fields in flat file from Windows environment to iSeries. The issue is that when we do FTP in ASCII mode, the packed fields are messed up (converted to the ASCII character equivalent of packed HEX instead of HEX). If we try FTP in binary mode, the whole file is messed up (no EBCDIC translation occurs I guess). Any ideas on this?
    10 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