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 / 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


Please Help Members By Posting Answers For Below Questions

how do you reference the rrds file formats from cobol programs

1494


What is perform what is varying?

1111


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5760


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

1291


What are the various section in data division and briefly explain them.

1110


i want a program using by if, evaluate , string, unstring, perform, occurs?

4635


What are different data types in cobol?

1228


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

1920


What is a report item?

1093


how do you reference the variable unblock file formats from cobol programs

1279


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

1175


In COBOL programming, what is PERFORM? What is VARYING?

1087


How do you reference the fixed block file formats from cobol programs

1156


) what is the difference between AID and HANDLE AID?

2099


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

1114