How to select highest score of each subject or how to select highest income of every month?



How to select highest score of each subject or how to select highest income of every month?..

Answer / Harshvardhan Aditya

To select the highest score for each subject or the highest income for every month in an RPG program on AS400, you can use sorting and grouping techniques. Here's a basic example for highest income: 1) Create a DS for each record with fields for Income, Month, Year etc. 2) Sort the DS by Income in descending order. 3) Group the records by Month, using the GROUP command. 4) Within each group (i.e., for every month), select the first record which will contain the highest income.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More RPG400 Interview Questions

Anyone help me for the below question:- If problem/error occur in *PSSR subroutine,how should I handel it in RPG program.

1 Answers  


wat is scan and check ? give me real time scenarios where we used these keywords in ur projects?

2 Answers   Four soft,


We have a Physical file, after reading 5 records,it has to read LF of that same Physical file,Will it start reading from Ist record or will start reading from 5th record?

5 Answers   Hexaware,


What is the purpose of Panel Groups?

4 Answers  


What is I90(Insure 90)?

1 Answers  


1.String operatio such as moving the characters to the variables? 2.what are the building functions for check file longs? 3.which of the following methods will make externally describe file fields available to a program? A: A/copy statement that specifies the library file and member of the field reference file source code B: A data structure definition specification that names the file on the EXTNAME keyword C: A data structure definition specification that names the file on the IMPORT keyword? D: A Definition specification for each desired field with the REFFLD keyword

1 Answers   CSC, CTS,


What is difference between bind by copy and bind by reference?

1 Answers  


How to update physical file in rpgle without using display file?

4 Answers   GalaxE, IBM, TCS,


difference between CHAIN and READE?

8 Answers   HCL,


please help me answer to this question what is the difference between the binding and srvpgm in ilerpg?

4 Answers   HCL,


can I touch the array during treatments?

1 Answers   IBM,


WHAT IS MENT BY RECORD LEVEL IDENTIFIER ? WHAT IS THE PURPOSE OF THIS?

1 Answers  


Categories