Hi,
Say I have 10 flat files and I want to copy all these 10
flat files to a GDG versions flat files (I have GDG base:
FDWS01.TEST.RESTORE) in one shot. Can we do that in one shot
using a JCL. May be by using IEBGENER. It's a bit urgent. So
anyone's fast rely would be appreciated.. Thanks in advance..

10 flat files
-----------------------------------
FDWS01.SUB.RESTORE1
FDWS01.SUB.RESTORE2
FDWS01.SUB.RESTORE3
;
;
FDWS01.SUB.RESTORE10

TO
GDG versions
-----------------------
FDWS01.TEST.RESTORE.G0001V00
FDWS01.TEST.RESTORE.G0002V00
FDWS01.TEST.RESTORE.G0003V00
;
;
FDWS01.TEST.RESTORE.G0010V00

Answers were Sorted based on User's Feedback



Hi, Say I have 10 flat files and I want to copy all these 10 flat files to a GDG versions flat fil..

Answer / sreeji

//jobcard JOB.......
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INDD1 DD DSNAME=FDWS01.SUB.RESTORE1,DSIP=OLD
//INDD2 DD DSNAME=FDWS01.SUB.RESTORE2,DSIP=OLD
//INDD3 DD DSNAME=FDWS01.SUB.RESTORE3,DSIP=OLD
//INDD4 DD DSNAME=FDWS01.SUB.RESTORE4,DSIP=OLD
......
......
......
//INDD10 DD DSNAME=FDWS01.SUB.RESTORE10,DSIP=OLD
//OUTDD1 DD DSNAME=FDWS01.TEST.RESTORE(+1),DISP=NEW
//OUTDD2 DD DSNAME=FDWS01.TEST.RESTORE(+1),DISP=NEW
//OUTDD3 DD DSNAME=FDWS01.TEST.RESTORE(+1),DISP=NEW
.......
.......
//OUTDD10 DD DSNAME=FDWS01.TEST.RESTORE(+1),DISP=NEW


//SYSIN DD *

REPRO INFILE (INDD1) OUTFILE (OUTDD1)
REPRO INFILE (INDD2) OUTFILE (OUTDD2)
.......
.......
REPRO INFILE (INDD10) OUTFILE (OUTDD10)

/*

Is This Answer Correct ?    3 Yes 1 No

Hi, Say I have 10 flat files and I want to copy all these 10 flat files to a GDG versions flat fil..

Answer / balmukund

sing below JCL we can achieve the above task.

//jobcard JOB.......
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INDD DD DSNAME=FDWS01.SUB.RESTORE1,DSIP=OLD
// DD DSNAME=FDWS01.SUB.RESTORE2,DSIP=OLD
// DD DSNAME=FDWS01.SUB.RESTORE3,DSIP=OLD
// DD DSNAME=FDWS01.SUB.RESTORE4,DSIP=OLD
......
......
......
// DD DSNAME=FDWS01.SUB.RESTORE10,DSIP=OLD
//OUTDD DD DSNAME=FDWS01.TEST.RESTORE(+1),DISP=NEW
//SYSIN DD *

REPRO INFILE (INDD) OUTFILE (OUTDD)
/*

Hope this will work with you. other wise let me known

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More JCL Interview Questions

what are the technical terms for // /* in jcl

3 Answers   Cap Gemini,


Do we need to code DCB parameters when using DISP position as MOD?

1 Answers   Accenture,


how you will define a temporary dataset in jcl?

1 Answers   IBM,


How to skip first step of a job? Can we use COND on the first step?

3 Answers   iNautix,


What do you understand by the terms: joblib and steplib?

0 Answers  






What is Uncatalog dataset? How can we access/use them?

1 Answers  


which utility is used to sort a file in jcl?

0 Answers   IBM,


Explain about ISPF/TSO Commands

0 Answers  


Please explain with syntax and an example, the Inrec fields and Outrec build in sort.

4 Answers   CTS, TCS,


How would I code JCL to copy a gdg data set G001v00 and create a gdg Data set G001v01

2 Answers  


Does jcl support automatic restart?

0 Answers  


What does S0C4 error mean?

8 Answers  


Categories