List all file members from a multi member AS400 File

5 pts.
Tags:
AS/400
iSeries
Multi-Member
ODBC Microsoft Access Driver Login Failed
I need to be able to retrieve a list of the members of a multi member file  so that I can process the members that meet certain criteria.  I need to be able to do this from a PC application.

If there is anyone with any ideas I would be grateful.

 

Thanks



Software/Hardware used:
iSeries, SQL Server, ODBC, SSIS, FTP,
ASKED: May 14, 2010  6:37 PM
UPDATED: May 15, 2010  1:04 AM

Answer Wiki

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

Either of these DSPFD commands should work for you:<pre>
DSPFD FILE( mylib/myfile ) TYPE( *MBR ) OUTPUT(*OUTFILE) OUTFILE( somelib/mymbr )
DSPFD FILE( mylib/myfile ) TYPE( *MBRLIST ) OUTPUT(*OUTFILE) OUTFILE( somelib/mymbrlist )</pre>
Run a couple tests to QTEMP and use RUNQRY to view the differences. Choose the variation that you need.

From a PC, the commands could be executed with RMTCMD or through a stored proc CALL to QSYS.QCMDEXC or a few other ways.

Tom

========================================================

Use the i5 command DSPFD to output to an *OUTFILE:

ex: DSPFD FILE(library/file) TYPE(*MBR) OUTPUT(*OUTFILE) OUTFILE(library/file)

Then use query to sort the data to your specs or just access the output file directly from your PC app.

Discuss This Question:  

 
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

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