Q
Problem solve Get help with specific problems with your technologies, process and projects.

Understanding the structure of DIR

I want to list all the files and folders in a directory in IFS. I'm using the opendir API. When I compile the code, I'm getting an error message in a variable declation used with DIR. I did some research and found out that the dirent.h file does not contain the definition of DIR. Can you direct me to a place where I can get the structure for the DIR? I am using ILE/C.
Do the following before reading the directory:

 
 *open directory and retrieve directory handle
C                   eval      dirpath = '/QDLS' + foldername
C                   eval      diroif = diropncon
C                   eval      tablelen = -1
C                   call      'QHFOPNDR'
C                   parm                    dirhandle
C                   parm                    dirpath
C                   parm      16            dirpathlen
C                   parm                    diroif
C                   parm                    tablespace
C                   parm                    tablelen
C                   parm                    errords 

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


This was last published in March 2004

Dig Deeper on iSeries ILE programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

  • How do I size a UPS unit?

    Your data center UPS sizing needs are dependent on a variety of factors. Develop configurations and determine the estimated UPS ...

  • How to enhance FTP server security

    If you still use FTP servers in your organization, use IP address whitelists, login restrictions and data encryption -- and just ...

  • 3 ways to approach cloud bursting

    With different cloud bursting techniques and tools from Amazon, Zerto, VMware and Oracle, admins can bolster cloud connections ...

Close