Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sample JCL required for Alternate Key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Sowmya Ramachandra

New User


Joined: 11 May 2007
Posts: 20
Location: Canada

PostPosted: Tue Feb 10, 2009 8:54 am    Post subject: Sample JCL required for Alternate Key
Reply with quote

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

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Feb 10, 2009 9:16 am    Post subject:
Reply with quote

Oh my Lord,
Have you looked at Creating alternate indexes in the guide and ALTERNATE RECORD KEY clause in the reference? icon_rolleyes.gif
Back to top
View user's profile Send private message
avina

New User


Joined: 04 Dec 2007
Posts: 16
Location: Kolkata

PostPosted: Mon Mar 09, 2009 6:19 pm    Post subject:
Reply with quote

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

New User


Joined: 04 Dec 2007
Posts: 16
Location: Kolkata

PostPosted: Mon Mar 09, 2009 6:24 pm    Post subject:
Reply with quote

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

New User


Joined: 04 Dec 2007
Posts: 16
Location: Kolkata

PostPosted: Mon Mar 09, 2009 6:25 pm    Post subject:
Reply with quote

also see this post

http://www.ibmmainframes.com/about29110.html
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Mar 09, 2009 6:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Several errors during building altern... Andi1982 JCL & VSAM 11 Wed Jul 06, 2016 7:39 pm
No new posts Drop building Alternate Index for a p... bhavin.mehta JCL & VSAM 6 Mon Jul 04, 2016 3:47 pm
No new posts VSAM Alternate Index in CICS jacobdng CICS 2 Fri May 06, 2016 1:41 pm
No new posts FTP help required amitc23 All Other Mainframe Topics 3 Thu Apr 28, 2016 12:02 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us