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
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
how to refer the data field?
Which is not true about evaluate statement
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
What rules are followed by the search verb.
What are declaratives and what are their uses in cobol?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
Define static linking and dynamic linking.
For rewrite, why is it mandatory that file needs to be opened?
What is amode(24)?
how to move the records from file to array table. give with code example
How do you get the data to code the BMS macro?
How do we get current date from system with century in COBOL?