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 type of SDLC u followed? Why?
SUPPOSE I HAVE 60 CHARACTERS STING. IN THAT I WANT FIND OUT HOW MANY TIMES 'A'(ASSUME)WILL REPEATED AND I HAVE TO PASS 'E' IN PLACE OF 'A'ALONG THAT STRING.
How many sections are there in data division in COBOL?
how to resolve the file status 47.......
i have two file one is ksds another one is esds i want store matching records in flat file how to you matching.
How do you differentiate between cobol and cobol-ii?
I have a files containing both duplicate and non-duplicate records.The file is already sorted by a key.I want to determine those records that are duplicate and records that are non-duplicate.If duplicate the record is move to a duplicate file and if non-duplicate that will be move to valid file.thank you
The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above
consider two data items 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move
What is the difference between Call and a Link?
What is Static and Dynamic linking ?
In EBCDIC, how would the number 1234 be stored?