DB2 ⭐ Featured
👁 0

Q: What is UDF (User Defined Function)?

Answer:
UDF extends SQL with custom functions. CREATE FUNCTION name(params) RETURNS type AS BEGIN logic END. Scalar returns single value. Table function returns rows. Use in SELECT, WHERE like built-in functions.
COBOL
👁 0

Q: Explain SPECIAL-NAMES paragraph

Answer:
SPECIAL-NAMES maps system names to COBOL names. DECIMAL-POINT IS COMMA for European notation. CURRENCY SIGN IS '$'. SYMBOLIC CHARACTERS name = value. ALPHABET for custom collating. CLASS for character groups.
COBOL
👁 0

Q: What is CLASS condition?

Answer:
CLASS tests character content. IF field IS NUMERIC/ALPHABETIC/ALPHABETIC-LOWER/ALPHABETIC-UPPER. Custom classes in SPECIAL-NAMES: CLASS VOWELS IS 'A' 'E' 'I' 'O' 'U'. Then IF char IS VOWELS. Useful for validation.
COBOL
👁 0

Q: What is COLLATING SEQUENCE?

Answer:
PROGRAM COLLATING SEQUENCE IS sequence-name. Affects comparisons and SORT order. Define custom alphabet in SPECIAL-NAMES. Standard is NATIVE (EBCDIC). ASCII for ASCII order. STANDARD-1 for ASCII collating.
COBOL
👁 0

Q: Explain ALPHABET clause

Answer:
ALPHABET defines custom collating sequence. ALPHABET MY-SEQ IS 'A' THRU 'Z' 'a' THRU 'z'. Or ALPHABET ASCII IS STANDARD-1. Use with COLLATING SEQUENCE. Affects string comparisons and SORT. Define in SPECIAL-NAMES.
COBOL
👁 0

Q: Explain JSON GENERATE

Answer:
JSON GENERATE creates JSON from data. JSON GENERATE output FROM data-item. NAME clause for custom keys. SUPPRESS clause omits fields. COUNT IN length. COBOL V6+ feature. Generates name-value pairs from structure.
CICS
👁 0

Q: Explain CICS global user exit

Answer:
Global exits intercept system events. XPPT for program load. XFCT for file operations. Customize CICS behavior. Assembled exits. Powerful but complex.
DB2
👁 0

Q: Explain ORDER BY options

Answer:
ORDER BY sorts results. ORDER BY col1 ASC, col2 DESC. ASC default. NULLS FIRST/LAST controls NULL position. Ordinal: ORDER BY 1, 2 uses column positions. ORDER BY CASE for custom order. Affects performance.