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 / mayank rastogi
Use following code: It'll work
MOVE 'I N D I A' TO WS-NAME.
UNSTRING WS-NAME DELIMITED BY ' '
INTO WS-CHAR1, WS-CHAR2, WS-CHAR3, WS-CHAR4, WS-CHAR5.
STRING WS-CHAR1, WS-CHAR2, WS-CHAR3, WS-CHAR4, WS-CHAR5
DELIMITED BY SIZE INTO WS-NAME1.
ws-name1 is the new variable that will contain INDIA
without any spaces
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
What is inspect in cobol ?
how do you reference the printer file formats from cobol programs
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
How do you get the data to code the BMS macro?
How many sections are there in data division in COBOL?
Explain how to differentiate call by context by comparing it to other calls?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is length is cobol?
Name some of the examples of COBOl 11?
Can we redefine the field of x(200) to less than 200?
What are the different rules of SORT operation?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
How many bytes S(8) comp field occupy and its maximum value?
Write some characteristics of cobol as means of business language.
In which area will you utilize 88 level items in cobol?