Consider the following COBOL entries:
05 X PIC 99 VALUE 10.
SUBTRACT 20 FROM X.
The resultant value of X wil be

Answer Posted / madhu

x=x-20 will be -10

Since there is a -ve sign in the beginning it'll be stored
on top of the last digit. So -0 = }.

Then ans will be 1}

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various section in data division and briefly explain them.

700


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2341


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2725


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

1785


Write a program to explain size error.

679






What is static and dynamic call in cobol?

601


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

428


Explain the configuration section of a cobol program with examples of syntax.

661


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3724


What are the different types of condition in cobol and write their forms.

660


Why occurs cannot be used in 01 level in COBOL?

721


how do you reference the printer file formats from cobol programs

669


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1234


how to move the records from file to array table. give with code example

2223


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

681