cobol query



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

cobol query

Postby puneet shukla » Thu Feb 26, 2009 1:56 pm

No
Date-1
code
Date-2
Ticket -number
Ticket -amount
Net amount



7
15/02/09
naveen
23/02/09
10000-12
1454692.5


0





7
15/02/09
naveen
23/02/09
1000-12
-1686


1453007





7
15/02/09
sanjay
23/02/09
1001-12
349160.67


0





7
15/02/09
naveen
23/02/09
1001-12
-39560


309600.7





10
15/02/09
Sachin
23/02/09
1003-12
-3068


0



10
15/02/09
Sachin
23/02/09
1003-13
57198.8


57198.8





10
15/02/09
satish
23/02/09
1004-14
4382.04


4382.04








For- net amount



Logic is if No(row1….rown) = no(row2……Rown) and code(row1….rown) = Code (row2…..rown) and Ticket-number(row1….rown) = Ticket-number(row2….rown)

Then Net amount = ticket amount(row1..) + ticket amount (row2…)

And Net amount >0 then Move Net amount value to vraible



Else

Net amount = ticket amount

And net amount >0 then move net amount value to o/p variable

Ese move 0 to o/p variable
puneet shukla
 
Posts: 2
Joined: Tue Feb 24, 2009 11:44 am
Has thanked: 0 time
Been thanked: 0 time

Re: cobol query

 

Re: cobol query

Postby dick scherrer » Fri Feb 27, 2009 2:49 am

Hello,

It is not clear what the question is?

If the info posted is "input" you need to post the output you want from that input.

If it is a request for code, we do not write the code. We will help people debug/complete their code, but will not provide ready-made solutions. Actually, most often, complete solutions posted by other than the requestor are deleted.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post