IS NUMERIC is used to check if the data is numeric or not.
IS NUMERIC clause IN COBOL EXAMPLE
01 WS-TEXT PIC X(05).
MOVE '15623' TO WS-TEXT.
IF WS-TEXT IS NUMERIC DISPLAY 'NUMBER'
ELSE
DISPLAY 'TEXTUAL CHARACTERS’
END-IF.
Output:
NUMBER
MOVE 'HE123' TO WS-TEXT
IF WS-TEXT IS NUMERIC DISPLAY 'NUMBER'
ELSE
DISPLAY 'TEXTUAL CHARACTERS’
END-IF.
Output:
TEXTUAL CHARACTERS
COBOL programming,COBOL tutorials,COBOL training,COBOL Interview Questions, COBOL Jobs, COBOL Books, programming course, example programs,COBOL Syntax, COBOL Commands, COBOL Verbs and their usage, COBOL Jobs in Hyderabad, Chennai, Pune, Mumbai, Bangalore
88-Level in cobol
ADD clause in cobol
Array in Cobol
Cobol
COBOL CHARACTER SET
COBOL coding rules
COBOL IS NUMERIC CLAUSE
COBOL PICTURE Clauses
COBOL Program Structure Principal
COBOL-Variable
DATA DIVISION
Data names in COBOL
data-types in COBOL
DISPLAY clause in cobol
Edited alphanumeric
Edited numeric
ENVIRONMENT DIVISION
EXIT PROGRAM Clause
EXIT PROGRAM Clause in COBOL
GO BACK Clause
GO BACK Clause in COBOL
HIGH-VALUES Clause in COBOL
History of COBOL
IDENTIFICATION DIVISION
INDEX Clause in Cobol
INDEX in Cobol
INITIALIZE Verb IN COBOL
IS NUMERIC clause IN COBOL
LEVEL 66 Clause In COBOL
LEVEL 66 In COBOL
LOW-VALUES Clause in COBOL
MOVE clause in cobol
Name the divisions in a COBOL Program
OCCURS Clause in Cobol
picture clause
Picture clause in cobol
PROCEDURE DIVISION
STOP RUN
STOP RUN Clause in Cobol
SUBTRACT clause in cobol
Table in Cobol
target area of COBOL applications
What does COBOL stand for
What does the INITIALIZE Verb do
WORKING-STORAGE Areas
Working-Storage Section
Popular
-
IS NUMERIC is used to check if the data is numeric or not. IS NUMERIC clause IN COBOL EXAMPLE 01 WS-TEXT PIC X(05). MOV...
-
Level-66 Data-item is used for RENAMES Clause. RENAMES clause is used to regroup(Re-arrange), club together existing fields under a new name...
-
REDEFINES Clause IN COBOL Sometime two or more different variables defined in a program are not in use simultaneously. Their memory can b...
-
Almost all COBOL compilers treat a line of COBOL code as if it contained two distinct areas. These are - AREA A - Between Column 8 to 11 -Di...
-
SYNC Keyword is used in COBOL to align the data(storage-area) to a Word-Boundary(Any address which is a multiple of 4). This is because, on...
Subscribe to:
Post Comments (Atom)
Y si el numero llega con espacion cual seria el resultado "8421 243"
ReplyDeleteNo es numerico.
DeleteGood info .
ReplyDeleteFor real time scenario based Mainframe interview questions with good explanation,please refer
www.MAINFRAMEINTERVIEW.com
What will happen if the value in WS-TEXT is shorter than the length of the variable ? The result of IS NUMERIC is TRUE or FALSE ?
ReplyDeleteFor example :
01 WS-TEXT PIC X(10).
MOVE '1562 ' TO WS-TEXT.
In cobol, moves are controlled by the size and type of the receiving field. Therefore, the resulting value will be "1562 ": not numeric.
DeleteThanks and I have a swell proposal: Whole House Reno sustainable home renovation
ReplyDelete