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
 

 

XPEDITER Interview questions

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

New User


Joined: 31 May 2005
Posts: 26
Location: pune

PostPosted: Wed Mar 22, 2006 2:39 pm    Post subject: XPEDITER Interview questions
Reply with quote

in xpediter i marked "b" in 15 where its starts debugging?

cobol:
write binary search code using indexs ?can anyone give me some code example ?

db2:
how to calulate second highest salary in employee table?
Back to top
View user's profile Send private message

thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Wed Mar 22, 2006 2:51 pm    Post subject:
Reply with quote

hi samchris,

if you are given "b" in 15 also it starts debuging from first line onward's then u press f12 means then only it will goes to that line.


for db2:

select sal from emp a where 2 = (select count(*) from emp b where a.emp <= b.emp)


thank's
thanooz.
Back to top
View user's profile Send private message
samchris

New User


Joined: 31 May 2005
Posts: 26
Location: pune

PostPosted: Thu Mar 23, 2006 10:02 am    Post subject: Re: XPEDITER Interview questions
Reply with quote

hello sir,
thanks for ur reply sir.

regards
chris
Back to top
View user's profile Send private message
bright_skull

New User


Joined: 22 May 2006
Posts: 7
Location: Bangalore

PostPosted: Mon Jul 17, 2006 8:28 pm    Post subject: XPEDITER Interview questions and DB2
Reply with quote


icon_exclaim.gif

For DB2:


I tried executing the query provided by Thanooz and verified it. The Query worked but took very long time compared to my query.

I also happened to come across the same question in one of the interviews I appeared.

Definitely I couldn't answer properly, but had come half way thru' and the interviewer was keen on getting a 'single' second highest value and not the sequence in desc order. The Query is some what simple also. I've tested this properly.

Here it goes:

SELECT EMPSAL FROM EMPTABLE
WHERE EMPSAL <
(SELECT MAX(EMPSAL) FROM EMPTABLE)
ORDER BY EMPSAL DESC
FETCH FIRST ROW ONLY


Explanation of the Query:


The Inner Query will return the Max value for Empsalary and the Outer Query will provide 'any' value less than the Max value in Descending order. So in order to limit it to one value that's the second highest, Use Fetch first row only.
Back to top
View user's profile Send private message
sureshchoudey

New User


Joined: 16 Sep 2005
Posts: 12

PostPosted: Wed Jul 19, 2006 8:21 pm    Post subject: Re: XPEDITER Interview questions
Reply with quote

SELECT EMPSAL FROM EMPTABLE
WHERE EMPSAL <
(SELECT MAX(EMPSAL) FROM EMPTABLE)
Back to top
View user's profile Send private message
Muthukumar.PLindia

New User


Joined: 03 Jul 2006
Posts: 51
Location: Chennai

PostPosted: Thu Jul 20, 2006 1:25 am    Post subject: Hi thanooz
Reply with quote

Hi thanooz,
Could you please explain ur query
Back to top
View user's profile Send private message
bright_skull

New User


Joined: 22 May 2006
Posts: 7
Location: Bangalore

PostPosted: Thu Jul 20, 2006 8:57 am    Post subject:
Reply with quote


Hi Suresh,

What does your query do.... It will fetch all the rows of the EMPSAL column which are less than the Max EMPSAL. But do you know the requirement?? icon_question.gif We need to get only the second Maximum EMPSAL...

icon_exclaim.gif Also Thanooz please explain how you got that query???
Back to top
View user's profile Send private message
bright_skull

New User


Joined: 22 May 2006
Posts: 7
Location: Bangalore

PostPosted: Wed Jul 26, 2006 9:09 am    Post subject: DB2 query
Reply with quote


Hi All,

icon_biggrin.gif I was thinking about the above questions again and again and came up with this simple logic.

The logic that I'll be putting down here can be used to get only the 3rd or 4th Max easily.. but this might eat up the resources as the joins are more.

For getting the second Max.

SELECT MAX(EMPSAL) FROM EMPTABLE
WHERE EMPSAL < (SELECT MAX(EMPSAL) FROM EMPTABLE).


Isn't this query simple compared to the previous 2 posted here??? icon_question.gif
Back to top
View user's profile Send private message
Niranjan B Manjappa

New User


Joined: 02 Jan 2007
Posts: 2
Location: Pune

PostPosted: Tue Apr 10, 2007 3:08 pm    Post subject:
Reply with quote

Can any one tell me how to set a break point in the middle of the perform

Eg perform i varying from 1 by 1 untill i>1000
I want top see the value of i =152.
I dnt want to press 152 times f9 and the value of i152
depends on the previous occurence.Do we hae any option for this
Back to top
View user's profile Send private message
ragganga

New User


Joined: 22 Jan 2007
Posts: 18
Location: bangalore

PostPosted: Tue Apr 10, 2007 6:41 pm    Post subject:
Reply with quote

Hi Niranjan,

Just overide(change) the I value in the Top screen when the value is 1 to 152.

Regards
Raghu
Back to top
View user's profile Send private message
Niranjan B Manjappa

New User


Joined: 02 Jan 2007
Posts: 2
Location: Pune

PostPosted: Wed Apr 11, 2007 3:40 pm    Post subject:
Reply with quote

Hi ,
Thanks for your reply.
I got the answer.

We can even use when i= 152 to set the break point.

Cheers
Niranjan
Back to top
View user's profile Send private message
azshukla

New User


Joined: 31 May 2006
Posts: 9
Location: Pune

PostPosted: Wed Apr 25, 2007 1:33 pm    Post subject: Re: XPEDITER Interview questions
Reply with quote

And how would you do that niranjan??
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Wed Apr 25, 2007 3:09 pm    Post subject:
Reply with quote

First one(B) is unconditional break point and second one is conditional break point which can be applied by keying in WHEN in the command line and supplying the variable name and the value for which you want to break.
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 The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts SAS Programming - Basic Questions Techelm All Other Mainframe Topics 3 Fri Mar 18, 2016 10:53 pm


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