a pic s9(4) comp
b pic s9(4) comp-3
c ????????????????
d ????????????????
move a to c
add a+B giving d.
what is ur declaration for c,d?
Answers were Sorted based on User's Feedback
Answer / mithlesh
since A is the comp field it takes 2 bytes space and B is
the comp-3 field it takes 3 bytes .
Now for the the declaration C and D they must be declaraed
into s9(4) and S9(5) pic caluse.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / lu
before answering this questions, i say "you need to code
PROPERLY, CORRECTLY" ok ....you add S9() comp to S9() comp.
comp-3 with comp-3...ok...
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vinodquestion
I dont know what you need mr. LU. My question is in place of '?' what do you code for that manipulations.. i.e give declarations for c,d and it satisfies both move,add operations.. if it is not possible give me your conclusion...
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / abhay
C should be declared as S9(04)
D should be declared as s(05)
Is This Answer Correct ? | 0 Yes | 0 No |
What is comp-1 and comp-2?
A LESS 1200 IF B GREATER 25 MOVE 47 TOC ELSE MOVE 57 TO C IF A GREATER 249 MOVE 67 TO C ELSE NEXT SENTENCE ELSE IF B LESS 67 MOVE 27 TO C What will be the value of C, when A is 137 and b is 25
How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?
what is jcl approach for programming?
There are two flat files one having 10 records and other having 5 records. write a cobol pgm to find the duplicate records(matching records)from both files.
01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??
how we separate the cobol cics statements from cobol&cics programming?
How to concatenation one or more string?
what is index and how to use two tables using index?
What are ISOLATION LEVELS? Where do we need to specify them?
In EBCDIC, how would the number 1234 be stored?
What is the difference between copy and include in cobol?