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

In a file if a column account number conatain value 0001234.. how can we move the value to another variable without zero. value may contain any type such as 00123405. we need the value 1234 or 12305. how can we do that in cobol. Please help.

Answer Posted / mahesh satya

variable pic 9(08).
perform varying I from 1 by 1 until I < 8 or found
IF VARIABLE(I:1) not = 0 then
compute actual = 8 - I
move VARIABLE(I: actual) to NEW_VARIABLE
set found to true
end-if
end-perform

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to move the records from file to array table. give with code example

2631


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.

1383


What is the default value(s) for an initialize and what keyword allows for an override of the default?

1155


Name the divisions, which are available in a cobol program?

1169


how do you reference the rrds file formats from cobol programs

1495


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

1145


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

1062


Define static linking and dynamic linking.

1110


What rules are to be followed while using the corresponding options?

1017


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

2337


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2395


What are 77 levels used for?

1052


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

1092


what are decleratives in cobol?

2209


What is report-item in COBOL?

1094