IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Find out the highest value among different groups


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sarat

New User


Joined: 30 Jun 2006
Posts: 1

PostPosted: Wed Oct 18, 2006 9:24 pm
Reply with quote

i have a issue in array.

My requirement is

Requirement

I have to find out the highest value among different groups.

Situation:1

Code Amount groups
10000___ 2000 grp1
10001 2500 grp2
10002 2500 grp1

Here amount of grp1 and amount of grp2 is taken

Third amount is set to zero.

Situation 2

codes Amount groups
29805______ 2000 grp1
58673 2500 grp2
29805 2000 grp4

Here all the three amount are taken.

Now there are 12 different groups. Grp1 to grp12

The above example has only 3 lines. There can be any number of lines.

You can have the count in variable called counter.

In the above example count is 3

You can refer each amount So amt(ctr) gives first amount, varying ctr from 1 to counter gives different amount.

Similarly groups can be accessed by varying same counter

Eg grp(ctr), if counter = 1 then grp(1)


Please help
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Oct 18, 2006 10:18 pm
Reply with quote

Hi Sarat,

Would u please restate ur problem.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Find the occurrence of Key Field (Par... DFSORT/ICETOOL 6
No new posts Find a record count/numeric is multip... COBOL Programming 1
No new posts Need to find a specific STRING COBOL Programming 11
Search our Forums:

Back to Top