DB2 ⭐ Featured
👁 0

Q: How to handle large objects (LOB)?

Answer:
BLOB/CLOB/DBCLOB for large data. Stored in auxiliary tablespace. Use LOB locators for efficiency. FETCH with INTO :lobvar. INSERT with CLOB(text). LOG NO for LOB tablespace optional.
VSAM ⭐ Featured
👁 0

Q: How to update KSDS record?

Answer:
READ record (optionally FOR UPDATE). Modify record area. REWRITE record. Key cannot change on REWRITE. Status 00 if successful. ACCESS MODE must allow updates.
COBOL ⭐ Featured
👁 0

Q: What is XML GENERATE?

Answer:
XML GENERATE creates XML from data. XML GENERATE output FROM data-item. Optional: COUNT IN length, WITH ENCODING, WITH XML-DECLARATION. Generates element for each field. Names from data names. COBOL 5+ feature.
CICS ⭐ Featured
👁 0

Q: What is EXEC CICS READ?

Answer:
READ retrieves VSAM record. EXEC CICS READ FILE(name) INTO(area) RIDFLD(key) LENGTH(len). Optionally: UPDATE for update intent, KEYLENGTH for partial key. Generic key with GENERIC/KEYLENGTH. Returns NOTFND if missing.
COBOL
👁 0

Q: What is reference modification?

Answer:
Reference modification extracts substring: WS-FIELD(start:length). WS-NAME(1:3) gets first 3 characters. Can use in MOVE, IF, DISPLAY. Start position is 1-based. Length optional (to end). More flexible than REDEFINES for variable positions.
VSAM
👁 0

Q: How to read VSAM sequentially?

Answer:
OPEN INPUT file. START if positioning needed. READ NEXT repeatedly until status 10 (end of file). CLOSE file. START optional - defaults to beginning. READ NEXT gets records in key sequence for KSDS.
COBOL
👁 0

Q: What is OPTIONAL file clause?

Answer:
OPTIONAL allows missing files: SELECT OPTIONAL input-file. OPEN succeeds even if file absent. READ immediately gets end-of-file. Useful for conditional processing. FILE STATUS 35 if accessed without OPTIONAL.
JCL
👁 0

Q: Explain DD DUMMY statement

Answer:
DD DUMMY discards output/provides EOF for input. No I/O actually performed. DUMMY, DSN=NULLFILE equivalent. Use to skip optional outputs or provide empty input. Program sees immediate EOF on read. Writes succeed but discarded.
DB2
👁 0

Q: What is SUBSTR function?

Answer:
SUBSTR extracts substring. SUBSTR(string, start, length). SUBSTR(name, 1, 3) gets first 3 chars. Position starts at 1. Length optional (to end). Can use in WHERE for pattern matching.