how to remove leading spaces and zeroes in a cobol
variable.is there any easy way to do it

Answers were Sorted based on User's Feedback



how to remove leading spaces and zeroes in a cobol variable.is there any easy way to do it ..

Answer / s.p.reddy

By using edit character Z in PIC clause we can remove
leading zeros

Is This Answer Correct ?    11 Yes 3 No

how to remove leading spaces and zeroes in a cobol variable.is there any easy way to do it ..

Answer / surendra

find the lenght of the leading spaces then move the actual
value of the variables using reference modification to
another working storage variable.

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More COBOL Interview Questions

what happens when a copybook variables are declared using include statement ?

3 Answers   IBM,


How to use the same COBOL program in Batch and CICS on lines? explain with an example

0 Answers   IBM,


What do you do to resolve SOC-7 error?

2 Answers   Sun Life, Wipro,


How do you define a variable of COMP-1? COMP-2?

3 Answers  


What is Alternate Index ? How is it different from regular index ?

2 Answers  






what if any ,is the syntex error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) ........ IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.

5 Answers   TCS,


what is rediffine clause?in what situation it can use?give me real time example?

1 Answers   IBM,


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

0 Answers   HSBC, Quest,


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

0 Answers  


What happens in the background of spool when we submit a job for compilation and execution... This is a recent question in ibm...Kindly help me.....

3 Answers   IBM,


can we redefine 77 level item is it possible

4 Answers   HCL,


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

0 Answers  


Categories