For some reason argv[1] does not get converted properly. If the folder name is hard coded the program works fine. If its value is passed through argv[1] the program will display the value correctly, but no directory list gets retrieved. This issue happens on MVS, but if the code is compiled on Linux it works as expected. Here is the code.? The code below will only display the contents of / but not its branches.