RPG/400 How read the record without using any input and outout operations

15 pts.
Tags:
AS/400
How read the record without using any input and outout operations?


Software/Hardware used:
AS/400 (RPG),IBMAS/400
1

Answer Wiki

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

You do this by using the RPG cycle.
Few people do this anymore because it is not really a good structured programming technique.YOu can get more information on this in the IBM RPG manual or any of the RPG textbooks that are available.
Else, just google RPG CYCLE

Discuss This Question: 5  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.
  • TomLiotta
    ...because it is not really a good structured programming technique. Fewer people do it because few sources teach it now. Also, indicator usage is encouraged due to I-spec record identification. That may be countered some by assigning names to indicators. Structured methods can be used mostly as easily with the Cycle as without. However few programs were ever written to do so. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    To use the cycle, the first or primary file is marked P instead of I for input. Just before processing the first line of code the first record is read. Each time the code is ehaused another record is read and the code restarted. When the last record is read the system sets *inlr on. Phil
    54,090 pointsBadges:
    report
  • Cwc
    Sounds like a homework question.
    4,290 pointsBadges:
    report
  • Rudedog
    you would have to define your file using the PRIMARY keyword. Ex A: FFile_A I P E E A K DISK (not spaced properly, but for reference) Ex B: FFile_A UPE E A K DISK Ex C: FFile_A I P E F A K DISK Ex D: FFile_A UP E F A K Disk you cannot READ, WRITE, UPDATE, DELETE a record without some I/O, just in this case, the RPG Cycle will do the I/O its self. example A shows you how to READ/WRITE a record from an externally described (DDS) file. example B shows you how to open a file for READ/WRITE/UPDATE/DELETE with an externally described file. example C shows you how to open a program described file for READ/WRITE. example D shows you how to open a program described file for READ/WRITE/UPDATE and DELETE the P is for PRIMARY FILE the A is for ADD the K is for reading the file by KEYED order. -Sarge
    950 pointsBadges:
    report
  • OldSysAdmin
    Could be he's maintenancing an old program and doesn't see any I/O and is confused?
    945 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.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: