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


Please Help Members By Posting Answers For Below Questions

How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.

5066


What parameter of the job statement is used to limit the cpu time consumed by the job?

847


how to compare two datasets without using superce because output is limited to 133 bytes

1488


What is condition checking in jcl? Is this possible?

630


what is use of space parameter in dd statement?

760






Differentiate between addressing mode and run mode.

618


write a jcl to execute a job by 7:00 am on jan 20,1986?

705


When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?

942


what is JCL?

700


I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.

734


Explain the function of //cntl statement?

663


is there any way to execute more than one proc in the same exec statement at the same time..?

2115


What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?

824


What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

1815


Explain the function of job statement in jcl?

655