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

Delete all records from KSDS


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

Senior Member


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

PostPosted: Wed Aug 16, 2006 4:48 pm
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
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: 2358
Location: Israel

PostPosted: Thu Aug 17, 2006 8:56 am
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: 1436
Location: Bangalore,India

PostPosted: Thu Aug 17, 2006 10:01 am
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
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: 1436
Location: Bangalore,India

PostPosted: Thu Aug 17, 2006 11:49 am
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
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 Developer


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

PostPosted: Thu Aug 17, 2006 7:59 pm
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: 1436
Location: Bangalore,India

PostPosted: Fri Aug 18, 2006 10:06 am
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 Developer


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

PostPosted: Fri Aug 18, 2006 7:55 pm
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:

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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top