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 / priyanka
//**********************************************************
//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 |
Post New Answer View All Answers
Is automatic restart possible in jcl?
how you can access an uncataloged dataset in a JCL?
How can the disposition of sysout datasets be set for an entire jobstream?
which parameter is use to declare the name of dataset in dd statement?
Mention the types of job control statements?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
What is NOTCAT ?
what is the purpose of coding notify parameter in job statement?
What is the motivation behind coding class parameter in job statement?
How does jcl act on code(if you take a cobol program)?
is there any way to execute more than one proc in the same exec statement at the same time..?
Explain how can return codes be tested before execution of a job step?
Hello Guys, I have 1+ Year Experience in MAINFRAME TESTING. After 1 Week I have an Interview With a Company on Mainframe Testing. Please Could You Guys Please Suggest me What Sections Should I prepare ?? ___Tell Me the Topic Or Appropriate Site & Links. ?? ---------------Thank You
What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?
How jcl work to handle various input output file operations?