Example of class condition, COBOL Programming

Example of Class condition:

Let the BASIC-PAY be a data name in the card record defined with picture 9(5) V99. By reading the card we can test the value of the BASIC-PAY to make certain that the data on the card is actually numeric. This can be completed as shown.

  IF BASIC-PAY IS NOT NUMERIC GO TO PARA-ERROR.

If the data holds any character other than digits, then the control will be transferred to PARA-ERROR. Or else, the control will go to the next sentence in series. It may be noted that the data should be punched with the foremost zeros, if any, and not with foremost spaces. The space character is treated to be an alphabetic character.

 

Posted Date: 10/17/2012 1:41:40 AM | Location : United States







Related Discussions:- Example of class condition, Assignment Help, Ask Question on Example of class condition, Get Answer, Expert's Help, Example of class condition Discussions

Write discussion on Example of class condition
Your posts are moderated
Related Questions
MULTI-DIMENSIONAL TABLES: The type of table which has been considered above is known as one-dimensional table. Whenever a table is such that each of its elements in turn is a

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

Illustration of perform statement: PERFORM    CALCUALTE-TAX. In this illustration, the CALCULATE-TAX is either a section name or paragraph name. Assume that it is a section

WRITE statement: The WRITE statement for tape and sequential-disk files has the syntax shown below. WRITE            record-name      [  FROM    identifier   ] As a resu

There are some restrictions when these procedures are used. (i) The Procedure should not contain any SORT/MERGE statement. (ii) An explicit transfer of the control outside

Example of Open statement: Illustration: The OPEN INPUT TRANSACTION, OLD-MASTER OUTPUT NEW-MASTER. The illustration represents that there are two input files named the

Literals: The actual values can too appear in a program. These values are termed as literals. For illustration, the statement MOVE 0 TO TOTAL indicates that the value zero wil

Comparison of Nonnumeric Operands: A nonnumeric operand can be compared to the other nonnumeric operand according to the rules as shown below: (i) Fields of Equal Sizes:

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

PROGRAM FOR CONDITION NAMES: We have to write a simple program to demonstrate Condition names usage.  identification division.   program- id.   environment division.