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 |
suppose there is one PF having two members PF1 PF2.PF has one unique key Emp ID.could you tell me uniqueness in PF will be effective across members as well ? assume emp iD 3333 is in member PF1 would same Emp id be exist also in member PF2 ?
If i got a job on mainframe technology, will i have a bright future?. Some people are discouraging me. Let me know, is it true? Please bring back me from the confusion.
wht is structured cobol pgm and non structred cobol pgm ?
what is the advantage of sync class
Can you please let me know the centre name of INS certification in Kolkata.
How do u initialize an array?
What are options have been removed in COBOL 11?
What is the difference between goback, stop run and exit program in cobol?
I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
What is the difference between a DYNAMIC and STATIC call in COBOL?
How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning.
What are the rules of the move verb?