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 |
What is rmode(any) ?
if a>b continue display x. dispaly y. end-if display 1 display 2. display 3. what should be my output ?
subscript and index r not coded in u r application program what will happen?
01 a pic x(6) value is abcdef 01 b pic x(3) move a to b wht will be the value in b ?
What is the Importance of GLOBAL clause According to new standards of COBOL?
How is sign stored in a comp-3 field?
Difference between file status codes 02 and 22.... since both are for duplicate key detection.
What is the difference between binary search and sequential search?
What will happen if we generate GDG +2 version instead of +1 version?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
Are you comfortable in cobol or jcl?
How can we know that cobol program is using report file or simple file....?