Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is inspect in cobol ?

1293


how do you reference the printer file formats from cobol programs

1212


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

2588


How do you get the data to code the BMS macro?

1963


How many sections are there in data division in COBOL?

1127


Explain how to differentiate call by context by comparing it to other calls?

1178


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

1089


What is length is cobol?

1097


Name some of the examples of COBOl 11?

3136


Can we redefine the field of x(200) to less than 200?

1363


What are the different rules of SORT operation?

1134


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

1077


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

2136


Write some characteristics of cobol as means of business language.

1139


In which area will you utilize 88 level items in cobol?

1161