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
 

 

Interview quetions asked in Polaris

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

New User


Joined: 23 Nov 2005
Posts: 6
Location: pune

PostPosted: Sat Oct 03, 2009 3:12 pm    Post subject: Interview quetions asked in Polaris
Reply with quote

Hi,
here i have listedout the quetions which are asked in my polaris interview. could you please helpme out to solve these.

1)there is one input file and one database is there.we need to create a output file that contains the records which are present in Database and not present in inputfile.please anyone help me for Logic,

2)How do we retrieve odd numbered records like 1st,3rd,5th,7th... from a file.

Thanks
Ramesh chandra
Back to top
View user's profile Send private message

dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sat Oct 03, 2009 5:55 pm    Post subject: Re: Interview quetions asked in Polaris
Reply with quote

rameshchandra wrote:


1)there is one input file and one database is there.we need to create a output file that contains the records which are present in Database and not present in inputfile.please anyone help me for Logic,

2)How do we retrieve odd numbered records like 1st,3rd,5th,7th... from a file.


1)step1: create a temp table which contains the records in your input file,
step2: issue the following SQL statement:
Code:
SELECT * FROM TB1 WHERE xx NOT EXIST (SELECT * FROM TEMPLE)


2)method 1: you can use SORT tool.
method 2: You can compose the following loop logic embeded into your program:
Code:

read file;
counter=counter+1;
if (counter/2)
then  process;
else continue with the next file reading processing.

Back to top
View user's profile Send private message
rameshchandra

New User


Joined: 23 Nov 2005
Posts: 6
Location: pune

PostPosted: Sat Oct 03, 2009 7:47 pm    Post subject: Reply to: Interview quetions asked in Polaris
Reply with quote

Hi Dejunzhu,
Thank you very much for the answers.

Thanks
Rameshchandra
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Oct 05, 2009 8:57 am    Post subject:
Reply with quote

Quote:
1)there is one input file and one database is there.we need to create a output file that contains the records which are present in Database and not present in inputfile.please anyone help me for Logic,

You can go with solution provided by dejunzhu or
other could be, unload the table to ps and then use utility like DFSORT to find records only in second file i.e. unloaded file


Rameshchandra wrote:
2)How do we retrieve odd numbered records like 1st,3rd,5th,7th... from a file.

Here is sample code using DFSORT
Code:

//STEP0100 EXEC PGM=SORT             
//SYSOUT   DD SYSOUT=*               
//DFSMSG   DD SYSOUT=*               
//SORTIN DD DSN=your input dataset
//OUT1 DD DSN=your output dataset
//OUT2 DD DUMMY                       
//SYSIN DD *                         
  SORT FIELDS=COPY                   
  OUTFIL FNAMES=(OUT1,OUT2),SPLIT     
/*                                   
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Oct 05, 2009 9:14 am    Post subject:
Reply with quote

For second this is better one
Code:

//SYSIN DD *                             
  SORT FIELDS=COPY                       
  OUTFIL FNAMES=(OUT1),SAMPLE=2         
/*                                       
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 Where can i find Interview questions ... Elixir Mainframe Interview Questions 4 Sat Feb 20, 2016 12:38 am
This topic is locked: you cannot edit posts or make replies. Mainframe interview on 10th Oct 2015 ... kotesh Mainframe Jobs 0 Thu Oct 08, 2015 5:21 pm
No new posts Sticky: Mainframe Developer Interview Questions Milin Mainframe Interview Questions 12 Wed Jan 07, 2015 8:58 pm


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