ALLInterview.com :: Home Page KalAajKal.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  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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
 Assembler interview questions  Assembler Interview Questions
 CLIST interview questions  CLIST Interview Questions
 QMF interview questions  QMF Interview Questions
 MVS interview questions  MVS Interview Questions
 OS390 interview questions  OS390 Interview Questions
 OS 2 interview questions  OS 2 Interview Questions
 VSAM interview questions  VSAM Interview Questions
 QSAM interview questions  QSAM Interview Questions
 Sysplex interview questions  Sysplex Interview Questions
 IBM MainFrame AllOther interview questions  IBM MainFrame AllOther Interview Questions
Question
Suppose your program is reading a Sequential Vsam file. The 
file contains 10 records. How will you code the JCL to read 
only 2nd, 5th, 7th,and 10th record?
 Question Submitted By :: Giri12
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Suppose your program is reading a Sequential Vsam file. The file contains 10 records. How will you code the JCL to read only 2nd, 5th, 7th,and 10th record?
Answer
# 1
Hope this will work 

//SORTIN   DD DSN=INPUTFILE,DISP=SHR
//SORTOF01 DD DSN=X.Y.OUTFILE1,DISP=SHR
//SORTOF02 DD DSN=X.Y.OUTFILE2,DISP=SHR
//SORTOF03 DD DSN=X.Y.OUTFILE3,DISP=SHR
//SORTOF04 DD DSN=X.Y.OUTFILE4,DISP=SHR
//SYSIN    DD *
   SORT  FIELDS=COPY
   OUTFIL FILES=01,STARTREC=2,ENDREC=2
   OUTFIL FILES=02,STARTREC=5,ENDREC=5
   OUTFIL FILES=03,STARTREC=7,ENDREC=7
   OUTFIL FILES=04,STARTREC=10,ENDREC=10
/*
//STEP2    EXEC PGM=SORT
//SORTIN   DD DSN=X.Y.OUTFILE1,DISP=SHR
//         DD DSN=X.Y.OUTFILE2,DISP=SHR
//         DD DSN=X.Y.OUTFILE3,DISP=SHR
//         DD DSN=X.Y.OUTFILE4,DISP=SHR
//SORTOUT  DD DSN=X.Y.OUTFILE,DISP=SHR
//SYSIN    DD *
   SORT  FIELDS=COPY
/*
Use X.Y.OUTFILE as input to your program , but in real time 
it wont make sense
 
Is This Answer Correct ?    0 Yes 0 No
Mahesh
 

 
 
 
Other JCL Interview Questions
 
  Question Asked @ Answers
 
what are the options in file-aid to edit vsam dataset and to compare data sets. Ocwen2
Hi, I have a requirement File A : I have 6 records out of which 4 are same. File B: I have 8 records out of 6 records are same. The 4 records in FILEA and 6 records in FILE B are same. If we substract we will get two records, I need these two records in output file This is because to remove the duplicates from the database. Through easytrieve we can compare but for that there should not duplicates, but in my file I have duplicates. Thanks in advance!!  2
I have a PDS and want to omit few rows of all members of a PDS. How to do it? Accenture3
what r the types of job control statements?  1
I have a JCL which 20 steps. How do I execute 17 th step alone (It should execute only 17ths tep.and it should not execute 18,19,20 steps?? Xansa8
I have 20 steps in a job... step01, 02....step17...step20. For some reason I want to execute step17 only if the return code for all the previous steps are less than or equal to 4. otherwise if return code for any of the previous 16 steps is greater than 4, then step17 should be bypassed. How do I do that ?? how and in which step should i formulate COND parameter  8
i have 3 steps in my jcl, where i want to run only one step at a time depending on the variable. How should i give the condition statement... I have tried this with two steps which is working but not able to add condn for the 3rd step. can anyone help me... I want to know the cond stmt which i can code in step 3 and step4, so that only either step2 or step3 or step4 executes  3
How can I write the joblog in the spool on normal end of a job step and direct the joblog to a dataset only if the step abends?  2
What is a procedure?  1
List some valid operation codes in JCL  2
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?? L&T9
What does a disposition of (NEW,CATLG,DELETE) mean?  2
There are a set of 10 files and a customer will be selecting random no of files(i.e they may be more than 2, may not be in the order).Sometimes he might just select one file or sometimes no files at all.How do you code a JCL for this? Is it possible to code just JCL alone for this problem? Infosys6
//step#3 exec pgm = hkbc762 what is wrong with the syntax?  3
How do you pass parameters to the program as the job is being executed ?  1
shall we concordinate two different length dataset in to a new date set.  5
A PROC has five steps. Step 3 has a condition code. How can you override/nullify this condition code? Wipro2
what is the default region size if I dont specify region parametre in my job card ( I know that if I specify region=0k or 0M, then the job will occupy all he available resources at the time of job execution), but I want to know the defult value for "region" paramatre. BirlaSoft3
describe the dd statement,its meaning,syntax and keywords?  1
I have a COBOL program that Accepts some input data. How do you code the JCL statement for this? ( How do you code instream data in a JCL? )  8
 
For more JCL Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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