Primary, Secondary Files processing in RPG

620 pts.
Tags:
AS/400
Primary file processing
Hi Iam getting this error while running a cl-program, which call this RPG program, wherein the file is declared as Primary & being processed. I tried debugging the program. The program-flow goes properly till the call to the RPG pgm & goes inside RPG program, but fails in the 1st line itself in F-spec, where the file is declared as primary. Please help. The below msg comes up --------------- "Undefined record type is found in file RMTEXT3015 (C G D F). unmonitored exception at line 1"

Software/Hardware used:
as/400

Answer Wiki

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

Since your file is declared as Primary, the system will automatically read the file for you.
It looks like it read the first record and found an error.
The file it is trying to read is RMTEXT3015
I would guess your problem is related to one of these 3 things.
Is the data correct in that file?
Did you do an override in the CL to something else?
If the file format of your input file the same as the format of the file in the program when it was complied?

Discuss This Question: 7  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
  • ElTerrifico
    I'm thinking the problem is related to how the record is defined on the I spec. Can you post the F and I specs here so we can get a better idea of what is going on?
    620 pointsBadges:
    report
  • TomLiotta
    Since the error specifically refers to "Undefined record type", F- and I-specs are needed. It would also be useful to have the first record in the file. (If it's in keyed sequence, then the lowest record key would be the 'first' record.) The error is at "line 1", but that doesn't necessarily mean the first record. But having the first record shown to us might help a lot in explaining what the error is. Tom
    125,585 pointsBadges:
    report
  • Rafo
    Hi, I have a Primary "X" and Secondary "Y" files in a RPG program, MR is not used and files are logical files. Can someone tellme how this process work?
    10 pointsBadges:
    report
  • TomLiotta
    Can someone tellme how this process work? The only useful explanation is in the Websphere Development Studio: ILE RPG Reference manual. Then, practice and experience solidify the knowledge from the manual. That's what you should be using to learn the language, not asking questions in a forum. There is too much that goes into an answer for a question like that. The manual tells you how it works. The simple answer is that only IBM knows how it works. We just know that it does work. Tom
    125,585 pointsBadges:
    report
  • CoderHal
    You really need to copy the F spec and I specs for these files and post them here so we can see. Is the file externally described? Is it a multi format logical file? Have any formats been included or excluded. Is the file a program described file. I specs should identify all record types and 1st record must match one of record types declared via I specs. Many times an I spec is defined to catch any unidentified records.
    360 pointsBadges:
    report
  • graybeard52
    >> have a Primary “X” and Secondary “Y” files in a RPG program, MR is not used and files are logical files. Can someone tellme how this process work? << If you specified the "E" indicator on the file spec for both flles (or neither file), the program will process all records from the primary file, then all records from the secondary file, then turn onLR indicator and terminate.
    3,115 pointsBadges:
    report
  • TomLiotta
    Perhaps the point should be that asking a new question is not appropriate in a 'Discussion' area of a different question. The new question should be asked in its own thread. Few are likely to see it here and it doesn't help the OP. Nor does it help much for future users of the site who might be searching for similar questions. But maybe not. 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