👁 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:
- Program sends screen to user and ends (RETURN TRANSID)
- User enters data and presses Enter
- CICS starts a new task with same program
- Program retrieves saved data from COMMAREA
- 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.
👁 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:
| 0 | Successful execution |
| 100 | No data found / End of cursor |
| -803 | Duplicate key on insert |
| -811 | Multiple rows returned for singleton SELECT |
| -904 | Unavailable resource |
| -911 | Deadlock/timeout |
| -922 | Authorization failure |
| -927 | DB2 not available |
Negative = Error, 0 = Success, 100 = No data
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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).
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.