MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Loading part of Data into KSDS.....

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kris_madras
Beginner


Joined: 07 Apr 2004
Posts: 46
Topics: 29

PostPosted: Sun May 30, 2004 9:24 pm    Post subject: Loading part of Data into KSDS..... Reply with quote

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
View user's profile Send private message
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Mon May 31, 2004 6:24 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Mon May 31, 2004 7:46 am    Post subject: Reply with quote

Kris Madras,

Did you check if your vsam file is already populated before running the copy job ?

Cheers
Brian
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon May 31, 2004 9:38 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group