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 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.
COBOL ⭐ Featured
👁 0

Q: What is GLOBAL clause?

Answer:
GLOBAL makes data available to nested programs. 01 WS-COUNTER PIC 9(5) GLOBAL. Nested programs can reference without passing as parameters. Use sparingly; explicit passing preferred. File definitions can also be GLOBAL.
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.
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.
JCL ⭐ Featured
👁 0

Q: How to pass data between steps?

Answer:
Use DISP=PASS to pass datasets. Receiving step references same DSN. Or use symbolic parameters. GDG allows relative references (+1 created, 0 passed). Temporary datasets (&& prefix) auto-pass. SYSIN instream data copied to subsequent steps.
JCL ⭐ Featured
👁 0

Q: What is symbolic parameter?

Answer:
Symbols are variables: SET symbol=value or &symbol on JOB/PROC. Reference: DSN=&HLQ..DATA. Resolved at job entry. EXEC proc,symbol=value overrides. SET statement defines. Symbols start with & and up to 8 characters.
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.
DB2
👁 0

Q: What is stored procedure?

Answer:
Stored procedure is saved SQL code. CREATE PROCEDURE name(params) BEGIN SQL statements END. CALL name(values) executes. Can have IN/OUT/INOUT parameters. Reduces network traffic. Logic in database. Security benefits.
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.
COBOL
👁 0

Q: What is LINKAGE SECTION?

Answer:
LINKAGE SECTION defines parameters received from calling program. Items here have no memory until CALL provides addresses via USING clause. Address established at runtime. Used for both passed parameters and dynamically addressed data.
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.
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: What is DEFINE MODEL?

Answer:
MODEL copies attributes from existing cluster. DEFINE CLUSTER(NAME(new) MODEL(existing)). Only copies definition, not data. Useful for creating similar clusters. Can override specific parameters.
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: 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.
JCL
👁 0

Q: How to override PROC DD?

Answer:
//procstep.ddname DD overrides. //MYSTEP.SYSOUT DD SYSOUT=H changes SYSOUT class. Can add parameters or replace entirely. Add new DD: //MYSTEP.NEWDD DD DSN=... Position after EXEC procname.