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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

8650


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

820


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

748


In COBOL programming, what is PERFORM? What is VARYING?

670


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

714






What are the different rules of SORT operation?

698


What is rmode(any) ?

684


What are the pertinent COBOL commands?

2621


What is the utilization of copybook in cobol?

655


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5057


What rules are followed by the search verb.

635


What are the different data types in cobol?

790


What rules are to be followed while using the corresponding options?

637


how to convert the recors form vsam file to db2 table tru file aid

2761


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

700