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

You have many options.

1. Use Reference modification if you want a COBOL program.
2. INSPECT will also do.
3. Use SORT, OUTREC option, it will also work.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

704


What are the cobol coding sheets?

655


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

724


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?

1795


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

632






What is rmode(any) ?

676


Why would you use find and get rather than to obtain?

672


Write the code implementing the perform … varying.

635


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1894


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1103


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

439


Whats the difference between search & search ALL?

5234


What is the use of intialize verb?

735


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

1469


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1829