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 are INPUT PROCEDURE and OUTPUT PROCEDURE?
What are the pertinent COBOL
Write a cobol program making use of the redefine clause.
Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $
i want all ERRORS codes in COBOL ,JCL,VSAM ,DB2,CICS
can i give 9(10) in comp 3 instead of s9(10) ? if i can give wht would be ths ans
Can we use goto statement in inline_perform ?
What is the figurative constant in cobol?
why occurs clause not mentioned in 01 level
6 Answers HCL, NIIT, TCS, Tesco,
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
if someone is using my file,how can i find which user id is using?
plz,could any one tell me? what about EBCDIC in cobol?briefly?