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

Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE

0 Answers  


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

0 Answers  


What will happen when we try to pass data from JCL to COBOL using PARM parameter without declaring the length field in Linkage Section?

2 Answers   IBM,


I need to compare two VSAm files. In input VSAM file some fields are updating and the updated feilds are coming into the output file. now i need to compare these two files with respect to a perticular field. Please suggest a suitable JCL code me.

2 Answers   Cognizant, Wipro,


How jcl is used for testing batch programs?

0 Answers  






i want apply mainframe devolper with 3+ but i dont have that much of knowledge what isthe solution to get that much of knoweldge?

1 Answers  


IN-STREAM DATA NOT ALLOWED IN PROC how can come out from this problem

7 Answers  


What is the purpose of disp parameter?

0 Answers  


Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed

0 Answers  


How to compare 2 files using File-Aid?

1 Answers   IBM,


How Can we see all generations of a GDG ?

3 Answers   Polaris,


what are the statements that are not valid to be included in an include statement?

0 Answers   IBM,


Categories