View previous topic :: View next topic |
Author |
Message |
kris_madras Beginner
Joined: 07 Apr 2004 Posts: 46 Topics: 29
|
Posted: Sun May 30, 2004 9:24 pm Post subject: Loading part of Data into KSDS..... |
|
|
Hi,
The following is the part of the dataset
1---------8 10-------------
46001002 370006618Y
46011003 1D0021815Y
46012003 291525445Y
46012004 109900000Y
46012005 370006640Y
46012006 1D0021814Y
46012010 370006651Y
46013005 370006656N
46013007 1D0021816Y
46013009 711531905Y
I just tried to convert this file to KSDS using IDCAMS.. by setting column nos 1-8 as Key..
While trying to load this file in to KSDS using repro its abneding because of duplicate record...(columns 10----)
Is there any possibility load a KSDS with part of the Input data....?
I mean take only 8 columns from the Input file and load with this data into KSDS....? |
|
Back to top |
|
|
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Mon May 31, 2004 6:24 am Post subject: |
|
|
Hi Kris_Madras,
I tried copying the data below that you had given thru IDCAMS into a KSDS and it worked fine.
Input File...
Code: |
46001002 370006618Y
46011003 1D0021815Y
46012003 291525445Y
46012004 109900000Y
46012005 370006640Y
46012006 1D0021814Y
46012010 370006651Y
46013005 370006656N
46013007 1D0021816Y
46013009 711531905Y
|
The output is a KSDS Vsam File with LRECL=19
Key is (8,0)
Code: |
----+--- -1----+----
********************************* TOP OF DATA
46001002 370006618Y
46011003 1D0021815Y
46012003 291525445Y
46012004 109900000Y
46012005 370006640Y
46012006 1D0021814Y
46012010 370006651Y
46013005 370006656N
46013007 1D0021816Y
46013009 711531905Y
******************************** BOTTOM OF DATA
|
The IDCAMS is as below
Code: |
//**----------------------------------------------------------------***
//STEP0000 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DD1 DD DSN=ABCD.TEST.FILE.CHK1,DISP=SHR
//DD2 DD DSN=ABCD.TEST1.KSDS.K.C,DISP=SHR
//SYSIN DD *
REPRO INFILE(DD1) OUTFILE(DD2)
/*
|
|
|
Back to top |
|
|
Brian Beginner
Joined: 12 Aug 2003 Posts: 95 Topics: 6
|
Posted: Mon May 31, 2004 7:46 am Post subject: |
|
|
Kris Madras,
Did you check if your vsam file is already populated before running the copy job ?
Cheers
Brian |
|
Back to top |
|
|
Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Mon May 31, 2004 9:38 am Post subject: |
|
|
Kris,
Here's a DFSORT/ICETOOL job that will list out the duplicate keys (if any):
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//SHOW DD SYSOUT=*
//TOOLIN DD *
OCCUR FROM(IN) LIST(SHOW) ON(1,8,CH) ON(VALCNT) -
BLANK ALLDUPS
/*
|
If you have duplicate keys, the output in SHOW would look something like this:
Code: |
(1,8,CH) VALUE COUNT
47012003 2
47012006 2
|
If you don't have duplicate keys, none will be listed.
On a separate note, you can use DFSORT to load the data into the KSDS. If you only want the first 8 bytes of the input data set, you can use
Code: |
OUTREC FIELDS=(1,8)
|
to get that. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
|
|
|