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.

Answers were Sorted based on User's Feedback



SUPPOSE I HAVE 60 CHARACTERS STING. IN THAT I WANT FIND OUT HOW MANY TIMES 'A'(ASSUME)WI..

Answer / vinodh

ASSUME WS-NAME HAS 60 CHARACTERS
INSPECT WS-NAME TALLYING WS-COUNT CHARACTER 'A'
INSPECT WS-NAME REPLACING ALL 'A' BY 'E',

Is This Answer Correct ?    17 Yes 0 No

SUPPOSE I HAVE 60 CHARACTERS STING. IN THAT I WANT FIND OUT HOW MANY TIMES 'A'(ASSUME)WI..

Answer / pandu

Thanks Vinodh

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More COBOL Interview Questions

how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?

4 Answers   TCS,


how to submit a jcl by cobol program. clear me with an example.

3 Answers   HCL,


How do pass the values to the parameters in cobol

2 Answers  


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

0 Answers  


I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

1 Answers   L&T,






Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?

1 Answers  


If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will display only 3.(the next sentence, ie., after fullstop/period) ____________________________________ if a>b continue end-if display 1 display 2. display 3. If a>b, it Will display 1 2 3 (the next statement) ____________________________________ if a>b continue display 1 end-if display 2 display 3. display 4. If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?

8 Answers   UST,


I have a File that has duplicate records. I need only those records that occur more than thrice.?

3 Answers   IBM, Wipro,


what is difference between the sysabend and userabend?

2 Answers  


How do you code Cobol to access a parameter that has been defined in JCL?

3 Answers  


How to concatenation one or more string?

4 Answers   Temenos,


is it possible to rename 01 level?

4 Answers  


Categories