× 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.



This should really be on the RPG list but here's a quick demo program

  * Walk directory and list file names found

 D RC              S             10I 0
 D pDir            S               *
                                                               
 D opendir         PR              *   ExtProc('opendir')
 D                                 *   Value  Options(*String)
                                                               
 D readdir         PR              *   ExtProc('readdir')
 D                                 *   Value
                                                               
 D closedir        PR            10I 0 ExtProc('closedir')
 D                                 *   Value
                                                               
 D DirEnt          DS                  Based( pDirEnt )
 D  Res1                         16a
 D  GenId                        10u 0
 D  FileNo                       10u 0
 D  RecLen                       10u 0
 D  Res3                         10i 0
 D  Res4                          6a
 D  Res5                          2a
 D  NLSinfo                      12a
 D   CCSID                       10i 0 Overlay(NLSinfo)
 D   CountryId                    2a   Overlay(NLSinfo:*Next)
 D   LanguageId                   3a   Overlay(NLSinfo:*Next)
 D   Res6                         3a   Overlay(NLSinfo:*Next)
 D  Len                          10u 0
 D  FileName                    640a
  * Next field only used to permit use of DSPLY op-code on file name
 D  ShortName                    50a   Overlay(FileName)
 

 C                   Eval      pDir =  opendir('/Partner400')
                                                                  
 C                   If        pDir <> *Null
 C                   Eval      pDirEnt = readdir( pDir )
 C                   DoW       pDirEnt <> *Null
 C     ShortName     Dsply
 C                   Eval      pDirEnt = readdir( pDir )
 C                   EndDo              
 C                   Eval      RC = closedir( pDir )
 C                   Else
 C     'Not Found'   Dsply
 C                   EndIf

If you have questions on this please use the RPG list.


Jon Paris
Partner400
www.Partner400.com 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.