I need to extract the last record of a file into a second file.
I can use
PURGE file2
FILE file2;SAVE
PRINT file1;OUT=*file2;UNN;START=-1
or
PURGE file2
SETVAR EOF_FILE1 FINFO ("file1","EOF) - 1
FCOPY FROM=file1;TO=file2;SUBSET=!EOF_FILE1,1;NEW
I assume that behind the scenes PRINT is doing stuff implicitly that I have to
do explicitly for FCOPY.
Which method is faster or more efficient or better. Is there a better way? Is
there any limitation to PRINT that would hurt me while FCOPY would not? There
used to be some issue with PRINT that would take the first 6 or 8 digits in a
file as line numbers, but I believe that this has been remedied.
Or is this a trivial matter?
Thanks.
===================
Leonard S. Berkowitz
Harvard Pilgrim Health Care
voice: 617-509-1212
fax: 617-407-8444