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
How do you reference the fixed block file formats from cobol programs
What are the pertinent COBOL commands?
How do you differentiate between cobol and cobol-ii?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Explain what you understand by passing by value.
How do we get current date from system with century in COBOL?
i want a program using by if, evaluate , string, unstring, perform, occurs?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What is inspect in cobol ?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
What is the difference between Global and External Variables?
Differentiate between structured cobol programming and object-oriented cobol programming.
What is the difference between structured cobol programming and object alternativelyiented cobol?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.