Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



how can count the number of character in feild ?? suppose for instance i have a feild with value ..

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

how can count the number of character in feild ?? suppose for instance i have a feild with value ..

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

how can count the number of character in feild ?? suppose for instance i have a feild with value ..

Answer / pradeep

INSPECT VARIABLE1 TALLYING WS-COUNT FOR CHARACTERS

Is This Answer Correct ?    2 Yes 0 No

how can count the number of character in feild ?? suppose for instance i have a feild with value ..

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

Post New Answer

More COBOL Interview Questions

What is the difference between comp and comp-3 usage?

0 Answers  


What is comp-1 and comp-2?

0 Answers  


i have variable record in the 5th, i want to sort from 5th filed ? how ?

2 Answers   TCS,


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

7 Answers   BirlaSoft,


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?

2 Answers  


perform I from 0 by 1 until I=5?How maney times it will executes

8 Answers  


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-

4 Answers   HSBC,


What does the INITIALIZE verb do?

1 Answers  


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.

0 Answers   IBM,


How to read the last 100 records from a COBOL file. The file contains N number of records.

11 Answers   IBM,


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.

5 Answers  


Categories