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

Want to update 5th record of peritcular column


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

New User


Joined: 13 Aug 2006
Posts: 20
Location: mumbai

PostPosted: Sun Aug 13, 2006 4:05 pm
Reply with quote

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
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Sun Aug 13, 2006 6:02 pm
Reply with quote

Give examples of inputs and expected outputs then we can help you
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Aug 14, 2006 12:35 am
Reply with quote

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
View user's profile Send private message
jamshirqureshi

New User


Joined: 13 Aug 2006
Posts: 20
Location: mumbai

PostPosted: Wed Aug 16, 2006 1:51 pm
Reply with quote

thx dave
Back to top
View user's profile Send private message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 127
Location: kerala,india

PostPosted: Wed Aug 16, 2006 5:27 pm
Reply with quote

Hello david can you please explain the need of rewrite in the above code
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top