Using environment variables with ILE-RPG

Need to recover the value of certain variables of environment on ILE-RPG programs? This example shows how to do it.

I develop applications in a mixed environment with solutions in Java and ILE-RPG. In this environment, I need to recover the value of certain variables of environment on ILE-RPG programs. This example shows how to do it.
     d getenv          pr              *   extproc('Qp0zGetEnvNoCCSID') 
     d   name                          *   value options(*string)      
                                                                       
                                                                       
     d p               s               *                               
     d path            S            256A                               
                                                                       
     c                   eval      p = getenv ('PATH')                 
     c                   if        p <> *NULL                          
     c                   eval      path = %str(p)                      
     c                   endif    
This was last published in July 2002

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close