Two options to get the working directory


There are two library routines that allow to retrieve this information.

1. C$CHDIR called using a blank data-item

     initialize curr-dir.|curr-dir pic x(256).
     call  "C$CHDIR"  using  curr-dir.
     display "Current directory: " curr-dir. 

2. C$GETENV to get the user.dir Java property

     call "C$GETENV" using "user.dir" curr-dir.
     display "Current directory: " curr-dir. 



Article ID: 257
Created: February 1, 2016
Last Updated: December 21, 2022
Author: Support KB Author

Online URL: https://support.veryant.com/phpkb/article.php?id=257