can anyone explain me about sort in jcl with inrec and
outrec ?

Answers were Sorted based on User's Feedback



can anyone explain me about sort in jcl with inrec and outrec ?..

Answer / madhu s reddy

.
.
//SYSIN DD *
INREC FIELDS=(5,10,15,2,23,4)
SORT FIELDS=(11,3,ZD,A)
OUTREC FIELDS=(1,10)
/*
.
.

INREC option is used to select the part(s) of record from
input file for sorting(ie, vertical split of records).

OUTREC option is used to select the part(s) of record from
sort file and is copied into output file.

Is This Answer Correct ?    12 Yes 1 No

can anyone explain me about sort in jcl with inrec and outrec ?..

Answer / challa srinivas

In short,INREC i used before SORT and OUTREC is used after SORT.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More JCL Interview Questions

I have a dataset with record length 40 in production, due to some requirements it was changed to 80. Then how can we know the jobs which are effected by this change and how can we resolve it.

3 Answers   iGate,


can we modify the code in copy book? if it possible how to submit ofter the modification.

3 Answers   IBM, L&T,


In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?

14 Answers   Cap Gemini, Cognizant, JPMorgan Chase, TCS, Xansa,


using cursor how can you fetch more than one record into a variable

3 Answers   Syntel,


read all error codes like SB07?

1 Answers  






In sms datasets, what is the function of the dd avgrec keyword?

0 Answers  


How to find the number of duplicates in a file using Sort?

4 Answers   Fidelity,


My requirement is : How to populate a empty PS/flat file with ONLY spaces in the first line. You should not use any input dataset to do this. I'm not sure whether you may use any utility for this purpose?

2 Answers   HCL,


How do you designate a comment in JCL?

1 Answers  


Name the statement which can be used to send data to another mvs jes3 node?

0 Answers  


How to find the length of variable length copybook using fileaid ??

1 Answers   CSC,


whats the diff bw the evaluate also and and?

0 Answers   CGI,


Categories