0

mainframe Online Quiz - 146

Description: mainframe Online Quiz - 146
Number of Questions: 20
Created by:
Tags: mainframe
Attempted 0/20 Correct 0 Score 0

Which statement(s) is/are true for LRECL

  1. LRECL=0 is valid only for RECFM=F.

  2. LRECL must not exceed BLKSIZE minus 4 for RECFM=V

  3. LRECL can not exceed BLKSIZE when RECFM=VS

  4. LRECL=nnnnnK syntax is valid.


Correct Option: B,D

Which parameter indicates when MVS is to free the resource(s) allocated to the DD statement.

  1. FREE

  2. RLS

  3. RLSE

  4. None of the above.


Correct Option: A

How does SUM FIELDS = NONE work?

  1. Sum up value in the fields specified in the SORT FIELDS statement and keep it as only one occurence in the o/p

  2. Removes the duplicates for the fields specified in the SORT FIELDS statement and keeps only the 1st occurence of it

  3. Works only for those records in the i/p file where no duplicates for the fields specified in SORT FIELDS statement,

  4. None of the above


Correct Option: B

In the i/p file A contains the records in the following sequence: Arun 20 Naveen40 Priya 35 Naveen10 Priya 25 Arun 50 If the following SORT query runs on file A, how would the o/p file B look like: SORT FIELDS = (1,6,CH,A) SUM FILEDS = (7,2,PD)

  1. Arun 50 Arun 20 Naveen10 Naveen40 Priya 25 Priya 35

  2. Priya 60 Naveen50 Arun 70

  3. Arun 70 Naveen50 Priya 60

  4. Naveen50 Priya 60 Arun 70


Correct Option: B

AI Explanation

To answer this question, we need to understand how the SORT query works and how it will affect the input file sequence.

The SORT query provided has two components: SORT FIELDS and SUM FIELDS.

SORT FIELDS = (1,6,CH,A) specifies that the records should be sorted based on the first 6 characters (position 1 to 6) in ascending order.

SUM FIELDS = (7,2,PD) specifies that the values in the 7th and 8th positions should be summed as they are packed decimal numbers (PD).

Let's go through each option to determine the correct output:

Option A) Arun 50 Arun 20 Naveen10 Naveen40 Priya 25 Priya 35 This option does not seem to be sorted correctly according to the SORT query. Additionally, it does not include the summed values. Therefore, option A is incorrect.

Option B) Priya 60 Naveen50 Arun 70 This option correctly sorts the records based on the first 6 characters and includes the summed values. Therefore, option B is a possible correct answer.

Option C) Arun 70 Naveen50 Priya 60 This option does not seem to be sorted correctly based on the SORT query. Additionally, it does not include the summed values. Therefore, option C is incorrect.

Option D) Naveen50 Priya 60 Arun 70 This option does not seem to be sorted correctly based on the SORT query. Additionally, it does not include the summed values. Therefore, option D is incorrect.

Based on the analysis, the correct answer is option B) Priya 60 Naveen50 Arun 70. This option correctly sorts the records and includes the summed values according to the given SORT query.

  1. user modified field to be sort ascending

  2. No specific order specified

  3. Jumbled order

  4. None of the above


Correct Option: A
  1. Sum up value in the fields specified in the SORT FIELDS statement and keep it as only one occurence in the o/p

  2. Removes the duplicates for the fields specified in the SORT FIELDS statement and keeps only the 1st occurence of it

  3. Works only for those records in the i/p file where no duplicates for the fields specified in SORT FIELDS statement,

  4. None of the above


Correct Option: B

How should the SORT statement be used to copy only 10 records with the EMP name 'Anil' to the o/p file, where the Emp name is in the 1st 10 chars of the i/p file?

  1. SORT FIELDS = (1,10,CH,A),SKIPREC= 10

  2. SORT FILEDS = (1,10,CH,A),SIZE = 10

  3. Sort FIELDS = (1,10,CH,A),STOPAFT = 10

  4. Sort FIELDS = (1,10,CH,A),EQUALS = 10


Correct Option: C

what are the different types that can be provided in the RECORD Statement?

  1. F (Fixed), V (Variable), D (ISCII/ASCII Variable)

  2. F (Fixed), V (Variable)

  3. No types are specified in the Record Statement

  4. FI (Fixed), VA (Variable)


Correct Option: A
  1. SORT FIELDS=(1,5,ZD,A) OUTREC FIELDS=(1:SEQNUM,5,ZD,6:6,295)

  2. SORT FIELDS=(1,5,BI,A) OUTREC FIELDS=(1:SEQNUM,5,BI,6:6,295)

  3. SORT FIELDS=(1,5,ZD,A) OUTREC FIELDS=(1:RESEQ,5,ZD,6:6,300)

  4. None of the above


Correct Option: A
  1. SORT FIELDS=COPY OUTREC FIELDS=(1:1,24,25,6,ZD,MUL,+0.97,TO=ZD,LENGTH=6,31:31,185)

  2. SORT FIELDS=COPY OUTREC FIELDS=(1:1,24,25,6,ZD,MUL,+97,DIV,+100,TO=ZD,LENGTH=6,31:31,185)

  3. SORT FIELDS=COPY OUTREC FIELDS=(1:1,24,25,6,ZD,DIV,+100,MUL,+97,TO=ZD,LENGTH=6,31:31,185)

  4. All of the above


Correct Option: B,C
  1. SORT FIELDS=(1,3,CH,A) SUM FIELDS=NONE OUTFILE FNAME = F2

  2. SORT FIELDS=(1,3,CH,A) SUM FIELDS=NONE,XSUM

  3. SORT FIELDS=(1,3,CH,A) SUM FIELDS=NONE COPY = F2

  4. None of the above


Correct Option: B

By using _________ statement, data can be sorted in a file between headers and trailers.

  1. DATASORT

  2. SUBSET

  3. both a and b

  4. None of the above


Correct Option: A

How to remove the last record from the i/p file?

  1. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST = 1

  2. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST(1)

  3. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE TRAILER

  4. All of the above


Correct Option: B,C

Find the i/p file records as below: Student A - Max = 100 Min = 60 Student B - Max = 60 Min = 50 Student C - Max = 80 Min = 75 How to format the file to the following o/p data? Student A - Maximum = 100 Minimum = 60 Student B - Maximum = 60 Minimum = 50 Student C - Maximum = 80 Minimum = 75

  1. OPTION COPY INREC FINDREP=(INOUT=(C'Max',C'Maximum',C'Min',C'Minimum')

  2. OPTION COPY INREC FINDREP=(C'Max',C'Maximum',C'Min',C'Minimum')

  3. Both a and b

  4. None of the above


Correct Option: A

What is the statement to create 2 files from 1 particular i/p file on specific conditions?

  1. OUTREC

  2. INREC

  3. OUTFIL

  4. None of the above


Correct Option: C

Which of the following will enhance the efficiency of the jcl?

  1. INCLUDE COND = (10,3,CH,EQ,C'YES') SORT FIELDS = (1,5,CH,A)

  2. SORT FIELDS = (1,5,CH,A) INCLUDE COND = (10,3,CH,EQ,C'YES')

  3. Order doesn't matter

  4. INCLUDE COND = (10,3,CH,EQ,C'YES') SORT FIELDS = COPY


Correct Option: A

What is the function of the STEPLIB DD statement?

  1. Identify a library to be searched for programs named in the EXEC statement

  2. Identify a library containing executable job steps

  3. Override the system step library within a job stream

  4. All of the above


Correct Option: D
- Hide questions