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
When space is allocated for an output dataset, what units can be used?
What are s0c1, s0c4, s0c5, s0c7 and socb?
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?
what is the use of JCL?
How can an in-stream dataset be terminated?
Name the statement which can be used to send data to another mvs jes3 node?
Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE
How do you overcome this limitation ?
How can values be passed from the job stream to an executable program?
write a jcl to execute a job by 7:00 am on jan 20,1986?
a set statement is used to define commonly used symbolic across job steps or procedures. It initializes the previous values in the symbolic names. It has to be defined before the first use of the symbolic names in the jcl. State whether true or false?
Is acct parameter mandatory?
Explain about ISPF/TSO Commands
When output dataset space is required, what quantity categories are used?
What is the purpose of disp parameter?