how can count the number of character in feild ?? suppose
for instance i have a feild with value ' rajesh sarkar'
then how can v count the number of characters whitout
spaces...........
Answers were Sorted based on User's Feedback
Answer / vikas pujar
We can use Inspect to accomplish this.
1) Inspect ws-var tallying ws-count for all spaces.
Here number of spaces will come and sit in ws-count, by deducting it with length of variable will get number of characters.
| Is This Answer Correct ? | 13 Yes | 1 No |
Answer / akviswa
1. Count the length of the string
2. Move the value of WS-IND to 1
2. perform until the length of the string=0
a. If string(ws-ind:1) <> spaces
Increment the counter for count
end-if
b. Decrement the length of string and increment WS-IND
end-perform
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / pradeep
INSPECT VARIABLE1 TALLYING WS-COUNT FOR CHARACTERS
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / dk
Declare an array with PIC X.
check for every subscript whether it is not SPACES.
Count the occurrences for non space values.
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?
can we use reference modification an arry.
What type of SDLC u followed? Why?
what are the error codes in cobol, db2, cics, vsam , and jcl
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
How to concatenation one or more string?
What are the different rules for performing sort operation?
If we use GO BACK instead of STOP RUN in cobol?
What is "Call by content" and "call by reference"?
I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?
Discuss about changing dataset name in proc.
input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.