September 2011

JCL Interview Questions - V

1) What parameter directs the output of the job log dataset?

(Ans) MSGCLASS

2) What is the function of //CNTL statement?

(Ans) Identifies the control card library

3)

JCL - Interview Questions - VI

1) If both the JOBCAT & STEPCAT statements are coded in a step, which will be executed?

(Ans) both the statements will be executed in sequence

2) When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?

(Ans) The library with the largest block size should be the first one.

Perl version 5.10 onwards - Given/When - Switch/Case

Perl 5.10 onwards have given/when, which can be used instead of multiple if's and switch/case. It is similiar to the switch/case in other languages.

To use given/when from perl 5.10 include the "use feature qw{ switch };". It uses keywords given, when, default.

Perl Dispatch table - Eliminating the nested if's

Dispatch table is nothing but hash, keys are the directive names and values are actions.

For example 1: Based on the variable task, the templates need to be return

if($task eq 'add') {
  return 'order/add_order.tmpl';
}elsif($task eq 'edit') {
  return 'order/edit_order.tmpl';
}elsif($task eq 'list') {
  return 'order/list_orders.tmpl'
}

the above nested if's can be written like below using dispatch table.

J2EE - Servlet - Questions

1. How would servlet code from a service method retrieve the value of the "User-Agent" header from the request?

Ans: String userAgent = request.getheader("User-Agent");

2. Which HTTP methods are used to show the client what server is receiving?

Ans: Trace

3. How would you set a header named "cONTENT-LENGth" in the HttpServletResponse object?

Ans: response.setHeader("content-length","numBytes");

4. The servlet code fragement that gets a binary stream for writing an image or other binary type to the HttpServletresponse

Ans : ServletoutputStream out = response.getOutputStream();

5. if servlet is invoked usingthe forward or include method of RequestDispatcher, which methods of the servlet's request object can access the request attributes set by the container?

Ans: getAttributes() method can access the container populated javax.servletforward.xxx and javax.servletinclude.xxx attributes.

6. when declaring a listener in the DD, which sub-elements of the
element are required?

Ans: <listener-class>

7.What is the recommended way to deal with servlets and thread safety?

Ans: use local variable exclusively, and if yu have to use instance variable, synchronize to them.

8. s.setAttribute("key","value"); which listener could be notified?

Ans : HttpsessionBindingListener and HttpSession.

9. What is the function of the servlet context?

Ans: Gives the information of the container.

10. what is the function of the page context?

Ans: Gives the information of the request.

Rootkit

A rootkit is a collection of programs that enables the attackers to get the administrator level accesses to the computer or the network.

The attacker installs the rootkit software, after obtaining the admin level access first time or cracking the password.

Google Wallet

Now a days we pay bills, shop using the cards. Initially we use coins, paper money and now it is cards (debit / credit cards), future?.

Google wallet:

Google wallet is going to be the next one after the plastic cards!!!

Snort - Network Intrusion Prevention and Detection System

Snort is open source network Intrusion Prevention and Detection System (IDS/IPS). It is based on libpcab ( that is library packet capture).

Libpcab, PCRE, Libnet and barnyard software packages are required to run the snort.

Check your Aptitude Skill

1. In a computer tape library there are two racks with 40 tapes per rack.In a given day 30 tapes are in use . What fraction remains in the rack?

2. In a certain company 20% of the men and 40% of the women attended the annual company picnic.If 35% of all the employees are men .What % of all the employee went to the picnic?