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
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 |
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 |
Ans is D and this 100% proof i have tested
Is This Answer Correct ? | 1 Yes | 1 No |
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 |
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 |
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 |
Answer / naveen
Why not C?
Can we have the reason for the above answer?
Is This Answer Correct ? | 0 Yes | 2 No |
01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??
where will we code call by content and call by reference dude pls reply soon ?
plz any one tell clearly the justify right clause?
Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1). can redefines clause be used with occurs clause?
Hi Devolopers.. i need ur help.. i have 3 years of exp in Manual testing and SQL, next month onwards i shifted in to MAINFRAME TESTING... i have ZERO Knowledge abt mainframes.... PLS SUGGEST ME WHAT I LEARN in AMEERPET? mainframe testing or mainframe total devolopment subject... AS a devoloper u know every thing tester what to do PLSSSSSSSSS help me ITS VERY URGENT...
What is the difference between Call and a Link?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
How many bytes S(8) comp field occupy and its maximum value?
diffrence between renames and redifnes with examples
If we use GO BACK instead of STOP RUN in cobol?
how to access the file from prodution from changeman tool and to submit a file to production
What is the compute verb? How is it used?