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

How to delete the record in the dataset -CLIST


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
svrekha

New User


Joined: 08 Mar 2007
Posts: 6
Location: coimbatore

PostPosted: Thu Nov 20, 2008 12:22 am
Reply with quote

Hi!
I given a input in the panel , if those values exist in the dataset, it should delete the record ,,,
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 20, 2008 12:41 am
Reply with quote

svrekha, your profile lists you as a "software engineer", so I would think you'd already be familiar with sequential dataset processing.

You can't delete records from a sequential dataset. All you can do is copy all of the records you want to keep to a new dataset, skip the one you wish to delete, and create the new dataset. Then, if desired, delete or rename the current dataset and copy the contents of the new dataset into the existing dataset. Obviously, it would be beneficial for you to not write your own process, but rather use an existing utility for this.

Other than that standard process, the only other way to remove a record from a sequential dataset is by editing it. Edit it, find the record, delete the record, then save it.
Back to top
View user's profile Send private message
svrekha

New User


Joined: 08 Mar 2007
Posts: 6
Location: coimbatore

PostPosted: Thu Nov 20, 2008 12:56 am
Reply with quote

Thanks a lot kevin,,, i tried giving the same , but not working and also some clist commands am not sure,,, I you give some sample examples it will be really helpful...
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 20, 2008 1:19 am
Reply with quote

I don't know CLIST (not too many people use it anymore) but if you describe your process in detail I might be able to hobble together some code.
Back to top
View user's profile Send private message
svrekha

New User


Joined: 08 Mar 2007
Posts: 6
Location: coimbatore

PostPosted: Thu Nov 20, 2008 2:11 am
Reply with quote

Am giving the an input in the screen ,,,, it should check whether the input given in the screen is equal to the record in the dataset ,, if yes , it should delete /skip the record ,,,,
It checks till the EOF , if found it will delete ....
Please let me know if you need any details
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Nov 20, 2008 2:47 am
Reply with quote

I think you can probably use DFSORT to exclude records. That is, make a new dataset without the records that you do not like.
Back to top
View user's profile Send private message
svrekha

New User


Joined: 08 Mar 2007
Posts: 6
Location: coimbatore

PostPosted: Thu Nov 20, 2008 7:25 am
Reply with quote

but i need in clist....
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Nov 20, 2008 10:09 am
Reply with quote

Call DFSORT from your clist. (actually, rexx is preferred).

And especially, call DFSORT if you are talking about a lot of records.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts DELETE SPUFI DB2 1
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top