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 amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
what is the coding difference between COBOL and CICS.
in the TIME parameter we r giving hours r minutes
How to read records in reverse order in flat file? I know we can do it by reading all records into an array.... Then read records in reverse order by using subscript or index but can any body give me the exact code.
What is amode(24)?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
if one main program ,n -subprograms are then which call you follow ?why reasonuhg
What are subroutines ? and how do we pass data to the sub routines?
which one is better among static call and dynamic call?
hi dudes.....can any one help me..... what is SET TO TRUE all about,anyway?
Can a REDEFINES clause be used along with an OCCURS clause? if yes, 01 WS-TABLE. 03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE 'A'. 03 WS-EX REDEFINES WS-TABLE-EL PIC X(5). What can you expect? if no,why?
how do u link sub pgm to main pgm ?