Number of records for a file

pts.
Tags:
AS/400
Mike wrote in with this question recently: "Is it possible to find out the number of records for a file on the iSeries from a mainframe FTP?" Do you know? -- Debra Tart, associate editor, Search400.com

Answer Wiki

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

I’m not sure what is meant by the question, but once the file is on the 400 in a CLP (or CLLE), you can use the command RTVMBRD to check the number of records. (e.g., “RTVMBRD FILE(library-name/file-name) MBR(member-name) NBRCURRCD(&recordcount)”. You can also use the QUSRMBRD API within an HLL program to retrieve the information.

Discuss This Question: 2  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
  • DeadMeatinLA
    May I be so bold as to "second guess" what you are trying to do... If you want to know how big a file is on the AS/400 so that you don't load too large a file to your client with FTP... you would probably want to write a program for the AS400 that would be called from the client through FTP (QUOTE RCMD pgmname )that would use the RTVMBRD command as noted in the last post... and then depending on your requirements either initiate the FTP from the AS400 to the client if it were small enough, or not send it if too large. If you have a lot of variables you could pass parameters for each run delineating the file and member name to be checked, the size limit, and even the client name of the file for the AS400 to use in the FTP PUT statement.
    0 pointsBadges:
    report
  • TomLiotta
    Even if you could do it, what would a mainframe FTP be able to do with the info? If there's no explanation how the info would be used, there's no point in listing the many, many ways the info might be accessed from within a FTP session. (DSPFD, RTVMBRD, FTP dir, numerous program calls, etc.) 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