Display statement, COBOL Programming

DISPLAY STATEMENT:

 The function of the DISPLAY statement is just opposite to that of the ACCEPT statement. It is used to display the low-volume results on the operator's console or various other hardware devices. The common format of the DISPLAY statement is

If the UPON option is absent, the values of the identifier-1/literal-1, identifier-2/literal-

2, etc. are all displayed on the console. The option UPON with the mnemonic-name is implementor-dependent.  The mnemonic name, as in the situation of the ACCEPT verb, must be defined in the SPECIAL-NAMES paragraph. Whenever more than one operand is specified, then the values of the operands are displayed in the series they are specified. There will be no gap between these values. The operands should be of the usage DISPLAY. The literals may be any of the literal or figurative constant apart from the ALL literal.  If the figurative constant is specified, then only one occurrence of the constant is displayed.

Illustration:

  Consider the statement as shown below:

 DISPLAY    " SUM  IS",     THE-SUM

And assume that the picture and present value of THE-SUM are 9(3) and 15 respectively.  Upon execution of the statement, then the result will be displayed on the console

 

           SUM   IS   015

 

 

 

Posted Date: 10/16/2012 6:08:43 AM | Location : United States







Related Discussions:- Display statement, Assignment Help, Ask Question on Display statement, Get Answer, Expert's Help, Display statement Discussions

Write discussion on Display statement
Your posts are moderated
Related Questions
IF STATEMENT: The easiest form of the IF statement is  IF condition-1 statement-1 where the condition-1 may be any one from the shown below. When the condition-1

DECLARATIVE and FILE STATUS Clause: The input-output exception condition in the situation of a direct access files can be handled by a declarative procedure in a manner simila

PROGRAMS FOR REDEFINES CLAUSE: We have to write a simple program to explain the REDEFINES clause at 01 level. identification division. program- id. Redef. environment

PROGRAM FOR SUBTRACT VERB: We have to write a simple program to elaborate the SUBTRACT verb. You can also use edit characters in the program. Identification division. Pr

CR and DB (Credit and Debit Sign): The two characters that is CR or DB symbol may appear only at the rightmost place of the picture. They are similar to the minus sign edit ch

Column and Field in COBOL program: In COBOL there are 2 types of entries termed as margin A and margin B entries. The Margin A entries start from the column 8, 9, 10 or 11 and

Illustration of Renames clause: In the illustration, PAT-OTHER-THAN-BASIC will become a fresh group consisting of DEARNESS-ALLOWANCE, HOUSE-RENT & MTHLY-INCENTIVE. Keep in min

Transaction file : A transaction file is a file which contains new records those changes to old records which are used to update the master file. The problem of file updatio

Example of Perform statement: PERFORM BEGIN-CALCULATION THRU END-CALCULATION. Assume, BEGIN-CALCULATION and END-CALCULTION is paragraph names. The execution of the PERFORM

Comparison of the Numeric Operand with Nonnumeric Operand: The numeric operand can be compared to the nonnumeric operand subject to the restrictions which are as follows.