COBOL ⭐ Featured
👁 0

Q: What is the difference between COMP and COMP-3 in COBOL?

Answer:

COMP (COMPUTATIONAL) - Pure binary format

  • Stored in binary (base-2)
  • Used for subscripts and counts
  • Efficient for arithmetic operations
  • PIC S9(4) COMP = 2 bytes
  • PIC S9(9) COMP = 4 bytes

COMP-3 (PACKED DECIMAL)

  • Each digit takes 4 bits (nibble)
  • Last nibble holds sign
  • Used for business calculations
  • PIC S9(5) COMP-3 = 3 bytes
  • Formula: (n+1)/2 rounded up

When to use:

  • COMP - Array subscripts, counters, loops
  • COMP-3 - Money, quantities, business data
COBOL S0C7 ⭐ Featured
👁 0

Q: How do I fix S0C7 Data Exception ABEND?

Answer:

S0C7 occurs when the program tries to perform arithmetic on non-numeric data.

Common Causes:

  1. Uninitialized numeric fields (contains spaces/garbage)
  2. Moving alphanumeric data to numeric field
  3. Reading file with wrong record layout
  4. Array subscript accessing wrong memory

How to Fix:

  1. Initialize all numeric fields to ZEROS
  2. Validate input before arithmetic
  3. Check file layouts match
  4. Use DISPLAY to debug field contents
* Always initialize
INITIALIZE WS-RECORD.
MOVE ZEROS TO WS-AMOUNT.

* Validate before use
IF WS-INPUT IS NUMERIC
    COMPUTE WS-RESULT = WS-INPUT * 2
END-IF.
DB2 ⭐ Featured
👁 0

Q: What is ROW_NUMBER()?

Answer:
ROW_NUMBER() assigns sequential numbers. ROW_NUMBER() OVER (ORDER BY col). Numbers restart per PARTITION BY group. Use for paging, deduplication (keep first), ranking. Result is numeric.
JCL ⭐ Featured
👁 0

Q: What is the difference between COND and IF/THEN/ELSE in JCL?

Answer:

COND Parameter:

  • Tests return codes from previous steps
  • Bypasses step if condition is TRUE
  • Works opposite to programming logic!
  • COND=(4,LT) means: Skip if 4 < any previous RC

IF/THEN/ELSE:

  • More intuitive programming-like syntax
  • Executes steps when condition is TRUE
  • Supports AND, OR operators
  • Can check ABEND conditions

Example:

// Using COND (skip if RC < 4)
//STEP2 EXEC PGM=PROG2,COND=(4,LT)

// Using IF/THEN/ELSE
//    IF STEP1.RC = 0 THEN
//STEP2 EXEC PGM=PROG2
//    ELSE
//ERROR EXEC PGM=ERRPROC
//    ENDIF
DB2 ⭐ Featured
👁 0

Q: When should I use COMMIT in DB2?

Answer:

COMMIT saves all changes since the last COMMIT and releases locks.

When to COMMIT:

  • After processing a logical unit of work
  • Periodically in long-running batch (every N records)
  • Before ending the program successfully

Frequency Guidelines:

  • Too frequent: Performance overhead
  • Too rare: Lock contention, large log
  • Typical: Every 100-1000 records in batch

Best Practice:

MOVE 0 TO WS-COMMIT-COUNT.

PERFORM PROCESS-RECORD.

ADD 1 TO WS-COMMIT-COUNT.
IF WS-COMMIT-COUNT >= 500
    EXEC SQL COMMIT END-EXEC
    MOVE 0 TO WS-COMMIT-COUNT
END-IF.

Note: In CICS, syncpoint (COMMIT) happens automatically at task end. Explicit SYNCPOINT is rarely needed.

DB2 ⭐ Featured
👁 0

Q: What is CTE (Common Table Expression)?

Answer:
CTE defines temporary result set. WITH cte_name AS (SELECT...) SELECT * FROM cte_name. Improves readability. Can be recursive for hierarchies. Multiple CTEs comma-separated. Referenced in main query. Scope is single statement.
VSAM ⭐ Featured
👁 0

Q: What is the difference between KSDS and ESDS?

Answer:

KSDS (Key Sequenced Data Set):

  • Records accessed by unique key
  • Records stored in key sequence
  • Has both data and index components
  • Supports random and sequential access
  • Can delete and reinsert records
  • Most commonly used VSAM type

ESDS (Entry Sequenced Data Set):

  • Records stored in arrival order
  • Accessed by RBA (Relative Byte Address)
  • No index component
  • Cannot delete records (only mark inactive)
  • Similar to sequential files
  • Good for logs, audit trails

Use KSDS when: You need key-based access, updates, deletes

Use ESDS when: Sequential processing only, append-only data

CICS ⭐ Featured
👁 0

Q: What is pseudo-conversational programming in CICS?

Answer:

Pseudo-conversational programming is a technique where the program ends between user interactions, freeing system resources.

How it works:

  1. Program sends screen to user and ends (RETURN TRANSID)
  2. User enters data and presses Enter
  3. CICS starts a new task with same program
  4. Program retrieves saved data from COMMAREA
  5. Process continues

Benefits:

  • Efficient resource usage
  • Better response times
  • More concurrent users

Implementation:

* End task, wait for user
EXEC CICS RETURN
    TRANSID('MENU')
    COMMAREA(WS-COMM)
    LENGTH(100)
END-EXEC.

* On return, check EIBCALEN
IF EIBCALEN = 0
    PERFORM FIRST-TIME
ELSE
    MOVE DFHCOMMAREA TO WS-COMM
    PERFORM PROCESS-INPUT
END-IF.
COBOL ⭐ Featured
👁 0

Q: What are the four divisions of a COBOL program?

Answer:
  1. IDENTIFICATION DIVISION - Program identification (PROGRAM-ID)
  2. ENVIRONMENT DIVISION - Hardware/software environment, file assignments
  3. DATA DIVISION - Data definitions (FILE, WORKING-STORAGE, LINKAGE SECTION)
  4. PROCEDURE DIVISION - Executable code and business logic

Only IDENTIFICATION and PROCEDURE DIVISION are mandatory.

COBOL ⭐ Featured
👁 0

Q: What is the difference between SECTION and PARAGRAPH in COBOL?

Answer:

SECTION:

  • Contains one or more paragraphs
  • Ends with next SECTION or end of program
  • Used for logical grouping
  • Can be performed as a unit

PARAGRAPH:

  • Basic unit of code
  • Named block of statements
  • Ends at next paragraph name or SECTION

PERFORM SECTION-NAME executes all paragraphs in the section.

PERFORM PARA-NAME executes only that paragraph.

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 ⭐ Featured
👁 0

Q: Explain REDEFINES clause with an example.

Answer:

REDEFINES allows the same storage area to be referenced by different data names with different definitions.

Rules:

  • Must be at same level as item being redefined
  • Cannot redefine item with OCCURS
  • Redefined item must appear first
  • Lengths should match or redefining should be shorter
01 WS-DATE.
   05 WS-DATE-NUM    PIC 9(8).
01 WS-DATE-X REDEFINES WS-DATE.
   05 WS-YEAR        PIC 9(4).
   05 WS-MONTH       PIC 9(2).
   05 WS-DAY         PIC 9(2).

Same 8 bytes can be accessed as single number or individual components.

DB2 ⭐ Featured
👁 0

Q: How to handle SQLCODE -805?

Answer:
-805 is DBRM or package not found. Plan bound but package missing or invalidated. REBIND PACKAGE. Check collection, package name. Verify BIND completed successfully. May need BIND PLAN to add package.
COBOL ⭐ Featured
👁 0

Q: What is a copybook and why is it used?

Answer:

A copybook is a reusable code file that can be included in multiple programs using the COPY statement.

Uses:

  • Standard record layouts
  • Common working storage definitions
  • Reusable paragraphs
  • Ensures consistency across programs

Syntax:

COPY EMPREC.
COPY EMPREC REPLACING ==EMP== BY ==WS-EMP==.

Benefits:

  • Reduces code duplication
  • Easier maintenance
  • Standard definitions across team
JCL ⭐ Featured
👁 0

Q: What is the difference between PARM and SYSIN for passing parameters?

Answer:

PARM (EXEC statement):

  • Limited to 100 characters
  • Passed in memory to program
  • Accessed via LINKAGE SECTION
  • Good for small, simple parameters

SYSIN (DD statement):

  • No practical size limit
  • Read as a file by program
  • Can contain multiple records
  • Good for control cards, complex input
// PARM example
//STEP1 EXEC PGM=MYPROG,PARM='PARAM1,PARAM2'

// SYSIN example
//SYSIN DD *
CONTROL OPTION1
DATE=20231215
LIMIT=1000
/*
DB2 ⭐ Featured
👁 0

Q: What is SQLCODE and what are common values?

Answer:

SQLCODE is a return code in SQLCA indicating the result of SQL execution.

Common SQLCODE values:

0Successful execution
100No data found / End of cursor
-803Duplicate key on insert
-811Multiple rows returned for singleton SELECT
-904Unavailable resource
-911Deadlock/timeout
-922Authorization failure
-927DB2 not available

Negative = Error, 0 = Success, 100 = No data

DB2 ⭐ Featured
👁 0

Q: What is RECOVER utility?

Answer:
RECOVER restores data from backup/logs. RECOVER TABLESPACE db.ts. Options: TOCOPY, TORBA, TOLOGPOINT. Image copy is backup. RECOVER applies logs to copy. Essential for disaster recovery.
DB2 ⭐ Featured
👁 0

Q: Explain the difference between INNER JOIN and LEFT OUTER JOIN.

Answer:

INNER JOIN:

  • Returns only matching rows from both tables
  • If no match, row is excluded

LEFT OUTER JOIN:

  • Returns all rows from left table
  • Matching rows from right table
  • NULL for right table if no match
-- INNER JOIN
SELECT E.NAME, D.DEPT_NAME
FROM EMPLOYEE E
INNER JOIN DEPARTMENT D
ON E.DEPT_ID = D.DEPT_ID;

-- LEFT OUTER JOIN
SELECT E.NAME, D.DEPT_NAME
FROM EMPLOYEE E
LEFT OUTER JOIN DEPARTMENT D
ON E.DEPT_ID = D.DEPT_ID;

Use LEFT JOIN when you want all employees even those without department.

DB2 ⭐ Featured
👁 0

Q: How to create image copy?

Answer:
COPY utility creates backup. COPY TABLESPACE db.ts. FULL or INCREMENTAL. SHRLEVEL REFERENCE or CHANGE. Store in GDG for versions. Regular copies essential for recovery. COPYTOCOPY duplicates copies.
CICS ⭐ Featured
👁 0

Q: What is the purpose of COMMAREA in CICS?

Answer:

COMMAREA (Communication Area) is used to pass data between programs or between transactions in pseudo-conversational programming.

Uses:

  • Pass data between LINK/XCTL programs
  • Save data between pseudo-conversational transactions
  • Maximum size: 32KB

How it works:

  1. Calling program: COMMAREA option on LINK/XCTL/RETURN
  2. Called program: DFHCOMMAREA in LINKAGE SECTION
  3. Check EIBCALEN for length (0 = no COMMAREA)
* Calling program
EXEC CICS LINK
    PROGRAM('SUBPROG')
    COMMAREA(WS-DATA)
    LENGTH(100)
END-EXEC.

* Called program
LINKAGE SECTION.
01 DFHCOMMAREA PIC X(100).

IF EIBCALEN > 0
    MOVE DFHCOMMAREA TO WS-DATA
END-IF.
COBOL ⭐ Featured
👁 0

Q: What is the difference between COMP and COMP-3?

Answer:
COMP (Binary) stores data in binary format, taking 2, 4, or 8 bytes. COMP-3 (Packed Decimal) stores two digits per byte with the sign in the last nibble, more efficient for decimal arithmetic. COMP is faster for calculations while COMP-3 saves space for large decimal numbers.
COBOL ⭐ Featured
👁 0

Q: How does SEARCH ALL differ from SEARCH?

Answer:
SEARCH performs a sequential/linear search from the current index position. SEARCH ALL performs a binary search requiring the table to be sorted (ASCENDING/DESCENDING KEY clause) and indexed. SEARCH ALL is faster for large tables but requires sorted data.
DB2 ⭐ Featured
👁 0

Q: What is UNLOAD utility?

Answer:
UNLOAD extracts data to sequential file. UNLOAD FROM TABLE name. Output format matches LOAD input. Used for data migration, backup, extract. Can include WHERE clause for filtering.
COBOL ⭐ Featured
👁 0

Q: What causes S0C7 abend and how to fix it?

Answer:
S0C7 (Data Exception) occurs when non-numeric data is used in numeric operations. Common causes: uninitialized fields, incorrect data from files, wrong REDEFINES. Fix by: initializing variables, validating input data, using INSPECT/NUMVAL functions, checking file data quality.
DB2 ⭐ Featured
👁 0

Q: How to handle restrictive states?

Answer:
COPY PENDING needs image copy. CHECK PENDING needs CHECK DATA. REBUILD PENDING needs REBUILD INDEX. REORG PENDING needs REORG. RECOVER PENDING needs RECOVER. Use -DISPLAY DATABASE to see status.
DB2 ⭐ Featured
👁 0

Q: Explain predicate types

Answer:
Stage 1 predicates evaluated by storage engine. Stage 2 evaluated by DB2 (more expensive). Indexable predicates can use index. Non-indexable force scan. Design for stage 1/indexable predicates. EXPLAIN shows predicate staging.
COBOL ⭐ Featured
👁 0

Q: How to handle variable length records?

Answer:
Use RECORD CONTAINS min TO max CHARACTERS clause in FD. Define RECORD-LENGTH field in the record. For VSAM, use RECORD VARYING IN SIZE. Access actual length via LENGTH OF or special register. Handle both fixed and variable portions appropriately.
DB2 ⭐ Featured
👁 0

Q: What is index-only access?

Answer:
Index-only access retrieves data from index without table access. All needed columns in index (including by include clause). Best performance. EXPLAIN shows INDEXONLY=Y. Design indexes for common queries.
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.
COBOL ⭐ Featured
👁 0

Q: Explain STRING and UNSTRING operations

Answer:
STRING concatenates multiple fields into one: STRING field-1 DELIMITED BY SPACE field-2 INTO output-field. UNSTRING splits one field into multiple: UNSTRING input-field DELIMITED BY ',' INTO field-1 field-2. Both support POINTER for position tracking and OVERFLOW handling.
COBOL ⭐ Featured
👁 0

Q: How does INSPECT work?

Answer:
INSPECT examines/modifies string contents. INSPECT field TALLYING counter FOR ALL 'X'. INSPECT field REPLACING ALL 'A' BY 'B'. INSPECT field CONVERTING 'abc' TO '123'. Useful for data validation, transformation, and counting characters.
DB2 ⭐ Featured
👁 0

Q: What is identity column?

Answer:
Identity column auto-generates values. col INTEGER GENERATED ALWAYS AS IDENTITY. Or GENERATED BY DEFAULT (allows override). Start, increment configurable. Alternative to sequence for single-table keys.
COBOL ⭐ Featured
👁 0

Q: What is 88-level condition name?

Answer:
88-level defines condition names for field values. 01 WS-STATUS PIC X. 88 VALID-STATUS VALUE 'Y'. 88 INVALID-STATUS VALUE 'N'. Use in IF: IF VALID-STATUS. Set using SET VALID-STATUS TO TRUE. Makes code self-documenting.
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.
COBOL ⭐ Featured
👁 0

Q: Explain REDEFINES clause usage

Answer:
REDEFINES allows multiple data descriptions for same memory. 01 WS-DATE PIC 9(8). 01 WS-DATE-R REDEFINES WS-DATE. 05 WS-YEAR PIC 9(4). 05 WS-MONTH PIC 99. 05 WS-DAY PIC 99. Cannot redefine with larger size. Useful for different views of data.
DB2 ⭐ Featured
👁 0

Q: What is temporal table?

Answer:
Temporal tables track historical data. SYSTEM_TIME versioning automatic. APPLICATION_TIME for business time. Query AS OF for point-in-time. History table stores old versions. Built-in time travel.
COBOL ⭐ Featured
👁 0

Q: Explain SECTION vs PARAGRAPH

Answer:
SECTION groups related paragraphs, terminated by next SECTION or end of program. PARAGRAPH is a named block of code, terminated by next paragraph/section. PERFORM SECTION executes all paragraphs within. SECTION needed for segmentation, PARAGRAPH for simple procedures.
COBOL ⭐ Featured
👁 0

Q: What is RENAMES clause?

Answer:
RENAMES (66-level) creates alternative groupings of elementary items. 01 REC. 05 FIELD-A PIC X(5). 05 FIELD-B PIC X(5). 05 FIELD-C PIC X(5). 66 FIELDS-AB RENAMES FIELD-A THRU FIELD-B. Provides different data views without memory overhead.
DB2 ⭐ Featured
👁 0

Q: What is dynamic SQL?

Answer:
Dynamic SQL constructed at runtime. PREPARE creates executable. EXECUTE runs it. EXECUTE IMMEDIATE for one-time. DECLARE CURSOR for queries. More flexible but less efficient than static. Security concerns (injection).
COBOL ⭐ Featured
👁 0

Q: What is USAGE clause?

Answer:
USAGE specifies internal data representation. DISPLAY (default)=character, COMP/BINARY=binary, COMP-3/PACKED-DECIMAL=packed, COMP-1=single float, COMP-2=double float. Affects storage size and arithmetic performance.
DB2 ⭐ Featured
👁 0

Q: Explain VIEW creation

Answer:
VIEW is saved query. CREATE VIEW name AS SELECT... WITH CHECK OPTION enforces WHERE on updates. Can be updatable if simple. Views for security, simplification. Materialized views (MQT) store data.
DB2 ⭐ Featured
👁 0

Q: What is MQT?

Answer:
MQT (Materialized Query Table) stores computed results. CREATE TABLE name AS (SELECT...) DATA INITIALLY DEFERRED REFRESH DEFERRED. Improves query performance. REFRESH TABLE updates. Use for aggregations, joins.
DB2 ⭐ Featured
👁 0

Q: How to handle -551 SQLCODE?

Answer:
-551 is authorization failure. No privilege for operation. Check GRANT statements. May need SELECT, UPDATE, DELETE, INSERT authority. GRANT privilege ON object TO user/role. Check SYSIBM.SYSTABAUTH.
DB2 ⭐ Featured
👁 0

Q: What is GRANT and REVOKE?

Answer:
GRANT gives privileges: GRANT SELECT ON table TO user. REVOKE removes: REVOKE SELECT ON table FROM user. Privileges: SELECT, INSERT, UPDATE, DELETE, EXECUTE. WITH GRANT OPTION allows re-granting. Essential for security.
DB2 ⭐ Featured
👁 0

Q: Explain database design normalization

Answer:
1NF: atomic values, no repeating groups. 2NF: 1NF + no partial dependencies. 3NF: 2NF + no transitive dependencies. BCNF: stricter 3NF. Higher forms reduce redundancy. Denormalize for performance. Balance is key.
COBOL ⭐ Featured
👁 0

Q: How to use CONTINUE statement?

Answer:
CONTINUE is a no-operation placeholder. Useful in EVALUATE when certain conditions need no action: WHEN 'X' CONTINUE. In IF: IF condition CONTINUE ELSE action. Maintains structure without dummy statements. Not a GOTO target.
DB2 ⭐ Featured
👁 0

Q: What is referential integrity?

Answer:
RI ensures foreign key values exist in parent. CREATE TABLE child ... REFERENCES parent(key). ON DELETE CASCADE/SET NULL/RESTRICT. DB2 enforces automatically. Constraint violations return -530/-531. Design carefully.
DB2 ⭐ Featured
👁 0

Q: How to alter table structure?

Answer:
ALTER TABLE name ADD COLUMN col type. ALTER TABLE name DROP COLUMN col. ALTER TABLE name ALTER COLUMN col SET DATA TYPE. Some changes need REORG. Adding columns easy; changes may need unload/reload.
COBOL ⭐ Featured
👁 0

Q: Explain START statement for VSAM

Answer:
START positions for sequential READ. START filename KEY IS EQUAL/GREATER/NOT LESS THAN key-field. After successful START, READ NEXT retrieves records sequentially from that position. INVALID KEY handles not-found condition.
DB2 ⭐ Featured
👁 0

Q: What is tablespace?

Answer:
Tablespace is storage container for tables. CREATE TABLESPACE name IN database USING STOGROUP. Contains one or more tables. Segmented/universal tablespace types. Management at tablespace level (REORG, COPY, RECOVER).
COBOL ⭐ Featured
👁 0

Q: How to handle packed decimal data?

Answer:
Packed decimal (COMP-3) stores 2 digits per byte, sign in low nibble. PIC S9(5) COMP-3 uses 3 bytes. For I/O, often must convert to display. Use MOVE to display field or NUMVAL function. Handle sign separately if needed.
DB2 ⭐ Featured
👁 0

Q: What is encoding scheme?

Answer:
Encoding defines character representation. EBCDIC for mainframe. ASCII for open systems. Unicode for international. CCSID specifies exact encoding. Mixed encoding needs careful handling. TRANSLATE for conversion.
DB2 ⭐ Featured
👁 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.
COBOL ⭐ Featured
👁 0

Q: Explain PROCEDURE DIVISION USING

Answer:
PROCEDURE DIVISION USING defines parameters for called program. Parameters match LINKAGE SECTION definitions. Order matches calling program's USING clause. Establishes addressability to passed data. BY REFERENCE/VALUE/CONTENT options inherited from CALL.
DB2 ⭐ Featured
👁 0

Q: What is XML support in DB2?

Answer:
DB2 stores XML natively. XMLTYPE column. XMLPARSE, XMLSERIALIZE for conversion. XQuery for querying. XMLTABLE extracts relational from XML. XML indexes for performance. Powerful for document storage.
COBOL ⭐ Featured
👁 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.
COBOL ⭐ Featured
👁 0

Q: What is MOVE CORRESPONDING?

Answer:
MOVE CORRESPONDING moves all fields with matching names between groups. MOVE CORR INPUT-REC TO OUTPUT-REC. Only moves if names match exactly. Moves all matches, not just first. Useful for record transformations. Debug carefully-silent partial moves.
DB2 ⭐ Featured
👁 0

Q: How to use EXPLAIN tables?

Answer:
PLAN_TABLE primary output. DSN_STATEMNT_TABLE for cost. DSN_FUNCTION_TABLE for functions. INSERT EXPLAIN before statement. Query tables after. PLANNO, ACCESSTYPE, MATCHCOLS important columns.
COBOL ⭐ Featured
👁 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.
COBOL ⭐ Featured
👁 0

Q: What is SAME RECORD AREA?

Answer:
SAME RECORD AREA clause specifies files share buffer: SAME RECORD AREA FOR FILE-1 FILE-2. Records of different files occupy same memory. Reading one file overlays other's record. Saves memory but requires careful coding.
DB2 ⭐ Featured
👁 0

Q: What is Distributed Data Facility (DDF)?

Answer:
DDF enables remote DB2 access. TCP/IP and SNA connectivity. DRDA protocol. Location name identifies target. Three-part names: location.schema.table. Network security considerations.
DB2 ⭐ Featured
👁 0

Q: How to handle SQLCODE 100?

Answer:
SQLCODE 100 means not found or end of data. For SELECT INTO: no matching row. For FETCH: no more rows. For UPDATE/DELETE: no rows affected. Check context - may be normal condition, not error.
COBOL ⭐ Featured
👁 0

Q: Explain JUSTIFIED RIGHT clause

Answer:
JUSTIFIED RIGHT aligns alphanumeric receiving field contents to right. 05 WS-NAME PIC X(10) JUSTIFIED RIGHT. MOVE 'ABC' TO WS-NAME gives ' ABC'. Default is left justified. Only for alphanumeric elementary items.
DB2 ⭐ Featured
👁 0

Q: What is OPTIMIZE FOR n ROWS?

Answer:
OPTIMIZE FOR n ROWS hints expected rows. SELECT * FROM t ORDER BY c OPTIMIZE FOR 1 ROW. Influences access path. Low n favors index. High n may favor scan. Use when you know actual row count.
COBOL ⭐ Featured
👁 0

Q: What is RECORDING MODE for files?

Answer:
RECORDING MODE specifies record format: F=fixed, V=variable, U=undefined, S=spanned. RECORDING MODE IS V for variable records. Affects how records are blocked and how length is tracked. Must match JCL DCB specifications.
VSAM ⭐ Featured
👁 0

Q: What is RRDS in VSAM?

Answer:
RRDS (Relative Record Dataset) accesses by relative record number (slot). Fixed length slots numbered 1, 2, 3... Can be empty slots. Good for direct access by position. Less common than KSDS/ESDS.
COBOL ⭐ Featured
👁 0

Q: How to handle EBCDIC/ASCII conversion?

Answer:
COBOL on mainframe uses EBCDIC natively. For ASCII conversion: use INSPECT CONVERTING, or file translation (JCL), or LE functions. NATIONAL-OF and DISPLAY-OF for Unicode. Different collating sequences affect SORT and comparisons.
COBOL ⭐ Featured
👁 0

Q: What is ORGANIZATION clause?

Answer:
ORGANIZATION specifies file structure: SEQUENTIAL (default), INDEXED (VSAM KSDS), RELATIVE (RRDS). Determines access methods available. INDEXED requires RECORD KEY. ACCESS MODE can be SEQUENTIAL, RANDOM, or DYNAMIC.
VSAM ⭐ Featured
👁 0

Q: How to define KSDS cluster?

Answer:
IDCAMS DEFINE CLUSTER(NAME(ds.name) INDEXED KEYS(len offset) RECORDSIZE(avg max) SHAREOPTIONS(2 3)) DATA(NAME(ds.data) CYLINDERS(5 1)) INDEX(NAME(ds.index) CYLINDERS(1 1)). Keys required for INDEXED.
VSAM ⭐ Featured
👁 0

Q: What is CI and CA in VSAM?

Answer:
CI (Control Interval) is I/O unit, like block. Contains records, free space, control info. CA (Control Area) is group of CIs. CISIZE affects performance. CI split when full. CA split more expensive.
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: How to use EXIT PERFORM?

Answer:
EXIT PERFORM immediately exits current PERFORM loop. EXIT PERFORM CYCLE skips to next iteration. COBOL 2002+ feature. Previously used GO TO with OUT-OF-PARAGRAPH technique. Makes loop control cleaner without extra flags.
VSAM ⭐ Featured
👁 0

Q: What is alternate index?

Answer:
AIX provides secondary access path. DEFINE AIX over base cluster. Different key. DEFINE PATH to access. BLDINDEX populates. UPGRADE option maintains AIX on base updates. Multiple AIX per cluster.
VSAM ⭐ Featured
👁 0

Q: How to handle file status 23?

Answer:
Status 23 is record not found for random READ or START. Key doesn't exist. Check key value, spelling. May be legitimate (check if exists logic). START with EQUAL, GTEQ, LTEQ options.
COBOL ⭐ Featured
👁 0

Q: What is PIC clause editing?

Answer:
Picture editing characters: Z=zero suppress, *=check protect, +=sign, -=negative, CR/DB=credit/debit, $=currency, .=decimal, ,=comma, B=blank. Example: PIC ,ZZ9.99- displays $ 123.45-. Insertion characters add to display.
VSAM ⭐ Featured
👁 0

Q: Explain FREESPACE parameter

Answer:
FREESPACE(cipct capct). CI percent free for inserts. CA percent free for splits. FREESPACE(20 10) leaves 20% CI, 10% CA free. More freespace reduces splits but uses more space. Tune based on activity.
VSAM ⭐ Featured
👁 0

Q: What causes file status 97?

Answer:
Status 97 indicates OPEN problem, often password or integrity. May be: dataset locked, open elsewhere without sharing, damaged dataset. Check SHAREOPTIONS, verify cluster status, recovery may be needed.
COBOL ⭐ Featured
👁 0

Q: Explain EXEC SQL statements

Answer:
EXEC SQL marks embedded DB2 SQL. EXEC SQL SELECT col INTO :host-var FROM table WHERE key = :key-var END-EXEC. Colon prefix for host variables. SQLCODE in SQLCA indicates result. Precompiler converts to COBOL calls.
VSAM ⭐ Featured
👁 0

Q: What is SPANNED record?

Answer:
Spanned records exceed CI size, span multiple CIs. DEFINE CLUSTER ... RECORDSIZE(avg max) SPANNED. CI too small for max record. Performance impact. Use appropriately sized CI when possible.
COBOL ⭐ Featured
👁 0

Q: How to handle OCCURS INDEXED tables?

Answer:
Indexed tables use INDEXED BY: 05 TBL OCCURS 10 INDEXED BY IDX. SET IDX TO 1 initializes. SET IDX UP BY 1 increments. SEARCH uses index implicitly. More efficient than subscript-index conversion.
VSAM ⭐ Featured
👁 0

Q: How to delete VSAM cluster?

Answer:
IDCAMS DELETE ds.name CLUSTER. Or DELETE ds.name FILE(ddname) if DD provided. PURGE overrides retention. ERASE clears data. DELETE removes catalog entry and data/index components.
VSAM ⭐ Featured
👁 0

Q: What is VSAM catalog?

Answer:
ICF catalog stores VSAM metadata. Aliases point to catalogs. DEFINE USERCATALOG creates. LISTCAT shows entries. Recovery important - losing catalog is disaster. BCS (Basic Catalog Structure) and VVDS on volume.
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: What is VERIFY utility?

Answer:
VERIFY corrects catalog end-of-data after abend. IDCAMS VERIFY FILE(ddname). Recovers from improper close. Run if status 97 or catalog inconsistent. Should be run before processing after abnormal end.
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.
VSAM ⭐ Featured
👁 0

Q: What is KSDS key format?

Answer:
Keys defined by KEYS(length offset). Offset is 0-based. Key extracted from record at offset for length bytes. Alphanumeric comparison. Numeric keys need proper format. Key must be contiguous.
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 39?

Answer:
Status 39 is file attribute mismatch. JCL attributes don't match cluster. Check: RECFM, LRECL in JCL vs cluster. May need to omit DCB parameters. VSAM doesn't use standard DCB.
COBOL ⭐ Featured
👁 0

Q: How to use STRING with POINTER?

Answer:
STRING uses POINTER to track position: STRING field-1 DELIMITED SIZE INTO output WITH POINTER pos-var. Pointer shows next available position. Initialize before first STRING. Check for overflow. Continue STRING in multiple statements.
COBOL ⭐ Featured
👁 0

Q: What is PERFORM recursion limit?

Answer:
COBOL doesn't traditionally support recursion; same paragraph in PERFORM stack causes error. RECURSIVE clause in PROGRAM-ID enables it. Recursive programs need local storage. Stack depth limited by system resources. Usually avoid in COBOL.
VSAM ⭐ Featured
👁 0

Q: What is RBA?

Answer:
RBA (Relative Byte Address) is byte offset from dataset start. ESDS uses RBA for access. KSDS index points to RBA. Changed by REORG. Use key for KSDS, RBA only when necessary.
VSAM ⭐ Featured
👁 0

Q: What causes file status 48?

Answer:
Status 48 is OPEN failure, file already open. Check logic - may have duplicate OPEN. CLOSE before re-OPEN. COBOL FILE-STATUS check important. May be another job has exclusive access.
VSAM ⭐ Featured
👁 0

Q: How to create VSAM backup?

Answer:
REPRO to sequential file: REPRO INFILE(vsam) OUTFILE(backup). Or EXPORT for full backup with catalog info. Can also use DFSMS backup. REPRO most common for simple backup.
COBOL ⭐ Featured
👁 0

Q: Explain DEBUGGING declarative

Answer:
USE FOR DEBUGGING enables debug procedures. Requires WITH DEBUGGING MODE. Triggers on: ALTER, PERFORM, GO TO, or reference to debug item. Displays data values and flow. Object code excluded unless compiled with DEBUG option.
VSAM ⭐ Featured
👁 0

Q: How to reorganize VSAM?

Answer:
REPRO out then back: REPRO to sequential, DELETE cluster, DEFINE new cluster, REPRO back. Alternatively, IDCAMS export/import. Reclaims space, restores free space distribution. Schedule regularly.
VSAM ⭐ Featured
👁 0

Q: What is IMBED option?

Answer:
IMBED places sequence set (lowest index level) in data CA. Reduces I/O for index access. Uses more data space. Obsolete with modern systems - use defaults. May still see in old definitions.
COBOL ⭐ Featured
👁 0

Q: Explain DE-EDIT function

Answer:
FUNCTION DE-EDIT converts edited numeric back to numeric. Original: '1,234.56-'. DE-EDIT result: -1234.56. Removes edit characters, preserves numeric value and sign. Useful when receiving edited display data needing calculation.
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: Explain RECORDSIZE parameter

Answer:
RECORDSIZE(average maximum). For variable length records. Average used for space calculation. Maximum is hard limit. Fixed length: same average and max. Space formula uses average.
COBOL ⭐ Featured
👁 0

Q: What is OBJECT-COMPUTER paragraph?

Answer:
OBJECT-COMPUTER describes execution machine. OBJECT-COMPUTER. IBM-3090. MEMORY SIZE clause deprecated. PROGRAM COLLATING SEQUENCE for sort order. SEGMENT-LIMIT for overlay. Mostly documentation now; compiler usually ignores.
VSAM ⭐ Featured
👁 0

Q: How to extend VSAM file?

Answer:
ALTER ds.name ADDVOLUMES(vol). Or secondary allocation triggers extension. RECORDS/CYLINDERS secondary amount. Up to 255 extents per volume. May need to reorganize if fragmented.
COBOL ⭐ Featured
👁 0

Q: What is READY TRACE?

Answer:
READY TRACE turns on paragraph tracing. Shows paragraph names as executed. RESET TRACE turns off. Must compile with debugging option. Output goes to SYSOUT. Replaced by better debuggers but useful for quick flow analysis.
COBOL ⭐ Featured
👁 0

Q: How to use UNSTRING with TALLYING?

Answer:
UNSTRING field-1 DELIMITED BY ',' INTO field-2 field-3 TALLYING IN count-var. Count-var shows how many receiving fields got data. With COUNT IN, tracks characters per field. ALL delimiter allows multiple consecutive delimiters as one.
VSAM ⭐ Featured
👁 0

Q: How to list VSAM catalog entries?

Answer:
LISTCAT ENTRIES(ds.pattern) ALL. Shows cluster info: space, attributes, records. LISTCAT LEVEL(high.level) for multiple. Output to SYSPRINT. Essential for troubleshooting.
COBOL ⭐ Featured
👁 0

Q: Explain SYMBOLIC CHARACTERS

Answer:
SPECIAL-NAMES. SYMBOLIC CHARACTERS NULL-CHAR IS 1. Assigns name to ordinal position in collating sequence. Position 1 is X'00' in EBCDIC. Use: MOVE NULL-CHAR TO field. Define non-printable characters readably.
VSAM ⭐ Featured
👁 0

Q: What is HURBA?

Answer:
HURBA (High Used RBA) marks end of data. Records beyond HURBA are unused space. LISTCAT shows HURBA. Grows as records added. REORG resets to eliminate gaps in ESDS.
COBOL ⭐ Featured
👁 0

Q: What is ALTER statement?

Answer:
ALTER changes GO TO target dynamically. ALTER para-1 TO PROCEED TO para-2. Obsolete-causes maintenance nightmares. Makes flow unpredictable. Use EVALUATE or SET/IF instead. Some shops prohibit. Still legal but strongly discouraged.
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.
VSAM ⭐ Featured
👁 0

Q: What is CISIZE calculation?

Answer:
CISIZE must hold at least one record plus overhead. Formula complex. Let system default usually best. Common sizes: 4096, 8192, 16384. Larger CI can improve sequential, hurt random.
COBOL ⭐ Featured
👁 0

Q: How to use PERFORM EXIT?

Answer:
EXIT statement marks paragraph end. PERFORM PROCESS-DATA THRU PROCESS-EXIT. Process-exit paragraph contains only EXIT. Ensures consistent exit point. Can also GO TO exit paragraph. EXIT PROGRAM in subprogram returns to caller.
COBOL ⭐ Featured
👁 0

Q: What is LOCAL-STORAGE SECTION?

Answer:
LOCAL-STORAGE SECTION is reinitialized each invocation. Unlike WORKING-STORAGE which retains values. Each thread gets own copy. Useful for recursive programs and threaded environments. COBOL-85+ feature. Not all compilers support equally.
COBOL ⭐ Featured
👁 0

Q: Explain COPY REPLACING

Answer:
COPY copybook REPLACING ==:TAG:== BY ==WS-==. Substitutes text during copy. Pseudo-text delimiters ==. Can replace identifiers, literals, words. Multiple REPLACING clauses allowed. Useful for generic copybooks.
COBOL ⭐ Featured
👁 0

Q: How to handle binary data?

Answer:
COMP/BINARY stores binary. PIC S9(4) COMP is halfword (2 bytes). PIC S9(9) COMP is fullword (4 bytes). PIC S9(18) COMP is doubleword (8 bytes). SYNC aligns for performance. Value range limited by bytes, not picture.
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: What is NOSCRATCH?

Answer:
NOSCRATCH on DELETE keeps data space. Entry removed from catalog but space not released. Rarely used. Normal DELETE releases space. May be useful for recovery scenarios.
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.
COBOL ⭐ Featured
👁 0

Q: How to use FUNCTION CURRENT-DATE?

Answer:
FUNCTION CURRENT-DATE returns 21-char timestamp. Format: YYYYMMDDHHMMSSDHHMM (D=hundredths, HH=GMT offset). MOVE FUNCTION CURRENT-DATE TO WS-TIMESTAMP. Parse components with reference modification or REDEFINES.
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.
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.
VSAM ⭐ Featured
👁 0

Q: What is KEYRANGES?

Answer:
KEYRANGES distributes KSDS across volumes by key value. KEYRANGES((low1 high1) (low2 high2)). Each range on different volume. Improves parallel access. Rarely used now.
VSAM ⭐ Featured
👁 0

Q: How to compress VSAM?

Answer:
DFSMS compression via DATACLAS. Or EXTENDED FORMAT with compression. Not native VSAM feature. Reduces space, adds CPU overhead. Good for large, read-heavy files.
VSAM ⭐ Featured
👁 0

Q: What is file status 41?

Answer:
Status 41 is file already open. Duplicate OPEN attempted. Check program flow. CLOSE before re-OPEN. May be logic error in nested calls. STATUS after OPEN shows this.
COBOL ⭐ Featured
👁 0

Q: How to define FILE-CONTROL?

Answer:
SELECT file-name ASSIGN TO ddname. ORGANIZATION IS INDEXED. ACCESS MODE IS DYNAMIC. RECORD KEY IS key-field. ALTERNATE RECORD KEY IS alt-key. FILE STATUS IS ws-status. Maps COBOL file to physical dataset.
VSAM ⭐ Featured
👁 0

Q: Explain BUFFERSPACE parameter

Answer:
BUFFERSPACE sets total buffer memory. Alternative to BUFND/BUFNI. BUFFERSPACE(65536) allocates 64K for buffers. System divides between index and data. Simpler than separate settings.
VSAM ⭐ Featured
👁 0

Q: How to improve KSDS performance?

Answer:
Appropriate CISIZE, FREESPACE. Adequate buffers (BUFND/BUFNI). Index in cache if possible. IMBED obsolete. Keep file organized (REORG). Monitor CA/CI splits. Sequential access for bulk.
VSAM ⭐ Featured
👁 0

Q: What is EXAMINE utility?

Answer:
EXAMINE checks VSAM structural integrity. EXAMINE NAME(ds.name) INDEXTEST DATATEST. Finds problems in index, data. Run periodically or when problems suspected. Output shows errors.
JCL ⭐ Featured
👁 0

Q: What is the difference between COND and IF/THEN/ELSE?

Answer:
COND tests return codes to skip steps (negative logic - skips IF true). IF/THEN/ELSE tests conditions to execute steps (positive logic). IF supports complex expressions, COND is simpler but confusing. IF preferred for readability. COND on JOB affects all steps; on EXEC affects that step.
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.
JCL ⭐ Featured
👁 0

Q: Explain SPACE parameter options

Answer:
SPACE=(unit,(primary,secondary,directory)). Unit: TRK/CYL/block-size. Primary allocated first, secondary in 15 increments. Directory only for PDS. RLSE releases unused. CONTIG requires contiguous. Example: SPACE=(CYL,(10,5,20),RLSE)
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.
JCL ⭐ Featured
👁 0

Q: How to pass data between steps?

Answer:
Use DISP=PASS to pass datasets. Receiving step references same DSN. Or use symbolic parameters. GDG allows relative references (+1 created, 0 passed). Temporary datasets (&& prefix) auto-pass. SYSIN instream data copied to subsequent steps.
JCL ⭐ Featured
👁 0

Q: Explain DCB parameter

Answer:
DCB defines Data Control Block: RECFM (F/FB/V/VB/U), LRECL (record length), BLKSIZE (block size). DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920). Can inherit from existing dataset. LRECL required for new datasets. BLKSIZE=0 lets system optimize.
JCL ⭐ Featured
👁 0

Q: How to define GDG in JCL?

Answer:
Create GDG base with IDCAMS DEFINE GDG. Reference generations: DSN=MY.GDG(+1) for new, DSN=MY.GDG(0) for current, DSN=MY.GDG(-1) for previous. DISP=(NEW,CATLG) for +1. Model DSCB needed for SMS-managed datasets.
VSAM ⭐ Featured
👁 0

Q: Explain LOG parameter

Answer:
LOG(NONE/UNDO/ALL) specifies recovery logging. UNDO for backward recovery. ALL for forward and backward. NONE for no logging. Used with transactional systems. Most batch uses NONE.
JCL ⭐ Featured
👁 0

Q: What is REGION parameter?

Answer:
REGION specifies memory limit. REGION=0M means no limit (use system default). REGION=4M limits to 4MB. On JOB card affects all steps, on EXEC affects that step. Below 16M line: REGION=2048K. Modern systems often use REGION=0M.
VSAM ⭐ Featured
👁 0

Q: How to handle VSAM in batch?

Answer:
Define cluster with IDCAMS. JCL DD statement references cluster. COBOL SELECT maps to DD. ACCESS MODE matches operations. Close properly. STATUS check after operations.
VSAM ⭐ Featured
👁 0

Q: What is STORAGECLASS?

Answer:
SMS STORAGECLASS for VSAM placement. STORCLAS on DEFINE. Controls performance, availability. ACS routines may assign. Modern storage management. Replaces explicit volume specifications.
JCL ⭐ Featured
👁 0

Q: What is symbolic parameter?

Answer:
Symbols are variables: SET symbol=value or &symbol on JOB/PROC. Reference: DSN=&HLQ..DATA. Resolved at job entry. EXEC proc,symbol=value overrides. SET statement defines. Symbols start with & and up to 8 characters.
JCL ⭐ Featured
👁 0

Q: How does OUTPUT statement work?

Answer:
OUTPUT defines SYSOUT processing options. //OUT1 OUTPUT CLASS=A,DEST=LOCAL,COPIES=2. Reference: //SYSOUT DD SYSOUT=*,OUTPUT=*.OUT1. Centralizes output attributes. Can specify JESDS for JES-level control. Forms, burst options available.
VSAM ⭐ Featured
👁 0

Q: What is SPANNED records impact?

Answer:
Spanned records span CIs. More I/O for spanned record access. CI header overhead per CI. Avoid if possible by larger CI. Performance degradation for random access.
JCL ⭐ Featured
👁 0

Q: What is JCLLIB ORDER?

Answer:
JCLLIB ORDER specifies procedure library search order. //JOBNAME JOB ... // JCLLIB ORDER=(PROC.LIB1,PROC.LIB2). Searched for INCLUDE and EXEC procname. Takes precedence over JES2/3 proclibs. Must be before first EXEC statement.
VSAM ⭐ Featured
👁 0

Q: Explain NONUNIQUEKEY?

Answer:
AIX can have NONUNIQUEKEY (duplicates). Base cluster KSDS always unique primary key. NONUNIQUEKEY AIX returns first match, use READ NEXT for others. UNIQUEKEY if one-to-one.
JCL ⭐ Featured
👁 0

Q: Explain NOTIFY parameter

Answer:
NOTIFY=userid sends message when job completes. On JOB card. Multiple userids: NOTIFY=(USER1,USER2). Notifies success or failure. TSO users get message at terminal. Essential for batch monitoring. Commonly NOTIFY=&SYSUID for submitter.
JCL ⭐ Featured
👁 0

Q: What causes S0C7 in batch?

Answer:
S0C7 is data exception - non-numeric in numeric field. Check: input file data quality, initialize variables, correct REDEFINES, field alignment. Use OFFSET in dump to find statement. LE CEEDUMP shows data values. Common with new programs.
VSAM ⭐ Featured
👁 0

Q: What is backward READ?

Answer:
READ PREVIOUS for backward sequential. Must establish position first (START or READ). KSDS and ESDS support backward. Useful for end-of-file processing or range searches.
JCL ⭐ Featured
👁 0

Q: How to concatenate datasets?

Answer:
Stack DD statements: //INPUT DD DSN=FILE1,DISP=SHR // DD DSN=FILE2,DISP=SHR. No DD name on continuation. Read consecutively as one file. Different LRECL needs LRECL on first DD or DCB parameter. Concatenation limit varies by system.
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 FREESPACE distribution?

Answer:
FREESPACE spread across CIs and CAs. Initial load distributes evenly. After activity, distribution varies. REORG restores even distribution. Monitor CI/CA splits for tuning.
VSAM ⭐ Featured
👁 0

Q: Explain UPGRADE path AIX?

Answer:
UPGRADE AIX maintained automatically on base cluster changes. PATH allows access but not update. PATH with UPDATE allows updates via alternate key. UPGRADE adds overhead but keeps AIX current.
JCL ⭐ Featured
👁 0

Q: What is IEBGENER utility?

Answer:
IEBGENER copies sequential datasets. SYSUT1=input, SYSUT2=output, SYSIN=control. Simple copy needs only SYSUT1/SYSUT2/SYSIN DD DUMMY. Can reformat, generate, edit records with SYSIN statements. Being replaced by ICEGENER.
VSAM ⭐ Featured
👁 0

Q: How to diagnose VSAM problems?

Answer:
Check file status first. LISTCAT for definition. EXAMINE for structure. IDCAMS PRINT to see data. System messages in JES output. VERIFY after abnormal end. Statistics from catalog.
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.
JCL ⭐ Featured
👁 0

Q: What is COND CODE?

Answer:
Programs return condition/return code in register 15. COND parameter tests: COND=(4,LT) skips if 4 < any prior return code. Values 0-4095. Convention: 0=success, 4=warning, 8=error, 12+=severe. Used for job flow control.
CICS ⭐ Featured
👁 0

Q: What is COMMAREA and how to use it?

Answer:
COMMAREA (Communication Area) passes data between programs and transactions. EXEC CICS LINK/XCTL COMMAREA(data) LENGTH(len). Receiving program has DFHCOMMAREA in LINKAGE. Max 32KB. Preserved across pseudo-conversational iterations.
CICS ⭐ Featured
👁 0

Q: What is pseudo-conversational programming?

Answer:
Pseudo-conversational ends task after sending screen, restarts on input. EXEC CICS RETURN TRANSID(trans) COMMAREA(data). Saves resources - no task waiting for user. Must restore state from COMMAREA. Standard CICS approach.
CICS ⭐ Featured
👁 0

Q: How to handle CICS RESP codes?

Answer:
RESP and RESP2 capture command results. EXEC CICS command RESP(ws-resp) RESP2(ws-resp2). Check DFHRESP(NORMAL) for success. RESP contains condition. RESP2 has additional info. Always check after commands.
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.
CICS ⭐ Featured
👁 0

Q: Explain LINK vs XCTL

Answer:
LINK calls program and returns. EXEC CICS LINK PROGRAM(name). Calling program resumes after LINK. XCTL transfers permanently - no return. EXEC CICS XCTL PROGRAM(name). Use LINK for subroutines, XCTL for navigation.
CICS ⭐ Featured
👁 0

Q: What is BMS?

Answer:
BMS (Basic Mapping Support) handles screen I/O. Map defines screen layout. DFHMSD macro creates mapset. SEND MAP displays screen. RECEIVE MAP gets input. Symbolic map in COBOL copybook. Physical map in load library.
JCL ⭐ Featured
👁 0

Q: Explain PARM parameter

Answer:
PARM passes data to program. EXEC PGM=PROG,PARM='value'. Max 100 characters. Program receives length prefix. PARM='abc,xyz' passes as one string. Program parses. Special chars need quotes. Alternative: SYSIN for larger data.
JCL ⭐ Featured
👁 0

Q: What is DD DATA statement?

Answer:
DD DATA marks instream data with delimiter. DD DATA,DLM=XX...data...XX. Default delimiter is /*. DLM needed when data contains /*. Data physically follows DD in JCL stream. Alternative: DD * for default delimiter.
CICS ⭐ Featured
👁 0

Q: Explain CICS task and transaction

Answer:
Transaction is unit of work started by TRANSID. Task is CICS execution instance. One transaction may create multiple tasks. Task has TCA (Task Control Area). EIBTRNID has transaction ID. Concurrent tasks share resources.
CICS ⭐ Featured
👁 0

Q: What is EIB?

Answer:
EIB (Execute Interface Block) contains execution info. EIBCALEN=COMMAREA length. EIBTRNID=transaction. EIBAID=attention key. EIBDATE/EIBTIME=date/time. EIBRESP/EIBRESP2=response codes. Automatically available in COBOL.
JCL ⭐ Featured
👁 0

Q: How to use SET statement?

Answer:
SET symbol=value assigns value. SET DATE=&LYYMMDD (system symbol). Multiple: SET A=1,B=2. Scope: job/proc. Override on EXEC. SET can reference other symbols. Evaluated at conversion time. Enables parameter files.
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.
JCL ⭐ Featured
👁 0

Q: How to check job status?

Answer:
SDSF DA/ST panels show jobs. TSO STATUS command. JES2 J'jobname'. JESMSGLG shows JCL, allocation. JESYSMSG has error details. Return code in JESMSGLG. Condition codes per step. Check SYSOUT for program output.
JCL ⭐ Featured
👁 0

Q: What is PRTY parameter?

Answer:
PRTY sets selection priority. PRTY=15 on JOB card. Values 0-15 (15 highest). Affects when job selected from queue. JES2 processes higher PRTY first within class. Different from PERFORM (execution priority).
CICS ⭐ Featured
👁 0

Q: How to do file BROWSE?

Answer:
BROWSE reads sequentially. EXEC CICS STARTBR FILE(name) RIDFLD(key). READNEXT/READPREV in loop. ENDBR ends browse. TOKEN for concurrent browses. Can use generic key to position.
JCL ⭐ Featured
👁 0

Q: Explain generation data groups

Answer:
GDG maintains versions. Base defined with IDCAMS: DEFINE GDG NAME(base) LIMIT(10) SCRATCH. Reference: base(+1) new, base(0) current, base(-1) previous. LIMIT controls kept generations. NOEMPTY/EMPTY for empty condition.
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.
JCL ⭐ Featured
👁 0

Q: What causes JCL ERROR?

Answer:
JCL ERROR means syntax error or invalid combination. Check: missing commas, unmatched quotes/parentheses, misspelled keywords, invalid parameter values. JES message indicates line and error. JESYSMSG has details.
JCL ⭐ Featured
👁 0

Q: How to use //IF statement?

Answer:
//IF (condition) THEN executes following steps if true. Conditions: RC, ABEND, ABENDCC, RUN, STEP.RC. Example: //IF (STEP1.RC = 0) THEN ... //ENDIF. Can nest. ELSE available. Clearer than COND parameter.
CICS ⭐ Featured
👁 0

Q: How to SYNCPOINT?

Answer:
SYNCPOINT commits changes. EXEC CICS SYNCPOINT. Makes updates permanent. Or SYNCPOINT ROLLBACK undoes since last sync. Implicit syncpoint at task end. Use for transaction consistency.
CICS ⭐ Featured
👁 0

Q: What is ABEND command?

Answer:
ABEND deliberately terminates. EXEC CICS ABEND ABCODE('XXXX'). Causes transaction abend with code. NODUMP suppresses dump. CANCEL removes HANDLE ABEND first. Use for unrecoverable errors.
JCL ⭐ Featured
👁 0

Q: What causes S722 abend?

Answer:
S722 is output limit exceeded. Too many lines to SYSOUT. Check program loops causing excessive output. Increase output limit in installation parameters. Or reduce output volume. May need job card BYTES parameter.
CICS ⭐ Featured
👁 0

Q: How to use INQUIRE command?

Answer:
INQUIRE retrieves resource status. EXEC CICS INQUIRE FILE(name) OPENSTATUS(ws-status). INQUIRE TRANSACTION, PROGRAM, etc. Returns current state. Use for dynamic decisions.
JCL ⭐ Featured
👁 0

Q: Explain AVGREC parameter

Answer:
AVGREC specifies space in record units. AVGREC=U (units), K (thousands), M (millions). SPACE=(80,(100,10),,,ROUND) with AVGREC=K means 100,000 records. Easier than calculating tracks. System converts to tracks.
CICS ⭐ Featured
👁 0

Q: Explain CICS regions

Answer:
CICS region is address space. TOR (Terminal Owning) owns terminals. AOR (Application Owning) runs programs. FOR (File Owning) owns files. MRO connects regions. Workload distribution.
JCL ⭐ Featured
👁 0

Q: What is JESDS parameter?

Answer:
JESDS specifies JES dataset for OUTPUT. JESDS=ALL creates JESMSGLG, JESJCL, JESYSMSG. JESDS=LOG for JESMSGLG only. On OUTPUT statement. Controls system output generation. Used for output management.
JCL ⭐ Featured
👁 0

Q: Explain RECFM options

Answer:
RECFM defines record format. F=fixed, V=variable, U=undefined. B=blocked, A=ASA control, M=machine control, S=spanned. Combinations: FB=fixed blocked, VBS=variable blocked spanned. Match program expectations.
CICS ⭐ Featured
👁 0

Q: What is CHANNEL/CONTAINER?

Answer:
Channels group containers for data passing. EXEC CICS PUT CONTAINER(name) CHANNEL(chan) FROM(data). GET retrieves. Modern alternative to COMMAREA. No 32KB limit. Typed data support.
CICS ⭐ Featured
👁 0

Q: Explain ASKTIME/FORMATTIME

Answer:
ASKTIME gets current time. EXEC CICS ASKTIME ABSTIME(ws-abstime). FORMATTIME converts to readable. FORMATTIME ABSTIME(ws-abstime) DATESEP('/') TIMESEP(':'). Formatting options available.
JCL ⭐ Featured
👁 0

Q: How to force uncataloged?

Answer:
VOL=SER=volume forces uncataloged access. DISP=(OLD,KEEP). System searches specified volume, not catalog. UNIT required. Bypasses catalog entirely. Useful for specific volume access. Security still applies.
CICS ⭐ Featured
👁 0

Q: What is EIBTRMID?

Answer:
EIBTRMID contains terminal ID (4 chars). Available in EIB. Identifies user terminal. Used for session management, logging. May be blank for non-terminal tasks.
CICS ⭐ Featured
👁 0

Q: How to use ENQ/DEQ?

Answer:
ENQ serializes resources. EXEC CICS ENQ RESOURCE(name) LENGTH(len). DEQ releases. Prevents concurrent access. NOSUSPEND returns immediately if busy. Use for data integrity.
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.
JCL ⭐ Featured
👁 0

Q: Explain BUFNO parameter

Answer:
BUFNO sets number of I/O buffers. DCB=(BUFNO=5). More buffers improve sequential performance but use memory. System default often 5. VSAM uses different buffering (BUFNI, BUFND). Too many can waste memory.
CICS ⭐ Featured
👁 0

Q: What is LENGTH in commands?

Answer:
LENGTH specifies data size. LENGTH(ws-len). Required for variable data. Set before RECEIVE. Check after READ for actual length. FLENGTH for fullword. Some commands have defaults.
JCL ⭐ Featured
👁 0

Q: What causes S0C4 in batch?

Answer:
S0C4 is protection exception - addressing unallocated memory. Causes: uninitialized pointer, subscript out of range, incorrect LINKAGE SECTION. Check CEEDUMP for offset. Likely program bug. Use debugger to trace.
CICS ⭐ Featured
👁 0

Q: Explain EIBRESP values

Answer:
EIBRESP holds response code. 0=NORMAL. Non-zero indicates condition. Use DFHRESP(condition) for comparison. Common: DFHRESP(NOTFND), DFHRESP(DUPKEY), DFHRESP(INVREQ). Check documentation.
JCL ⭐ Featured
👁 0

Q: How to define VSAM in JCL?

Answer:
//DD DD DSN=VSAM.CLUSTER,DISP=SHR for existing. New cluster needs IDCAMS DEFINE CLUSTER. JCL references cluster, not data/index. AMP parameter for VSAM options: AMP=(BUFNI=8,BUFND=4). Cannot create VSAM with JCL alone.
CICS ⭐ Featured
👁 0

Q: What is NOHANDLE option?

Answer:
NOHANDLE suppresses condition handling. EXEC CICS command NOHANDLE RESP(ws-resp). Program handles all conditions. No HANDLE CONDITION invoked. Cleaner error handling. Recommended approach.
CICS ⭐ Featured
👁 0

Q: How to do interval control?

Answer:
START with INTERVAL/AFTER for delayed execution. EXEC CICS START TRANSID(xx) INTERVAL(001000). Or AFTER HOURS(1) MINUTES(30). For scheduled background work. Data via FROM or CHANNEL.
CICS ⭐ Featured
👁 0

Q: What is IMMEDIATE option?

Answer:
IMMEDIATE on RETURN returns without COMMAREA. EXEC CICS RETURN IMMEDIATE. Next input starts fresh - no continuation. Use when pseudo-conv not needed.
JCL ⭐ Featured
👁 0

Q: What is FREE parameter?

Answer:
FREE specifies when to release allocation. FREE=END (default) at step end. FREE=CLOSE when file closed. FREE=CLOSE allows reuse within step. Reduces concurrent allocations. Helps resource-constrained systems.
CICS ⭐ Featured
👁 0

Q: What is KEYLENGTH option?

Answer:
KEYLENGTH specifies key portion for generic access. EXEC CICS READ FILE RIDFLD(partial) KEYLENGTH(4) GENERIC. Finds first matching prefix. Use with GTEQ for range.
JCL ⭐ Featured
👁 0

Q: What is SYSIN DD *?

Answer:
SYSIN DD * starts instream data. Data follows until /*. Program reads via SYSIN DD. Common for utility control statements. DD DATA,DLM=xx if data contains /*. SYSIN DD DUMMY for no input.
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: Explain NULLFILE keyword?

Answer:
NULLFILE is alternate for DUMMY. //DD DD NULLFILE. Discards output, provides EOF for input. DSN=NULLFILE equivalent. No actual dataset. Useful for testing without actual files.
CICS ⭐ Featured
👁 0

Q: What is SYSID?

Answer:
SYSID identifies CICS system. 4-character name. EXEC CICS ASSIGN SYSID(ws-sysid). Or in RDO definitions. Used for MRO routing, function shipping. Remote file/program SYSID option.
JCL ⭐ Featured
👁 0

Q: What causes S222 abend?

Answer:
S222 is job cancelled by operator or system. S222-02 means JOB CANCEL command. S222-04 means TSO CANCEL. S222-08 means FORCE. Not program error - external intervention. Check with operations if unexpected.
CICS ⭐ Featured
👁 0

Q: Explain SUSPEND command

Answer:
SUSPEND yields control to other tasks. EXEC CICS SUSPEND. Allows multitasking. Task resumes when dispatched. Use sparingly. May help long-running tasks. Usually unnecessary.
JCL ⭐ Featured
👁 0

Q: What is PERFORM parameter?

Answer:
PERFORM assigns service class. PERFORM=n (1-999). JES/WLM determines resource allocation. Higher may get more resources. Installation dependent. Modern systems use WLM service classes instead.
CICS ⭐ Featured
👁 0

Q: How to use WAIT EVENT?

Answer:
WAIT suspends until event. EXEC CICS WAIT EVENT ECBLIST(ecb-list). Multiple ECBs. Returns when any posted. Used for synchronization. Timer events, external events.
JCL ⭐ Featured
👁 0

Q: Explain DD PATH statement?

Answer:
PATH specifies Unix/USS file. PATH='/u/user/file'. Used instead of DSN. PATHDISP for disposition. PATHOPTS for options. PATHMODE for permissions. Integrates USS files into batch JCL.
JCL ⭐ Featured
👁 0

Q: What is PATHDISP parameter?

Answer:
PATHDISP=(normal,abnormal) for USS files. Options: KEEP, DELETE. PATHDISP=(KEEP,DELETE). Used with PATH parameter. Similar to DISP for MVS datasets. Controls USS file retention.
JCL ⭐ Featured
👁 0

Q: How to code symbolic override?

Answer:
EXEC proc,SYM1=value1,SYM2=value2. Symbols defined in PROC with SET or & default. Override replaces default. Multiple overrides comma-separated. Must match PROC symbols. Case sensitive.
JCL ⭐ Featured
👁 0

Q: What is FILEDATA parameter?

Answer:
FILEDATA specifies DCB for NFS/USS. FILEDATA=TEXT or BINARY. TEXT handles line endings. BINARY transfers unchanged. On PATH DD statements. Affects how data converted between systems.
CICS ⭐ Featured
👁 0

Q: How to use RETRIEVE command?

Answer:
RETRIEVE gets data passed via START. EXEC CICS RETRIEVE INTO(area) LENGTH(len). Data from START FROM parameter. Or RETRIEVE CHANNEL for containers. One retrieve per start.
CICS ⭐ Featured
👁 0

Q: What is PPT?

Answer:
PPT (Processing Program Table) defines programs. Now RDO PROGRAM definition. Contains: program name, language, resident status. CEDA DEFINE PROGRAM creates entry.
JCL ⭐ Featured
👁 0

Q: What causes INVALID DATA SET NAME?

Answer:
Dataset name violates rules: 44 char max, qualifier 8 max, start with letter/national, periods separate qualifiers, no double periods, no special characters. Check spelling, length, valid characters.
CICS ⭐ Featured
👁 0

Q: Explain PCT

Answer:
PCT (Program Control Table) defines transactions. Now RDO TRANSACTION. Links TRANSID to initial program. Security, priority, other options. CEDA DEFINE TRANSACTION.
JCL ⭐ Featured
👁 0

Q: How to allocate SYSDA?

Answer:
UNIT=SYSDA for disk. Generic device group. Installation defines SYSDA contents. Usually includes all available disk. SMS may direct allocation. UNIT=3390 for specific device type. SYSDA preferred for portability.
JCL ⭐ Featured
👁 0

Q: What is LRECL=X?

Answer:
LRECL=X means system-determined length. Usually for RECFM=U or special files. System calculates based on BLKSIZE or file characteristics. Not common for normal datasets. Used with certain utilities.
CICS ⭐ Featured
👁 0

Q: How to check EIBAID?

Answer:
EIBAID shows attention key pressed. Compare with DFHENTER, DFHPF1-24, DFHCLEAR, DFHPA1-3. Example: IF EIBAID = DFHPF3 do-exit. Determines user action on screen.
CICS ⭐ Featured
👁 0

Q: What is DFHRESP?

Answer:
DFHRESP macro converts response name. DFHRESP(NOTFND) returns numeric value. Use in IF: IF ws-resp = DFHRESP(NORMAL). Readable condition checking. Standard practice.
JCL ⭐ Featured
👁 0

Q: What is DATACLAS parameter?

Answer:
DATACLAS assigns SMS data class. DATACLAS=classname. Defines DCB attributes, space, data type. ACS routines may assign automatically. Overrides explicit DCB. Simplifies JCL. Installation-defined classes.
CICS ⭐ Featured
👁 0

Q: What is attribute byte?

Answer:
Attribute byte controls field display. In BMS: ATTRB=(PROT,BRT). Protected, unprotected. Bright, normal, dark. MDT (Modified Data Tag) for transmission. Set in map or program.
CICS ⭐ Featured
👁 0

Q: How to use CURSOR option?

Answer:
CURSOR positions cursor on SEND MAP. EXEC CICS SEND MAP CURSOR(pos). Position number from 0. Or CURSOR option in symbolic map (-1 in length field). Controls data entry flow.
CICS ⭐ Featured
👁 0

Q: Explain DATAONLY option

Answer:
DATAONLY sends only changed data. EXEC CICS SEND MAP DATAONLY FROM(data). No map formatting. Faster for updates. Fields must exist on screen. Use after initial MAPONLY.
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.
CICS ⭐ Featured
👁 0

Q: What is FRSET?

Answer:
FRSET (Field Reset) resets MDTs. EXEC CICS SEND MAP FRSET. Only changed fields transmitted back. Efficiency. Without FRSET, all unprotected transmitted. Use for repeat maps.
JCL ⭐ Featured
👁 0

Q: What is SEGMENT parameter?

Answer:
SEGMENT limits output lines per dataset. On OUTPUT statement. SEGMENT=nnn pages per segment. JES creates multiple output datasets. Helps with huge print files. Easier to handle smaller pieces.
CICS ⭐ Featured
👁 0

Q: How to use ACCUM option?

Answer:
ACCUM accumulates map output. EXEC CICS SEND MAP ACCUM. Build complete screen before send. Final EXEC CICS SEND PAGE. For multi-map screens. Message building.
JCL ⭐ Featured
👁 0

Q: Explain REFDD parameter?

Answer:
REFDD references DD for attributes. DCB=*.STEP.DD or REFDD=ddname. Copies DCB info. Similar to VOL=REF. Useful for consistent attributes. Referenced DD must be allocated first.
CICS ⭐ Featured
👁 0

Q: Explain symbolic map structure

Answer:
Symbolic map copybook. Field name with L (length), F (flag), A (attribute), I (input), O (output). Set -1 in length for cursor. Check flag for modified. Program data area.
CICS ⭐ Featured
👁 0

Q: What is OVERFLOW condition?

Answer:
OVERFLOW when output exceeds page. During SEND with paging. Handle to manage paging. RESP check. Terminal specific limits. May need to restructure output.
JCL ⭐ Featured
👁 0

Q: What is RLSE subparameter?

Answer:
RLSE releases unused space at close. SPACE=(CYL,(10,5),RLSE). Returns unused secondary allocations. Good practice for new datasets. Saves disk space. May cause allocation issues if reextended.
JCL ⭐ Featured
👁 0

Q: Explain EROPT parameter?

Answer:
EROPT specifies error handling. DCB=(EROPT=ABE/ACC/SKP). ABE=abend on error, ACC=accept and continue, SKP=skip block. For tape I/O errors. Program may handle differently. Default is ABE.
DB2 ⭐ Featured
👁 0

Q: What is the difference between INNER JOIN and LEFT OUTER JOIN?

Answer:
INNER JOIN returns only matching rows from both tables. LEFT OUTER JOIN returns all rows from left table plus matching rows from right (NULL if no match). LEFT preserves all left table rows regardless of match. INNER excludes non-matching rows from both sides.
CICS ⭐ Featured
👁 0

Q: Explain INVREQ condition

Answer:
INVREQ is invalid request. Command invalid for situation. Check: command syntax, option combinations, resource state. EIBRESP2 may have more info. Common programming error.
DB2 ⭐ Featured
👁 0

Q: What is RUNSTATS and when to use it?

Answer:
RUNSTATS collects table/index statistics for optimizer. Run after significant data changes (loads, deletes). Updates catalog tables (SYSTABLES, SYSINDEXES). Optimizer uses for access path selection. RUNSTATS TABLESPACE db.ts INDEX(ALL).
DB2 ⭐ Featured
👁 0

Q: How does REORG work?

Answer:
REORG physically reorganizes tablespace or index. Eliminates fragmentation, reclaims space, restores clustering. REORG TABLESPACE db.ts. Options: SHRLEVEL (REFERENCE/CHANGE), LOG (YES/NO). Schedule during low activity. Run RUNSTATS after.
CICS ⭐ Featured
👁 0

Q: How to use TRANSFORM?

Answer:
TRANSFORM converts data format. EXEC CICS TRANSFORM DATATOXML. XML/JSON transformations. Modern data exchange. Requires definitions. Simplifies integration.
DB2 ⭐ Featured
👁 0

Q: What is a DB2 plan vs package?

Answer:
Plan is executable form of program's SQL, bound from DBRM. Package is independent unit, can be shared. Plans contain packages or direct SQL. Packages allow separate rebind. Modern approach: package collections with small plans.
CICS ⭐ Featured
👁 0

Q: What is INVOKE SERVICE?

Answer:
INVOKE SERVICE calls web service. EXEC CICS INVOKE SERVICE. PIPELINE processing. SOAP/REST support. Modern integration. Requires CICS TS 3.1+.
DB2 ⭐ Featured
👁 0

Q: What is DB2 catalog?

Answer:
Catalog tables describe DB2 objects. SYSIBM.SYSTABLES for tables, SYSIBM.SYSCOLUMNS for columns, SYSIBM.SYSINDEXES for indexes. Query catalog for metadata. Read-only except through DDL. Essential for documentation and analysis.
CICS ⭐ Featured
👁 0

Q: What is CICS Liberty?

Answer:
CICS Liberty embeds Java server. Run Java apps in CICS. RESTful services. Modern application development. Coexists with COBOL. Container environment.
DB2 ⭐ Featured
👁 0

Q: Explain NULL handling in DB2

Answer:
NULL means unknown/missing value. NULL != NULL returns unknown. Use IS NULL, IS NOT NULL. COALESCE(col, default) substitutes. NULL in arithmetic yields NULL. Indicator variables detect NULL in COBOL. NVL function alternative.
CICS ⭐ Featured
👁 0

Q: Explain CICS DB2 connection

Answer:
CICS connects to DB2 via thread. EXEC SQL in CICS program. RCT (Resource Control Table) defines. Thread pool for efficiency. DB2 subsystem parameter.
DB2 ⭐ Featured
👁 0

Q: What is indicator variable?

Answer:
Indicator variable detects NULL values. Declare: 01 col-var. 01 col-ind PIC S9(4) COMP. Use: INTO :col-var:col-ind. If col-ind < 0, value is NULL. Set indicator negative to insert NULL. Required for nullable columns.
CICS ⭐ Featured
👁 0

Q: What is CICS monitoring?

Answer:
CICS monitoring facilities. SMF 110 records. CICS statistics. Transaction analysis. Performance data. OMEGAMON for real-time. Capacity planning.
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.
CICS ⭐ Featured
👁 0

Q: Explain CICS troubleshooting

Answer:
CEDF for debugging. CEMT for status. Dumps for abends. Trace for flow. CICS messages. Aux trace for detailed analysis. Systematic approach.
DB2 ⭐ Featured
👁 0

Q: How to handle -904 SQLCODE?

Answer:
-904 is resource unavailable. Tablespace/index in restricted state, stopped, or unavailable. Check display status. May need START DATABASE command. Check for REORG, RECOVER, LOAD running. Wait and retry.
DB2 ⭐ Featured
👁 0

Q: What is DB2 subsystem?

Answer:
Subsystem is DB2 instance. Has unique name (4 chars). Multiple subsystems on same LPAR. Each has own catalog, logs, data. SSID in application connection. Data sharing allows multi-subsystem access.
DB2 ⭐ Featured
👁 0

Q: Explain COMMIT and ROLLBACK

Answer:
COMMIT makes changes permanent, releases locks. ROLLBACK undoes changes since last COMMIT. Implicit COMMIT at program end (normal). Implicit ROLLBACK on abend. Frequent COMMIT reduces lock duration and log usage.
VSAM ⭐ Featured
👁 0

Q: How to handle RLS (Record Level Sharing)?

Answer:
RLS allows VSAM access without exclusive control. Define with SHAREOPTIONS and LOG. Enable RLS at VSAM level. CF lock structure coordinates. Better than old batch/CICS conflicts.
DB2 ⭐ Featured
👁 0

Q: How to use UNION?

Answer:
UNION combines SELECT results. UNION removes duplicates, UNION ALL keeps all. Column count and types must match. ORDER BY at end only. UNION expensive due to sort. Use UNION ALL if duplicates OK or impossible.
VSAM ⭐ Featured
👁 0

Q: Explain IDCAMS ALTER command

Answer:
ALTER modifies cluster attributes. ALTER ds.name ADDVOLUMES(vol). ALTER ds.name SHAREOPTIONS(2 3). Some changes need empty file. Some need unload/reload. Limited modifications.
DB2 ⭐ Featured
👁 0

Q: What is DISTINCT keyword?

Answer:
DISTINCT eliminates duplicate rows. SELECT DISTINCT col FROM table. Applies to entire row, not single column. Causes sort for duplicate elimination. Performance impact. Avoid if possible. Sometimes indicates bad design.
VSAM ⭐ Featured
👁 0

Q: How to handle SMS conversion?

Answer:
SMS manages storage automatically. Migrate VSAM to SMS: DATACLAS, STORCLAS, MGMTCLAS. ACS routines for assignment. Remove explicit VOL/UNIT. Benefits: automation, management.
DB2 ⭐ Featured
👁 0

Q: What is CURRENT DATE function?

Answer:
CURRENT DATE returns today's date. CURRENT TIME for time. CURRENT TIMESTAMP for both. No parentheses needed. Used in SELECT, WHERE, INSERT. Can compare: WHERE hire_date > CURRENT DATE - 30 DAYS.
VSAM ⭐ Featured
👁 0

Q: What is IMBEDDED index?

Answer:
IMBEDDED places sequence set in data CA. Reduces I/O for index access. Obsolete - modern systems don't benefit. Use system defaults. May see in old definitions.
DB2 ⭐ Featured
👁 0

Q: How to handle date arithmetic?

Answer:
DATE + n DAYS adds days. DATE - n MONTHS subtracts months. DAYS(date2) - DAYS(date1) gives day count. DATEDIFF function available. TIMESTAMPDIFF for time differences. DATE/TIME functions for extraction.
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.
VSAM ⭐ Featured
👁 0

Q: What is maximum VSAM key length?

Answer:
Maximum key length is 255 bytes. KEYS(255 offset). Practical limits lower for performance. Index size grows with key. Keep keys reasonably sized.
DB2 ⭐ Featured
👁 0

Q: Explain COALESCE function

Answer:
COALESCE returns first non-NULL argument. COALESCE(col1, col2, 'default'). Useful for NULL handling. VALUE is synonym. Common: COALESCE(nullable_col, 0) for calculations. Can chain multiple expressions.
CICS ⭐ Featured
👁 0

Q: What is EXEC CICS SEND CONTROL?

Answer:
SEND CONTROL sends control functions. EXEC CICS SEND CONTROL ERASE FREEKB. Clears screen, unlocks keyboard. No map or data. Prepare terminal for next operation.
CICS ⭐ Featured
👁 0

Q: What is ISSUE ABEND?

Answer:
ISSUE ABEND requests dump without termination. EXEC CICS ISSUE ABEND. Diagnostic snapshot. Continue execution. Alternative to full ABEND. Debug technique.
DB2 ⭐ Featured
👁 0

Q: Explain CREATE INDEX

Answer:
CREATE INDEX creates index on table. CREATE INDEX idx ON table(col1, col2). UNIQUE prevents duplicates. CLUSTER determines physical order. Include columns for index-only access. Drop unused indexes for insert performance.
DB2 ⭐ Featured
👁 0

Q: What is clustered index?

Answer:
Clustered index determines physical row order. Only one per table. Other indexes are secondary. CLUSTER keyword on CREATE INDEX. Good for range queries on cluster key. REORG restores clustering after updates.
CICS ⭐ Featured
👁 0

Q: How to handle CICS timeout?

Answer:
Set RTIMOUT on transaction. EXEC CICS HANDLE CONDITION ERROR. DTIMOUT for deadlock. Program design for cleanup. TIMEOUT condition raised.
DB2 ⭐ Featured
👁 0

Q: What is BETWEEN operator?

Answer:
BETWEEN tests range inclusively. WHERE col BETWEEN 1 AND 100. Equivalent to col >= 1 AND col <= 100. Works with dates, times. Can use NOT BETWEEN for exclusion. Index can be used for BETWEEN.
DB2 ⭐ Featured
👁 0

Q: Explain UPDATE with JOIN

Answer:
UPDATE table SET col = value FROM table t1 INNER JOIN table t2 ON... WHERE condition. Or: UPDATE t1 SET col = (SELECT col FROM t2 WHERE t2.key = t1.key). Merge statement is alternative.
DB2 ⭐ Featured
👁 0

Q: How to delete with JOIN?

Answer:
DELETE FROM table WHERE key IN (SELECT key FROM other WHERE condition). Or: DELETE FROM t1 WHERE EXISTS (SELECT 1 FROM t2 WHERE t1.key = t2.key). Correlated subquery common for conditional delete.
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 ⭐ Featured
👁 0

Q: What is INSERT...SELECT?

Answer:
INSERT INTO table SELECT cols FROM other_table WHERE condition. Bulk insert from query. Column count/types must match. Faster than row-by-row. Can transform data during insert. Good for data migration.
DB2
👁 0

Q: What is FETCH FIRST?

Answer:
FETCH FIRST n ROWS ONLY limits result set. SELECT * FROM t ORDER BY col FETCH FIRST 10 ROWS ONLY. Optimizes query - doesn't retrieve all. OFFSET for paging. WITH TIES includes equal values.
DB2
👁 0

Q: How to use window functions?

Answer:
ROW_NUMBER() OVER (PARTITION BY col ORDER BY col2). RANK, DENSE_RANK for rankings. SUM/AVG/COUNT OVER for running totals. PARTITION BY groups within result. ORDER BY within partition. Powerful analytics.
DB2
👁 0

Q: Explain RANK vs DENSE_RANK

Answer:
RANK() creates gaps for ties: 1,2,2,4. DENSE_RANK() no gaps: 1,2,2,3. ROW_NUMBER() no ties: 1,2,3,4. RANK useful for competition ranking. DENSE_RANK for level assignment. Choose based on need.
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: What is stored procedure?

Answer:
Stored procedure is saved SQL code. CREATE PROCEDURE name(params) BEGIN SQL statements END. CALL name(values) executes. Can have IN/OUT/INOUT parameters. Reduces network traffic. Logic in database. Security benefits.
DB2
👁 0

Q: Explain DB2 triggers

Answer:
Trigger fires automatically on INSERT/UPDATE/DELETE. CREATE TRIGGER name AFTER/BEFORE/INSTEAD OF event ON table FOR EACH ROW/STATEMENT. Use for audit, validation, derived columns. Can impact performance.
DB2
👁 0

Q: What is DCLGEN?

Answer:
DCLGEN generates COBOL declarations from table. DCLGEN TABLE(name) LIBRARY(dataset) STRUCTURE(host-struct-name). Creates copybook with field definitions. Essential for maintaining table-program consistency.
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.
DB2
👁 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.
DB2
👁 0

Q: Explain LOAD utility

Answer:
LOAD inserts large data volumes. LOAD DATA INTO TABLE name. Options: REPLACE, RESUME, LOG NO. Input is SYSREC dataset. LOAD faster than INSERT. Puts tablespace in COPY PENDING after LOG NO.
COBOL
👁 0

Q: Explain PERFORM VARYING with example

Answer:
PERFORM VARYING executes a paragraph while incrementing a counter. Syntax: PERFORM para-name VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > 10. The counter is initialized, tested, and incremented automatically. Can have nested VARYING with AFTER clause.
DB2
👁 0

Q: What is data sharing?

Answer:
Data sharing allows multiple DB2s to access same data. Group of subsystems share data. Uses Coupling Facility for coordination. Provides availability, scalability. Complex but powerful for high availability.
COBOL
👁 0

Q: What is the purpose of COPY statement?

Answer:
COPY includes copybook members at compile time, promoting code reuse and standardization. Syntax: COPY copybook-name. REPLACING clause allows field substitution. Copybooks typically contain record layouts, working-storage definitions, and common routines.
COBOL
👁 0

Q: What is EVALUATE statement and when to use it?

Answer:
EVALUATE is COBOL's case/switch construct. Syntax: EVALUATE TRUE WHEN condition-1 statement WHEN OTHER default END-EVALUATE. More readable than nested IF for multiple conditions. Can evaluate multiple subjects and use THRU for ranges.
DB2
👁 0

Q: What is VOLATILE table?

Answer:
VOLATILE TABLE hints optimizer to expect different row counts. Useful for varying cardinality. CREATE TABLE ... VOLATILE CARDINALITY. Or ALTER TABLE ... VOLATILE. Helps when statistics mislead optimizer.
COBOL
👁 0

Q: What is INITIALIZE and its options?

Answer:
INITIALIZE sets fields to default values: alphabetic to spaces, numeric to zeros. Options: REPLACING NUMERIC BY value, REPLACING ALPHANUMERIC BY value. Does not initialize FILLER or REDEFINES items. Useful for clearing record areas before processing.
DB2
👁 0

Q: Explain sequence objects

Answer:
SEQUENCE generates unique numbers. CREATE SEQUENCE name START WITH 1 INCREMENT BY 1. NEXT VALUE FOR sequence-name gets next. Used for keys. Cached for performance. No gaps guaranteed.
COBOL
👁 0

Q: What is CORRESPONDING in COBOL?

Answer:
CORRESPONDING (CORR) operates on fields with matching names. MOVE CORRESPONDING record-1 TO record-2 moves all matching fields. ADD CORRESPONDING does arithmetic. Reduces code but requires careful naming. Not recommended for performance-critical code.
DB2
👁 0

Q: Explain partitioning strategies

Answer:
Range partitioning by value ranges (date, key ranges). Hash partitioning distributes evenly. Partition independence allows parallel operations. Partition pruning improves queries. Rotate partitions for time-series.
COBOL
👁 0

Q: How to use OCCURS DEPENDING ON?

Answer:
OCCURS DEPENDING ON creates variable-length tables. 01 WS-TABLE. 05 WS-COUNT PIC 99. 05 WS-ITEM OCCURS 1 TO 100 DEPENDING ON WS-COUNT. Only variable entries allocated based on counter. Used with variable length records.
DB2
👁 0

Q: What is table compression?

Answer:
Compression reduces storage. Huffman encoding in dictionary. CREATE TABLE ... COMPRESS YES. REORG to compress existing. CPU trade-off for I/O savings. Good for read-heavy, large tables.
COBOL
👁 0

Q: What is FILE STATUS and common codes?

Answer:
FILE STATUS is a 2-byte field capturing I/O operation results. 00=success, 10=end-of-file, 22=duplicate key, 23=record not found, 35=file not found, 39=file attribute mismatch, 41=file already open, 47=not opened input. Essential for error handling.
DB2
👁 0

Q: How to monitor DB2 performance?

Answer:
Use OMEGAMON, DB2PM, or built-in monitor. Check: buffer pool hit ratios, lock waits, CPU time, elapsed time. DISPLAY commands show real-time. Statistics trace for analysis. EXPLAIN for query level.
DB2
👁 0

Q: What is REBIND and when needed?

Answer:
REBIND updates access path without precompile. REBIND PACKAGE after RUNSTATS, index changes. REBIND PLAN for plan-level changes. Can improve or degrade performance - test first. EXPLAIN before/after.
DB2
👁 0

Q: Explain host variable rules

Answer:
Host variables prefixed with : in SQL. Declare in WORKING-STORAGE. Must be compatible types. Use indicator for NULL. Cannot use in dynamic object names. VARCHAR needs two-part structure in COBOL.
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.
DB2
👁 0

Q: How to prevent SQL injection?

Answer:
Use parameter markers (?), not concatenation. PREPARE stmt FROM 'SELECT * FROM t WHERE c = ?'. EXECUTE stmt USING :hostvar. Never build SQL with user input directly. Validate input. Use static SQL when possible.
COBOL
👁 0

Q: Explain COMPUTE statement

Answer:
COMPUTE performs arithmetic with expression syntax. COMPUTE RESULT = (A + B) * C / D. Supports + - * / ** operators. ROUNDED option rounds result. ON SIZE ERROR handles overflow. Clearer than separate ADD/SUBTRACT/MULTIPLY/DIVIDE for complex formulas.
DB2
👁 0

Q: What is ALIAS?

Answer:
ALIAS is alternate name for table. CREATE ALIAS alias FOR table. Useful for cross-subsystem access. Synonym is similar. PUBLIC alias visible to all. ALIAS can point to table in different schema.
COBOL
👁 0

Q: What is SORT and MERGE in COBOL?

Answer:
SORT orders records: SORT SORT-FILE ON ASCENDING KEY-FIELD USING INPUT-FILE GIVING OUTPUT-FILE. INPUT/OUTPUT PROCEDURE allows processing during sort. MERGE combines pre-sorted files: MERGE SORT-FILE ON KEY USING FILE-1 FILE-2 GIVING OUTPUT-FILE.
COBOL
👁 0

Q: How to define and use indexes?

Answer:
INDEX defined with OCCURS: 05 WS-TABLE OCCURS 10 INDEXED BY WS-IDX. SET WS-IDX TO 5 sets position. SET WS-IDX UP/DOWN BY 1 changes position. Use SEARCH verb with index. More efficient than subscripts for table access.
COBOL
👁 0

Q: What is DECLARATIVES section?

Answer:
DECLARATIVES contains USE procedures for exception handling. USE AFTER ERROR PROCEDURE ON file-name handles file errors. USE AFTER EXCEPTION handles specific conditions. Must be first in PROCEDURE DIVISION. END DECLARATIVES marks end.
COBOL
👁 0

Q: Explain CALL statement and parameters

Answer:
CALL invokes subprogram: CALL 'SUBPROG' USING param-1 param-2. BY REFERENCE (default) passes address. BY CONTENT passes copy. BY VALUE passes value (for C). ON EXCEPTION handles load failures. CANCEL releases memory.
COBOL
👁 0

Q: What is LINKAGE SECTION?

Answer:
LINKAGE SECTION defines parameters received from calling program. Items here have no memory until CALL provides addresses via USING clause. Address established at runtime. Used for both passed parameters and dynamically addressed data.
COBOL
👁 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.
COBOL
👁 0

Q: What is GOBACK vs STOP RUN?

Answer:
STOP RUN terminates entire run unit (all programs). GOBACK returns to caller; if main program, acts like STOP RUN. Use GOBACK in subprograms to return control. STOP RUN from subprogram ends everything unexpectedly.
DB2
👁 0

Q: Explain storage group

Answer:
Storage group defines volumes for data. CREATE STOGROUP name VOLUMES(vol1, vol2). Tablespaces assigned to stogroups. DB2 manages space within. PRIQTY/SECQTY control allocation. Foundation of storage management.
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.
DB2
👁 0

Q: Explain access path selection

Answer:
Optimizer chooses access path based on statistics, predicates, indexes. Index scan vs tablespace scan. Join methods: nested loop, merge scan, hybrid. Sort operations. EXPLAIN reveals choice. Tuning influences path.
COBOL
👁 0

Q: How to work with OCCURS indexed tables?

Answer:
Define: 01 WS-TABLE. 05 WS-ENTRY OCCURS 100 INDEXED BY WS-IDX. 10 WS-NAME PIC X(20). 10 WS-VALUE PIC 9(5). Access: MOVE WS-NAME(WS-IDX) TO output. Search: SEARCH WS-ENTRY WHEN WS-NAME(WS-IDX) = 'VALUE' perform action.
DB2
👁 0

Q: What is profile table?

Answer:
Profile tables store user-specific optimizer settings. DSN_PROFILE_TABLE, DSN_PROFILE_ATTRIBUTES. Override defaults for specific statements. Use QUERYNO correlation. Advanced tuning technique.
DB2
👁 0

Q: What is zparm?

Answer:
ZPARM (DSNZPARMs) are DB2 installation parameters. Control system behavior, limits, defaults. DSNZPARM module loaded at startup. Changes need restart usually. Critical for performance and security tuning.
DB2
👁 0

Q: Explain thread management

Answer:
Thread is DB2 connection. Allied thread for TSO/batch. DBAT (database access thread) for DDF. Pool thread for efficient reuse. Max threads controlled by zparm. Monitor active threads.
COBOL
👁 0

Q: How to use intrinsic functions?

Answer:
COBOL-85 intrinsic functions: FUNCTION LENGTH(field), FUNCTION CURRENT-DATE, FUNCTION UPPER-CASE(field), FUNCTION NUMVAL(field), FUNCTION MOD(a,b), FUNCTION INTEGER-OF-DATE(date). Use in expressions or with COMPUTE. Return values only, no side effects.
COBOL
👁 0

Q: What is SYNCHRONIZED clause?

Answer:
SYNCHRONIZED aligns binary items on natural boundaries for efficient access. 01 WS-GROUP. 05 WS-CHAR PIC X. 05 WS-BINARY PIC S9(8) COMP SYNC. Adds slack bytes as needed. Can waste space but improves performance. RIGHT/LEFT options available.
VSAM
👁 0

Q: What causes VSAM file status 35?

Answer:
Status 35 is file not found. Check: DSN spelling, catalog entry exists, IDCAMS LISTCAT confirms. JCL DD name matches program. May need to define cluster first. Common for new programs.
COBOL
👁 0

Q: Explain ALTERNATE RECORD KEY

Answer:
ALTERNATE RECORD KEY defines secondary indexes for INDEXED files. SELECT file-name ALTERNATE RECORD KEY IS ALT-KEY WITH DUPLICATES. Allows access by multiple keys. DUPLICATES permits non-unique values. Define path in VSAM cluster.
COBOL
👁 0

Q: What is NATIVE-BCD?

Answer:
NATIVE-BCD is native binary-coded decimal, digits stored one per byte. Less efficient than COMP-3 but simpler to inspect in dumps. Some shops prefer for debugging. Available through compiler options or USAGE clause variations.
COBOL
👁 0

Q: What is VALUE clause?

Answer:
VALUE initializes data items. 05 WS-FLAG PIC X VALUE 'Y'. 05 WS-COUNT PIC 9(3) VALUE ZEROS. 05 WS-TABLE OCCURS 5 VALUE 'INIT'. Figurative constants: SPACES, ZEROS, LOW-VALUES, HIGH-VALUES, QUOTES. Cannot use with REDEFINES target.
COBOL
👁 0

Q: Explain BLANK WHEN ZERO clause

Answer:
BLANK WHEN ZERO displays spaces when numeric field contains zero. 05 WS-AMOUNT PIC Z(5)9.99 BLANK WHEN ZERO. Shows blank instead of 0.00. Only for numeric-edited or numeric display fields. Improves report readability.
VSAM
👁 0

Q: What is REPRO utility?

Answer:
REPRO copies VSAM files. IDCAMS REPRO INFILE(in) OUTFILE(out). Can REPRO between VSAM and sequential. Options: FROMKEY/TOKEY, SKIP/COUNT, REPLACE. Used for backup, conversion, extraction.
COBOL
👁 0

Q: How to define table with KEY?

Answer:
For binary search, tables need KEY: 05 WS-TABLE OCCURS 100 ASCENDING KEY WS-CODE INDEXED BY WS-IDX. 10 WS-CODE PIC X(5). 10 WS-DESC PIC X(20). SEARCH ALL requires sorted data per KEY. Multiple keys for complex sorts.
COBOL
👁 0

Q: What is ON SIZE ERROR?

Answer:
ON SIZE ERROR traps arithmetic overflow. COMPUTE X = A + B ON SIZE ERROR PERFORM error-handler END-COMPUTE. Also NOT ON SIZE ERROR for success. Must be enabled (TRUNC option). Prevents abends from overflow conditions.
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 POINTER data type?

Answer:
USAGE POINTER stores memory addresses. SET ptr TO ADDRESS OF data. Used with SET ADDRESS OF linkage-item TO ptr. CALL with BY REFERENCE returns addresses. Supports dynamic memory and chained structures.
VSAM
👁 0

Q: Explain BUFND and BUFNI

Answer:
BUFND is data buffer count, BUFNI is index buffer count. More buffers improve performance but use memory. JCL AMP='BUFNI=10,BUFND=20'. Default usually 2. Tune based on access pattern.
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.
COBOL
👁 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.
COBOL
👁 0

Q: How does PERFORM THRU work?

Answer:
PERFORM para-1 THRU para-2 executes from para-1 through para-2 inclusive. Paragraphs must be contiguous. Common: PERFORM 1000-INIT THRU 1000-EXIT where EXIT paragraph has only EXIT. Ensures cleanup code always runs.
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.
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.
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.
VSAM
👁 0

Q: How to delete records from KSDS?

Answer:
READ record with key. DELETE record-name. Status 00 if successful. In COBOL, DELETE uses primary key. Can delete current record after READ. Cannot delete from ESDS.
COBOL
👁 0

Q: Explain condition-name SET TRUE

Answer:
SET condition-name TO TRUE assigns the condition's VALUE. If 88 ACTIVE VALUE 'A', SET ACTIVE TO TRUE moves 'A' to parent. Cleaner than MOVE 'A' TO STATUS. Makes code self-documenting. Multiple values take first.
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 IDCAMS PRINT utility

Answer:
PRINT displays VSAM contents. PRINT INFILE(dd) CHARACTER/HEX/DUMP. FROMKEY/TOKEY limits range. COUNT limits records. Useful for debugging, verification. Output to SYSPRINT.
COBOL
👁 0

Q: How to define group level items?

Answer:
Group items contain subordinate items. 01 WS-DATE. 05 WS-YEAR PIC 9(4). 05 WS-MONTH PIC 99. 05 WS-DAY PIC 99. Group is alphanumeric regardless of contents. MOVE WS-DATE moves all 8 bytes. Reference individual or group.
COBOL
👁 0

Q: What is BLOCK CONTAINS clause?

Answer:
BLOCK CONTAINS defines blocking factor. BLOCK CONTAINS 10 RECORDS or BLOCK CONTAINS 800 CHARACTERS. 0 RECORDS means system-determined. Affects I/O performance-larger blocks fewer I/Os. Must match JCL/VSAM definition.
VSAM
👁 0

Q: What is DEFINE PATH?

Answer:
PATH associates AIX for access. DEFINE PATH(NAME(path.name) PATHENTRY(aix.name)). Required to access via AIX. Open PATH in program, not AIX directly. UPDATE option allows updates via path.
COBOL
👁 0

Q: What is LABEL RECORDS clause?

Answer:
LABEL RECORDS specifies header/trailer labels. STANDARD (default) for labeled tapes. OMITTED for unlabeled or disk. Now less relevant-mostly tapes. Compiler may accept but ignore for disk files. Required in some older programs.
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.
COBOL
👁 0

Q: How to use SUBTRACT CORRESPONDING?

Answer:
SUBTRACT CORRESPONDING subtracts matching fields. SUBTRACT CORR group-1 FROM group-2. Each matching numeric field in group-2 decreased by corresponding group-1 value. Use ROUNDED and SIZE ERROR options. Limited to numeric fields.
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.
VSAM
👁 0

Q: How to access AIX?

Answer:
Open PATH to AIX, not base cluster. READ via alternate key. Can browse by alternate key sequence. Updates depend on PATH UPDATE option. Non-unique AIX returns first, then READ NEXT for others.
COBOL
👁 0

Q: What is CURSOR IS clause?

Answer:
In Screen Section, CURSOR IS field-name positions cursor. ACCEPT screen-name WITH CURSOR. Runtime positions to specified field. Can set dynamically. Used in interactive COBOL (CICS typically handles cursor differently).
COBOL
👁 0

Q: How to handle negative numbers?

Answer:
Sign stored in PIC S9. SIGN IS LEADING/TRAILING SEPARATE CHARACTER for explicit sign byte. COMP-3 sign in low nibble. Display: S9(5)- shows trailing minus. +9(5) shows sign always. DB/CR for accounting format.
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.
COBOL
👁 0

Q: Explain ENTRY statement

Answer:
ENTRY creates alternate entry point in subprogram. ENTRY 'ALTNAME' USING params. Called program appears under different name. Useful for multiple functions in one load module. Each ENTRY has own parameters. Not standard-use carefully.
VSAM
👁 0

Q: What causes file status 34?

Answer:
Status 34 is boundary violation or record too large. Record exceeds defined maximum. Check RECORDSIZE definition. May have wrong record format. Truncation not automatic.
VSAM
👁 0

Q: Explain INHIBIT attribute

Answer:
INHIBIT prevents certain operations. ALTER INHIBITSOURCE prevents REPRO from. ALTER INHIBITTARGET prevents REPRO to. Used for protection. PERMIT removes restriction.
COBOL
👁 0

Q: What is SERVICE RELOAD?

Answer:
SERVICE RELOAD refreshes segmented program overlays. Forces segment reload from disk. Rarely needed with virtual storage. From overlay management era. May affect performance. Better to restructure program than use frequently.
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.
COBOL
👁 0

Q: What is TITLE statement?

Answer:
TITLE 'Page Header' sets listing page headers. Appears on each page of compilation listing. Useful for documentation. Multiple TITLES change as encountered. After IDENTIFICATION DIVISION start. Compiler directive, not executable.
VSAM
👁 0

Q: How to handle multi-string access?

Answer:
STRNO parameter defines concurrent requests. More strings for high-activity files. Costs memory per string. JCL: AMP='STRNO=5'. Default usually 1. Batch usually needs 1-2.
COBOL
👁 0

Q: How to define OCCURS ASCENDING?

Answer:
05 TABLE OCCURS 100 ASCENDING KEY IS CODE-FIELD INDEXED BY IDX. 10 CODE-FIELD PIC X(5). 10 DATA-FIELD PIC X(20). ASCENDING means lower values first. Required for SEARCH ALL. DESCENDING also available. Key must be within occurrence.
VSAM
👁 0

Q: Explain UNIQUE vs SUBALLOCATION

Answer:
UNIQUE cluster gets own VSAM dataspace. SUBALLOCATION shares space with others. SUBALLOCATION deprecated, use UNIQUE. Modern systems prefer UNIQUE for isolation.
COBOL
👁 0

Q: Explain IDENTIFICATION DIVISION

Answer:
IDENTIFICATION DIVISION identifies program. PROGRAM-ID required (up to 8 chars for compatibility). AUTHOR, DATE-WRITTEN, DATE-COMPILED, REMARKS are documentation. INSTALLATION for deployment info. Only PROGRAM-ID affects compilation.
COBOL
👁 0

Q: What is WORKING-STORAGE SECTION?

Answer:
WORKING-STORAGE SECTION declares program variables. Initialized at program load. Retains values between CALL invocations unless INITIAL program. Define all work areas, flags, counters, tables here. 01-49 levels for data, 77 for independent items.
VSAM
👁 0

Q: How to recover damaged VSAM?

Answer:
Run VERIFY first. Then REPRO if possible. May need forward/backward recovery from logs. EXAMINE checks for problems. May need DELETE and restore from backup.
VSAM
👁 0

Q: What is LINEAR dataset?

Answer:
LINEAR VSAM is byte-addressable. No record structure. Used by DB2 tablespaces, system software. DEFINE CLUSTER LINEAR. Accessed via DIV (Data-in-Virtual) or memory mapping.
VSAM
👁 0

Q: Explain EXPORT utility

Answer:
EXPORT creates portable copy with catalog info. IDCAMS EXPORT ds.name OUTFILE(dd). Includes cluster definition. IMPORT recreates on target system. Good for migration.
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.
VSAM
👁 0

Q: How to handle status 96?

Answer:
Status 96 is no DD statement for file. Check JCL has correct DD name. May be dynamic allocation failure. DD name must match SELECT ASSIGN. Case sensitive in some systems.
VSAM
👁 0

Q: What is DEFINE MODEL?

Answer:
MODEL copies attributes from existing cluster. DEFINE CLUSTER(NAME(new) MODEL(existing)). Only copies definition, not data. Useful for creating similar clusters. Can override specific parameters.
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: 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.
COBOL
👁 0

Q: Explain FUNCTION LENGTH

Answer:
FUNCTION LENGTH returns byte count. FUNCTION LENGTH(field-name). For group items, includes all subordinates. For variable OCCURS, actual current length. Use in COMPUTE, MOVE, comparisons. Often used with STRING pointer initialization.
COBOL
👁 0

Q: What is PROCEDURE-POINTER?

Answer:
USAGE PROCEDURE-POINTER stores program addresses. SET proc-ptr TO ENTRY 'PROGNAME'. CALL proc-ptr. Enables dynamic program selection. Similar to function pointers. Used in table-driven designs. Check ADDRESS OF for validity.
COBOL
👁 0

Q: What is RETURN-CODE register?

Answer:
RETURN-CODE sets program completion status. MOVE 0 TO RETURN-CODE (success). MOVE 8 TO RETURN-CODE (warning). Passed to caller/JCL. Check RETURN-CODE after CALL. LE uses CEE3STS for detailed status.
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.
JCL
👁 0

Q: How does DISP parameter work?

Answer:
DISP=(status,normal-end,abnormal-end). Status: NEW/OLD/SHR/MOD. Normal-end: DELETE/KEEP/PASS/CATLG/UNCATLG. Abnormal-end: same options. Example: DISP=(NEW,CATLG,DELETE) creates new, catalogs if OK, deletes if abend. MOD appends or creates if not exists.
VSAM
👁 0

Q: What is ORDERED attribute?

Answer:
ORDERED on DEFINE allocates volumes in specified order. Without ORDERED, system chooses. ORDERED ensures predictable allocation. May be important for performance tuning.
JCL
👁 0

Q: What causes JCL error S013-14?

Answer:
S013-14 is member not found in PDS. Check: DD name matches program expectation, member name spelled correctly, library in concatenation contains member, DISP allows access. Use LISTDS or ISPF 3.4 to verify member exists.
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.
VSAM
👁 0

Q: What is CONTROLINTERVALSIZE?

Answer:
CONTROLINTERVALSIZE sets CI size explicitly. CONTROLINTERVALSIZE(4096). Powers of 2, max 32768. Let system default usually. Larger CI better sequential, worse random. Match to workload.
JCL
👁 0

Q: What is STEPLIB vs JOBLIB?

Answer:
JOBLIB at job level provides program libraries for all steps. STEPLIB at step level overrides JOBLIB for that step. STEPLIB takes precedence. Both searched before LINKLIST. Multiple libraries concatenated. DDN must be STEPLIB/JOBLIB exactly.
VSAM
👁 0

Q: How to switch file for restart?

Answer:
IDCAMS DELETE/DEFINE or REUSE attribute. REUSE allows OPEN OUTPUT reset. Alternative: JCL with DISP=(NEW,CATLG,DELETE) pattern. Checkpoints may need restart considerations.
JCL
👁 0

Q: What is TYPRUN parameter?

Answer:
TYPRUN options: SCAN (syntax check, no execution), HOLD (submit but hold), COPY (copy JCL to SYSOUT), JCLHOLD (hold with JCL). TYPRUN=SCAN validates JCL without running. Useful for testing complex JCL before production.
VSAM
👁 0

Q: What is CATALOG vs CATACB?

Answer:
CATALOG parameter specifies which catalog to use. CATALOG(catalog.name) on DEFINE. CATACB no longer used. Modern systems use aliases to route to correct catalog.
VSAM
👁 0

Q: How to create temporary VSAM?

Answer:
Use REUSE attribute. Or define/delete in same job. Or use GDG-like naming. JCL doesn't support && for VSAM. IDCAMS DELETE at job end. Cannot be truly temporary like sequential.
JCL
👁 0

Q: What causes S322 abend?

Answer:
S322 is job/step time exceeded. Check TIME parameter on JOB/EXEC. Causes: infinite loop, too much data, insufficient time allocated. Fix: increase TIME, optimize program, check data volumes. TIME=1440 is no limit (24 hours).
VSAM
👁 0

Q: What is file status 47?

Answer:
Status 47 is READ attempted but file not open input. OPEN mode doesn't match operation. Must OPEN INPUT or I-O for READ. Check file OPEN statement and mode.
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.
VSAM
👁 0

Q: How to resize VSAM?

Answer:
Cannot resize directly. REPRO out, DELETE, DEFINE larger, REPRO back. Or ALTER to add secondary space/volumes. Planning important - define adequate size initially.
VSAM
👁 0

Q: How to access VSAM via CICS?

Answer:
Define FILE in CICS FCT (File Control Table). Or RDO DEFINE FILE. EXEC CICS READ FILE. VSAM must be closed to batch when CICS owns. NSRV or LSR buffering. BROWSE for sequential.
JCL
👁 0

Q: What is MSGLEVEL parameter?

Answer:
MSGLEVEL=(statements,messages). Statements: 0=JOB only, 1=all JCL, 2=input JCL. Messages: 0=completion only, 1=all including allocation. MSGLEVEL=(1,1) shows everything. MSGLEVEL=(0,0) minimal output. Affects JESMSGLG.
JCL
👁 0

Q: Explain referback DD

Answer:
Referback references earlier DD: DSN=*.STEP1.DDNAME or DSN=*.DDNAME (same step). Copies DSN and DISP. Can override other parameters. VOL=REF=*.STEP1.DD copies volume. Useful for chained processing.
JCL
👁 0

Q: How to define temporary dataset?

Answer:
Temporary datasets: DSN=&&TEMP or omit DSN. Exist for job duration only. Not cataloged. Passed between steps with DISP=PASS. Automatically deleted at job end. Example: //WORK DD DSN=&&TEMP,UNIT=SYSDA,SPACE=(CYL,5)
VSAM
👁 0

Q: How to define ESDS?

Answer:
DEFINE CLUSTER(NAME(ds.name) NONINDEXED RECORDSIZE(avg max)) DATA(NAME(ds.data) CYLINDERS(10 2)). NONINDEXED means ESDS. No KEYS or INDEX components. Access by RBA only.
JCL
👁 0

Q: Explain SMS-managed storage

Answer:
SMS (Storage Management Subsystem) manages dataset placement. Specify STORCLAS, MGMTCLAS, DATACLAS in DD. DATACLAS sets DCB attributes, STORCLAS controls placement, MGMTCLAS defines retention. SMS uses ACS routines for assignment.
VSAM
👁 0

Q: What is LSR?

Answer:
LSR (Local Shared Resources) pool shares buffers across VSAM files. Efficient memory use. MACRF=LSR in JCL or ACB. CICS uses LSR. Define pool with BLDVRP macro.
JCL
👁 0

Q: What is EXEC PGM vs PROC?

Answer:
EXEC PGM=name executes program directly. EXEC procname or EXEC PROC=procname invokes cataloged procedure. EXEC name where 'name' exists as PROC takes precedence. Procedures can be overridden with PROC.STEP.DD syntax.
VSAM
👁 0

Q: Explain DEFINE CLUSTER syntax

Answer:
DEFINE CLUSTER(NAME(ds) ...) DATA(NAME(ds.data) ...) INDEX(NAME(ds.index) ...). CLUSTER level: type, SHAREOPTIONS. DATA level: space, RECORDSIZE. INDEX level: space for KSDS index.
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 use IDCAMS conditionally?

Answer:
IF LASTCC/MAXCC condition THEN command. Example: IF MAXCC < 8 THEN REPRO... SET MAXCC/LASTCC resets codes. Allows conditional processing in IDCAMS job steps.
JCL
👁 0

Q: What causes S806 abend?

Answer:
S806 is module not found. Check: program name spelling, STEPLIB/JOBLIB correct, library exists and contains module, module link-edited properly, aliases defined. S806-04 means not in JOBLIB/STEPLIB/LINKLIST.
VSAM
👁 0

Q: What is REPLICATE option?

Answer:
REPLICATE duplicates sequence set on each track. Each track has own copy of sequence set index. Reduces contention. Obsolete with modern systems. Uses more space.
JCL
👁 0

Q: Explain RESTART parameter

Answer:
RESTART=stepname restarts job at specified step. RESTART=(stepname,checkid) for checkpointed restart. Use after abend to continue from failure point. Prior steps skipped. Data must be recoverable or recreatable.
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.
JCL
👁 0

Q: What is IEFBR14?

Answer:
IEFBR14 is null program (Branch to Register 14 = return). Returns immediately. Used for dataset management: create, delete, catalog datasets. //DELETE EXEC PGM=IEFBR14 //DD DD DSN=name,DISP=(MOD,DELETE). Common for housekeeping.
JCL
👁 0

Q: How to use INCLUDE statement?

Answer:
INCLUDE MEMBER=name inserts JCL from JCLLIB member. Processed at conversion time. Can contain any JCL statements. Modular JCL design. INCLUDE can contain INCLUDE. SET statements affect included members.
JCL
👁 0

Q: What is CLASS parameter?

Answer:
CLASS assigns job to execution class. CLASS=A on JOB card. Initiators start jobs by class. Determines execution priority, resources. Installations define class characteristics. Multiple classes: CLASS=AB (not common). JES2/JES3 interpret differently.
JCL
👁 0

Q: Explain DFSORT utility

Answer:
DFSORT sorts/merges files. SYSIN has SORT FIELDS=(1,10,CH,A). SORTIN=input, SORTOUT=output. Options: INCLUDE/OMIT for filtering, OUTREC/INREC for reformatting, SUM for summarization. ICETOOL provides extended functions.
JCL
👁 0

Q: What causes S913 abend?

Answer:
S913 is security violation. Not authorized to dataset or resource. Check: RACF/ACF2/TopSecret permissions, dataset profile, user authority level. S913-38 means insufficient access. Contact security administrator.
JCL
👁 0

Q: How to define PDS?

Answer:
//PDSOUT DD DSN=MY.PDS,DISP=(NEW,CATLG),SPACE=(CYL,(5,1,10)),DCB=(RECFM=FB,LRECL=80). Directory blocks (10) required for PDS. Or DSNTYPE=LIBRARY for PDSE. PDSE allows dynamic directory expansion, member-level sharing.
JCL
👁 0

Q: What is IDCAMS utility?

Answer:
IDCAMS manages VSAM and catalog. Commands: DEFINE CLUSTER, DELETE, REPRO, LISTCAT, ALTER, PRINT. //SYSIN DD * has commands. REPRO copies VSAM files. DEFINE creates VSAM clusters. IF/THEN/ELSE for conditional processing.
CICS
👁 0

Q: How to SEND MAP to terminal?

Answer:
EXEC CICS SEND MAP(mapname) MAPSET(mapsetname) FROM(symbolic-map) ERASE. CURSOR option positions cursor. FREEKB unlocks keyboard. ALARM sounds alarm. MAPONLY sends without data. DATAONLY sends only modified fields.
CICS
👁 0

Q: What is RECEIVE MAP?

Answer:
EXEC CICS RECEIVE MAP(name) MAPSET(mapset) INTO(symbolic-map). Gets terminal input. Modified fields only (MDT). Check EIBAID for key pressed. MAPFAIL if no data. Symbolic map populated with input.
JCL
👁 0

Q: How does IEFBR14 delete work?

Answer:
//DEL EXEC PGM=IEFBR14 //DD DD DSN=file,DISP=(MOD,DELETE). If file exists, DISP=(MOD,DELETE) deletes. If not exists, MOD creates then deletes (empty). Or DISP=(OLD,DELETE) fails if not exists. Common pattern for cleanup.
JCL
👁 0

Q: What is UNIT parameter?

Answer:
UNIT specifies device type. UNIT=SYSDA (direct access), UNIT=TAPE, UNIT=3390. UNIT=AFF=ddname shares device. UNIT=(SYSDA,2) allocates 2 volumes. SMS may override. UNIT=VIO for virtual I/O (memory only).
CICS
👁 0

Q: How to handle MAPFAIL?

Answer:
MAPFAIL occurs when RECEIVE MAP finds no modified data. Handle: EXEC CICS RECEIVE MAP ... RESP(resp). IF resp = DFHRESP(MAPFAIL). User pressed Enter without typing. May need to redisplay or handle appropriately.
JCL
👁 0

Q: Explain JES2 control cards

Answer:
JES2 cards start with /*. /*JOBPARM limits resources. /*ROUTE sends output. /*OUTPUT JESDS specifies JES output. /*PRIORITY sets priority. Process by JES2, not passed to job. Position after JOB card before first EXEC.
CICS
👁 0

Q: What is ASSIGN command?

Answer:
ASSIGN retrieves system values. EXEC CICS ASSIGN USERID(ws-user) FACILITY(ws-term). Other options: SYSID, ABCODE, PROGRAM. Gets runtime environment info. Useful for audit, conditional processing.
JCL
👁 0

Q: What causes NOTCAT error?

Answer:
NOTCAT means dataset not in catalog. Check: correct DSN spelling, dataset was cataloged, catalog searched is correct. Use DISP=SHR only for cataloged datasets. DISP=OLD with VOL=SER for uncataloged. LISTCAT verifies catalog entry.
CICS
👁 0

Q: Explain START command

Answer:
START schedules transaction for later. EXEC CICS START TRANSID(trans) AFTER HOURS(1) FROM(data). INTERVAL or TIME for specific time. Data passed in channel/container or FROM/LENGTH. Background processing.
CICS
👁 0

Q: What is GETMAIN?

Answer:
GETMAIN allocates temporary storage. EXEC CICS GETMAIN SET(pointer) LENGTH(size) INITIMG(X'00'). Returns pointer. Use for dynamic memory. FREEMAIN releases. SHARED for multi-task access. Automatic cleanup on task end.
JCL
👁 0

Q: What is VOL parameter?

Answer:
VOL specifies volume. VOL=SER=PACK01 specific volume. VOL=REF=*.STEP.DD copies volume from previous. VOL=(,RETAIN) keeps volume mounted. VOL=(,,,5) allows 5 volumes. SER overrides SMS placement. Use cautiously.
JCL
👁 0

Q: Explain LIKE parameter

Answer:
LIKE copies DCB attributes from existing dataset. DCB=*.STEP1.DD or LIKE=catalog.dataset. Simplifies JCL. Model dataset must exist or be allocated earlier. Override specific attributes: DCB=(LIKE=...,LRECL=100).
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.
JCL
👁 0

Q: What is DFSMS?

Answer:
DFSMS (Data Facility Storage Management Subsystem) automates storage management. Components: SMS, HSM (migration), DFRMM (tape). ACS routines assign classes. Reduces JCL complexity. DATACLAS defines data characteristics.
CICS
👁 0

Q: Explain HANDLE CONDITION

Answer:
HANDLE CONDITION sets error label. EXEC CICS HANDLE CONDITION NOTFND(para-notfnd). Jumps to label on condition. PUSH/POP HANDLE for nesting. Obsolete - prefer RESP option. Still seen in old code.
CICS
👁 0

Q: What is HANDLE ABEND?

Answer:
HANDLE ABEND traps abends. EXEC CICS HANDLE ABEND PROGRAM(abend-prog) or LABEL(abend-para). Allows cleanup before termination. CANCEL removes handler. Use for graceful error handling.
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: What is DELETE command?

Answer:
DELETE removes record. EXEC CICS DELETE FILE(name) RIDFLD(key). Or after READ UPDATE: DELETE FILE(name). KEYLENGTH/GENERIC for range delete. NOTFND if key missing. NUMREC returns count deleted.
JCL
👁 0

Q: What is ACCTRG parameter?

Answer:
ACCT (accounting) provides billing information. On JOB card: ACCT=(account-number,additional-info). Installation-defined format. Passed to SMF for accounting records. May affect job processing priority.
JCL
👁 0

Q: Explain DD SYSOUT statement

Answer:
SYSOUT=class routes output to JES spool. SYSOUT=* uses MSGCLASS from JOB. SYSOUT=A specific class. Additional: COPIES=2, DEST=node.userid, FCB=fcb-name. Held output: HOLD=YES. OUTPUT statement for complex options.
JCL
👁 0

Q: What is INTRDR?

Answer:
SYSOUT=(class,INTRDR) submits output as new job. Internal reader. Programs can submit jobs dynamically. Class often B. Output must be valid JCL. Used for job scheduling, dynamic workflows.
CICS
👁 0

Q: Explain RETURN command

Answer:
RETURN ends program or task. EXEC CICS RETURN returns to caller. EXEC CICS RETURN TRANSID(next) COMMAREA(data) for pseudo-conv. IMMEDIATE for no COMMAREA. End of logical unit.
JCL
👁 0

Q: How does MERGE work?

Answer:
DFSORT MERGE combines pre-sorted files. SORTIN01, SORTIN02, etc. inputs. MERGE FIELDS=(1,10,CH,A). Files must be sorted on merge key. Output one sorted file. Preserves input order for equal keys.
CICS
👁 0

Q: What is CEDA?

Answer:
CEDA defines CICS resources online. CEDA DEFINE PROGRAM(pgm) GROUP(grp). Resources: TRANSACTION, PROGRAM, FILE, etc. CEDA INSTALL activates. CEDA VIEW displays. RDO (Resource Definition Online).
CICS
👁 0

Q: What is SET command?

Answer:
SET modifies resource state. EXEC CICS SET FILE(name) OPEN/CLOSED. SET TRANSACTION ENABLED/DISABLED. Requires authority. Dynamic resource management. Change status without CEDA.
JCL
👁 0

Q: What is KEYLEN parameter?

Answer:
KEYLEN specifies key length for new dataset. DCB parameter for VSAM-like. Or VSAM DEFINE CLUSTER KEYS(length offset). Length 1-255. Required for indexed organization. Offset from 0 or 1 depending on context.
JCL
👁 0

Q: How to handle multivolume datasets?

Answer:
VOL=(,,,n) allows n volumes. SPACE with volume count. SMS handles multivolume automatically. DISP=MOD extends to new volume. DATACLAS can specify multivolume. Large datasets need multivolume planning.
CICS
👁 0

Q: What is MRO?

Answer:
MRO (Multi-Region Operation) connects CICS regions. Function shipping sends requests to owning region. Transaction routing sends terminal to AOR. DPL (Distributed Program Link) for remote LINK.
CICS
👁 0

Q: How to handle NOTFND condition?

Answer:
NOTFND means record not found. Check RESP: IF ws-resp = DFHRESP(NOTFND). Or HANDLE CONDITION NOTFND(para). Common for READ/DELETE. Handle gracefully - display message, take action.
JCL
👁 0

Q: What is CNTL statement?

Answer:
CNTL groups control statements. //name CNTL establishes scope. //name ENDCNTL ends it. Used with OUTPUT or other complex statements. Provides modularity. Can be referenced by name from multiple DDs.
JCL
👁 0

Q: What causes S837 abend?

Answer:
S837 is end of volume and no more volumes available. Dataset needs more space. Solutions: allocate larger primary/secondary, increase volume count, extend dataset. IEFBR14 can extend with MOD DISP.
JCL
👁 0

Q: Explain LABEL parameter

Answer:
LABEL=(n,type) specifies tape label info. n=file sequence number. Type: SL=standard, NL=no labels, SUL=standard user. LABEL=(2,SL) is second file on standard label tape. EXPDT/RETPD for retention.
CICS
👁 0

Q: What is CEMT?

Answer:
CEMT inquires and sets resources. CEMT I TASK shows tasks. CEMT S FILE(name) OPEN opens file. Master terminal transaction. Operational control. I for inquire, S for set.
JCL
👁 0

Q: What is RETPD parameter?

Answer:
RETPD=nnn specifies retention days. Cannot delete until expired. EXPDT=yyddd for specific date. EXPDT=99365 or RETPD=9999 for permanent. Security software may override. Affects tape and disk datasets.
CICS
👁 0

Q: Explain recoverable resources

Answer:
Recoverable resources participate in syncpoint. File with RECOVERY(YES). TS MAIN with AUX. Changes backed out on rollback. Non-recoverable not protected. Define appropriate for data.
JCL
👁 0

Q: How to allocate PDSE?

Answer:
DSNTYPE=LIBRARY creates PDSE. Better than PDS: dynamic directory, member-level sharing, no compression needed. Or DATACLAS with PDSE attribute. Cannot convert back to PDS easily. Recommended for new PDSes.
CICS
👁 0

Q: What is CEDF?

Answer:
CEDF is execution diagnostic facility. Debug tool. CEDF ON intercepts EXEC CICS. Step through commands. Display/modify data. Powerful debugging. CEDF transaction-id starts debug.
JCL
👁 0

Q: What is SPIN parameter?

Answer:
SPIN=UNALLOC releases output immediately on step/job end. SPIN=(UNALLOC,step) at step end. Without SPIN, output held until job completes. Allows viewing long job output early. On DD SYSOUT statement.
JCL
👁 0

Q: What is AMP parameter?

Answer:
AMP specifies VSAM buffer parameters. AMP='BUFNI=8,BUFND=4' for index/data buffers. AMP='AMORG' for VSAM organization. OPTCD for options. Overrides VSAM cluster definitions for this run. Affects performance.
JCL
👁 0

Q: Explain DEST parameter?

Answer:
DEST routes output. DEST=nodeid.userid sends to remote. DEST=LOCAL for local printer. On OUTPUT statement or SYSOUT. JESDS respects DEST. Can be printer name or user. Network delivery support.
CICS
👁 0

Q: Explain RRN in CICS

Answer:
RRN (Relative Record Number) for RRDS files. RIDFLD contains RRN, not key. Numeric 1-based slot number. RRN option on file commands. Access by position not content.
JCL
👁 0

Q: How to use JCLTEST?

Answer:
TYPRUN=JCLTEST validates JCL without execution. Checks syntax, dataset names, authorization. Some systems support TYPRUN=SCAN which is similar. Submit job and check messages. No resources actually allocated.
JCL
👁 0

Q: How to override PROC DD?

Answer:
//procstep.ddname DD overrides. //MYSTEP.SYSOUT DD SYSOUT=H changes SYSOUT class. Can add parameters or replace entirely. Add new DD: //MYSTEP.NEWDD DD DSN=... Position after EXEC procname.
CICS
👁 0

Q: What is journaling in CICS?

Answer:
Journaling records activity. EXEC CICS JOURNAL JFILEID(id) FROM(data). For recovery, audit. Define journal file. Can be automatic or explicit. System journal for CICS recovery.
CICS
👁 0

Q: What is BIF DEEDIT?

Answer:
BIF DEEDIT removes edit characters. EXEC CICS BIF DEEDIT FIELD(data) LENGTH(len). Converts edited numeric to raw. Removes $, commas, etc. Useful for BMS numeric input.
CICS
👁 0

Q: Explain ASKTIME ABSTIME

Answer:
ABSTIME is packed decimal timestamp. Microseconds since 1/1/1900. ASKTIME returns current. FORMATTIME converts to readable. Use for calculations, comparisons. Full precision timing.
CICS
👁 0

Q: What is MAPFAIL condition?

Answer:
MAPFAIL when RECEIVE MAP gets no data. Terminal timeout or clear. Handle: check RESP for DFHRESP(MAPFAIL). May need to resend map or handle timeout.
JCL
👁 0

Q: Explain DEFINE PATH for VSAM?

Answer:
PATH provides alternate access to VSAM cluster via alternate index. IDCAMS: DEFINE PATH NAME(path.name) PATHENTRY(aix.name). Reference PATH in JCL, not AIX directly. Allows secondary key access.
CICS
👁 0

Q: What is FCT?

Answer:
FCT (File Control Table) defines files. Now RDO FILE. Maps name to VSAM cluster. Status, options, recovery. CEDA DEFINE FILE creates. LSR/NSR buffering options.
JCL
👁 0

Q: Explain EXPDT parameter?

Answer:
EXPDT=yyddd or EXPDT=yyyyddd expiration date. After this date, dataset can be deleted. EXPDT=99365 effectively permanent (1999 or 2099). RETPD alternative. Security software may enforce or override.
CICS
👁 0

Q: Explain CICS RECEIVE without MAP

Answer:
RECEIVE INTO without MAP gets raw terminal data. EXEC CICS RECEIVE INTO(area) LENGTH(len). For non-BMS screens. AID in EIBAID. Raw data stream. Lower level than BMS.
JCL
👁 0

Q: How to use DYNAM in JCL?

Answer:
Dynamic allocation via BPXWDYN or TSO ALLOC. From program: call BPXWDYN with parm string. JCL can't do dynamic allocation itself. Programs allocate as needed. More flexible than static JCL allocation.
JCL
👁 0

Q: What causes NOT DEFINED TO CATALOG?

Answer:
Dataset exists on volume but not cataloged. Solutions: DISP=OLD,VOL=SER=volume, or catalog with IDCAMS DEFINE NONVSAM. Check correct catalog alias. May need ICF catalog update.
JCL
👁 0

Q: Explain STORCLAS parameter?

Answer:
STORCLAS assigns SMS storage class. STORCLAS=classname. Determines placement, management, backup. ACS routines may assign. Defines performance characteristics. Installation-defined classes.
CICS
👁 0

Q: What is MAPONLY?

Answer:
MAPONLY sends map without data. EXEC CICS SEND MAP MAPONLY. Displays initial screen. No symbolic map data. Fast initial display. Use when no data to populate.
JCL
👁 0

Q: What is MGMTCLAS parameter?

Answer:
MGMTCLAS assigns SMS management class. Controls migration, backup, retention. MGMTCLAS=classname. Defines data lifecycle. HSM uses management class. Installation-defined policies.
CICS
👁 0

Q: What is PAGING option?

Answer:
PAGING breaks large output. EXEC CICS SEND MAP PAGING. User navigates pages. Autopaging available. Terminal paging commands. For long reports on screen.
JCL
👁 0

Q: What causes IEF452I error?

Answer:
IEF452I is symbolic substitution error. Symbol not defined or wrong format. Check SET statements, PROC defaults. Verify symbol names match. May be missing &. Case matters for some systems.
JCL
👁 0

Q: How to use MODIFY parameter?

Answer:
MODIFY references FCB image. MODIFY=(fcb,trc) on OUTPUT. FCB controls forms. TRC is table reference character. For print formatting. Installation-defined FCBs. Used with special forms.
CICS
👁 0

Q: How to set field attributes?

Answer:
Modify A field in symbolic map. DFHBMUNP=unprotected, DFHBMPRO=protected, DFHBMBRY=bright. Move to field-A before SEND. Dynamic attribute control.
CICS
👁 0

Q: What is CONVERSE?

Answer:
CONVERSE combines SEND and RECEIVE. EXEC CICS CONVERSE FROM(out) INTO(in). One command for both. Simpler for simple screens. Less control than separate commands.
DB2
👁 0

Q: How to handle -818 SQLCODE?

Answer:
-818 is timestamp mismatch between plan and DBRM. DBRM precompiled after last BIND. Solutions: REBIND plan/package, ensure DBRM library current, check promotion procedures. Timestamp in DBRM must match bound plan.
CICS
👁 0

Q: What is LENGERR?

Answer:
LENGERR is length error. Data too large for area, or length specification wrong. Check LENGTH values. Common on RECEIVE. Ensure adequate receiving field.
DB2
👁 0

Q: What is EXPLAIN and how to use it?

Answer:
EXPLAIN analyzes query access path. EXPLAIN PLAN SET QUERYNO=1 FOR SELECT... Results in PLAN_TABLE. Shows index usage, join method, sort operations. Use for performance tuning. Review ACCESSTYPE, MATCHCOLS, PREFETCH columns.
CICS
👁 0

Q: How to handle ILLOGIC?

Answer:
ILLOGIC is VSAM logic error. Unusual error in file access. Check file status elsewhere. May indicate file corruption. Rare - investigate thoroughly.
DB2
👁 0

Q: What causes -911 SQLCODE?

Answer:
-911 is deadlock or timeout. Two processes waiting for each other's resources. Solutions: consistent lock order, shorter transactions, COMMIT frequently, appropriate isolation level. -913 is similar (deadlock victim). Retry transaction.
CICS
👁 0

Q: What is QIDERR?

Answer:
QIDERR is queue ID error. TS/TD queue not found. Check queue name. May need to create first (TS) or define (TD). Spelling error common.
DB2
👁 0

Q: Explain DB2 isolation levels

Answer:
UR (Uncommitted Read) reads dirty data. CS (Cursor Stability) locks current row. RS (Read Stability) locks all accessed rows. RR (Repeatable Read) locks range, prevents phantom. Higher isolation = more consistency but more locking. CS most common.
CICS
👁 0

Q: Explain ITEMERR condition

Answer:
ITEMERR is item error in TS. Item number invalid. Out of range or doesn't exist. ITEM 1 is first. Check NUMITEMS. Common in READQ TS.
CICS
👁 0

Q: What is PGMIDERR?

Answer:
PGMIDERR is program not found. LINK/XCTL to undefined program. Check RDO PROGRAM definition. Or spelling. Must be defined and installed.
CICS
👁 0

Q: What is DOCUMENT?

Answer:
DOCUMENT builds dynamic content. CREATE, SET, INSERT commands. For web responses. Template-based output. Modern CICS web support. Replace BMS for web.
DB2
👁 0

Q: Explain DECLARE CURSOR syntax

Answer:
DECLARE cursor-name CURSOR FOR SELECT... WITH HOLD keeps open after COMMIT. WITH RETURN returns to caller. FOR UPDATE OF allows positioned update. FOR READ ONLY optimizes read. ORDER BY for sorting. Static or dynamic declaration.
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.
DB2
👁 0

Q: What is SQLCA structure?

Answer:
SQLCA (SQL Communication Area) contains execution results. SQLCODE for return code. SQLERRM for message. SQLERRD(3) for rows affected. SQLWARN for warnings. INCLUDE SQLCA in WORKING-STORAGE. Check after each SQL statement.
DB2
👁 0

Q: How to handle -803 SQLCODE?

Answer:
-803 is duplicate key violation. Primary key or unique index constraint. Check SQLERRD(3) for index ID. Solutions: check data, use IGNORE_DUPLICATE, handle in program logic. May indicate data quality issue.
CICS
👁 0

Q: How to use DOCTEMPLATE?

Answer:
DOCTEMPLATE defines dynamic content. Create template with symbols. Insert data at runtime. EXEC CICS DOCUMENT SET/INSERT. For generating responses.
CICS
👁 0

Q: What is CICS asynchronous processing?

Answer:
RUN TRANSID for async execution. EXEC CICS RUN TRANSID(xx) CHILD. FETCH CHILD waits for completion. Modern async pattern. Alternative to START.
DB2
👁 0

Q: How to do paging with DB2?

Answer:
Use FETCH FIRST n ROWS ONLY with OFFSET or ROW_NUMBER(). Modern: SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER BY col) AS rn, t.* FROM table t) WHERE rn BETWEEN start AND end. Or cursor with FETCH FIRST.
CICS
👁 0

Q: How to handle CICS security?

Answer:
RACF/ACF2 integration. EXEC CICS QUERY SECURITY. SIGNON establishes identity. VERIFY checks resource access. XFCT/XPPT exits. Secure by default.
DB2
👁 0

Q: What is SPUFI?

Answer:
SPUFI (SQL Processing Using File Input) is TSO tool for interactive SQL. Input dataset with SQL statements. Output shows results. Good for testing queries, DDL, quick data checks. Not for production processing.
DB2
👁 0

Q: What is BIND command?

Answer:
BIND creates plan/package from DBRM. BIND PLAN(name) MEMBER(dbrm). Options: ISOLATION, VALIDATE, EXPLAIN. REBIND updates existing. BIND PACKAGE for packages. Precompile creates DBRM, BIND makes executable.
VSAM
👁 0

Q: What is DEFINE ALTERNATEINDEX syntax?

Answer:
DEFINE AIX(NAME(aix.name) RELATE(base.cluster) KEYS(len offset)) DATA(NAME(aix.data)) INDEX(NAME(aix.index)). UNIQUEKEY or NONUNIQUEKEY. UPGRADE to maintain automatically. Must DEFINE PATH and BLDINDEX after.
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.
VSAM
👁 0

Q: What is CATALOG parameter in DEFINE?

Answer:
CATALOG(catalog.name) specifies which catalog to use. Without it, uses alias routing. Important for multi-catalog environments. Modern systems often rely on alias. Explicit better for clarity.
DB2
👁 0

Q: What is DB2 buffer pool?

Answer:
Buffer pool caches data/index pages in memory. BP0, BP1, etc. Hit ratio critical for performance. GETPAGE vs SYNCIO shows effectiveness. Size appropriately. Virtual buffer pool for each pool. Monitor with statistics.
VSAM
👁 0

Q: What is BDAM conversion to VSAM?

Answer:
BDAM is block-oriented, VSAM is record-oriented. Convert: analyze BDAM access, choose KSDS/RRDS/ESDS. REPRO or IDCAMS copy. Program changes for VSAM access. Test thoroughly.
VSAM
👁 0

Q: What is REUSE option purpose?

Answer:
REUSE allows OPEN OUTPUT to reset file. Like delete/define without overhead. Good for work files. DEFINE CLUSTER ... REUSE. Cannot be UNIQUE. Efficient for scratch files.
DB2
👁 0

Q: Explain EXISTS vs IN

Answer:
EXISTS checks for row existence: WHERE EXISTS (SELECT 1 FROM...). IN checks value in list: WHERE col IN (SELECT...). EXISTS usually faster with correlated subquery. IN better for small static lists. EXISTS stops at first match.
DB2
👁 0

Q: What is GROUP BY clause?

Answer:
GROUP BY aggregates rows. SELECT col, COUNT(*) FROM t GROUP BY col. All non-aggregate SELECT columns must be in GROUP BY. HAVING filters groups (vs WHERE filters rows). GROUP BY ROLLUP/CUBE for subtotals.
VSAM
👁 0

Q: How to split VSAM file?

Answer:
REPRO with FROMKEY/TOKEY extracts range. Create multiple target clusters. REPRO ranges to each. Or program logic to split. Consider partitioning design.
DB2
👁 0

Q: What is CASE expression?

Answer:
CASE provides if-then logic. CASE WHEN cond1 THEN val1 WHEN cond2 THEN val2 ELSE default END. Simple CASE: CASE col WHEN 'A' THEN 'Active' END. Use in SELECT, WHERE, ORDER BY. Powerful for transformations.
DB2
👁 0

Q: How to concatenate strings?

Answer:
Use CONCAT(str1, str2) or || operator. CONCAT('Hello', ' ', 'World'). || works same: col1 || col2. Handles VARCHAR properly. NULL concatenation yields NULL (use COALESCE). RTRIM to remove trailing spaces.
CICS
👁 0

Q: How to use PUSH/POP HANDLE?

Answer:
PUSH HANDLE saves current handlers. POP HANDLE restores. EXEC CICS PUSH HANDLE. Allows nested handler management. Clean up with POP. For modular code.
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.
CICS
👁 0

Q: Explain CICS event processing

Answer:
CICS events for complex situations. WAIT EVENT for multiple conditions. Posted externally. WAIT EXTERNAL alternative. Modern: EVENT binding for async.
CICS
👁 0

Q: What is CICS resource protection?

Answer:
Protection via RACF/external security. SEC=YES on region. QUERY SECURITY for checks. SECLABEL for levels. Program security attributes.
DB2
👁 0

Q: How to use LIKE for patterns?

Answer:
LIKE matches patterns. % matches zero or more chars. _ matches single char. WHERE name LIKE 'SM%' finds Smith, Smart. ESCAPE clause for literal % or _. Not index friendly unless prefix match (e.g., 'ABC%').
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.
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: What is MERGE statement?

Answer:
MERGE updates or inserts conditionally. MERGE INTO target USING source ON condition WHEN MATCHED THEN UPDATE WHEN NOT MATCHED THEN INSERT. Combines INSERT/UPDATE logic. Efficient for sync operations.
CICS
👁 0

Q: What is CICS FEPI?

Answer:
FEPI (Front End Programming Interface) connects to external systems. Terminal emulation. Legacy integration. EXEC CICS FEPI commands. Complex configuration.
DB2
👁 0

Q: What is FETCH SENSITIVE cursor?

Answer:
SENSITIVE cursor reflects concurrent changes by other processes. EXEC SQL DECLARE cursor SENSITIVE STATIC/DYNAMIC SCROLL CURSOR. INSENSITIVE does not see changes. Affects isolation behavior. Consider performance impact.
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.
DB2
👁 0

Q: Explain NOFOR option in SELECT?

Answer:
NOFOR prevents FOR UPDATE locking. SELECT ... NOFOR. Read-only access without lock overhead. For display-only queries. Cannot UPDATE WHERE CURRENT OF cursor with NOFOR.