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 |
Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.
in cobol main pgm is calling sub pgm but sub pgm does not exists , what abend i get if submit the job?
can you declare redefine in level 01?
what is rediffine clause?in what situation it can use?give me real time example?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
what is the difference between perform varying and perform until
) How do you access the migrate the data from production region to development region
how we rectify soc7 and soc4 errors in project?
What is the difference between a binary search and a sequential search?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?
In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference