WORKING-STORAGE SECTION.
01 A PIC X(3) VALUE 'ABC'
01 B PIC 9(3).
PROCEDURE DIVISION.
MOVE A TO B.
STOP RUN.

OUTPUT IS: AB3
WHY AND HOW THIS IS HAPPENING.

Answer Posted / kamaldeep

I got AB3 as out put, when ever we are moving X(3) to 9(3) then 1st 2 bytes will be moved right(i.e. AB) but last byte will have '3' as C=+3

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a scope terminator give example?

653


How do you differentiate between cobol and cobol-ii?

651


how do you reference the ksds vsam file formats from cobol programs

662


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

655


What type of SDLC u followed? Why?

1517






What is inspect in cobol ?

798


Why did you choose to work with ibm mainframe cobol programming?

627


Why would you use find and get rather than to obtain?

680


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

712


how to move the records from file to array table. give with code example

2216


What are the pertinent COBOL

2041


Explain the configuration section of a cobol program with examples of syntax.

655


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

1922


How do you get the data to code the BMS macro?

1473


A table has two indexes defined. Which one will be used by the SEARCH?

755