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 all records from KSDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Aug 16, 2006 4:48 pm    Post subject: Delete all records from KSDS
Reply with quote

Hi,

Assume I have 'n' records in KSDS. My requirement is to delete all the records from VSAM. Program/SORT is also not allowed.

How can I achieve this? Thanks in advance for your help.

Regards,
Murali
Back to top
View user's profile Send private message

red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Wed Aug 16, 2006 10:47 pm    Post subject:
Reply with quote

if u need to empty the KSDS. why dont you delete it and define it again.?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Aug 17, 2006 8:56 am    Post subject:
Reply with quote

Or REPRO it to itself, with COUNT 0.

O.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Aug 17, 2006 10:01 am    Post subject: Re: Delete all records from KSDS
Reply with quote

Hi All,

I can't delete/define the KSDS as it is a region file (CICS region). I tried with count(0), but still I found records.

Waiting for the solution and Thanks for responses.

Regards,
Murali Mohan K
Back to top
View user's profile Send private message
red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Thu Aug 17, 2006 11:38 am    Post subject:
Reply with quote

Even if it is a region file. you can deallocate it from the region and try deleting and redefining it and then again allocating it to the cics region.

or open up the file in fileaid n delete all the records( this is a tedious and inefficient process)
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Aug 17, 2006 11:49 am    Post subject: Re: Delete all records from KSDS
Reply with quote

Thanks for the reply red_roses.

But, we are not allowed to deldef the KSDS. Is there any option in IDCAMS through which I can achieve the required result?

DFSORT in my shop doesn't support VSAM writing and my team is not interested using program for this.

Regards,
Murali Mohan K
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Thu Aug 17, 2006 12:40 pm    Post subject:
Reply with quote

Hi,

I can see a couple of potential solutions.

1. Open the file in DISP=OLD mode an do nothing . It should erase all the records.
2. Using a COBOL program : Read the file sequentially and using the keys delete the record that is just read.


will watch this thread for some innovative solutions. icon_smile.gif
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 Aug 17, 2006 7:59 pm    Post subject:
Reply with quote

Quote:
DFSORT in my shop doesn't support VSAM writing


Huh? DFSORT certainly does support writing VSAM output files. What makes you think it doesn't?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Aug 18, 2006 10:06 am    Post subject: Re: Delete all records from KSDS
Reply with quote

Hi Frank,

Thanks for the reply. Actually my shop uses SYNCSORT not DFSORT as said before. I got the following error message for sort job -

CONDITIONS NOT MET TO USE THE SAME VSAM DATA SET FOR SORTIN AND SORTOUT

Sort step used -

//SORTSTP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//*
//SORTIN DD DSN=SS5661.G5661.INTAS.TST3.PDIQUEUE,DISP=SHR
//SORTOUT DD DSN=SS5661.G5661.INTAS.TST3.PDIQUEUE,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
OMIT COND=ALL
/*


Thanks,
Murali Mohan K
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: Fri Aug 18, 2006 7:55 pm    Post subject:
Reply with quote

Are you sure you're not using DFSORT? That message text matches DFSORT message ICE183A exactly. Unfortunately, you didn't post the message number (you should always post the message number). If it is ICE183A, then you're using DFSORT. If it's a WERxxxs message, then you're using Syncsort and they have the same exact message text (that would be surprising).

Here's a link to an explanation of ICE183A:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CM20/2.2.175?SHELF=&DT=20060721170811&CASE=

If the VSAM data set is defined for REUSE, I believe this DFSORT job will do what you want:

Code:

//SORTSTP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=SS5661.G5661.INTAS.TST3.PDIQUEUE,DISP=SHR
//SORTOUT DD DSN=SS5661.G5661.INTAS.TST3.PDIQUEUE,DISP=SHR
//SYSIN DD *
   RECORD TYPE=V
   OPTION VSAMIO,RESET
   OMIT COND=ALL
   SORT FIELDS=(5,1,BI,A)
/*
Back to top
View user's profile Send private message
ravven16

New User


Joined: 22 Aug 2006
Posts: 16

PostPosted: Tue Aug 22, 2006 6:52 pm    Post subject:
Reply with quote

you can try this option

/REPRO4 EXEC PGM=IDCAMS,COND=(4,LT)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//IN DD DUMMY
//OUT DD DISP=OLD,DSN=BRLV.SRBRDCF
//SYSIN DD *
REPRO INFILE(IN) OUTFILE(OUT) REUSE REPLACE
/*
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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

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