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

Answers were Sorted based on User's Feedback



How to delete a front spaces in a data-name/variable in cobol Example:- 01 data-name-1 PIC x(2..

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

How to delete a front spaces in a data-name/variable in cobol Example:- 01 data-name-1 PIC x(2..

Answer / deepak dada

01 data-name-1 pic value " cobol language" justified
right.
01 data-nane-2 pic(20).
01 data-name-3 redifines data-name-2 pic x(14).
move data-name-1 to data-name-3.
display data-name-3.

Is This Answer Correct ?    1 Yes 2 No

How to delete a front spaces in a data-name/variable in cobol Example:- 01 data-name-1 PIC x(2..

Answer / anjibabu

Deepak is partially right.

01 name1 pic a(20) value ' cobol language'.
01 name2 pic a(20).
01 name3 redefines name2 pic a(14) justified right.
PD
move name1 to name3.
display name2.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

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

0 Answers  


if you code move high-values to variable,can you move it into numeric variable or alphanumeric variable?

1 Answers   Patni,


The maximum number of dimensions that an array can have in COBOL-85 is ?

11 Answers  


How much salary you are expecting? If they ask in an interview, what we have to tell?

6 Answers   Tech Mahindra, Wipro,


in a indexed file what is procedure for read the records from 12 to 18. please give the code example

2 Answers   L&T,


Why we are using comp and comp-3 in real time projects?

4 Answers   IBM,


how to create temporary data set in jcl? what is the use?

3 Answers   Cap Gemini, Temenos,


What is the Importance of GLOBAL clause According to new standards of COBOL?

2 Answers   Infosys,


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

0 Answers  


period is missing in the cobol program which error we getting

5 Answers   TCS, Tesco,


What are different file OPEN modes available in COBOL?

4 Answers   Sun Life,


How will you find the currepted records in a file

2 Answers  


Categories