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
PROCEDURE DIVISION statements for the relative files: The statements OPEN, CLOSE, READ, WRITE and REWRITE that are available for sequential files are also available for the re

Point Location: The position of the decimal point is the other characteristic which can be specified in the case of the numeric data items. If the position is not specified, t

Environment Division: The Environment Division is the second division in the COBOL source program. It is mainly machine-dependent . The computer and all the peripheral dev


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

B (Blank Insertion) : The occurrence of a B anyplace in the picture will insert a space character in the edited data. There can be more than one B in the picture. Examples:

CR and DB (Credit and Debit Sign): The two characters that is CR or DB symbol may appear only at the rightmost place of the picture. They are similar to the minus sign edit ch

DATA RECORD CLAUSE: The DATA RECORD clause, documents the record names defined for the file. For illustration, DATA RECORDS ARE REC-1, REC-2, REC-3 that means there are 3diffe

GO TO, STOP RUN: The GO TO verb is used to completely transfer the control to elsewhere in the program. Its form is as shown below: GO TO procedure-name As a result o

FILLER CLAUSE: Consider the statements as shown below: 1)  01    f    pic     x(80)  value    all "-". This statement origins a line of 80 characters filled with "-"