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 the default value(s) for an initialize? What keyword will allow for an override of the default?

1060


How to use the same COBOL program in Batch and CICS on lines? explain with an example

2327


What is the default value(s) for an initialize and what keyword allows for an override of the default?

1154


What rules are to be followed while using the corresponding options?

1016


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

1174


What kind of error is trapped by on size error option?

1174


How you can read the file from bottom?

1082


how to move the records from file to array table. give with code example

2628


I have a File that has duplicate records. I need only those records that occur more than thrice.?

9741


How do u write test cases?

2011


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1198


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1601


What is an in line perform? When would you use it? Anything else you wish to say about it.

1017


How can you get the ksds file records into your cobol program?

1025


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

1041