Class condition - cobol programming, COBOL Programming

Assignment Help:

CLASS CONDITION:

 The class condition establishes whether or not the value of the operand is numeric or alphabetic. The operand is numeric if it contains only the digits 0 to 9 with or without the operational sign. An operand is alphabetic if it holds only the letters A to Z & space. The format of the class condition is as shown below:

The rules shown below apply in the situation of the class condition.

(i) The usage of the identifier should be DISPLAY or some forms of the DISPLAY.

(ii) For the NUMERIC option the identifier should be either numeric or alphanumeric.When the data item is defined with the operational sign then the appearance of the sign is considered as normal.

(iii) For the alphabetic option, the identifier should be either alphabetic or alphanumeric.

(iv) The identifier might be a group item. Though, for the NUMERIC option, the group item should not consists elementary items explained with an operational sign.

The class condition is very helpful for the validation of the input data. In COBOL, the data is read in the record region in similar form as recorded on the external medium regardless of the specified class of the individual fields in the record. For illustration, if we are reading the value of the numeric field from a card and the corresponding position in the card contains non-numeric characters, then the system will not detect it to be an error. Rather than, the nonnumeric characters will be stored in the character positions of the numeric field. This error may even pass ignored as during any subsequent numeric operation (like numeric MOVE or arithmetic operation), only the numeric portion of the characters in the field be used. And hence, the possible punching mistake in the data card can go and detected unless the proper care is taken. One may avoid a few of these blunders through the use of the class condition. 


Related Discussions:- Class condition - cobol programming

IMS, Can u please let me know how can i use SSA''s in IMS while fetching se...

Can u please let me know how can i use SSA''s in IMS while fetching segments. Thanks, Rajesh

Rules of redefines clause, RULES OF REDEFINES CLAUSE The rules shown be...

RULES OF REDEFINES CLAUSE The rules shown below govern the use of the REDEFINES clause: (i) The level-number of data-name-1 and data-name-2 should be identical. (ii) Exce

Declarative and file status clause, DECLARATIVE and FILE STATUS Clause: ...

DECLARATIVE and FILE STATUS Clause: The input-output exception condition in the situation of a direct access files can be handled by a declarative procedure in a manner simila

Program for screen section with files, PROGRAM FOR SCREEN SECTION WITH FILE...

PROGRAM FOR SCREEN SECTION WITH FILES: identification division.   program- id.   environment division.          input-output section.   file-control.     select

Conditions-name condition, CONDITIONS-NAME CONDITION:   The condition...

CONDITIONS-NAME CONDITION:   The condition name is an entity which itself is a condition and these can have either a true or false value. Though, a condition name cannot be d

Compound condition, COMPOUND CONDITION: The two simple conditions can ...

COMPOUND CONDITION: The two simple conditions can be connected by the logical operators AND or OR to form a compound condition (also termed as combined condition). When two co

Open statement - sequential files, OPEN statement: We know that the pr...

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

Sign condition - cobol programming, SIGN CONDITION:   The sign condit...

SIGN CONDITION:   The sign condition establishes whether or not the algebraic value of an operand is negative, positive or zero. The operand can be either the numeric identif

Rules of move verb, RULES OF MOVE VERB:  The Data movement is managed ...

RULES OF MOVE VERB:  The Data movement is managed by the rules which are as shown below: (a) The contents of the identifier - 1 or the value of the literal - 1 is moved to

Compute verb, COMPUTE VERB: The COMPUTE verb is very powerful. All the...

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

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd