Program for condition names , COBOL Programming

PROGRAM FOR CONDITION NAMES:

We have to write a simple program to demonstrate Condition names usage.

 identification division.

  program- id.

  environment division.

  data division.

  working-storage section.

  01   ms     pic  9(2).

  88   s    value 0 thru  9 .

  88   m    value 10 thru 99.

  procedure division.

  p-1.

    display(1 1) erase.

    display(5 5) "Enter Marriage Status : ".

    display(7 5) " 0 to 9   .... Single Person ".

    display(8 5) " 10 to 99 .... Married Person".

    accept ms.

    if s   display(10 5) "Single".

    if m   display(10 5) "Married".

    stop run.  

Posted Date: 10/18/2012 2:04:32 AM | Location : United States







Related Discussions:- Program for condition names , Assignment Help, Ask Question on Program for condition names , Get Answer, Expert's Help, Program for condition names Discussions

Write discussion on Program for condition names
Your posts are moderated
Related Questions
SEQUENTIAL FILE CREATION AND REWRITING: We have to write a program to create a student file with just two fields: sno i.e. Student Number and same i.e. Student Name. Add a few

Comparison of Numeric Operands: We are well-known with the kind of the relational condition where both the operands are numeric. The comparison in this situation is algebraic

Abbreviation: The Consecutive relational conditions in a compound condition can be abbreviated in many cases as shown: (i) When the subjects in the consecutive relational c

Example of condition names: The illustration below is of the use of the condition names  77  MARITAL-STATUS     PIC    9   88  SINGLE    VALUE    IS     ZERO   88  MA

READ STATEMENT: The aim of this verb is to make available the next logical record from the input file. It is important to note the meaning of the "next" logical record in the

REWRITE STATEMENT: As in the situation of a relative file, the REWRITE statement needs that the file should be opened in the I-O mode, and if the SEQENTIAL access mode is spec

PROGRAM FOR IF :   We have to write a program to check whether the given number is ODD or EVEN. Identification division. Program- id. Ifst. Environment division.

RULES OF REDEFINES CLAUSE The rules shown below govern the use of the REDEFINES clause: (i) The level-number of data-name-1 and data-name-2 should be identical. (ii) Exce

CONDITIONS-NAME CONDITION:   The condition name is an entity which itself is a condition and these can have either a true or false value. Though, a condition name cannot be d

OPEN statement: We know that the processing of a file should start with the execution of an OPEN statement. The file can be opened in any one of the 4 open modes - INPUT, OUTP