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

delete particular records in a ksds file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hyuzen

New User


Joined: 10 Jul 2005
Posts: 58

PostPosted: Thu Sep 01, 2005 1:23 am
Reply with quote

Hi all,

How can I delete particular records in a ksds file whose RECFB=FB and LRECL=80 ? All keys of those records are 999 and begin at 20th positions.

Can I do that using DFSORT utility and same ksds file.

Thanks in advance,
hyuzen
Back to top
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Thu Sep 01, 2005 3:00 am
Reply with quote

I think DFSORT works only for flat files.One thing u could do is copy it into a flat file and use the omit option.The other way is to use FILEAID.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Sep 01, 2005 3:59 am
Reply with quote

Quote:
I think DFSORT works only for flat files


Not true. DFSORT works for VSAM files too.

Quote:
How can I delete particular records in a ksds file whose RECFB=FB and LRECL=80 ? All keys of those records are 999 and begin at 20th positions.

Can I do that using DFSORT utility and same ksds file.


If the KSDS is defined with REUSE, you can use DFSORT's VSAMIO and RESET options along with the OMIT and SORT statements to delete specific records from the KSDS. The VSAMIO option allows a VSAM file defined with REUSE to be sorted in-place (that is, the same VSAM file can be used for input and output).

Note that this kind of "suicide sort" is not recommended unless you can afford to lose the VSAM file if something goes wrong. It's safer to go from the VSAM file to a temporary file and then from the temporary file back to the VSAM file.
Back to top
View user's profile Send private message
hyuzen

New User


Joined: 10 Jul 2005
Posts: 58

PostPosted: Mon Sep 05, 2005 1:09 am
Reply with quote

Dear Frank,
Thank you very much again & again as. You are always very helpful. I would like to try that kind of 'suicide sort' . In the light of your suggest, I will make a copy of Vsam file at earlier steps in the jcl...
Thank you again.
Hyuzen
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts DELETE SPUFI DB2 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top