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

PARTIAL key read for KSDS


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tijo george

New User


Joined: 22 May 2009
Posts: 3
Location: pune

PostPosted: Fri Sep 03, 2010 5:29 pm
Reply with quote

Hi,

I need to read the KSDS file for which i do not have the entire KEY. Using START I position the pointer on the required record. Now if i need read this particular record, is there any method? I do not want to use READ NEXT option. While using READ file-name the status code issued is '23' because it automatically picks the key as same as that one used in the START.

I have referred to other posts in the forum.

Any help is appreciated.

Tijo
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: Fri Sep 03, 2010 5:44 pm
Reply with quote

Please post the START statement you used -- this should have been posted as part of the question.
Back to top
View user's profile Send private message
tijo george

New User


Joined: 22 May 2009
Posts: 3
Location: pune

PostPosted: Fri Sep 03, 2010 5:51 pm
Reply with quote

key of the VSAM ==> var1
var2
var3

START key1 KEY IS EQUAL TO var1

END-START

READ file1

Thanks,
Tijo [/i]
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: Fri Sep 03, 2010 7:58 pm
Reply with quote

Hello,

Quote:
I do not want to use READ NEXT option.
Why not?

The posted START statement is not the one in the code - you need to post exactly what was used.

Suggest you also post the SELECT/ASSIGN and the first part of the FD.
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: Fri Sep 03, 2010 8:19 pm
Reply with quote

From the little bit you have posted -- nowhere near enough to accurately diagnose what's happening -- COBOL appears to be doing exactly what you told it to do. START KEY EQUAL is going to find one -- and only one -- record unless an alternate index is involved. And so far you have provided nothing indicating an alternate index is involved.

Not wanting to use READ NEXT is either a sign of an incompetent programmer or an insane programmer -- your choice. Either you are not willing to take advantage of the tools available (and which, by the way, are designed to do very precise tasks), or you have irrational (by definition, insane) reasons not to use valid COBOL statements. And claiming that this is a "requirement" imposed upon you falls in the irrational area. No valid set of requirements dictates the specific statements that can be used in the programming language.
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: Fri Sep 03, 2010 11:36 pm
Reply with quote

Hi Robert,

Quote:
And claiming that this is a "requirement" imposed upon you falls in the irrational area.
We might disagree with an opinion but a "requirement" is sacred and we must help implement as described - - - well, because it is required. . .

NOT icon_cool.gif

d
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: Sat Sep 04, 2010 12:56 am
Reply with quote

Quote:
We might disagree with an opinion but a "requirement" is sacred and we must help implement as described - - - well, because it is required.
RRRiiiggghhhttt .... since I'm still at work and haven't stared drinking (yet -- although after that last meeting I am ready to), that one's not gonna get past me! icon_smile.gif
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Sep 04, 2010 1:03 am
Reply with quote

"Can't make a good decision without knowing the alternatives." icon_wink.gif

Bill
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: Sat Sep 04, 2010 1:29 am
Reply with quote

We don' need no steenking decision - this is a requirement. . .
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts ICETOOL to Read records SMF CEF it is... DFSORT/ICETOOL 4
Search our Forums:

Back to Top