How To Separate The Numerics From An Alphanumric Data Item
Which Contains Both Alphabates And Numerics ?
Answers were Sorted based on User's Feedback
Answer / shriram supalwar, dharmabad
01 A pic x(10) value 'a1b2c34d5e'.
01 B pic x(5).
(You want to move only numeric data from a to b)
PERFORM PARA1 VARYING I FROM 1 BY 1 UNTIL I>10
PARA1.
IF A(I:1) IS NUMERIC
MOVE A(I:1) TO B(I:1)
END-IF
END-PERFORM.
DISPLAY "NUMERIC DATA IS:" B(I).
Is This Answer Correct ? | 12 Yes | 0 No |
Answer / kingmanish
Use the COBOL keyword ISNUMERIC.
This would be evaluated to true if the value stored is
numeric and you can separate the numeric values
Is This Answer Correct ? | 2 Yes | 1 No |
How you can delete a record from a ps file in cobol?
is it mandatory to give data division before procedure division ? wht happens if i give procedure division first thn data division ? reply soon
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
How can we pass data from cobol to JCl?
What is LENGTH in COBOL II?
wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?
i am a btech cs 2009 passout. i am opting for mainframe course. is it good to do this course? pls. anyone suggest me
Hi All, how is sign is stored in S9(17) comp-3 variable. Answer with an Example will be of great help.
What is the significance of 'above the line' and 'below the line'?
Define static linking and dynamic linking.
can we print comp 3 stmts how ?
What is SDSF?