👁 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.
👁 0
Q: How to handle CLOB in COBOL?
Answer:
Declare: 01 CLOB-VAR SQL TYPE IS CLOB(1M). Or use LOB locator: 01 CLOB-LOC SQL TYPE IS CLOB_LOCATOR. FREE LOCATOR releases. DBMS_LOB procedures for manipulation. Large CLOBs need special handling.
👁 0
Q: What is GLOBAL clause?
Answer:
GLOBAL makes data available to nested programs. 01 WS-COUNTER PIC 9(5) GLOBAL. Nested programs can reference without passing as parameters. Use sparingly; explicit passing preferred. File definitions can also be GLOBAL.
👁 0
Q: Explain EXTERNAL clause
Answer:
EXTERNAL allows data sharing between separately compiled programs. 01 WS-SHARED PIC X(100) EXTERNAL. All programs with same EXTERNAL name share same storage. Use for global data without passing parameters. Be careful with initialization.
👁 0
Q: What is CHECK utility?
Answer:
CHECK validates data integrity. CHECK DATA TABLESPACE db.ts. Finds constraint violations, orphan rows. CHECK INDEX validates index structure. CHECK LOB for LOB issues. Run periodically or after issues.
👁 0
Q: What are nested programs?
Answer:
Nested programs are contained within another COBOL program. Defined between IDENTIFICATION DIVISION and END PROGRAM. Can access outer program's data with GLOBAL clause. COMMON attribute allows access from sibling programs. Promotes modular design.
👁 0
Q: What is REPLACE statement?
Answer:
REPLACE substitutes text during compilation. REPLACE ==OLD-TEXT== BY ==NEW-TEXT==. Active until REPLACE OFF or next REPLACE. Useful with copybooks for site-specific modifications. Different from COPY REPLACING-more global.
👁 0
Q: What is TALLY special register?
Answer:
TALLY is predefined counter for EXAMINE (obsolete verb). Some code still references it. INSPECT replaced EXAMINE. Not recommended for new code. TALLY is global, can conflict. Define your own counters instead.
👁 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.