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 Select numeric portion from CHAR data... balaji81_k DB2 1 Sat Aug 19, 2017 1:51 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm


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