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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

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

10637


How do you define a variable of comp-1 and comp-2?

707


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.

1703


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1234


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

692






how do you reference the esds vsam file formats from cobol programs

634


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

1846


Write the code implementing the perform … varying.

646


HOw can I get the negative sign while deduct high value from low value

1794


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

1552


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

815


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

720


What is difference between static and dynamic call in cobol?

779


Difference between array and sub-script ?

1169


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

934