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 |
What is Redefines clause?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
Can printer files (having 133 characters) be of variable length?
What is the figurative constant in cobol?
a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?
What is the difference between goback, stop run and exit program in cobol?
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.
The maximum number of dimensions that an array can have in COBOL-85 is ?
I know my query will return more than one row but I don't want cursor what should I do?
What rules are to be followed while using the corresponding options?
What do you feel makes a good program?