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

How to delete leading spaces/blank in COBOL ?
Example:- 01 data-name-1 pic x(220) " English is a
language".
I would like to delete leading spaces.

Answer Posted / minarul

you can do this by defining another varible with JUSTIFIED
RIGHT clause. then move the value from data-name-1 to that
varible. You have to define the picture clause of that
varible with proper length : below code will exactly do
that:

01 data-name-1 pic x(220) " English is a language".
01 CHR6 PIC X(217) JUSTIFIED RIGHT.
now do a move from data-name-1 to CHR6 and then disolay
the content of CHR6

Is This Answer Correct ?    20 Yes 33 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the Purpose of Pointer in the string?

1026


State the various causes of s0c1, s0c5 and s0c7.

1026


Which is not true about evaluate statement

2394


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

1175


Why occurs cannot be used in 01 level in COBOL?

1123


What is link edit in cobol?

1152


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

3092


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

1222


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2482


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

2222


IF I mention stop run in CICS what happens?

2304


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

1307


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2533


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

4120


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1451