Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Extract record for change in combinat... Trinadh DFSORT/ICETOOL 5 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 5 Tue Oct 24, 2017 12:01 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us