In a SORT step using JCL, which statement specifies the input dataset to be sorted?

  • FROMFILE
  • INFILE
  • INPUT
  • SORTFILE
The INPUT statement in a SORT step specifies the input dataset to be sorted

When using a GDG dataset, which parameter in the DD statement is used to specify the generation number?

  • GDN
  • GEN
  • GENNUM
  • GENS
In the DD statement, the GENS parameter is used to specify the generation number when using a GDG dataset

How does IDCAMS handle duplicate records in a VSAM dataset during insertion?

  • Generates an error
  • Ignored, no action taken
  • Overwrites the existing record
  • Rejects them
IDCAMS overwrites the existing record if a duplicate is encountered

Explain a real-world scenario where the IEBDG utility is used to generate test data for mainframe applications.

  • Generating sample input data for batch processing programs
  • Creating test datasets for application testing
  • Generating mock customer data for performance testing
  • Creating dummy records for stress testing
Option 2 is correct. The IEBDG utility is commonly used to create test datasets for mainframe application testing purposes.

In JCL, "_______" dependencies are defined at the job level and apply to all steps within that job.

  • GLOBAL
  • INTRA
  • JOB-WIDE
  • STEP
"JOB-WIDE" dependencies are defined at the job level

Which JCL utility is used for copying datasets?

  • IDCAMS
  • IEBCOMP
  • IEBCOPY
  • IEBGENER
IEBCOPY is a JCL utility used for copying datasets

Which JCL utility is commonly used for sorting data?

  • IDCAMS
  • IEBCOPY
  • IEBGENER
  • SORT
SORT is a JCL utility commonly used for sorting data

To extract specific records from a dataset, you can use the _______ utility in JCL.

  • IDCAMS
  • IEBCOPY
  • IEBGENER
  • SORT
The SORT utility in JCL is used to extract specific records from a dataset

What is the difference between IEBCOPY and other JCL utilities like IEBGENER?

  • IEBCOPY copies entire datasets
  • IEBCOPY is used for copying
  • IEBCOPY is used for generation
  • IEBCOPY performs dataset sorting
IEBCOPY is primarily used for copying entire datasets

You have a JCL job with two steps: Step 1 and Step 2. You want Step 2 to execute only if Step 1 fails. How would you accomplish this using the IF statement?

  • IF (COND.STEP1 = 0) THEN EXEC Step2
  • IF (RETURN-CODE(STEP1) > 0) THEN EXEC Step2
  • IF (STEP1.RC EQ 0) THEN EXEC Step2
  • IF (STEP1.RC NE 0) THEN EXEC Step2
The correct syntax to execute Step 2 only if Step 1 fails is to use the IF statement with the condition (STEP1.RC NE 0). This checks the return code of Step 1, and if it is not equal to 0 (indicating failure), Step 2 will be executed.