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
 

 

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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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