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
Illustration of if- else statement: IF OK-BALANCE NEXT SENTENCE ELSE MOVE 2 BALANCE-CODE In this illustration, the OK-BALANCE is a condition name. No action is specific if

PROGRAM TO DEMONSTRATE MERGE VERB: The two files for which a record having 2 fields viz. Account Number and Name are already available. Now Merge these two files and create 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

PROGRAM FOR SCREEN SECTION:  identification division.   program- id.   environment division.   data division.   working-storage section.   01  a pic 9(2) value

PROGRAM FOR IF -ELSE: We have to write a program to check whether the given number is ODD or EVEN. You can use IF..ELSE. Identification division. Program- id. IfElse.

We have input file, record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input f

Examples - Edit characters for numeric data: The following illustration illustrates the use of Z editing characters. The character b is used to indicate the space character an

START STATEMENT: The START statement places the files to the initial logical record whose record key satisfies the condition specified by the KEY phrase. The access mode shoul

RENAMES CLAUSE: At times re-grouping of an elementary data items in a record may be essential so that they can belong to the original as well as to the latest group. This is o

Numeric -   Literals : The numeric literal can be created with the help of digits only. It can have a sign (+ or -) and can also have a decimal point. If no sign is specifi