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

1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1605


HOw can I get the negative sign while deduct high value from low value

1779


Write a program to explain size error.

667


What is a scope terminator give example?

650


How do you reference the fixed block file formats from cobol programs

693






I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1796


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2716


what are decleratives in cobol?

1821


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

624


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

679


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

699


) how do u code after getting data?

1575


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1014


What is the problem of ordered sequential files access?

690


How to know whether the module is dynamical or statistical?

648