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
PROGRAM FOR SCREEN SECTION WITH FILES: identification division.   program- id.   environment division.          input-output section.   file-control.     select

PROGRAM FOR SIMPLE PERFORM: We have to write a program to elaborate simple PERFORM statement Identification division. Program- id.  Perf1. Environment division. Da

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

Record Description for the Variable-length Records: When the variable- length records consists of records of various lengths, each record type is to be explained at level 01 f

PROGRAM FOR MOVE CORRESPONDING: We have to write a simple program to demonstrate Move Corresponding. identification division.   program- id.   environment division.

.(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

RELATIONAL CONDITION:   We know that a relational condition specifies a comparison between two operands and has the form.     Operand-1    relational-operator   operand-2

Example of Sign condition: The illustration below describes the use of the sign condition. Illustration:     77  BALANCE  PIC  S9 (6) V99.       .       .     I


Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi