Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X - 40.
The result in X is
Answer Posted / muhammad abdul aleem
I doubt if 05 level number will work or not.
But if it works the here is the answer.
Add 40,x to x means X = 10 + 40 + 10 =60
then
x = 60*3 -40
x=180-40
= 140
Since X = 99 so value will be 40
Therefore, Value of X will be 40...
| Is This Answer Correct ? | 26 Yes | 0 No |
Post New Answer View All Answers
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
What is the difference between goback, stop run and exit program in cobol?
how to move the records from file to array table. give with code example
What is report-item 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 ......
how to access the file from prodution from changeman tool and to submit a file to production
I have a File that has duplicate records. I need only those records that occur more than thrice.?
What are the different rules of SORT operation?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
Write a cobol program making use of the redefine clause.
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
How you can read the file from bottom?
Difference between cobol and cobol-ii?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?