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



How can I find the maximum value of a field in a file while reading the file dynamically? without ..

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

Post New Answer

More COBOL Interview Questions

input:-AABBCCDDEFGHIIJ output:- ABCDEFGHIJ Here in input we hav the duplicate characters i.e repeating characters.SO we should eliminate the duplicate characters and should display the output in ascending order.

6 Answers  


What is the difference between SEARCH and SEARCH ALL?

6 Answers   Cognizant,


should I use Go back in the main program ? Yes we can use Go back in main program as well.

2 Answers   Xansa,


01 a pic s9(5) value '-12345' how it will be stored

7 Answers   ACS,


if someone is using my file,how can i find which user id is using?

4 Answers  






What is the difference between write & move in COBOL?

3 Answers   CSC, HHB,


What are the pertinent COBOL

0 Answers   IBM,


i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk values pls say how to do ths reply fast

4 Answers   L&T,


What is level 66 used for ?

3 Answers   TCS,


What was removed from COBOL in the COBOL II implementation?

0 Answers  


How To Separate The Numerics From An Alphanumric Data Item Which Contains Both Alphabates And Numerics ?

4 Answers  


Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?

3 Answers   Microsoft,


Categories