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 type of SDLC u followed? Why?

0 Answers   IBM,


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.

2 Answers   Wipro,


How many sections are there in data division in COBOL?

0 Answers   B-Ways TecnoSoft,


how to resolve the file status 47.......

1 Answers   MMM,


i have two file one is ksds another one is esds i want store matching records in flat file how to you matching.

2 Answers   Wipro,


How do you differentiate between cobol and cobol-ii?

0 Answers  


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

1 Answers  


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

3 Answers   TCS,


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

5 Answers   TCS,


What is the difference between Call and a Link?

0 Answers  


What is Static and Dynamic linking ?

3 Answers  


In EBCDIC, how would the number 1234 be stored?

2 Answers   TCS,


Categories