Please explain with syntax and an example, the Inrec fields
and Outrec build in sort.
Answer Posted / cd
In most cases INREC and OUTREC statements can be used
interchangeably..
The difference between them is more of a performance issue
than anything else.
For Example:
INPUT
------
Name Regn. No. School ADDRESS
____ _________ _______ __________________________
DINA 1657565511 SSV sadadadadadadadadadadadada
EALA 1264546461 SADADADA ddwaedsagfdsdsadadagfdsdsw
ARUN 1214231211 DADARDCA kjhdsakjhgkjdagtsagdsakjhd
SUDA 1212121211 DRADS kiyeakjhsdakjgdajgshaskgsa
RINI 1275655345 AFAASFAF kadhlkjdabgsagkjashksaoksa
Assume, you want to have the sorted names of the people from
this file in the output.
What Inrec would do:
//SYSIN DD *
SORT FIELDS=(1,4,CH,A)
INREC FIELDS=(1,4)
/*
Step 1.
Name
____
DINA
EALA
ARUN
SUDA
RINI
Step 2.
Name
____
ARUN
DINA
EALA
RINI
SUDA
If outrec was used, the steps 1 and 2 would be reversed.
thanks
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
How is the record format of an output dataset specified?
Explain dfsort utility?
Name a few IBM utility programs, and explain its function.
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
What are the 4 fields in dd statement?
Give the syntax of job specifying jcl statement.
How dummy is used in jcl?
whats the diff bw the evaluate also and and?
which utility is used to sort a file in jcl?
What is the function of dd disp parameter?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
What is the function of //cntl statement?
Explain how can a stopped job be started again?
What is the function of dd name parameter with a 2 part structure; audit.report?
which parameter is use to declare the name of dataset in dd statement?