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: 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: 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.
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: 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.
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.
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: 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: 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.
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: 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: 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.
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.
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.
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.
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: Explain REUSE parameter

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

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

Q: Explain RECOVERY vs NORECOVER?

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

Q: 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.
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: 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.
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.
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.
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.
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.
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.
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.
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.
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: 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: 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: 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: 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: 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: 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: 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.
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.
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: 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.
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.
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: 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: 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: 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: 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.
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.
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.
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: 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
👁 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: 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: 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: 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: 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.
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.
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: 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.
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.
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.
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.
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: 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: 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: 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: 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: Explain UPGRADE attribute

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

Q: 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.
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.
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: 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: Explain INHIBIT attribute

Answer:
INHIBIT prevents certain operations. ALTER INHIBITSOURCE prevents REPRO from. ALTER INHIBITTARGET prevents REPRO to. Used for protection. PERMIT removes restriction.
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.
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: 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: 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: 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: Explain DD DUMMY statement

Answer:
DD DUMMY discards output/provides EOF for input. No I/O actually performed. DUMMY, DSN=NULLFILE equivalent. Use to skip optional outputs or provide empty input. Program sees immediate EOF on read. Writes succeed but discarded.
JCL
👁 0

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