We've run the dirdemo.cbl program referenced in other knowledge base articles.  It seems to run ok except that it not returning the the file/directory name as referenced in the program by name-text.
We've run this both on hp-ux and linux with the same results.
Any suggestions?
What is being returned from the call?
Are the other fields in entry-data being returned?
What is the value of search-status after the call to CBL_DIR_SCAN_READ?
Is the call to CBL_DIR_SCAN_START successful?
Thanks.
                
     
                                    
            We've run the dirdemo.cbl program referenced in other knowledge base articles.  It seems to run ok except that it not returning the the file/directory name as referenced in the program by name-text.
We've run this both on hp-ux and linux with the same results.
Any suggestions?
I tried this demo program on Linux.  It seems to work:
$ export COBCPY=$COBDIR/cpylib
$ cob DIRDEMO.CBL
  [program is successfully compiled]
  
$ cobrun DIRDEMO
Next entry is: Directory  /var/preserve
Next entry is: Directory  /var/games
Next entry is: Directory  /var/db
Next entry is: Directory  /var/crash
Next entry is: Directory  /var/cvs
Next entry is: File       /var/aslmfsem
Next entry is: Directory  /var/lib
Next entry is: Directory  /var/mfcobol
Next entry is: File       /var/.mng2sys
Next entry is: Directory  /var/ftp
Next entry is: Directory  /var/tmp
Next entry is: Directory  /var/cache
Next entry is: Directory  /var/mfaslmf
Next entry is: Directory  /var/mail
Next entry is: Directory  /var/empty
Next entry is: Directory  /var/log
Next entry is: Directory  /var/yp
Next entry is: Directory  /var/gdm
Next entry is: Directory  /var/lock
Next entry is: Directory  /var/account
Next entry is: Directory  /var/run
Next entry is: Directory  /var/spool
Next entry is: Directory  /var/local
Next entry is: Directory  /var/nis
Next entry is: Directory  /var/opt
That's all!
The program can take a directory name as a parameter, but if no parameter is supplied, on Unix/Linux, it scans the /var directory by default.
In the below, a parameter is supplied: a "." (meaning the current directory), and the contents of the current directory are shown correctly:
$ ls
DIRDEMO.CBL  DIRDEMO.idy  DIRDEMO.int  DIRDEMO.TXT  test-sub-dir
$  cobrun DIRDEMO .
Next entry is: File       ./DIRDEMO.CBL
Next entry is: File       ./DIRDEMO.idy
Next entry is: File       ./DIRDEMO.int
Next entry is: File       ./DIRDEMO.TXT
Next entry is: Directory  ./test-sub-dir
That's all!
How does this differ from your experience?
                
     
                                    
            We've run the dirdemo.cbl program referenced in other knowledge base articles.  It seems to run ok except that it not returning the the file/directory name as referenced in the program by name-text.
We've run this both on hp-ux and linux with the same results.
Any suggestions?
Hi:
To answer Chris, the search status came back zero in all cases.  The only item that looked to be populated was stamp-size but I dont think it was correct.
Following from Dan's suggestion our default compiler directives for our application were removed and the program now works as expected. I'll dig through the directives and see which one(s) may be causing the issue.  They are listed here for reference.
CONFIRM
ANS85
VSC2
ASSIGN"EXTERNAL"
NOMFCOMMENT
NOTRUNC
NOBOUND
NOBOUNDOPT
IBMCOMP
ERRLIST"TERSE"
APOST
COPYEXT"CPY,cpy"
ODOSLIDE
STICKY-LINKAGE"2"
DEFAULTBYTE"00"
ARITHMETIC"VSC2"
NOSPZERO
NESTCALL
HIDE-MESSAGE"1018"
HIDE-MESSAGE"1320"
HOST-NUMCOMPARE"1"
IDXFORMAT"8"
MF"12"
thanks for the repsonses.
                
     
                                    
            We've run the dirdemo.cbl program referenced in other knowledge base articles.  It seems to run ok except that it not returning the the file/directory name as referenced in the program by name-text.
We've run this both on hp-ux and linux with the same results.
Any suggestions?
IBMCOMP looks like the likely suspect to me as this changes the default storage of binary data items to use word storage.
Try removing IBMCOMP and see if it works.