× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Another method is like below, although the *end method is self documenting, anyway it's a method I used years ago to retrieve
the last record from batches of data imported from a UNIX box:


     FFileName  if   f 1024        disk    InfDS( OpnFBK )
.............
     D OpnFBK          DS
      * This is the number of records in file.
     D LstRecNum             156    159I 0
.............
      * Program initialization subroutine
     C     *INZSR        BEGSR
     ‚* Retreive batch number from trailer record, It will be the
     ‚* 10 bytes following the 2nd 'TAB' character.
     C     LstRecNum     chain     FileName

C Do 2
C Eval WrkPos = %Scan( @Tab :@ImpRec:


     C                                                   WrkPos+1 )
     C                   EndDo

     C                   Eval      BatchNbr = %Subst( @ImpRec : WrkPos+1
     C                                                        : 10 )

     ‚* Position file cursor to before 1st record.
     C     1             SetLL     FileName

     C                   EndSr
.............


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.