Module ibm.jzos
Package com.ibm.jzos

Class JesSymbols

java.lang.Object
com.ibm.jzos.JesSymbols

public final class JesSymbols extends Object
Class to create, delete, or extract JES symbols using the IAZSYMBL service.

For more information, refer to the JES Symbol Service (IAZSYMBL) section in z/OS JES Application Programming Version 2 Release 1, SA32-0987.

Since:
2.4.6
  • Field Details

    • MAX_SYMBOL_NAME_LEN

      public static final int MAX_SYMBOL_NAME_LEN
      Maximum length allowed for a JES symbol name
      See Also:
    • MAX_SYMBOL_VALUE_LEN

      public static final int MAX_SYMBOL_VALUE_LEN
      Maximum length allowed for a JES symbol value
      See Also:
    • SYM_SYS_CORR_USRDATA

      public static final String SYM_SYS_CORR_USRDATA
      The JES system symbol that defines the user portion of the job correlator.
      See Also:
  • Method Details

    • define

      public static void define(String symbol, String value, JesSymbols.Level level, boolean replace)
      Define a single symbol. Symbols can be defined at either the task level or on the job step level. Symbols at the task level overrides the symbols with the same name on the job step level.
      Parameters:
      symbol - the symbol name
      value - the value of the symbol
      level - either Level.TASK or Level.JOBSTEP
      replace - replace value of the symbol at the same level
      Throws:
      JesSymbolsException - if the IAZSYMBL call was unsuccessful
      NullPointerException - if symbol, value, or level is null
      IllegalArgumentException - if the length of the symbol name or value is invalid
    • define

      public static void define(Map<String,String> symbols, JesSymbols.Level level, boolean replace)
      Define one or more symbols. Symbols can be defined at either the task level or on the job step level. Symbols at the task level overrides the symbols with the same name on the job step level.
      Parameters:
      symbols - a Map containing the symbol names and values
      level - either Level.TASK or Level.JOBSTEP
      replace - replace value of duplicate symbols at the same level
      Throws:
      JesSymbolsException - if the IAZSYMBL call was unsuccessful
      NullPointerException - if symbols or level is null
      IllegalArgumentException - if the length of a symbol name or value is invalid
    • delete

      public static void delete(String symbolNameOrFilter)
      Delete symbols that match with a name or a filter. Deletion starts at the task level and only moves to the job step level if requested symbol was not found at the task level.
      Parameters:
      symbolNameOrFilter - the symbol name or filter
      Throws:
      JesSymbolsException - if the IAZSYMBL call was unsuccessful
      NullPointerException - if symbol is null
      IllegalArgumentException - if the length of the symbol name or filter is invalid
    • delete

      public static void delete(Map<String,String> symbolNamesOrFilters)
      Delete symbols that match names or filters in a Map. Deletion starts at the task level and only moves to the job step level if requested symbol was not found at the task level.
      Parameters:
      symbolNamesOrFilters - a Map whose keys are the symbol names or filters to delete. Values are ignored
      Throws:
      JesSymbolsException - if the IAZSYMBL call was unsuccessful
      NullPointerException - if symbols is null
      IllegalArgumentException - if the length of a symbol name or filter is invalid
    • delete

      public static void delete(List<String> symbolNamesOrFilters)
      Delete symbols that match names or filters in a List. Deletion starts at the task level and only moves to the job step level if requested symbol was not found at the task level.
      Parameters:
      symbolNamesOrFilters - a list of symbol names or filters
      Throws:
      JesSymbolsException - if the IAZSYMBL call was unsuccessful
      NullPointerException - if symbolNames is null
      IllegalArgumentException - if the length of a symbol name or filter is invalid
    • extract

      public static Map<String,String> extract(String symbolNameOrFilter)
      Extract symbols that match a name or a filter. Extraction starts at the task level and only moves to the job step level if requested symbol was not found at the task level.
      Parameters:
      symbolNameOrFilter - the symbol name or filter to extract
      Returns:
      Map<String,String> a Map containing matched symbols
      Throws:
      JesSymbolsException - if the IAZSYMBL call was unsuccessful.
      NullPointerException - if symbolNameOrFilter is null
      IllegalArgumentException - if the length of the symbol name or filter is invalid
    • extract

      public static Map<String,String> extract(List<String> symbolNamesOrFilters)
      Extract symbols that match names or filters in a List. Extraction starts at the task level and only moves to the job step level if requested symbol was not found at the task level.
      Parameters:
      symbolNamesOrFilters - a list of symbol names or filters
      Returns:
      Map a Map containing matched symbols
      Throws:
      JesSymbolsException - if the IAZSYMBL call returned errors. JesSymbolsException return code 4 with reason code 4 means some or all of the symbols were not found or that one or more of the supplied filters did not add anything new to the results. Use getSymbols() in JesSymbolsException to retrieve symbols returned by IAZSYMBL.
      NullPointerException - if symbolNames is null
      IllegalArgumentException - if the length of a symbol name or filter is invalid