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 / hi
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 ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is multithreading in jcl?
Is there any command to check wether the ps file is in sorted order?
Is condition checking possible in jcl?
Is it possible to code instream data in a PROC?
if the submitter of a job wants to inform another user about the job completion, how can it be done?
Step 1 RC 4 Step 2 Step 3 I want to know the COND parameter which can be coded in step 2 or 3. Step 2 should be executed based on Step 1 RC and Step 3 should not be executed based on step 1's RC
what sort card you will use to copy the data from one dataset to another dataset?
How is a type of file defined in the jcl that executes the cobol program?
In sms datasets, what is the function of the dd avgrec keyword?
whats the diff bw the evaluate also and and?
What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?
Where can program checkpoints be stored for use in a restart?
in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?
Suppose I have five jobs to do. But I want to hold one?
How would you understand error(execution phase)?