How can I find the maximum value of a field in a file while
reading the file dynamically? without using sort function.
Suppose i have a file with fields Timestamp, description,
teamname, teamnumber.. i have read the file till end and
find the maximun value of timestamp which is not in sorted
order.. can we use function max(timestamp)?
Answer / mr.perfect
yes, we can use the function command.
MOVE FUNCTION MAX(timestamp-field) TO WS-TIMESTAMP
Is This Answer Correct ? | 1 Yes | 3 No |
PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B>2 AFTER C FROM 2 BY -1 UNTIL C<2 How many times the paragraph ACCUMULATE-TOTALS would be exicuted?
Whats the difference between search & search ALL?
Why do we use COMP-3 variables for computation, when we know that they are non displayable fields and require additional MOVE to numeric field before we populate it in output Reports?
Which is not true about evaluate statement
What type of Call you would use if you don;t want the control back to the calling program?
Can we redefine the field of x(200) to less than 200?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Suppose i have a Cobol field of 10 byte. it contains a decimal sign.How to know where is the point location?
Write down the divisions of cobol program?
What is the default value of DISP parameter?
How many variables can be declared in w-s section.?
In a program, there are 2 sections defined say SECTION-A and SECTION-B. There is a paragraph say CALC-INT in both the sections. If this para has to be called directly for SECTION-A, then PERFORM CALC-INT will not work as it is present in both sections. How the PERFORM statement has to be coded here?