I've one string with spaces ( I N D I A ). My question is I
want remove the spaces & combine in to single string without
space (INDIA).How we can write the cobol program & wich
options we need to use. Please let me know.
Answer Posted / uday
Through reference modification we can acheive and it is the
best way.
In Working storage section
01 ws-india pic x(10) value ' I N D I A '
01 ws-india-f pic x(05).
In procedure division
Perform varying ws-i from 1 by 1 until wi-i > 20
If ws-india(ws-i:1) = spaces
continue
Else
move ws-india(ws-i:1)to ws-india-f
End-if
End-perform
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
what happens if parmparameter passes zero bytes to the program
Which Search verb is equivalent to PERFORM…VARYING?
What is the difference between comp and comp-3?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Write a program to enter and display the names of students in a class using the occurs clause.
) How do u handle errors in BMS macro?
Write a cobol program making use of the redefine clause.
how do you define single dimensional array and multidimensional array in your cobol?
What is inspect in cobol ?
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 ......
What rules are followed by the search verb.
Explain the configuration section of a cobol program with examples of syntax.
Explain how to differentiate call by context by comparing it to other calls?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
what is the use of outrecord?