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


Please Help Members By Posting Answers For Below Questions

What are the different rules of SORT operation?

694


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1900


Name some of the examples of COBOl 11?

2677


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

709


What is the local-storage section?

681






What is the difference between PIC 9.99 and PIC9v99?

775


Name the divisions, which are available in a cobol program?

683


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

704


What is the difference between Global and External Variables?

661


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

706


What is rmode(24)

676


How do you define a variable of comp-1 and comp-2?

701


What is a report item?

738


What is the difference between external and global variables in COBOL?

811


What is the use of intialize verb?

743