Program for condition names , COBOL Programming


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.


    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
DELETE STATEMENT: The format of the delete statement is as shown below: DELETE   file-name RECORD   [  ;   INVALID   KEY  imperative-statement  ] Whenever the ACCESS MOD

COMPUTE VERB: The COMPUTE verb is very powerful. All the evaluations performed by the other 4 verbs can also be completed easily by using the COMPUTE verb. Its normal format i

ON SIZE ERROR OPTION:   If after an arithmetic expression, the result exceeds the highest value which can be accommodated in the result; this error is termed as size error. T

Picture Clause: The picture clause explains the general characteristics of an elementary data item. These characteristics are elaborated below: Class: In COBOL the

Buffers: The Modern computers are able of handling I-O operations independent of the CPU by means of the hardware termed as data channel. For illustration, if two buffers a

.(Period or Decimal Point) : The period may be used to insert a decimal point and may not come into view more than once. Both the period and V cannot appear in similar picture

NONSTANDARD CLAUSES: The various clauses explained above are as per the ANSI standard. Also, most compilers provide for additional nonstandard clauses to meet the specific nec

PROGRAM FOR COMPUTE VERB: We have to write an easy program to elaborate the COMPUTE verb.  Identification division. Program- id. compverb. Environment division. Da

PROGRAM FOR DIVIDE VERB:   We have to write an easy program to elaborate DIVIDE verb. You can also use edit characters in the program. Identification division. Program-

SIMPLE MERGE VERB: Like sorting, the merging of files is often required in different commercial application. It is likely to merge two or more files with the help of one MERGE