In CL programming, How to read last record of physical file member

1k views Asked by At

I want to read last record of physical file member.

1

There are 1 answers

0
jmarkmurphy On

You can use an override to do this, but you can't read backwards in the file using CL, so what's the point? Probably better to use RPG.

But, you can position a file in CLP using:

OVRDBF FILE(file name) POSITION(*NONE | *START | *END | etc.)

You can prompt the command to find other positions. The ones I left out have to do with positioning by relative record number or by key.