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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   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
 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
In one of intervie, my interviwer asked, I have a file 
which contains 4 records I would like to split the 4 
different outputs for each record how to do?
 Question Submitted By :: Avinas
I also faced this Question!!     Rank Answer Posted By  
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 1
Sort utility could be used for this with the OUTFIL option. 
In your case you will have to mention 4 outfil op
OUTFIL RECORDS=(POS,LENGTH,COND,CONDVALUE) OUTIL=PS1
PS1 would be the outdataset need to define in DD stmt. In 
ur case you need to have 4 outfil stmts mentioning 4 
outfile record..
Not sure about the syntax..
 
Is This Answer Correct ?    5 Yes 0 No
Aarti Sharma
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 2
You need to use ICETOOL utility and with Case statment. Pl 
find the answer from ICETOOL pdf manual and test it.
 
Is This Answer Correct ?    0 Yes 1 No
Chandan
 
 
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 3
You can do through DF SORT .
See the below Example.

OUTFIL FNAMES=OUTDD1,INCLUDE=(POS,LENGTH,COND,CONDVALUE)
OUTFIL FNAMES=OUTDD2,INCLUDE=(POS,LENGTH,COND,CONDVALUE)
OUTFIL FNAMES=OUTDD3,INCLUDE=(POS,LENGTH,COND,CONDVALUE)
 
Is This Answer Correct ?    7 Yes 0 No
Ajay
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 4
You can use OUTFIL's SPLIT parameter to put the first 
record into OUTPUT1, the second record into OUTPUT2, the 
third record into OUTPUT1, the fourth record into OUTPUT2, 
and so on until you run out of records. SPLIT splits the 
records one at a time among the data sets specified by 
FNAMES. The following statements split the records between 
two OUTFIL data sets: 
       OPTION COPY
       OUTFIL FNAMES=(Op1.op2,op3,op4),SPLIT
Similarly, OUTFIL's SPLITBY=n parameter splits the records 
n at a time among the data sets specified by FNAMES. The 
following statements split the records four at a time 
between three OUTFIL data sets: 

       OPTION COPY
       OUTFIL FNAMES=(OUT1,OUT2,OUT3),SPLITBY=4
 
Is This Answer Correct ?    6 Yes 0 No
Kiran
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 5
Hi Kiran.
Thanks for your answer can you please give a full jcl for 
this senario you explained.
Thanks in advance for your answer
 
Is This Answer Correct ?    0 Yes 0 No
Bramar
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 6
//**********************************************************
//STEP0011 EXEC 
PGM=SORT                                                
//SORTIN    DD DSN= <input file>                 
//             
DISP=SHR                                                 
//SORTOFO1  DD DSN= <output file 1>,                     
//             DISP=
(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,
(10,10),RLSE)                                 
//SORTOFO2  DD DSN= <output file 2>,                     
//             DISP=
(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,
(10,10),RLSE)                                 
//SORTOFO3  DD DSN= <output file 3>,                     
//             DISP=
(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,
(10,10),RLSE)                                 
//SORTOFO4  DD DSN= <output file 4>,                     
//             DISP=
(NEW,CATLG,DELETE),                                 
//             SPACE=(CYL,
(10,10),RLSE)                                 
//*                                                         
            
//SORTWK01  DD SPACE=(CYL,
(100,50)),UNIT=SYSDA                          
//SORTWK02  DD SPACE=(CYL,
(100,50)),UNIT=SYSDA                          
//SYSOUT   DD 
SYSOUT=*                                                  
//SYSIN     DD 
*                                                        
  SORT FIELDS=
(01,3,CH,A)                                               
  OUTFIL FILES=O1,INCLUDE=
(01,3,CH,EQ,C'USA'),CONVERT,OUTREC=(4,062)    
  OUTFIL FILES=O2,INCLUDE=
(01,3,CH,EQ,C'CAN'),CONVERT,OUTREC=(4,062)    
  OUTFIL FILES=O3,INCLUDE=
(01,3,CH,EQ,C'CHE'),CONVERT,OUTREC=(4,062)    
  OUTFIL FILES=O4,INCLUDE=
(01,3,CH,EQ,C'GBR'),CONVERT,OUTREC=(4,062)    
/*                                                          
            
//**********************************************************
 
Is This Answer Correct ?    1 Yes 0 No
Priyanka
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 7
//REPRO    EXEC PGM=IDCAMS                           
//SYSPRINT DD SYSOUT=*                               
//SYSOUT   DD SYSOUT=*                               
//IN       DD DISP=OLD,DSN=IN                        
//OUT1     DD DISP=OLD,DSN=OUT1                      
//OUT2     DD DISP=OLD,DSN=OUT2                      
//OUT3     DD DISP=OLD,DSN=OUT3                      
//OUT4     DD DISP=OLD,DSN=OUT4                      
//SYSIN    DD *                                      
  REPRO    IFILE(IN) OFILE(OUT1)         COUNT(1)
  REPRO    IFILE(IN) OFILE(OUT2) SKIP(1) COUNT(1)
  REPRO    IFILE(IN) OFILE(OUT3) SKIP(2) COUNT(1)
  REPRO    IFILE(IN) OFILE(OUT4) SKIP(3)
 
Is This Answer Correct ?    3 Yes 1 No
Bjoern
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 8
//**********************************************************

//STEP0011 EXEC PGM=SORT 
                                                
//SORTIN    DD DSN= <input file>,DISP=SHR                 
         
//SORTOFO1  DD DSN= <output file 1>,DISP=.....,
//             SPACE=(....),
//             DCB=....       
//SORTOFO2  DD DSN= <output file 1>,DISP=.....,
//             SPACE=(....),
//             DCB=....       
//SORTOFO3  DD DSN= <output file 1>,DISP=.....,
//             SPACE=(....),
//             DCB=....                   
//SORTOFO4  DD DSN= <output file 1>,DISP=.....,
//             SPACE=(....),
//             DCB=....       
//*                                                         
                                                
//SYSIN DD *
         
        OUTFIL FILES=(1,2,3,4),SPLITBY=1  
      
/*                                                          
//
 
Is This Answer Correct ?    1 Yes 0 No
Rookie
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 9
one more way to do this!!!

//JOB12345  JOB (DVLP,TEST),'CUTSDC',CLASS=N,MSGCLASS=X
//*
//STEP01   EXEC PGM=IDCAMS
//*                                                         
//SYSPRINT DD SYSOUT=*
//INFILE   DD DSN=IN,DISP=SHR
//OUTFILE  DD DSN=OUT1,
//             DISP=(NEW,CATLG,DELETE),
//             DCB=(RECFM=FB,LRECL=179),SPACE=(CYL,
(20,20),RLSE),
//             UNIT=SYSDA
//SYSIN    DD *
 REPRO INFILE(IN) -
 OUTFILE(OUT1) -
 SKIP(0) -
 COUNT(1)
//STEP02   EXEC PGM=IDCAMS
//*                                                         
//SYSPRINT DD SYSOUT=*
//INFILE   DD DSN=IN,DISP=SHR
//OUTFILE  DD DSN=OUT2,
//             DISP=(NEW,CATLG,DELETE),
//             DCB=(RECFM=FB,LRECL=179),SPACE=(CYL,
(20,20),RLSE),
//             UNIT=SYSDA
//SYSIN    DD *
 REPRO INFILE(IN) -
 OUTFILE(OUT1) -
 SKIP(1) -
 COUNT(1)
//STEP03   EXEC PGM=IDCAMS
//*                                                         
//SYSPRINT DD SYSOUT=*
//INFILE   DD DSN=IN,DISP=SHR
//OUTFILE  DD DSN=OUT3,
//             DISP=(NEW,CATLG,DELETE),
//             DCB=(RECFM=FB,LRECL=179),SPACE=(CYL,
(20,20),RLSE),
//             UNIT=SYSDA
//SYSIN    DD *
 REPRO INFILE(IN) -
 OUTFILE(OUT3) -
 SKIP(2) -
 COUNT(1)
//STEP04   EXEC PGM=IDCAMS
//*                                                         
//SYSPRINT DD SYSOUT=*
//INFILE   DD DSN=IN,DISP=SHR
//OUTFILE  DD DSN=OUT4,
//             DISP=(NEW,CATLG,DELETE),
//             DCB=(RECFM=FB,LRECL=179),SPACE=(CYL,
(20,20),RLSE),
//             UNIT=SYSDA
//SYSIN    DD *
 REPRO INFILE(IN) -
 OUTFILE(OUT4) -
 SKIP(3) -
 COUNT(1)


LEMMI KNOW IF THIS WORKS OUT!
 
Is This Answer Correct ?    1 Yes 1 No
Hi
 
  Re: In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?
Answer
# 10
//PMAP128A JOB ,'SORT SPLIT',                      
//    MSGCLASS=Q,                                  
//    CLASS=D,TIME=0                               
//*                                                
//STEP010 EXEC PGM=SORT                            
//SYSPRINT DD SYSOUT=*                             
//SYSOUT   DD SYSOUT=*                             
//SORTIN   DD DSN=PMAP128.SORTIN,DISP=SHR          
//SORTOF01 DD SYSOUT=*                             
//SORTOF02 DD SYSOUT=*                             
//SORTOF03 DD SYSOUT=*                             
//SORTOF04 DD SYSOUT=*                             
//SYSIN DD *                                       
  SORT FIELDS=COPY                                 
  OUTFIL FILES=(01,02,03,04),SPLIT                 
/*                                                 
/*
 
Is This Answer Correct ?    0 Yes 1 No
Shridhar
 

 
 
 
Other JCL Interview Questions
 
  Question Asked @ Answers
 
There is a procedure in A.B.PROCS(PROC1) (member name is PROC1) //PROCA... There is a call to a procedure PROCA from a JOB. //STEP01 EXEC PROCA ... Here "PROCA" in JOB refers to the actual PROC name or the member name of the PDS where this PROCA is stored. Merrill-Lynch1
When we give TYPERUN = SCAN , what are the syntax errors we get? Kanbay5
Which is the most widely used batch performance monitor for DB2?  1
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
Suppose there r 10 steps . Out fo which i want to execute 10th, 9th and 8th in reverse order without using IEBEDIT. How can i do that..??? IBM4
how to skip the steps in JCl EDS2
What does the statements: typrun=scan and typrun=hold do in a JCL statement  2
How do you override a specific DDNAME/SYSIN in PROC from a JCL?  5
What is DSNDB06 ?  1
how to identify a vasam dataset by seeing in 3.4(browse) Cap-Gemini4
describe the dd statement,its meaning,syntax and keywords?  1
What is a GDG? How is it referenced? How is it defined? What is a MODELDSCB?  3
what are the options in file-aid to edit vsam dataset and to compare data sets. Ocwen2
what is a cataloged procedure ? Xansa1
Can we delete the data using IEFBR14 , IEBGENER?? Kanbay4
What is a Generation Data Group (GDG)?  1
Can comments be specified at the very beginning of a jobcard? Will the JCL execute?  3
Is it possible to take a PDS and write it to a GDG? If so, can you provide an example? Thanx  3
What is the max blocksize for a Tape file?  2
How do you restart a step in JCL? HSBC6
 
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