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 a front spaces in a data-name/variable in
cobol
Example:-
01 data-name-1 PIC x(20) value " cobol language".
01 data-name-2 PIC x(20).
MOVE data-name-1 to data-name-2.
would like the value of data-name-2 is "cobol language".

Answer Posted / varun v

we can use "Inspect Tallying" also for the same. I guess
this one is more effective.

Working storage Variable:
01 data-name-1 PIC x(20) value " cobol language".
01 data-name-2 PIC x(20).
01 WS-TALLY1 PIC 9(02) VALUE ZERO.

Procedure Dvision:
Inspect data-name-1 Tallying WS-TALLY1 for leading
spaces
Move data-name-1(WS-TALLY1+1 : 20-WS-TALLY1) to
data-name-2.

Now data-name-2 should have
Value 'cobol language'.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What guidelines should be followed to write a structured cobol prgm?

1200


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

1302


What are the pertinent COBOL

2620


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

1362


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

1151


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

1148


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

3317


What is rmode(24)

1195


) how do u code after getting data?

2206


What is the difference between external and global variables in COBOL?

1537


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

2164


Can we change the password using ALTER? anyone tried and changed?

2075


What is the difference between Global and External Variables?

1432


What is a scope terminator give example?

1154


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

1306