👁 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 /*
👁 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.
👁 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:
- Calling program: COMMAREA option on LINK/XCTL/RETURN
- Called program: DFHCOMMAREA in LINKAGE SECTION
- 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.
👁 0
Q: How to handle large objects (LOB)?
Answer:
BLOB/CLOB/DBCLOB for large data. Stored in auxiliary tablespace. Use LOB locators for efficiency. FETCH with INTO :lobvar. INSERT with CLOB(text). LOG NO for LOB tablespace optional.
👁 0
Q: 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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)
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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: 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.
👁 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.