E9.2 Linux Enterprise Server and Readdir API - see "read folder contents / filename from a folder"

ccornagg

Well Known Member
Dear JDElist,

did someone have experience with the 3 APIs jdeOpendir / readdir / jdeClosedir on Linux Enterprise Server ?

In standard JDE code you can find similar logic in two BSFN:

* B7400015 – Standard BSFN used to read European eInvoice XML response
* B76B525 – Standard BSFN doing something similar with Brazilian “Nota Fiscal” response

I'm currently running my own C BSFN which is similar to standard one, and which is succesfully running on iSeries and Linux Servers.

Issue is: readdir is going to fail when my Linux folder is a mounted share, thus it's not a directory stored into the same Linux enterprise server.

Please consider this is not affecting any other piece of code, for example: standard P007101 interactive program is able to read and to write *specific* files into a mounted share, but apparently there's no chance to read folder filename list.

Do you have any clue on whether there's a solution different from using a local Linux folder ?

Thanks,

Carlo

E1 9.2.5.x
 

johnd

Well Known Member
Hi Carlo

Did you fix this? I am looking into a similar BSFN that works in 9.0 but not on our new 9.2 using 9.2.5

Here's the code, that works when called the 1st time (no pointer) but falls over when called a second time with the pointer from the first call
 

Attachments

  • B5500040.pdf
    946.8 KB · Views: 2

ccornagg

Well Known Member
Hi John,

the only issue I had with readdir API was related to Linux "mapped folders", thus directories sitting into another machine.
It seems to me your issue is different: in my opinion you cannot call readdir several time with a pointer in order to mime something similar to standard B9600471 (client only) containing FindFirstFileMatchingWildcard and FindNextFileMatchingWildcard.

In my piece of code I'm using JDEcache to store filenames, but you can also use an array as you can see from standard code "B7400015 - Wrapper For XML Response Parser - 74 - EU" (mentioned in my previous message).

Kind regards,

Carlo
 
Top