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
FILE CHARACTERISTICS: The task of file handling is the responsibility of the system software termed as IOCS (Input-Output control system). Record Size: We know that th

Block Size: The normal practice is to group a number of consecutive records to form that is termed as a block or a physical record. The number of records in a block is frequen

PROGRAM TO FIND INTEREST ON BANK DEPOSITS: We have to write a program to find interest on deposits. The criteria is given below : identification division. program-

Data Names and Identifiers:   The Data name provides reference to the storage space in the memory where the real value is stored. This value takes part in the operation whene

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

we have input file ,record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input file

SEQUENTIAL FILES:   The purpose of the proposed section is to introduce the concepts such as File characteristics, File Description for Fixed-Length Records, File-Control

Illustration of Perform with varying option: A) Perform para-3 varying the k from 1 by 1 until k > 10. Here para-3 will be constantly executed 10 times (For k=1,2,3, .....1

PROGRAM TO DEMONSTRATE MERGE VERB: The two files for which a record having 2 fields viz. Account Number and Name are already available. Now Merge these two files and create a