View previous topic :: View next topic
|
Author |
Message |
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
red_roses
New User
Joined: 31 Oct 2005 Posts: 27
|
|
|
|
if u need to empty the KSDS. why dont you delete it and define it again.? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Or REPRO it to itself, with COUNT 0.
O. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
red_roses
New User
Joined: 31 Oct 2005 Posts: 27
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
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. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
ravven16
New User
Joined: 22 Aug 2006 Posts: 16
|
|
|
|
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 |
|
|
|