Get the contents of a Application Server directory

After reading the answers of Chris Carrthers and tomdemuyt I would say:

1) Use RZL_READ_DIR_LOCAL if you need simple list of filenames.

2) EPS_GET_DIRECTORY_LISTING is more powerfull - it can also list subdirectories.

Thanks You both!

With best Regards Niki Galanov


EPS2_GET_DIRECTORY_LISTING does the same thing as EPS_GET_DIRECTORY_LISTING BUT retunrs the file names up to 200 chars!


Call function RZL_READ_DIR_LOCAL:

FUNCTION RZL_READ_DIR_LOCAL.
*"----------------------------------------------------------------------
*"Lokale Schnittstelle:
*"       IMPORTING
*"             NAME LIKE SALFILE-LONGNAME
*"       TABLES
*"             FILE_TBL STRUCTURE SALFLDIR
*"       EXCEPTIONS
*"             ARGUMENT_ERROR
*"             NOT_FOUND
*"----------------------------------------------------------------------

Place the path in the NAME import parameter, and then read the directory listing from FILE_TBL after it returns.

RZL_READ_DIR_LOCAL can handle normal local paths as well as UNC paths.

The only downside is it only gives you access to the first 32 chars of each filename. However, you can easily create a new function based on the RZL_READ_DIR_LOCAL code, and change the way the C program output is read, as the first 187 characters of each filename are actually available.