01 xxx pic 9(4).
01 yyy pic 9(6).
move 123456 into yyy.
move yyy to xxx.
display yyy.
what would be the value of yyy
Answers were Sorted based on User's Feedback
Answer / jaganmohanreddy
HAI ALL U R WRITING DIFFERENT ANSWERS BUT THEY ARE ASKING
FOR YYY VALUE IT WONT BE CHANGED IT HAS VALUE OF 123456
BECAUSE ITS PIC CLAUSE IS 9(6) OK THEN DISPLAY YYY IT WIL
DISPLAY 123456 OK ANY DOUBTS
| Is This Answer Correct ? | 55 Yes | 3 No |
Answer / gangadhara.m
numeric number alingment is right to left
truncation is done in left side
the datatype size of y is 6
so value of y is 123456
| Is This Answer Correct ? | 8 Yes | 2 No |
Answer / mahaveer
Here if u display YYY it will 123456
and if u display xxx it will 3456
Hope its clear
| Is This Answer Correct ? | 4 Yes | 0 No |
File status must be checked both while opening and reading the file or only while reading the file?
Which of the following paragraphs is compulsory in every COBOL program? (a) SPECIAL-NAMES (b) PROGRAM-ID (c) FILE-CONTROL (d) OBJECT-COMPUTER
What is the difference between NEXT SENTENCE and CONTINUE?
Can you REWRITE a record in an ESDS file? Can you DELETE a record from it?
6 Answers ABC, IBM, Mphasis, Wipro,
How to retrive the 9th records out of ten records using the cobol program ?
input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.
How many sections are there in data division?.
I have a file it contain 10 records.i got abend at 8th record because of soc7.how do you know that perticular record got abend?
What is the maximum length of a field you can define using COMP-3?
4 Answers Complex System, Infosys,
can we use COPY statement in w-s section? how?
Explain how to differentiate call by context by comparing it to other calls?
I have a seq file with different fields one field is address with pic x(50) as input in a cobol program. In address there is 'PUNE' at any different positions in the address field ( form 1 t0 50) . My requirement is select the fields with address 'PUNE' by using cobol. Please suggest