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

Search all Question


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 6966
Location: porcelain throne

PostPosted: Wed Aug 12, 2009 2:48 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Question for file manager IBM Tools 7
No new posts first column truncated in search result IBM Tools 13
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top