School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,084 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,265 people online right now. Registration is fast and FREE... Join Now!




add amount for duplicate entries

 

add amount for duplicate entries

codeman26

14 Jul, 2009 - 01:31 AM
Post #1

New D.I.C Head
*

Joined: 6 Jul, 2009
Posts: 1

I WANT TO ADD THE AMOUNT EVERYTIME DUPLICATE ENTRY OF KEYS OCCURED.
FILE_A CONTAINS OF KEYS: WS-NCA-NO,WS-NCA-ACCT AND WS-NCA-AMOUNT
1.Read FILE_A
2.MOVE WS-NCA-NO TO WS-SAVE-NCA-NO
3.MOVE WS-NCA-ACCT TO WS-SAVE-NCA-ACCT
4.READ FILE_A NEXT RECORD UNTIL END-OF-FILE
5.IF WS-NCA-NO = WS-SAVE-NCA-NO and
WS-NCA-ACCT = WS-SAVE-NCA-ACCT
ADD WS-NCA-AMOUNT
ELSE
MOVE TO VALID

This post has been edited by codeman26: 14 Jul, 2009 - 01:38 AM

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 10:43AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month