Without using RCVF command can we retrieve AS/400 physical file

65 pts.
Tags:
AS/400
AS400 physical file
CLLE
iseries v5r4
Physical File
Hi frnds, I have two PF say as PF1 & PF2 and in the both files there are records such as Name, ADDR & PHNO: and now i want fetch data of repeated names in the both PF's. But without using RCVF command can we fetch records or data... Thanks

Software/Hardware used:
V5R4

Answer Wiki

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

Sorry..The question is not very clear.
But what I understood from above.
You can do this with the combination of CRTPF and OPNQRYF command.

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
  • TomLiotta
    ...without using RCVF command can we fetch records or data... The question doesn't make a lot of sense. Why don't you want to use the command that is designed to read records? If you explained the business problem that you need to solve, we might provide alternatives. But asking a question that has an impossible answer or an answer that is extremely complicated doesn't do much good. CRTPF and OPNQRYF almost certainly won't help. Tom
    125,585 pointsBadges:
    report
  • chakramdhar
    Hi frnds, Sorry for my wrong question..., as iam attending interviews on as/400 developers, in an interview they have given me the program of two PF's as they are holding fields like Name, Addr & PH no: and Name fields hold repeated record and as the question was fetch the repeated names from both PF's but with out using RCVF command... so i was confused little bit that how to fetch, plz help me out....
    65 pointsBadges:
    report
  • CharlieBrowne
    I think you need to get a bit more education before you should become and AS400 developer.
    41,380 pointsBadges:
    report
  • TomLiotta
    ...get a bit more education... I agree; but then again, I've run across more than a couple developers who didn't know this about CL enhancements. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    ...the question was fetch the repeated names from both PF’s but with out using RCVF command… The proper answer might be "Why? The RCVF command is capable of being used in CL for two different files in the same CL program, as long as a current release of the operating system is used." Without RCVF, V5R4 and later ILE CL could also use the Call Level Interface (CLI) APIs or even C functions such as _Rreadk() -- but you might be better off coding in C. Why would it be done in CL? If _Rreadk() or related APIs are used, I wouldn't quite say that it was actually being done in "CL"; it's being done via calls into a different language. There are a few different possibilities. But because RCVF can be used, there's not much reason to use anything else. I'd say that the only reason would be that no HLL compilers are available when the CL is coded. I don't think I'd want to hire someone who would code ridiculously complex CL modules where a simple RPG module was appropriate. Tom
    125,585 pointsBadges:
    report
  • bvining
    Vendor response: The Control Language for Files (CLF) product, described here, allows a CL program to fetch records without using the RCVF command. In addition to fetching records you can also write, update, and delete records; work with null fields; access file information; etc. No API coding necessary, no HLL compiler needed..
    6,540 pointsBadges:
    report
  • Vatchy
    OPNQRYF is the only way to do this without buying some package. The problem was to fetch the records; what wasn't stated was what to do with the records. In this case use OPNQRYF to read the records and either output them to a printer file or to another database file. This fulfills the letter of the request as stated.
    1,410 pointsBadges:
    report
  • TomLiotta
    In this case use OPNQRYF to read the records... OPNQRYF doesn't read records -- it only opens the file. You still need to use RCVF to read the records into the program. You could use CPYFRMQRYF to copy records from the open file into another file, but the program could also use straight CPYF if copying was the actual requirement. 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