View previous topic :: View next topic
|
Author |
Message |
jamshirqureshi
New User
Joined: 13 Aug 2006 Posts: 20 Location: mumbai
|
|
|
|
hi ALL
If there is sequential file n it has 10 records n i want to update 5th record of peritcular column how to upadate thru cobol prg.
PLZ help me out
thx in advance
jamshir |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
Give examples of inputs and expected outputs then we can help you |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
Pseudo code
Code: |
OPEN OI FILE
READ FILE
MOVE +1 TO WS-REC-COUNT
PERFORM
UNTIL FILE-EOF
IF WS-REC-COUNT = 5
THEN
UPDATE RECORD
END-IF
REWRITE FILE-REC
READ FILE
ADD +1 TO WS-REC-COUNT
END-PERFORM
CLOSE FILE
|
Dave |
|
Back to top |
|
|
jamshirqureshi
New User
Joined: 13 Aug 2006 Posts: 20 Location: mumbai
|
|
|
|
thx dave |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
Hello david can you please explain the need of rewrite in the above code |
|
Back to top |
|
|
|