How do I copy a data base file to IFS directory

35 pts.
Tags:
AS/400 - CL Command
How do I copy a data base file to IFS directory

Software/Hardware used:
OS 400

Answer Wiki

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

Discuss This Question: 4  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
  • CharlieBrowne
    Use CPYTOIMPF, CPYTOPCD, or CPYTOSTMF
    41,430 pointsBadges:
    report
  • TomLiotta
    It depends on what you want to do with the streamfile that gets created and what kind of "database file" you have. . Use CPYTOIMPF if you are thinking of transferring data from an externally-described database file to another system in a format such as a .CSV file. This is probably the most common way to do it. . Use CPYTOSTMF if the database file is a source file or a single-field physical file that was created without DDS or SQL. . Only use CPYTOPCD if you understand why the command should be used. In the vast majority of cases, it should not be used. . You might also use the Qshell db2 utility and redirect its output to a streamfile. That allows you to choose which columns to copy, what order they should be in, what format the values should have and other details. (By piping the output through the sed utility, you can remove some extra lines that the db2 utility automatically inserts before putting output into a streamfile.) . And of course you can write programs in any language to read database records and write them to streamfile lines. That gives you total flexibility to do it in any form you need. . Tom
    125,585 pointsBadges:
    report
  • ITR
    Can you give me an example of CPYTOIMPF to copy a file as CSV . Thanks
    35 pointsBadges:
    report
  • TomLiotta
    The help text for the command shows an example. -- Tom
    125,585 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