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
Give some examples of command terminators?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
Explain how to differentiate call by context by comparing it to other calls?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
how can i see junk values in dclgen or in hostvariable of comp ?
What do you understand by psb and acb?
how to move the records from file to array table. give with code example
Explain the configuration section of a cobol program with examples of syntax.
how do you reference the fixed unblock file formats from cobol programs
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
HOw can I get the negative sign while deduct high value from low value
Which division and paragraphs are mandatory for a COBOL program?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?