vijay Beginner
Joined: 09 May 2003 Posts: 131 Topics: 64
|
Posted: Thu Feb 26, 2004 9:34 am Post subject: Help with EZTREVE |
|
|
Hi ,
I need a small help in EZT.I've a huge vsam file.I've 25 records with key 071000.
I've to create another 25 records with the key changed to '006278'.That means I'm creating a copy
of the old records with a new key.I'm using the following programs.It does the job,but it takes
a long time,bcos I'm trying to delete and add in the same file ,in the same program.
when I use add record the pointer is going to 006278 and trying to read the next record and is
therefore taking a long time.COuld you please help me with this one ?
Thanks,
Vijay
Code: |
POINT FILEA GE FILEA-KEY STATUS
IF FILEA:FILE-STATUS NOT ZERO
DISPLAY 'POINT ERROR: ' FILEA-KEY
STOP
END-IF
GET FILEA
IF FILEA:FILE-STATUS NOT ZERO
DISPLAY 'POINT ERROR: ' FILEA-KEY
STOP
END-IF
DO WHILE NOT EOF FILEA
IF CNTL-A = '071000'
WRITE FILEA DELETE
COUNT = COUNT + 1
CNTL-A = '006278'
WRITE FILEA ADD STATUS
END-IF
IF CNTL-A > '071000'
STOP
END-IF
GET FILEA
END-DO
|
|
|