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.
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
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.
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.
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 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: 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.
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: 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: 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.
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: 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.
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 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.
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: 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: 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.
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.
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.
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: 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: 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.
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.
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 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: 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: 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.
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: 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.
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: 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.
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.
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: 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
👁 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: 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.
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.
VSAM
👁 0

Q: What is WRITECHECK?

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

Q: What 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: 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: 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.
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.
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: 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.
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: 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.
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.
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.
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: 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: 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: 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.
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: 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: 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.
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.
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.
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.
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.
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 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: 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.
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.