field.7. MR Match Record When a matchoccurs.Print datafrom multiplefiles.8. U1 – U8 External Indicators When turnedexternally.Conditionalfileprocessing.9. KA – KN,KP – KYFunction Key Indicators When a functionkey is pressed.Function Keyprocessing.
Note : A thumb rule with these indicators is that whenever a high level indicator isset on all the lower levels automatically get on. For example, when LR is on allother indicators (like L1 – L9) are automatically switched on.
There are basically two programming styles with RPG –1)
RPG Logic Cycle2)
User Logic.RPG logic cycle is best suited for report generation as it is totally controlled by thesystem whereas the user logic is best suited for user application because it is at the solediscretion of the user.1)
RPG Logic Cycle : A logic cycle is a series of steps performed by RPG to process anindividual record. In this style of programming, the system takes entire control of thefiles used and the files are opened, read and closed automatically. In this process,there are two cycles which take place, viz.,a)
One file is designated as Primary file which is processed (READ) by systemimplicitly without any READ operation on that file.b)
No loop is used to READ successive records of primary file.c)
The first cycle is the opening where the files are opened, read and records areprocessed for the first time.d)
The subsequent cycle where the rest of the records are processed, therefore,the file opening is not required here.During the cycle the calculations are done twice:a)
Detail Time : The calculations are performed after the read of every individualrecord.b)
Total Time : The calculations are performed for a group of records together.During the cycle the printing operations are performed 4 times:a)
Heading Time : The headings, titles, etc. are printed during the heading timefor eg. Company Name, Column Headings etc.