Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Want to update 5th record of peritcular column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Want to update 5th record of peritcular column
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    Post subject: Re: Want to update 5th record of peritcular column
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    Post subject: Re: Want to update 5th record of peritcular column
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    Post subject:
Reply with quote

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

Active User


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

PostPosted: Wed Aug 16, 2006 5:27 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us