Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


consider the following piece of code
01 GROUP-ITEM
05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50
05 AMOUNT-2 PIC 9(4)V99 USAGE COMP
MOVE ZERO TO GROUP-ITEM
ADD 50 TO AMOUNT-1
what will be the content of AMOUNT-1?
a.50
b.100
c.0
d.unpredictable

Answers were Sorted based on User's Feedback



consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / suresh

hi naveen,

Actually we are moving 0 to group-item so it will become
zero and adding 50 to amount-1. Hence Amount-1 is 50.

please correct me if i am wrong.

Is This Answer Correct ?    5 Yes 1 No

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / ashok

i have tried it, the answer is D unpredictable

Is This Answer Correct ?    4 Yes 0 No

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / man

d. unpredictable

GROUP-ITEM is considered as alphanumeric. You can only
initialise a group item.

Is This Answer Correct ?    3 Yes 1 No

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / jyotiprakash8

a is write ans

Is This Answer Correct ?    1 Yes 1 No

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / jyoti prakash

Ans is D and this 100% proof i have tested

Is This Answer Correct ?    1 Yes 1 No

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / priyanka

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 GROUP-ITEM.
05 AMOUNT-1 PIC 99V9 COMP USAGE COMP VALUE 50.
05 AMOUNT-2 PIC 9(4)V99 USAGE COMP.

PROCEDURE DIVISION.
A000-FIRST-PARA.
INITIALIZE GROUP-ITEM.
MOVE 0 TO GROUP-ITEM.
ADD 50 TO AMOUNT-1.

DISPLAY AMOUNT-1
.
STOP RUN.

If we don't use " MOVE 0 TO GROUP-ITEM." condition then the answer is 50 else if we are using it then the answer is 32.0. so I think the right answer is unpredictable.
Please correct in email if I am wrong.

Is This Answer Correct ?    0 Yes 0 No

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / harish

u r right a. 50

pls correct me if anything wrong

HARISH POOMGAME SHIVAPPA(hassan,karnataka)
NIIT TECHNOLOGY
KOLKATA

Is This Answer Correct ?    1 Yes 2 No

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / sachin borase

yes answer will be 50.

But if you initialize instead of move zeros then
value will be 100.

Is This Answer Correct ?    0 Yes 1 No

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / shan

A.50

Is This Answer Correct ?    0 Yes 2 No

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP V..

Answer / naveen

Why not C?

Can we have the reason for the above answer?

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More COBOL Interview Questions

How you can delete a record from a ps file in cobol?

1 Answers  


How do you come out of an EVALUATE statement?

3 Answers  


I hv ten records in ps file and i hv say some 15 records in vsam file .i hv empno and age in ps file n empno,empname,dept n desig in vsam file. i hv 2 read the ps file n check wid matching empno in vsam file and then insert all fields from ps and vsam into db2 table....plz help in writin the procedure division

1 Answers  


What do you understand by psb and acb?

0 Answers  


In a program, variables are used but no DB2 involved in it. Can you call it as host variables??

4 Answers   EDS,


consider the fallowing 77 stat pic 9. 88 male value 1,2,3. 88 female value 4 through7. what will be the value of stat a) set male to true. b) set female to true.

5 Answers  


What is the difference between index and subscript?

5 Answers   Visa,


what is meaning by design document? who can repared for this?

5 Answers   TCS,


I have a File that has duplicate records. I need only those records that occur more than thrice.?

3 Answers   IBM, Wipro,


What are ISOLATION LEVELS? Where do we need to specify them in compiling JCL (Exactly which statement and what is syntax for it)?

2 Answers   T systems,


what is lrec=f,what is difference between f,fb,v,vb?what is default value?how do we came to know that records are in f,fb,v,vb?

2 Answers   IBM, Wipro,


IF I mention stop run in CICS what happens?

0 Answers   IBM,


Categories