input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16....
output:- A = 100,B=36,C=50.
Here spaces are considered between numbers.
When we give input as above, the numbers should be added n
displayed.So please help me out.

Answer Posted / lalitha

Use Delimiter option in STRING function - COBOL to unstring
the numbers to variables and then sum it up.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1953


What is the difference between PIC 9.99 and PIC9v99?

777


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

2761


) How do u handle errors in BMS macro

1505


Whats the difference between search & search ALL?

5261






I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1113


How you can read the file from bottom?

658


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

775


Why did you choose to work with ibm mainframe cobol programming?

627


Give some examples of command terminators?

752


What are declaratives and what are their uses in cobol?

708


How many bytes S(8) comp field occupy and its maximum value?

1628


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 is the difference between next sentence and continue in cobol programing language?

708


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

672