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 |
In which area will you utilize 88 level items in cobol?
input:-AABBCCDDEFGHIIJ output:- ABCDEFGHIJ Here in input we hav the duplicate characters i.e repeating characters.SO we should eliminate the duplicate characters and should display the output in ascending order.
i need a program by giving input as a abcd in any randem order but i need a output as 1234 related to abcd. i.e,. a for 1,b=2,c.....etc..
How to retrive the 9th records out of ten records using the cobol program ?
I have a PS file and I would like to manually insert the binary values (like a COMP format) into the file. How can i do that? the way do in COMP-3 format.. suppose i want to insert -12345 in to file in comp-3 format. simply we can open a file in edit mode and do HEX-ON and insert the value . SEE BELOW-- 135 24D in 3 bytes - this will be COMP-3 presenatation of -12345.
How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp
01 x pic s9(8) comp. How will the following value be internally allocated '18787'
how to transfer the file from pc to mainframe??
what is the difference between Plan & package
in cobol i have one file it contains records like 10,4,23,98,7,90..... total records 100. iwant 10 to 20 in reverse order in cobol environ ment any one please give the answer......
How many sections are there in data division in COBOL?
How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB