View previous topic :: View next topic
|
Author |
Message |
Sowmya Ramachandra
New User
Joined: 11 May 2007 Posts: 20 Location: Canada
|
|
|
|
Hi,
I am coding a program with Alternate key KSDS file for first time. Can anyone provide me the sample JCL for it. My requirement is as follows.
1. Copy the flat file data into KSDS.
2. Use the KSDS file to run the program.
Note: The Key to fetch the data from this file containd duplicates. Hence I am making this as the alternate key. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
avina
New User
Joined: 04 Dec 2007 Posts: 16 Location: Kolkata
|
|
|
|
You can use repro to do a simple copy from flat file to a KSDS cluster and then create a Key ( With alternate index defined with parameter NONUNIQUEKEY ). A simple suggestion will be to have the output file in a to remove the duplicate records ( having duplicate key ) with SORT and then REPRO to a VSAM file .
Else sort your flat file to remove the duplicates first then do a repro, as per your requirement. |
|
Back to top |
|
|
avina
New User
Joined: 04 Dec 2007 Posts: 16 Location: Kolkata
|
|
|
|
see if this helps you
//DEFALTIX EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE AIX (NAME (SIMOTIME.DATA.ALTKSD1) -
RELATE (SIMOTIME.DATA.ALTKSD) -
RECORDSIZE (512 512) -
TRACKS (10 5) -
KEYS (12 68) -
UPGRADE) |
|
Back to top |
|
|
avina
New User
Joined: 04 Dec 2007 Posts: 16 Location: Kolkata
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
Note: The Key to fetch the data from this file containd duplicates. Hence I am making this as the alternate key. |
Is this the base KSDS which may NOT contain duplicate keys - a completely different problem, or is this the AIX which is allowed to contain duplicate keys. |
|
Back to top |
|
|
|