ALLInterview.com :: Home Page Forum9.Com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories >> Software >> MainFrame >> IBM-MainFrame >> JCL
 
 


 

 
 COBOL interview questions  COBOL Interview Questions
 JCL interview questions  JCL Interview Questions
 CICS interview questions  CICS Interview Questions
 DB2 interview questions  DB2 Interview Questions
 IMS interview questions  IMS Interview Questions
 IDMS interview questions  IDMS Interview Questions
 Natural interview questions  Natural Interview Questions
 ADABAS interview questions  ADABAS Interview Questions
 REXX interview questions  REXX Interview Questions
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.
 
Is This Answer Correct ?    1 Yes 0 No
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)
 
Is This Answer Correct ?    0 Yes 1 No
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
 
Is This Answer Correct ?    0 Yes 0 No
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.
 
Is This Answer Correct ?    0 Yes 0 No
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.
 
Is This Answer Correct ?    0 Yes 0 No
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      
//
 
Is This Answer Correct ?    0 Yes 0 No
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
 
Is This Answer Correct ?    0 Yes 0 No
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
 
Is This Answer Correct ?    0 Yes 0 No
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 ?
 
Is This Answer Correct ?    0 Yes 0 No
Lachchu
 
 
 
 
Other JCL Interview Questions
 
  Question Asked @ Answers
 
In my job I have 6 steps. Step01,02,03...step06. after executing step02 i want to skip step03 and want to execute step04. and once step04 is done then I want to go back and execute step03. once step03 is completed I want execute step05, 06 and so on... can any one tell me how do i do that??? Perot-Systems8
Can I concatenate various datasets whose organization are different from each other. Lets say I want to cancatenate a PDS file, a PS file, a GDG file etc. Can You do that ?? If yes, how ? is there any separate Utility to do so ???  4
describe the dd statement,its meaning,syntax and keywords?  1
describe the job statement, its meaning,syntax and significant keywords?  1
Can you execute a PROC from another PROC? Keane-India-Ltd4
what r the types of job control statements?  1
There are 5 steps in a Job. How to bypass the first step by making use of only COND Parameter and not using any Restart and IF/THEN/ELSE parameter?  6
how to have variable length record in outrec..i have the requmt as follows.. i/p file variable lenght record output file : i need to alter the input and write into outrec(another file) sort fields: copy from(dd1) using ctl1 ctl1cntl dd * outfil fnames=xxx, outrec=(1,131) here i outrec is bombing with error..how to overcome this defect...???  1
What are three major types of JCL statements? What are their functions?  1
What is a Proc ? why do we go for a Proc ? What are the types of procs?Can we have nesting in Procs ? Xansa8
Can there be 2 job statements in a JCL? If yes what is the purpose of doing tha?  1
Describe the DD statement, its meaning, syntax and keywords?  2
What is DATACOM db?  2
What is the use of the utility DFSRRC00 in the JCL? Convergys2
Definition of COND parameter in JCL  3
What are the default system and catalog libraries in JCL?  1
What is a Dummy Utility and what it does ?  1
What are the basic JCL Statements for a Job?  1
How do you restart a PROC from a particular step?  2
How do you submit JCL via a Cobol program?  2
 
For more JCL Interview Questions Click Here 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com