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

Answer Posted / balmukund

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?

784


What is the function of dd disp parameter?

646


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 ?

9197


How can a jobs execution priority be modified?

782


how you will the direct the data to spool using sysout option?

1743






In sms datasets, what is the function of the dd avgrec keyword?

638


Suppose I have five jobs to do. But I want to hold one?

642


I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?

683


I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?

1331


How does jcl specify the job to the operating system?

736


How can a stopped job be started again?

692


When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?

732


What is the function of the dd mgmtclas keyword in sms datasets?

724


What is the difference between run mode and addressing mode?

619


what are the various stages of job processing?

721