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

How to Rewrite the file Sequentially


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
devidas-patil

New User


Joined: 08 Jan 2007
Posts: 54
Location: pune

PostPosted: Fri Apr 13, 2007 7:49 pm
Reply with quote

Hi all

how to rewrite the file sequentially in cics
please give the code if possible.
suppose my file name is Dev
keys name is empid
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Apr 13, 2007 8:31 pm
Reply with quote

STARTBR
READNEXT UPDATE
REWRITE
repeat
Back to top
View user's profile Send private message
munikumar
Currently Banned

New User


Joined: 18 Apr 2007
Posts: 24
Location: India

PostPosted: Thu Apr 26, 2007 1:02 pm
Reply with quote

I am also giving you some high level view:

MOVE LOW-VALUES TO KEY
EXEC CICS STARTBR
DATASET(dev)
RIDFLD(key)
END-EXEC.
PERFORM LOOP
THRU LOOP-EXIT
UNTIL EOF.
LOOP.
EXEC CICS
READNEXT DATASET(dev)
INTO (data-area)
LENGHT (lenght of data-area)
RIDFLD (key)
GTEQ
UPDATE
END-EXEC.

<<update statement>>

EXEC CICS REWRITE
DATASET(dev)
FROM(data-area)
LENGHT(length of data-area)
END-EXEC.
IF DFHRESP = ENDFILE
SET EOF TO TRUE
END-IF
LOOP-EXIT.
EXIT.

EXEC CICS ENDBR
DATASET(dev)
END-EXEC.

Regards
Munikumar G
Back to top
View user's profile Send private message
devidas-patil

New User


Joined: 08 Jan 2007
Posts: 54
Location: pune

PostPosted: Thu May 03, 2007 6:09 pm
Reply with quote

Thanks manikumar
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top