Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Search all Question

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
meetasn

New User


Joined: 23 May 2006
Posts: 8

PostPosted: Wed Aug 12, 2009 2:30 pm    Post subject: Search all Question
Reply with quote

Interviewer Asked this question, I defined table with 100 rows, but loaded with 50 columns only? When doing the "search all" the element is not found. But actually element is there ? what is the reason?

Ans : I told that the array may not be in sorted order, he is not satisfied with my answer then I told I didn't come across this situation in my experience.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Aug 12, 2009 2:48 pm    Post subject:
Reply with quote

actually, your interviewer is full of crap. had there been only 49 items populated, I can see the problem. But you had 50. so the out-of-sort condition is an adequate answer. Had there been less than 50, then the population of the unused area of the table makes a difference in the outcome of the search all.

search all starts in the middle of your cobol internal table (array) - item 50. then depending on the outcome of the compare, the next place the search all looks is either 1/4 table back or 1/4 table forward.

the last 50 items (learn the correct terminology) if not initialized to high-values (or something greater than any potential item's field value) can/will produce the erroneous result.

your out-of-sort condition is part of the answer, but the key is the unused portion of the table must contain 'higher values' as the used portion. or simply use an ODO with sorted input.

typical halfass interviewer question.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us