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
/*
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 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: 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.
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.
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.
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.
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.
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.
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: 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 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.
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: 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.
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: 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
👁 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 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.
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: 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.
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 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.
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).
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.