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 / chandrababu
We will get 123 not AB3..why because
A = +1 J = -1
B = +2 K = -2
C = +3 L = -3
D = +4 M = -4
E = +5 N = -5
F = +6 O = -6
G = +7 P = -7
H = +8 Q = -8
I = +9 R = -9
So will get 123 for ABC..
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Whats the difference between search & search ALL?
What is report-item in COBOL?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
What is the utilization of copybook in cobol?
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
What are declaratives and what are their uses in cobol?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
) How do u handle errors in BMS macro?
What are the different rules to perform a Search?
What are the different data types in cobol?
how do you reference the printer file formats from cobol programs
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
i want a program using by if, evaluate , string, unstring, perform, occurs?
What is the difference between binary search and sequential search?