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 / 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 |
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
What is Redefines clause?
how can u pass the values into db2 values from cobol ?
How do get the result of your program directly on your pc?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
Discuss about changing dataset name in proc.
ZEROES and SPACES are _______ constants (a) Figurative (b) Numeric (c) Non-numeric (d) Alphabete
wht r the advantages of 77 level number ?
What is the difference between working storage copybook and linkage section copybook?
There is a variable with value 19446. Requirement is to convert it to 194.46. I tried it by doing divide by 100 and my receiving field data type is 9(03)v99. But the output is 194. I am not getting the decimal value. Could anyone pls let me know how to get this done?
what is the minimum number of lines a Cobol program should have to successfully compile and run
11 Answers ABC, Societe Generale,
How are the next sentence and continue different from each other?