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
 
PARTIAL key read for KSDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: PARTIAL key read for KSDS
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Sep 03, 2010 5:44 pm    Post subject:
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    Post subject: Reply to: PARTIAL key read for KSDS
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

Site Director


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

PostPosted: Fri Sep 03, 2010 7:58 pm    Post subject:
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Sep 03, 2010 8:19 pm    Post subject:
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

Site Director


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

PostPosted: Fri Sep 03, 2010 11:36 pm    Post subject: Reply to: PARTIAL key read for KSDS
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sat Sep 04, 2010 12:56 am    Post subject:
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Sat Sep 04, 2010 1:03 am    Post subject: Reply to: PARTIAL key read for KSDS
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

Site Director


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

PostPosted: Sat Sep 04, 2010 1:29 am    Post subject: Reply to: PARTIAL key read for KSDS
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Read of TDQ fails in LENGERR Tracy Hansen CICS 10 Wed Apr 05, 2017 12:10 am

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