- java.lang.Object
-
- com.ibm.jzos.JesSymbols
-
public final class JesSymbols extends java.lang.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JesSymbols.Level
Symbol levels with values that match the definition in IAZSYMDF.
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_SYMBOL_NAME_LEN
Maximum length allowed for a JES symbol namestatic int
MAX_SYMBOL_VALUE_LEN
Maximum length allowed for a JES symbol valuestatic java.lang.String
SYM_SYS_CORR_USRDATA
The JES system symbol that defines the user portion of the job correlator.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
define(java.lang.String symbol, java.lang.String value, JesSymbols.Level level, boolean replace)
Define a single symbol.static void
define(java.util.Map<java.lang.String,java.lang.String> symbols, JesSymbols.Level level, boolean replace)
Define one or more symbols.static void
delete(java.lang.String symbolNameOrFilter)
Delete symbols that match with a name or a filter.static void
delete(java.util.List<java.lang.String> symbolNamesOrFilters)
Delete symbols that match names or filters in a List.static void
delete(java.util.Map<java.lang.String,java.lang.String> symbolNamesOrFilters)
Delete symbols that match names or filters in a Map.static java.util.Map<java.lang.String,java.lang.String>
extract(java.lang.String symbolNameOrFilter)
Extract symbols that match a name or a filter.static java.util.Map<java.lang.String,java.lang.String>
extract(java.util.List<java.lang.String> symbolNamesOrFilters)
Extract symbols that match names or filters in a List.
-
-
-
Field Detail
-
MAX_SYMBOL_NAME_LEN
public static final int MAX_SYMBOL_NAME_LEN
Maximum length allowed for a JES symbol name- See Also:
- Constant Field Values
-
MAX_SYMBOL_VALUE_LEN
public static final int MAX_SYMBOL_VALUE_LEN
Maximum length allowed for a JES symbol value- See Also:
- Constant Field Values
-
SYM_SYS_CORR_USRDATA
public static final java.lang.String SYM_SYS_CORR_USRDATA
The JES system symbol that defines the user portion of the job correlator.- See Also:
- Constant Field Values
-
-
Method Detail
-
define
public static void define(java.lang.String symbol, java.lang.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 namevalue
- the value of the symbollevel
- either Level.TASK or Level.JOBSTEPreplace
- replace value of the symbol at the same level- Throws:
JesSymbolsException
- if the IAZSYMBL call was unsuccessfuljava.lang.NullPointerException
- if symbol, value, or level is nulljava.lang.IllegalArgumentException
- if the length of the symbol name or value is invalid
-
define
public static void define(java.util.Map<java.lang.String,java.lang.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 valueslevel
- either Level.TASK or Level.JOBSTEPreplace
- replace value of duplicate symbols at the same level- Throws:
JesSymbolsException
- if the IAZSYMBL call was unsuccessfuljava.lang.NullPointerException
- if symbols or level is nulljava.lang.IllegalArgumentException
- if the length of a symbol name or value is invalid
-
delete
public static void delete(java.lang.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 unsuccessfuljava.lang.NullPointerException
- if symbol is nulljava.lang.IllegalArgumentException
- if the length of the symbol name or filter is invalid
-
delete
public static void delete(java.util.Map<java.lang.String,java.lang.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 unsuccessfuljava.lang.NullPointerException
- if symbols is nulljava.lang.IllegalArgumentException
- if the length of a symbol name or filter is invalid
-
delete
public static void delete(java.util.List<java.lang.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 unsuccessfuljava.lang.NullPointerException
- if symbolNames is nulljava.lang.IllegalArgumentException
- if the length of a symbol name or filter is invalid
-
extract
public static java.util.Map<java.lang.String,java.lang.String> extract(java.lang.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
a Map containing matched symbols - Throws:
JesSymbolsException
- if the IAZSYMBL call was unsuccessful.java.lang.NullPointerException
- if symbolNameOrFilter is nulljava.lang.IllegalArgumentException
- if the length of the symbol name or filter is invalid
-
extract
public static java.util.Map<java.lang.String,java.lang.String> extract(java.util.List<java.lang.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.java.lang.NullPointerException
- if symbolNames is nulljava.lang.IllegalArgumentException
- if the length of a symbol name or filter is invalid
-
-