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
In job processing, what happens in conversion stage?
How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?
What is the difference between the positional and keyword parameters? Give examples.
Explain in DD statement what is the use of DCB parameter?
Explain how can values be passed from the job stream to an executable program?
Explain about ISPF/TSO Commands
Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?
What is the purpose of dd dummy statement?
What is the function of //jcllib statement?
What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?
In sms datasets, what is the function of the dd mgmtclas keyword?
how you can direct the data to spool using SYSOUT option?
In job processing, what happens in execution stage?
What is notcat 2 - gs?
what is the use of IEBGENER utility?