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
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
Describe the cobol database components?
How you can read the file from bottom?
how can i see junk values in dclgen or in hostvariable of comp ?
Can a Search can be done on a table with or without Index?
What is the Purpose of Pointer in the string?
what is difference between cobol and cobol/400
A table has two indexes defined. Which one will be used by the SEARCH?
what is the use of outrecord?
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?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
What is report-item in COBOL?
How can you get the ksds file records into your cobol program?
What is a SSRANGE and NOSSRANGE?
Write a program that uses move corresponding.