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
 

 

deleting a record in a sequential file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
bala-lakshmi

New User


Joined: 01 Mar 2004
Posts: 6

PostPosted: Tue Mar 16, 2004 2:36 pm    Post subject: deleting a record in a sequential file
Reply with quote

hai friends,
please tell me how to delete a particular record from a sequential file .organization is sequential,access mode is sequential
bye
lakshmi icon_lol.gif
Back to top
View user's profile Send private message

anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Tue Mar 16, 2004 4:46 pm    Post subject:
Reply with quote

hi lakshmi,

In a sequential file we cant delete any record directly.AFAIK read the file until that particular record is found and delete it.That is the only way i hope.

THANKS AND REGARDS
ANU
Back to top
View user's profile Send private message
bala-lakshmi

New User


Joined: 01 Mar 2004
Posts: 6

PostPosted: Tue Mar 16, 2004 5:14 pm    Post subject: DELETING A RECORD FROM A SEQUENTIAL FILE
Reply with quote

HAI ANU,
WE CAN NEVER DELETE A RECORD FROM A SEQUENTIAL FILE.
BUT SUPPOSE I DON'T WANT A RECORD SAY IF I HAVE 10 RECORDS
I DON'T WANT THE 7 RECORD THEN HOW WILL I DELETE ?
PLEASE TELL ME WITH A PROGRAM
BYE

LAKSHMI icon_lol.gif
Back to top
View user's profile Send private message
bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Tue Mar 16, 2004 7:16 pm    Post subject:
Reply with quote

hello,
the only way I can think of :
prepare a pgm that will have your seq file as input and a new temporary file (coded &&file with disp=(new,pass)) in your JCL
pgm will read and copy records you want in your temporary file
subsequent steps will 1 delete your seq file then recreate your seq file from temp file.

hope it helps
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Wed Mar 24, 2004 12:33 pm    Post subject:
Reply with quote

In addition to bluebird's post,
We can use SORT with SKIP option to copy records selectively, provided the skip conditions are not that much complex.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Mar 26, 2004 10:00 am    Post subject:
Reply with quote

Hi lakshmi,

Your question should have been addressed in the design phase of the project.

If the file contained a "delete byte" that is turned "on" when the record is "deleted", you accomplish your objective. If space becomes a problem you can use SORT to recreate the file, dropping the "deleted" recs.

Regards, Jack.
Back to top
View user's profile Send private message
kappurajesh
Currently Banned

New User


Joined: 03 Apr 2004
Posts: 4
Location: India

PostPosted: Mon Apr 26, 2004 7:37 pm    Post subject:
Reply with quote

We can delete 7th record for that we have to create two sequential files with same structure , if count the records, if it is 7th , don't write to second seq. file else write it. And transfer to first seq file
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
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 Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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