View previous topic :: View next topic
|
Author |
Message |
vasco ferreira
New User
Joined: 12 Jul 2008 Posts: 32 Location: sintra - portugal
|
|
|
|
Hi, i need to delete 10 records of a vsam beginning in column 1 until 12, how can i do it with a job?
I already tried with IEHPROGM (with the scratch) and didn't work. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
What kind of "VSAM" -- ESDS, RRDS, KSDS, LS/MFT? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
IDCAMS :
REPRO SKIP(10)
Works only for the 1st 10 records. |
|
Back to top |
|
|
vasco ferreira
New User
Joined: 12 Jul 2008 Posts: 32 Location: sintra - portugal
|
|
|
|
It's aKSDS |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
What does column 1-12 have to do with it? |
|
Back to top |
|
|
vasco ferreira
New User
Joined: 12 Jul 2008 Posts: 32 Location: sintra - portugal
|
|
|
|
Phrzby Phil wrote: |
What does column 1-12 have to do with it? |
That's the key |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
So it's the key.
Do you want to delete records with certain key values, or values of other fields, or just a certain number of records, or records at random, or what?
You say you want to delete 10 records. In that case, what does the key matter?
Clearly think about what you want, and then say so as clearly and unambiguously as you can. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Review IDCAMS "FROMKEY" and "TOKEY" keywords, which can be used to copy a portion of an INFILE (your KSDS) to an OUTFILE.
You may have to use these multiple times, bypassing the records that you don't need.
Specify a temporary/catalogued QSAM flat-file for your OUTFILE and review the contents after you've completed the copy.
But, backup your KSDS file beforehand.
After review, if the FROM and TO key criteria work as you've expected, then just REPRO the flat-file contents into the KSDS file with REPLACE.
At a later point in time, you can delete the KSDS backup and the temporary/catalogued files.
Bill |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
vasco ferreira wrote: |
Hi, i need to delete 10 records of a vsam beginning in column 1 until 12 |
I've two inferences from this:
1. Delete first 10-records from the VSAM-file -- If this is true - then mention about "column 1 until 12" is useless.
1. Delete first 12-bytes of first 10-records from the VSAM-file and copy the rest in output file as is -- may be repro the VSAM to QSAM, use SORT to do what you've asked for and repro back the sortout to VSAM. |
|
Back to top |
|
|
|