Download physical file from AS/400 to text file using FTP

280 pts.
Tags:
AS/400
AS/400 FTP
PF file
How to download PF from AS400 to text file in PC?

I tried reflection.. It worked but having issues with larger files.

I tried FTP command get from system. But the text file obtained has lot of special characters which are not present in the database. I gave the conversion mode as ASCII.

Any other way to do FTP?

 

 



Software/Hardware used:
AS400
ASKED: April 30, 2012  12:00 PM
UPDATED: August 22, 2013  6:37 PM

Answer Wiki

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

Do you have Client Access why not use File Transfer?

Discuss This Question: 7  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
    FTP can transfer files, but database files that have packed or binary fields cannot effectively be converted to ASCII. You could create a SQL VIEW of the file to present packed or binary values as characters -- then you could FTP the view. Most common, though, probably is to use the CPYTOIMPF command to generate a .CSV file from the database file. The .CSV file can then be copied to a PC. Excel and other PC programs can open .CSV files. Tom
    125,585 pointsBadges:
    report
  • vibgyor
    The CSV file will get created in folder in AS400 right? How to extract data from this folder to PC?
    280 pointsBadges:
    report
  • vibgyor
    How can i get client access?
    280 pointsBadges:
    report
  • vibgyor
    Tom, How to Create the SQL View of a file? If we are using CPYTOIMPF what should be given in the part "to stream file". Where should i check for the csv file?
    280 pointsBadges:
    report
  • TomLiotta
    How to Create the SQL View of a file? Use the SQL CREATE VIEW statement. You might use the STRSQL command to enter the interactive SQL environment, or you might put the statement into a source file member and execute it with the RUNSQLSTM command. Or if you have iSeries Access installed on your PC and can use iSeries Navigator, you might choose to use the 'Run SQL scripts' function. Or there are a number of other possibilities depending on what tools you have available for entering and running SQL statements. If we are using CPYTOIMPF what should be given in the part “to stream file”. Put the path to the .CSV file that you will be creating. For example, if you have a 'home' directory named /home/Vibgyor, you might specify TOSTMF('/home/Vibgyor/mynew.csv'). That would put the result into a streamfile named mynew.csv in the /home/Vibgyor directory. Where should i check for the csv file? Check for it in the place that you put it. In the above example, you would check on your AS/400 in your /home/Vibgyor directory. If you put it in a directory that is shared out to your network, then you could open the share on your PC and check for it there. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    How can i get client access? You need to ask your system administrator. I don't know if your organization has it available nor how it is provided for you. Tom
    125,585 pointsBadges:
    report
  • graybeard52
    F.R.O.G. is a great tool for running SQL scripts, and has an option to save the resuts to a CSV file that can be located on your Windows server or PC. And its free.
    3,115 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