COBOL Interview Questions and Answers

COBOL is a high-level programming language first developed by the CODASYL Committee (Conference on Data Systems Languages) in 1960. The word COBOL is an acronym that stands for COmmon Business Oriented Language. As the the expanded acronym indicates, COBOL is designed for developing business, typically file-oriented, applications. It is not designed for writing systems programs. For instance you would not develop an operating system or a compiler using COBOL.The COBOL 2002 standard includes support for object-oriented programming and other modern language features.

COBOL Interviews are getting tough these days as the technology grows faster. To get through the COBOL interview one needs to update him/herself in a regular manner. Having said that, just before the interview, it is very important to have a quick glance of the reputed COBOL questions and answers to make yourself comfortable during the interview process. This is where DoAnswers.com helps you in renewing yourself on COBOL and various other technologies interview preparation.



<< Previous                Next >>

 

11. Give some advantages of REDEFINES clause.

You can REDEFINE a Variable from one PICTURE class to another PICTURE class by using the same memory location. By REDEFINES we can INITIALISE the variable in WORKING-STORAGE Section itself. We can REDEFINE a Single Variable into so many sub variables. (This facility is very useful in solving Y2000 Problem.)


12. How can I tell if a module is being called DYNAMICALLY or STATICALLY?

The ONLY way is to look at the output of the linkage editor (IEWL)or the load module itself. If the module is being called DYNAMICALLY then it will not exist in the main module, if it is being called STATICALLY then it will be seen in the load module.

Calling a working storage variable, containing a program name, does not make a DYNAMIC call. This type of calling is known as IMPLICITE calling as the name of the module is implied by the contents of the working storage variable. Calling a program name literal (CALL)


13. How can you submit a job from COBOL programs?

Write JCL cards to a dataset with //xxxxxxx SYSOUT= (A,INTRDR) where 'A' is output class, and dataset should be Write JCL cards to a dataset with //xxxxxxx SYSOUT= (A,INTRDR) where 'A' is output class, and dataset should be opened for output in the program. Define a 80 byte record layout for the file.


14. How do we get current date from system with century?

By using Intrinsic function, FUNCTION CURRENT-DATE


15. How do you code Cobol to access a parameter that has been defined in JCL? And do you code the PARM parameter on the EXEC line in JCL?

Using JCL with sysin. //sysin dd *here u code the parameters(value) to pass in to cobol program /* and in program
you use accept variable name(one accept will read one row)/.another way.
in jcl using parm statement ex: in exec statement parm='john','david' in cobol pgm u have to code linkage section in that for first value you code length variable and variable name say, abc pic x(4).

It will take john inside to read next value u have to code another variable in the same way above mentioned.


Your Ad Here

16. How do you come out of an EVALUATE statement?

After the execution of one of the when clauses, the control is automatically passed on to the next sentence after the EVALUATE statement. There is no need of any extra code.


17. How do you declare a host variable (in COBOL) for an attribute named Emp-Name of type VARCHAR(25) ?

01 EMP-GRP. 49 E-LEN PIC S9(4) COMP. 49 E-NAME PIC X(25).


18. How do you define a sort file in JCL that runs the COBOL program?

Use the SORTWK01, SORTWK02,..... dd names in the step. Number of sort datasets depends on the volume of data being sorted, but a minimum of 3 is required.


19. How do you define a table/array in COBOL?

ARRAYS.
05	ARRAY1	PIC X(9) OCCURS 10 TIMES.
       05	ARRAY2	PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX.

05	ARRAY1	PIC X(9) OCCURS 10 TIMES.
       05	ARRAY2	PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX.


20. How do you define a variable of COMP-1? COMP-2?

No picture clause to be given. Example 01 WS-VAR USAGE COMP-1.


Your Ad Here

<< Previous                Next >>

 
Databases Questions and Answers
 
DB2 Interview Questions and Answers
IMS Interview Questions and Answers
MYSQL Interview Questions and Answers
Oracle Interview Questions and Answers
PL/SQL Interview Questions And Answers
Quel Interview Questions and Answers
SQL Interview Questions and Answers

 
 
.NET Interview Questions and Answers
 
ASP Interview Questions and Answers
C# Interview Questions and Answers
Visual Basic Interview Questions and Answers
 
J2EE Interview Questions and Answers
 
Enterprise Java Beans (EJB) Interview Questions And Answers
Hibernate Interview Questions And Answers
Jave Messaging Service (JMS) Interview Questions And Answers
Jave Server Faces (JSF) Interview Questions And Answers
Java Server Pages (JSP) Interview Questions And Answers
Servlets Interview Questions And Answers
Spring Framework Interview Questions And Answers
Struts Framework Interview Questions And Answers
 
JAVA Interview Questions and Answers
 
Core Java Interview Questions and Answers
Java Platform, Micro Edition (Java ME) Interview Questions And Answers
JAVA GUI Interview Questions and Answers
Java Performance Tuning Interview Questions And Answers
JUnit Interview Questions And Answers
Remote Method Invocation (RMI) Interview Questions And Answers
Unified Modeling Language (UML) Interview Questions And Answers
 
Java Application Server Interview Questions And Answers
 
Tomcat Application Server Interview Questions And Answers
WebLogic Application Server Interview Questions And Answers
 
Mainframe Interview Questions and Answers
 
CICS Interview Questions and Answers
COBOL Interview Questions and Answers
IMS Interview Questions and Answers
JCL Interview Questions and Answers
REXX Interview Questions and Answers
TELON Interview Questions and Answers
VSAM Interview Questions and Answers
 
Object Oriented Language Questions and Answers
 
C Interview Questions and Answers
C++ Interview Questions and Answers
Eiffel Interview Questions and Answers
J2EE Interview Questions and Answers
JAVA Interview Questions and Answers
Sather Interview Questions and Answers
Small talk Interview Questions and Answers
 
Operation Systems Interview Questions and Answers
 
MS DOS Interview Questions and Answers
Unix OS Interview Questions and Answers
Windows Interview Questions and Answers
 
Scripting languages Interview Questions and Answers
 
Java Script Interview Questions and Answers
Practical Extraction and Reporting Language Interview Questions and Answers
PHP Interview Questions and Answers
VBScript Interview Questions and Answers
 
UserInterfaces Questions and Answers
 
Foxit Interview Questions and Answers
Glade Interview Questions and Answers
Tweak Interview Questions and Answers
 
WEB Technologies Questions and Answers
 
AJAX Interview Questions and Answers
HTML Interview Questions and Answers
WML Interview Questions and Answers
XML Interview Questions and Answers
 
Interview Tips And Some Common Questions
 
Behavioral Interview Questions And Answers


Your Ad Here