IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To find the abnormal key in vsam ksds file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhuspin

New User


Joined: 13 Aug 2008
Posts: 26
Location: chennai

PostPosted: Mon Sep 15, 2008 12:32 pm
Reply with quote

Hi,

I am new to this forum.May i know the answer for my question posted below?

I am having a vsam ksds file with 10 records with keyfield of length 5.Supposing my records are not in sequence.That is;
For eg:
00001
00003
00002
00004
00005
How could i find the record or key which causes this abnormality?Waiting for your answers.
Back to top
View user's profile Send private message
jaspal

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Mon Sep 15, 2008 12:36 pm
Reply with quote

Hi Bhuspin

When we insert any record in VSAM it inserts in sorted order i.e
00001
00002
00003
00004......

for example: if you have two records:
00001
00003
and then you insert on more record i.e 00002 then it will take 2nd position ( for KSDS VSAM)
Now output will be :
00001
00002
00003


Thanks,
Jaspal
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Sep 15, 2008 5:14 pm
Reply with quote

Why worry about it? Sort the file then load into VSAM. End of issue.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 15, 2008 9:44 pm
Reply with quote

Hello bhuspin and welcome to the forums,

Quote:
Supposing my records are not in sequence
If they are already in the vsam file, they are "in sequence".

If you need to load records into a vsam file, follow Robert's advice.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Sep 16, 2008 11:36 am
Reply with quote

bhuspin wrote:
Hi,

I am new to this forum.May i know the answer for my question posted below?

I am having a vsam ksds file with 10 records with keyfield of length 5.Supposing my records are not in sequence.That is;
For eg:
00001
00003
00002
00004
00005
How could i find the record or key which causes this abnormality?Waiting for your answers.


But your records would be in sequence if they were stored in a KSDS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top