GeekInterview.com
Series: Subject: Topic:

COBOL Interview Questions

Showing Questions 1 - 20 of 231 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

What is local storage section in cobol ?

Asked By: dtiwar | Asked On: Sep 27th, 2011

Answered by: davindersingh29 on: May 17th, 2013

Just to add, my two cents: Data items in the LOCAL-STORAGE SECTION are automatically allocated for each instance of a program invocation. When a program runs in multiple threads simultaneously, each ...

Answered by: Toleshwar on: Mar 14th, 2013

Local storage section is a section of Data Division of Cobol which is similar to the Working storage section. The only difference being that the variables in the Local Storage always get initialised w...

What is difference between s9(04) comp and 9(04) comp? (cobol comp with s and without s)

Asked By: mannurusrinivasulareddy | Asked On: Sep 2nd, 2012

Answered by: davindersingh29 on: May 17th, 2013

Both are binary, please see the below link for more info:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IGY3PG50/1.3.4.7?DT=20090820210412


9(4) will always be treated as a positive number and s9(4) may be either positive or negative.

Answered by: Ankit Sood on: Oct 2nd, 2012

S signifies Signed variable. So S9(04)comp will have value -/+ 2 (Binary) whereas 9(04)comp will have value as 2 (Numeric)

How will you analyze a cobol program?

Asked By: ankoo | Asked On: Oct 25th, 2012

Hi, i was asked in interview how would you analyze a cobol program? i gave the ans as there are many kind of analyses -: requirement analysis root cause analysis impact analysis problem / logic analysis but in general we talk about problem finding in a program and told him we would first go in for...

Answered by: davindersingh29 on: May 17th, 2013

Second part of your answer seems satisfactory. You should have asked the interviewer for what we need to analyze, if its just for document purpose, then your answer is right. If its for a change, then there are specific areas we need to analyze for the changes impact.

What is linkage section? Can we use this concept when there's no called program?

Asked By: Suganj | Asked On: Apr 20th, 2007

Answered by: vidhya on: May 10th, 2013

When there is PARM passed from JCL, we need Linkage Section in COBOL program even when there is no called program.

Answered by: Rajni on: May 25th, 2007

How can you use the concept of Linkage section in the manner you have specified.. Where do you intend to populate these values from and where do you intend to send the values back? It is not possible ...

What is difference between initialize and value?

Asked By: p.srinivas | Asked On: Aug 30th, 2006

Answered by: nagaraju on: Apr 30th, 2013

value : value clause is used to initialize values at working storage section only. i.e.., giving the values at declaration time initialize : this verb is used in 2 ways. 1) used to supply the init...

Answered by: talluri on: Jul 27th, 2011

INITIALIZE verb is used to refresh the alphabetic & alphanumeric empty fields with SPACES and numeric empty fields with ZEROS

In the example below 05 ws-var1 pic x(5),05 ws-var2 redefines wa-var1 pic 9(5),procedure division move 'abcde' to ws-var1.Now what is the value of ws-var1 and ws-var2 ?

Asked By: Interview Candidate | Asked On: Aug 12th, 2005

Answered by: Vahida Syed on: Apr 7th, 2013

I tried implementing this in mainframes.. Neither it has given compilation error nor abended when executing the program.
Result is : both the fields holds "abcde".

Answered by: vardhan.frd on: Apr 4th, 2012

SOC7 ERROR bcaz whenever ws-var1 is redefined by ws-var2 (num),the numeric pic 9(5) stands in-front of Alphanumeric pic x(5) and so it takes the values anything that comes to ws-var1.if once any varia...

What is the use of level 49 in cobol?

Asked By: LC Sharma | Asked On: Jan 12th, 2007

Answered by: snehali on: Apr 2nd, 2013

The level number 02 to 49 are use to specify the group and elementary data items within a record.

Answered by: Vaneeshkhurana on: Mar 21st, 2010

Although level 02-49 level are group or elementry elements but sometimes 49 are used for dynmic SQL, i.e.01 WS-SQl-statement1-VARIABLE.    49  WS-SQL-STATEMENT1-LEN  &nbs...

Prime number in cobol

Asked By: vijayjessy | Asked On: Aug 9th, 2012

Culd any body tell the concept for the prime number programe?

Answered by: Gunesh Asatkar on: Feb 13th, 2013

set the start and end limit from which prime will calculate. then start first for loop and second for loop. "cobol DATA DIVISION. WORKING-STORAGE SECTION. 77 I PIC 999 VALUE 001. ...

Answered by: drcobol on: Nov 26th, 2012

1. You dont need to loop further than the integer of the square root of the number in question
2. You can skip multiples of numbers already checked (if a number is not divisible by 2 then its not by 4 either)

C1 c2 c3 are three conditions whose truth values are as folloes. C1-true c2-false c3-true a,b,c are defined as given below a:c1 and(not c2) or c3 b.(not c1) or (not c2 and not c3) c.(c1 or c2)and...

Asked By: Interview Candidate | Asked On: Aug 20th, 2002

Answered by: SANDYA on: Sep 27th, 2012

Ans: b. only A,C and D are TRUE

Answered by: Su on: Oct 31st, 2007

The answer is C. This is because whenever a condition is evaluated first the condition is bracket is evaluated and then AND and then OR.Also  True AND True is True.         True OR True is T...

Concatinating two rec by using cobol & jcl

Asked By: mannurusrinivasulareddy | Asked On: Sep 6th, 2012

I need to concatenate records by using cobol and jcl (both) as follows. input file: aaaaa bbbbb ccccc ddddd 11111 22222 33333 44444 split the file into two halves and 1st rec of first half and 2nd rec of second half records are concatinated and 2nd rec of first half and 2nd rec of second half records...

Answered by: Rajesh.chedhalla on: Sep 26th, 2012

1. Split the INPUT File into two halves and generate the SEQNUM for each record.
2. Then Join the two files on SEQNUM and Reformat the fields in required format.

Redefine

Asked By: rajcandoit | Asked On: Sep 20th, 2010

What is redefine in cobol?

Answered by: Karthik on: Sep 24th, 2012

Truncation happens from left to right.

Answered by: mannurusrinivasulareddy on: Sep 1st, 2012

Its Just like a type conversion If we are having a field in database as alphanumeric and we want to superate the $ symbol and superate the numeric value for calculation as follows ...

What will happen if a cursor is opened again before closing?

Asked By: Manish Lalwani | Asked On: Sep 13th, 2007

A cursor is opened.After fetching few rows. It is opened again before closing it.What will be the result?

Answered by: mannurusrinivasulareddy on: Sep 1st, 2012

It give -502 error code i.e already the cursor was opened

Answered by: mf.vannan on: Jun 25th, 2010

If cursor is opened again before closing The error will be happen as Cursor already opened. Error code is 501

Rgds


Rasipuram Manivannan M
Contact: =91-9486115495
 

Study the following 01 a pic 99v0 value 5 01 b pic 9v9 value 6 01 C pic 99v9 value 2.5 01 d pic 99 value 3 compute a rounded b C = a+b*c/d on size error perform print-error the comments of a.B.C...

Asked By: Interview Candidate | Asked On: Aug 20th, 2002

Answered by: Ashish on: Aug 23rd, 2012

Tested the prog actually on Mf

Ans is :
A B C :100 00 100

Answered by: shivanilal on: Apr 22nd, 2008

answer is d
c=10

Can redefines clause be used in file section, if yes at which level number ?

Asked By: Interview Candidate | Asked On: Sep 1st, 2005

Answered by: giriswamy on: Aug 17th, 2012

except 66 and 88 levels it will work.

Answered by: BALASUKUMAR on: May 10th, 2012

Cant used redefines clause in file-section.

What is the result of the following? Divide a into b giving c.A.C=a/b b.The reminder of b/a is stored in C c.C=b/a d.The reminder of a/b is stored in C

Asked By: Interview Candidate | Asked On: Aug 20th, 2002

Answered by: on: Aug 1st, 2012

C=B/A

Answered by: Cathy on: Jul 1st, 2012

c.C=B/A

Called and calling program for cobol with cursor

Asked By: harish.jamkhande | Asked On: Jun 11th, 2012

I have program a which is calling b first time. B program is feaching data using cursor , but some mess happened and the control went back to pro a without closing cursor . Once again program a called program b then what will happen to cursor. Will program fetch the data.

Answered by: Latha on: Jul 16th, 2012

Program B will throw an error while it is trying to open the cursor again, which is already opened.

Can we reverse the string in cobol ? See the following problem : 77 name pic x(10) value 'manoj', 77 srname pic x(10).I want jonam in srname.

Asked By: manoj | Asked On: Jul 21st, 2006

Answered by: RAMESH on: Jul 3rd, 2012

by using reference modification...... IDENTIFICATION DIVISION. PROGRAM-ID. REVSTRN. ENVIRONMENT DIVISION. ...

Answered by: Nik on: May 14th, 2012

Have you tried doing this -

Code
  1. MOVE FUNCTION REVERSE(WS-A) TO WS-B

Redefine in cobol

Asked By: anjuthomas | Asked On: Jun 18th, 2012

Can a third level redefining possible in cobol? 01 b redefines a 05 a pic x(2) 01 C redefines b 01 d redefines C

Answered by: ramesh on: Jul 3rd, 2012

Yes....it is possible...multiple redefines possible......

Consider two data items 77 w-a pic 9(3)v99 value 23.75 77 w-b pic zz9v99 value 123.45 after the statement move w-a to w-b what will be w-b value? A.123.75 b.B23.75 (where b indicates space) c.023.75...

Asked By: Interview Candidate | Asked On: Aug 20th, 2002

Answered by: Cathy Saunders on: Jul 1st, 2012

b.b23.75 (where b indicates space)

Answered by: ajayingle on: Jun 30th, 2010

Answer is :  b23.75
Bacause W-A 's original value is 023.75
           & W-B's original value is  123.45

After moving W-A's value to W-B Z replaces the 0 as blank.

Perform accumulate-totals varying a from 1 by 2 until a >2 after b from1 by 1 until b>2 after C from 2 by -1 until c<2 the paragraph accumulate-totals would be exicuted a.18 times b.4 times...

Asked By: Interview Candidate | Asked On: Aug 20th, 2002

Answered by: Abhi on: Jun 27th, 2012

(B) 4 times

Answered by: rakesh jena on: Apr 25th, 2007

(C) 8 times

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.