CALL "C$LIST_ENVIRONMENT" USING opCode                                   parameters                           GIVING returnCode  | 
opCode  | It is the function to be executed. Valid values, defined in iscobol.def, are:  | |
Open a list of configuration properties.  | ||
Retrieve the next property in the list.  | ||
Close a previously open list of properties.  | ||
parameters  | Parameters depend on the opcode.  | |
       PROGRAM-ID. listenv.        WORKING-STORAGE SECTION.        copy "iscobol.def".        77 variableName  pic x any length.        77 variableValue pic x any length.        77 listenvHandle usage handle.        PROCEDURE DIVISION.        mainLogic.            CALL "C$LIST-ENVIRONMENT" using LISTENV-OPEN                                    giving listenvHandle            if listenvHandle not = 0               perform until exit                  CALL "C$LIST-ENVIRONMENT" using LISTENV-NEXT                                                listenvHandle                                                variableName                  if variableName = spaces                     exit perform                  else                                                      CALL "C$GETENV" using variableName, variableValue                     display variableName "=" variableValue upon sysout                  end-if               end-perform               CALL "C$LIST-ENVIRONMENT" using LISTENV-CLOSE,                                                listenvHandle            end-if            goback            .  |