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 Posted / bjoern

//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 ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?

1613


what is the JCL statement consists of?

693


Explain in DD statement what is the use of DCB parameter?

652


Is it possible to define dd statements as you want?

644


Name the statement which can be used to send data to another mvs jes3 node?

595






what is JCL?

691


How can the submitting users racf authority be overridden in a job stream?

741


How can the attributes of one sms dataset be copied to another dataset?

846


What are the 4 fields in dd statement?

737


Explain how can a stopped job be started again?

636


What is the format of comment statement?

662


How to submit jcl through a cobol program?

673


write a jcl to execute a job by 7:00 am on jan 20,1986?

693


What is the syntax of JCL statement?

688


What are the parameters that are used in creating a gdg?

735