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 |
BY seeing a program how can we say that it is static call or dynamic call
Why would you use find and get rather than to obtain?
What is the difference between Global and External Variables?
How may divisions are there in JCL-COBOL?
i am a btech cs 2009 passout. i am opting for mainframe course. is it good to do this course? pls. anyone suggest me
Read a flat file and write last but one (I have n records in a file I have to write n-1th) record in another flat file. Could you please provide me the code in COBOL?
What is the difference between PIC 9.99 and 9v99 in COBOL?
0 Answers SwanSoft Technologies,
where will u code file status ?
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...........
Differentiate COBOL and COBOL-II?
Name some of the examples of COBOl 11?
Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING C Which of the following is true ? (a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.