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
NONSTANDARD CLAUSES: The various clauses explained above are as per the ANSI standard. Also, most compilers provide for additional nonstandard clauses to meet the specific nec

UPDATING OF THE RELATIVE AND INDEXED FILES: The Sequential files are updated by creating a new master file from an existing old master file and a transaction file. Such an Upda

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

Rules for Simple sort verb: The work file is to be defined by a sort elaboration entry (SD entry).The format of SD entry is as shown below. The rules below should be taken

PROGRAM FOR PERFORM - VARYING: We have to write a program to elaborate PERFORM ...VARYING Identification division. Program- id. PerfVary. Environment division. Dat

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

ADD and SUBTRACT CORRESPONDING: The CORRESPONDING option can also used with the ADD and SUBTRACT verbs. The following are some of the formats of these verbs with the CORRESPON

Illustration of Multiply verb: (a)  MULTIPLY A BY B. In this situation the value of A & B will be multiplied and the product will be stored in B.  The decimal point locatio

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-

PROGRAM FOR ELECTRICITY BILL: An electricity company supplies electricity to 4 types of customers coded 1, 2, 3 & 4.The rate schedule for customers is shown in one table as