Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
delete particular records in a ksds file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: delete particular records in a ksds file
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    Post subject: Hi
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 Moderator


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

PostPosted: Thu Sep 01, 2005 3:59 am    Post subject:
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    Post subject: hi
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us