| Question |
i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
|
Question Submitted By :: Reshmamsc |
|
I also faced this Question!! |
Rank |
Answer Posted By |
| |
|
Re: i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
Answer
# 1 | i think, we can use OUTLIM parameter.
| | Felix |
| |
|
Re: i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
Answer
# 2 | sorry. my previous answer is wrong.
use the following coding in JCL.
First u should sort the file using sort pgm. enter the
sorted file path in input data set.
//SYSIN DD*
REPRO
INDATASET(WRITE THE INPUT PATH)
OUTDATASET(WRITE THE OUTPUT PATH)
COUNT(200)
| | Felix |
| |
|
|
| |
| |
|
Re: i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
Answer
# 3 | Write a sort step to sort the entire file. Write another
sort step with the following sort card
SORT FIELDS=COPY,
STOPAFT=200
END
| | Kavya |
| |
|
Re: i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
Answer
# 4 | I think the answer written by Kavya is not fully correct.It
will cause the sort to stop after first 200 records in the
input file are sorted.But we want the input file to be
sorted completely.and first 200 records to be placed in
output file.
| | Sudeep |
| |
|
Re: i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
Answer
# 5 | sorry kavya is right.I haven't red the first part.sorting
the file completely at first.
| | Sudeep |
| |
|
Re: i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
Answer
# 6 | //STEP1 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SORTOUT DD DSN=TEST.SAMPLE.OUTPUT.VIN,DISP=SHR
//SORTIN DD DSN=TEST.SAMPLE.INPUT.VIN,DISP=SHR
//SYSIN DD *
SORT FIELDS=( , ,CH,A)
ENDREC=200
//
| | Bachee |
| |
|
Re: i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
Answer
# 7 | Kavya's answer is correct.
i used the following control card
//SYSIN DD *
SORT FIELDS=(1,3,CH,A),
STOPAFT=8
Input file contained the following records
IMSDEVELOPER CSAA
IMSPRODSUPPORTXEROX
IMSTESTER EMDAC
IMSDEVELOPER CSAA
CICPRODSUPPORTXEROX
IMSTESTER EMDAC
The output i got was
CICPRODSUPPORTXEROX
DB2PRODSUPPORTEMDAC
IMSDEVELOPER XEROX
IMSDEVELOPER CSAA
IMSDEVELOPER CSAA
IMSPRODSUPPORTXEROX
IMSTESTER EMDAC
IMSTESTER EMDAC
| | Sivakumar Sekharannair |
| |
|
Re: i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
Answer
# 8 | The input records shown in the above message contained a
few records9total 10 records) also which was misset while
cut/copy
| | Sivakumar Sekharannair |
| |
|
Re: i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that?? |
Answer
# 9 | Can you please write C code for the same ?
| | Lachchu |
| |
| |