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
PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION: We have to write a program to create an Indexed Sequential File in a dynamic mode for Student particulars. Suppose just 3 fields:

Example of File-control: The assign clause assigns a specific physical peripheral device name to a file. The physical peripheral device are machine-dependent. We use the devic

Selection of file Organization: While designing a file, the programmer should select an appropriate association for a file. The order in which the choice is to be made is as s

MERGE VERB WITH OUTPUT PROCEDURE: Like the sort verb, the merge verb can also have an output procedure. The syntax of the MERGE verb is as shown below:   The r

TO WRITE A QUADRATIC EQN ROOTS ARE COMPLEX IN COBOL PROGRAM

IF ... ELSE STATEMENT: We are familiar with an easy form of the IF statement. The common form of the IF statement is as shown below: Each of the statement-1 and statem

PROGRAM FOR SCREEN SECTION WITH FILES: identification division.   program- id.   environment division.          input-output section.   file-control.     select

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

DELETE STATEMENT: The format of the delete statement is as shown below: DELETE   file-name RECORD   [  ;   INVALID   KEY  imperative-statement  ] Whenever the ACCESS MOD

VALUE CLAUSE: The value clause defines the preliminary value of the data item. Normally initialization will be completed just before the first statement in the procedure di