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
I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.
How can a jobs execution priority be modified?
what is the use of IEBGENER utility?
Explain how can a jobs execution priority be modified?
Why block size is multiple of lrecl in jcl?
What is jcl in mainframe?
How do you access an uncatalogued dataset in a jcl?
Explain the purpose of dd dummy statement?
When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?
What parameter of the job statement is used to limit the cpu time consumed by the job?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY
what is the difference between JES3 and JES2?
I have a job called careerride and some steps in it as step1,step2. But I want to execute step2 before step1 ? How do I do that?