DB2 ⭐ Featured
👁 0

Q: How to tune DB2 queries?

Answer:
Check EXPLAIN output. Look at: access type (index vs scan), join method, sort operations. Add indexes for predicates. Rewrite with hints. Update statistics. Check for full tablespace scans. Monitor actual execution.
VSAM ⭐ Featured
👁 0

Q: Explain SHAREOPTIONS parameter

Answer:
SHAREOPTIONS(crossregion,crosssystem). Values: 1=exclusive, 2=read share/write exclusive, 3=full sharing, 4=full sharing no buffer refresh. SHAREOPTIONS(2 3) is common. Higher sharing needs application coordination.
COBOL ⭐ Featured
👁 0

Q: Explain WRITE BEFORE/AFTER ADVANCING

Answer:
ADVANCING controls line spacing for print files. WRITE rec AFTER ADVANCING 2 LINES skips 2 lines first. WRITE rec BEFORE ADVANCING PAGE starts new page after. WRITE rec AFTER PAGE goes to new page first. Controls report formatting.
VSAM ⭐ Featured
👁 0

Q: How to handle file status 22?

Answer:
Status 22 is duplicate key on WRITE or REWRITE attempt. KSDS primary key must be unique. Check program logic. May indicate data error. Use DUPLICATES option on AIX only if needed.
VSAM ⭐ Featured
👁 0

Q: Explain REUSE parameter

Answer:
REUSE allows reloading without delete/define. DEFINE CLUSTER ... REUSE. OPEN OUTPUT resets to empty. Like scratch and rewrite. Good for temporary work files. Cannot be UNIQUE.
COBOL ⭐ Featured
👁 0

Q: What is USE BEFORE REPORTING?

Answer:
In Report Writer, USE BEFORE REPORTING procedure runs before printing. USE BEFORE REPORTING report-group-name. Allows dynamic modification of report data. Can suppress or modify lines based on runtime conditions.
VSAM ⭐ Featured
👁 0

Q: What is file status 92?

Answer:
Status 92 is logic error. Conflicting operation for file state. Examples: READ before OPEN, WRITE to INPUT file, wrong ACCESS MODE for operation. Check program logic carefully.
VSAM ⭐ Featured
👁 0

Q: How to access RRDS?

Answer:
ACCESS MODE IS RANDOM. Use RELATIVE KEY for slot number. READ/WRITE by slot. STATUS 23 if slot empty. Can have empty slots. Record size fixed for RRDS.
COBOL ⭐ Featured
👁 0

Q: What is EXEC CICS structure?

Answer:
EXEC CICS marks CICS commands. EXEC CICS READ FILE('name') INTO(area) RIDFLD(key) END-EXEC. Commands: READ, WRITE, SEND, RECEIVE, LINK, XCTL. RESP and RESP2 capture return codes. Translator converts to CALL.
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.
VSAM ⭐ Featured
👁 0

Q: Explain RECOVERY vs NORECOVER?

Answer:
RECOVERY (default) enables recovery after abend. Writes RBA info to catalog. NORECOVER disables - cannot recover from abend. NORECOVER saves some overhead but risky.
VSAM ⭐ Featured
👁 0

Q: How to handle variable length KSDS?

Answer:
Define with RECORDSIZE(avg max). Read/write variable length records. COBOL RECORD VARYING clause. Key position fixed. Read returns actual length. Write length implicit from record.
VSAM ⭐ Featured
👁 0

Q: How to load VSAM from sequential?

Answer:
REPRO INFILE(seqfile) OUTFILE(vsamfile). REPLACE option to overwrite existing. Records must match VSAM format. For KSDS, records must be sorted by key. IDCAMS job.
VSAM ⭐ Featured
👁 0

Q: Explain MASSINSERT?

Answer:
MASSINSERT optimizes bulk sequential inserts. System defers CI splits. Better performance for loads. Implicit with REPRO. COBOL can hint with APPLY WRITE-ONLY style.
VSAM ⭐ Featured
👁 0

Q: How to handle status 44?

Answer:
Status 44 is boundary violation on sequential WRITE. Record too large for file definition. Check RECORDSIZE parameter. May need variable length definition. Truncation doesn't happen automatically.
VSAM ⭐ Featured
👁 0

Q: What is ERASE on DELETE?

Answer:
ERASE overwrites data with binary zeros. Physical erase before space release. Security requirement for sensitive data. Takes time. Without ERASE, data remains until overwritten.
CICS ⭐ Featured
👁 0

Q: How to use temporary storage?

Answer:
TS queue stores data across tasks. EXEC CICS WRITEQ TS QUEUE(name) FROM(data). READQ retrieves. DELETEQ removes. ITEM number for multiple items. MAIN/AUXILIARY for storage type. Named by string.
CICS ⭐ Featured
👁 0

Q: What is WRITE command?

Answer:
WRITE adds new record. EXEC CICS WRITE FILE(name) FROM(data) RIDFLD(key) LENGTH(len). DUPREC condition if key exists. KEYLENGTH for generic. MASSINSERT optimizes bulk loads.
CICS ⭐ Featured
👁 0

Q: How to WRITEQ with REWRITE?

Answer:
WRITEQ TS with REWRITE updates existing item. EXEC CICS WRITEQ TS QUEUE(name) FROM(data) REWRITE ITEM(n). Without REWRITE, adds new item. ITEM must exist for REWRITE.
CICS ⭐ Featured
👁 0

Q: How to handle DUPKEY?

Answer:
DUPKEY on WRITE means key exists. Check: IF ws-resp = DFHRESP(DUPKEY). Handle appropriately - maybe update instead. Or error to user. Common for insert logic.
JCL ⭐ Featured
👁 0

Q: How to reference PDS member?

Answer:
DSN=PDS.NAME(MEMBER). Direct member reference. DISP must allow access. For input, member must exist. For output, overwrites or creates. IEBCOPY for multiple members. Member name 1-8 characters.
DB2 ⭐ Featured
👁 0

Q: Explain DB2 locking

Answer:
DB2 locks at row, page, table, tablespace level. X (Exclusive) for writes, S (Share) for reads. IX/IS for intent. Lock escalation moves to higher level. LOCK TABLE statement forces mode. Timeout if wait too long.
VSAM ⭐ Featured
👁 0

Q: Explain SPEED/RECOVERY on REPRO?

Answer:
SPEED bypasses recovery info write. Faster but risky if failure. RECOVERY (default) safer but slower. Use SPEED for idempotent copies. RECOVERY for critical data.
CICS ⭐ Featured
👁 0

Q: How to use CICS WAIT JOURNALNAME?

Answer:
WAIT JOURNALNAME ensures journal write. EXEC CICS WAIT JOURNALNAME(jname). Synchronize journal I/O. For assured delivery. Recovery purposes.
DB2
👁 0

Q: How to write recursive CTE?

Answer:
WITH RECURSIVE cte AS (base-case UNION ALL recursive-case referencing cte) SELECT * FROM cte. For hierarchies: start with root, join to find children. DEPTH limit prevents infinite recursion.
DB2
👁 0

Q: Explain DB2 logging

Answer:
DB2 logs all changes for recovery. Active log (circular), archive log (offloaded). LOG YES/NO on DDL. COMMIT writes to log. Recovery uses logs. Log full causes issues - monitor usage.
COBOL
👁 0

Q: How does ACCEPT and DISPLAY work?

Answer:
ACCEPT reads from console/system: ACCEPT WS-DATE FROM DATE, ACCEPT WS-INPUT FROM CONSOLE. DISPLAY writes to console: DISPLAY 'Message' WS-FIELD. UPON clause specifies destination. Limited in batch; mainly for debugging or simple interaction.
COBOL
👁 0

Q: What is OPEN mode options?

Answer:
OPEN INPUT for read, OUTPUT for write (creates), I-O for read/update, EXTEND for append. Multiple files per OPEN. OPEN OUTPUT deletes existing file! EXTEND preserves and adds. File must be closed before reopening in different mode.
VSAM
👁 0

Q: How to write VSAM random?

Answer:
ACCESS MODE IS RANDOM or DYNAMIC. WRITE record writes at key position. For KSDS, key must not exist (status 22). For ESDS, writes at end. RANDOM/DYNAMIC MODE required.
VSAM
👁 0

Q: Explain UPGRADE attribute

Answer:
UPGRADE keeps AIX synchronized with base cluster. Changes to base automatically update upgraded AIX. Adds overhead to writes. Non-upgrade AIX needs manual BLDINDEX. Use UPGRADE for real-time currency.
COBOL
👁 0

Q: What is APPLY WRITE-ONLY?

Answer:
APPLY WRITE-ONLY FOR file-name optimizes output buffer handling. System doesn't preserve record area after WRITE. Can't re-read just-written record. Improves I/O performance. Use when write-only access pattern is guaranteed.
VSAM
👁 0

Q: Explain SPEED vs RECOVERY

Answer:
SPEED skips CI/CA recovery info during load. Faster but risky. RECOVERY (default) writes recovery info. If job abends, RECOVERY allows restart. SPEED needs complete reload if problem.
VSAM
👁 0

Q: What is WRITECHECK?

Answer:
WRITECHECK verifies writes by reading back. Extra I/O for verification. Rarely needed with modern hardware. Can slow performance. Default off. Use only if data corruption suspected.
VSAM
👁 0

Q: What is ERASE parameter?

Answer:
ERASE overwrites data on delete. DELETE CLUSTER ERASE. Security feature - data unrecoverable. Without ERASE, space released but data remains. Use for sensitive data.
VSAM
👁 0

Q: How to handle concurrent access?

Answer:
Use appropriate SHAREOPTIONS. Multiple readers OK with SHAREOPTIONS(2). Writers need coordination. LSR (Local Shared Resources) for same address space. Consider file status checks.
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.
JCL
👁 0

Q: How does IEBCOPY work?

Answer:
IEBCOPY copies/merges PDS members. SYSUT1=input PDS, SYSUT2=output PDS. SYSIN: COPY OUTDD=SYSUT2,INDD=SYSUT1 copies all. SELECT MEMBER=name for specific members. REPLACE option overwrites existing. Can compress PDS.
VSAM
👁 0

Q: How to monitor VSAM performance?

Answer:
SMF records for I/O counts. LISTCAT for statistics (READS, WRITES, SPLITS). RMF reports. Third-party tools. Track CI/CA splits, EXCP counts, buffer hit ratios.
CICS
👁 0

Q: What is transient data?

Answer:
TD queues for sequential I/O. EXEC CICS WRITEQ TD QUEUE(name) FROM(data). Intrapartition for CICS internal. Extrapartition for external datasets. Defined in DCT. Automatic trigger level option.
CICS
👁 0

Q: Explain REWRITE command

Answer:
REWRITE updates record. Must READ with UPDATE first. EXEC CICS REWRITE FILE(name) FROM(data) LENGTH(len). Changes record held from READ. Cannot change key. TOKEN matches UPDATE-READ.
CICS
👁 0

Q: Explain CICS web support

Answer:
CICS handles HTTP. EXEC CICS WEB READ/WRITE. URIMAP defines URLs. Programs handle requests. JSON/XML responses. Modern application interface.
VSAM
👁 0

Q: How to use BLDINDEX utility?

Answer:
BLDINDEX creates AIX entries from base. IDCAMS BLDINDEX INDATASET(base) OUTDATASET(aix). Reads base cluster, writes AIX. Required after AIX definition. EXTERNALSORT for large datasets.
CICS
👁 0

Q: What is EXEC CICS SPOOLOPEN?

Answer:
SPOOLOPEN accesses JES spool. SPOOLREAD/SPOOLWRITE for data. SPOOLCLOSE ends. Process job output. Modern batch integration. Requires authorization.