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

Why is it necessary that file needs to be opened in I-O mode for REWRITE?

748


Describe the cobol database components?

684


How you can read the file from bottom?

660


how can i see junk values in dclgen or in hostvariable of comp ?

2546


Can a Search can be done on a table with or without Index?

806






What is the Purpose of Pointer in the string?

645


what is difference between cobol and cobol/400

21572


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

759


what is the use of outrecord?

1774


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1234


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

744


What is report-item in COBOL?

713


How can you get the ksds file records into your cobol program?

646


What is a SSRANGE and NOSSRANGE?

826


Write a program that uses move corresponding.

676