ihave ten flatfile in that iwant to concatinate all the
files except file 5,6 into output file by uing jcl?
how to do this? give me detail yntax for tis?

Answers were Sorted based on User's Feedback



ihave ten flatfile in that iwant to concatinate all the files except file 5,6 into output file by u..

Answer / mr. cooooool

Hi...........
We can do it as following.

//COOLJCL JOB NOTIFY=&SYSUID
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=COOL.TOP.PS1,DISP=SHR
// DD DSN=COOL.TOP.PS2,DISP=SHR
// DD DSN=COOL.TOP.PS3,DISP=SHR
// DD DSN=COOL.TOP.PS4,DISP=SHR
//* DD DSN=COOL.TOP.PS5,DISP=SHR
//* DD DSN=COOL.TOP.PS6,DISP=SHR
// DD DSN=COOL.TOP.PS7,DISP=SHR
// DD DSN=COOL.TOP.PS8,DISP=SHR
// DD DSN=COOL.TOP.PS9,DISP=SHR
// DD DSN=COOL.TOP.PS10,DISP=SHR
//SYSUT2 DD DSN=COOL.TOP.OUTPUT,DISP=SHR
//SYSIN DD DUMMY



We can give comments for 6th and 7th dd statement
through which we can concatenate the remaining files
except 5,6 file into the output file.


I know there is also some other logic
except this.
if anybody know than tell me.
thanks.

Is This Answer Correct ?    14 Yes 0 No

ihave ten flatfile in that iwant to concatinate all the files except file 5,6 into output file by u..

Answer / harsha

In addition to the above provided solutions, if user is
concatenating these files in a PROC then user can provide
the overriding parameter in JCL as
//STEP1 EXEC PROC1
//STEPA.DD1 DD DSN=DSN1,DISP=SHR
// DD DSN=DSN2,DISP=SHR
// DD DSN=DSN3,DISP=SHR
// DD DSN=DSN4,DISP=SHR
// DD DSN=DSN7,DISP=SHR
// DD DSN=DSN8,DISP=SHR
// DD DSN=DSN9,DISP=SHR
// DD DSN=DSN10,DISP=SHR

Is This Answer Correct ?    2 Yes 1 No

ihave ten flatfile in that iwant to concatinate all the files except file 5,6 into output file by u..

Answer / rajamohan reddy

If your conactenating files in a proc. we can use the
following JCL
//INST PROC
//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=DATASET1
// DD DISP=SHR,DSN=DATASET2
// DD DISP=SHR,DSN=DATASET3
// DD DISP=SHR,DSN=DATASET4
// DD DISP=SHR,DSN=DATASET5
// DD DISP=SHR,DSN=DATASET6
// DD DISP=SHR,DSN=DATASET7
// DD DISP=SHR,DSN=DATASET8
// DD DISP=SHR,DSN=DATASET9
// DD DISP=SHR,DSN=DATASET10
//SYSUT2 DD SYSOUT=*
//INST PEND
//*
//STEP2 EXEC INST
//SYSPRINT DD SYSOUT=*
//STEP1.SYSUT1 DD DISP=SHR,DSN=DATASET1
// DD DISP=SHR,DSN=DATASET2
// DD DISP=SHR,DSN=DATASET3
// DD DISP=SHR,DSN=DATASET4
// DD
// DD
// DD DISP=SHR,DSN=DATASET7
// DD DISP=SHR,DSN=DATASET8
// DD DISP=SHR,DSN=DATASET9
// DD DISP=SHR,DSN=DATASET10
//SYSIN DD DUMMY

Is This Answer Correct ?    0 Yes 1 No

ihave ten flatfile in that iwant to concatinate all the files except file 5,6 into output file by u..

Answer / ajay kumar ande

give one DD Name to all datasets excluding 5,6
dd1 dd dsn=dataset1
dd dsn=dataset2
dd dsn=dataset3
dd dsn=dataset4
dd dsn=dataset7
dd dsn=dataset7
dd dsn=dataset9
.
.
.
.

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More JCL Interview Questions

What do you understand by the term job time – out and how can you overcome that?

0 Answers  


wht r different types of sorts ?

1 Answers   L&T,


what does mvs stand for?

1 Answers   IBM,


whats SOC7?

1 Answers   Patni,


What is the meaning of the EXEC statement keyword, COND? What is its syntax?

2 Answers  






i am trying to copy a PS file into VSAM file in step2 by using PGM=IDCAMS,COND=(0,LT) and the pS file is getting sorted in the step1. I got the return code 00 for step1 but step2 got flushed. can u please help on this. Below is My JCL. SEPP050 EXEC PGM=SORT,REGION=6144K SYSIN DD DSN=SYSCMN.PROD.CCLIB (F5910BNN), DISP=SHR SYSOUT DD SYSOUT=* SYSUDUMP DD SYSOUT=A SORTIN DD DSN=Z1225BT.F5910EPP.HISOUT, DISP=SHR SORTOUT DD DSN=Z1225BT.F5910EPP.HISOUT.SORTOUT5, DISP= (NEW,CATLG,DELETE),UNIT=DELQ, SPACE=(CYL, (500,500),RLSE), DCB= (RECFM=FB,LRECL=1606,BLKSIZE=16060,BUFNO=15) SORTWK01 DD UNIT=SYSDA,SPACE=(CYL, (1)) SORTWK02 DD UNIT=SYSDA,SPACE=(CYL, (1)) SORTWK03 DD UNIT=SYSDA,SPACE=(CYL, (1)) SORTWK04 DD UNIT=SYSDA,SPACE=(CYL, (1)) SYSIN1 DD UNIT=VIO,SPACE= (80,1) * SEPP060 EXEC PGM=IDCAMS,COND= (0,LT) SYSPRINT DD SYSOUT=* SYSOUT DD SYSOUT=* SYSLIST DD SYSOUT=* *** DD01 DD DSN=Z1225BT.F5910EPP.HISOUT.SORTOUT, // DISP=SHR //*** //DD01O DD DSN=Z1225BT.F5910PHS, // DISP=SHR, // AMP=(AMORG,'BUFND=12,BUFNI=5') //SYSIN DD DSN=SYSCMN.PROD.CCLIB(F5910BBB), // DISP=SHR Output RC for the two steps: SDCBPJ05 SEPP050 00 236 .00 .00 .0 SDCBPJ05 SEPP060 FLUSH 0 .00 .00 .0

3 Answers  


What methodology can be adapted to transfer data to a program that is coded using the exec statement?

0 Answers  


How do you designate a comment in JCL?

1 Answers  


What are SD37, SB37, SE37 abends?

4 Answers  


How to DEBUG a JCL?

9 Answers   Satyam,


once we submitted the job to the operating system, how can we cancel the job before execution?

2 Answers  


1) max no of steps with jcl job can execute 2) how many extentions r possible in sequencial files with job 3) what is set parameter will do 4)how to get syntax errors without sub 5) what is differ between error and abend 6) hw mvs knows who submitted the job and whoom it has to forward 7) what are the positinal parameters of data descripter

1 Answers   L&T,


Categories