AS/400: How to copy member to new file?

25 pts.
Tags:
AS/400
AS/400 Query
Hello - I'm unable to query a certain member directly, so I need to make a copy of the member in a file then query that file. How do I copy a member to a new file?

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: 8  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
    CPYF FROMFILE(YOURLIB/THEFILE) TOFILE(ANYLIB/ANYFILE)       
    FROMMBR(YOURMEMBER) TOMBR(*FROMMBR) CRTFILE(*YES)           

    41,380 pointsBadges:
    report
  • philpl1jb
    What type of query are you trying to use?
    49,980 pointsBadges:
    report
  • ToddN2000
    If you are unable to query the file you may not be able to copy it could be a security issue. How are you trying to query it , SQL, WRKQRY or other means?
    11,350 pointsBadges:
    report
  • CharlieBrowne
    You can also use SQL and do CREATE ALIAS
    This will create and object the you can query for you that is just over a single member.
    41,380 pointsBadges:
    report
  • MattToland
    Thank you all for the suggestions.  Sorry for my late reply, I've been traveling.

    I'm querying via SQL and will try the CPYF and Create Alias statements...    
    25 pointsBadges:
    report
  • CharlieBrowne
    Thanks for the response.
    Let us know what works best for you.
    41,380 pointsBadges:
    report
  • MattToland
    Create Alias seems to have worked, but when i query the new library/alias, zero rows of data are returned...perhaps there's simply no data in this member...? (i'm learning new tables and structure for a new position)   i'll check with colleagues on this particular member.   thanks again for your help and quick replies!    
    25 pointsBadges:
    report
  • philpl1jb
    The command DSPFD will give you number of records in each member.
    49,980 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