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 difference between comp and comp-3 usage?
What is comp-1 and comp-2?
i have variable record in the 5th, i want to sort from 5th filed ? how ?
If there are two files one with 100 records and other with 101 records. we have to find out the one record that is the odd man out . What are the steps to do it
If we put three reads in COBOL in the same para one after the other, to read a PS file,will it read the same record thrice or it will read three records sequentially? For example : Input File 01 02 03 Para 900 Read infile Display Infile rec Read infile Display infile rec Read infile Display infile rec. What will be the output?
perform I from 0 by 1 until I=5?How maney times it will executes
I have the requirement to compare the two files and pick up the matching records. File 1. file2 23 32 32 13 34 15 35 36 36 35 43 Get the matching records from this 2 files to out file. how you will do this in cobol program?
15 Answers ADP, Broadridge, CTS, HSBC, L&T, RBS, TCS,
what is the meaning of pic 9(09)v99-
What does the INITIALIZE verb do?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
How to read the last 100 records from a COBOL file. The file contains N number of records.
consider the fallowing 77 stat pic 9. 88 male value 1,2,3. 88 female value 4 through7. what will be the value of stat a) set male to true. b) set female to true.