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

State the various causes of s0c1, s0c5 and s0c7.

1088


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

1186


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

12385


i need a small 3d program using inline and outline.

2213


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

1972


What are the different types of condition in cobol and write their forms.

1115


Which division and paragraphs are mandatory for a COBOL program?

1278


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

1247


Write a program to explain size error.

1203


Are you comfortable in cobol or jcl?

1050


How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?

1249


how do you reference the printer file formats from cobol programs

1220


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

1152


Define static linking and dynamic linking.

1196


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

1540