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 / 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

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

Answer / lu

your questions is 10 flat files copy into 1 output !!! or
10 flat file into 10 output !!!!


u create 10 steps (10 flat files into 10 output with GDG
//STEP1 EXEC PGM=IEBGENER
//sysut1 DD DSN=FDWS01.SUB.RESTORE1,DISP=old
//SYSUT2 DD DSN=FDWS01.TEST.RESTORE(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(20,10),RLSE),
// DCB=(MODEL.DCB,RECFM=FB,
// LRECL=80, BLKSIZE=800)
//*
//*
//STEP02 EXEC PGM=IEBGENER
//sysut1 DD DSN=FDWS01.SUB.RESTORE2,DISP=old
//SYSUT2 DD DSN=FDWS01.TEST.RESTORE(+2),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(20,10),RLSE),
// DCB=(MODEL.DCB,RECFM=FB,
// LRECL=80, BLKSIZE=800)
ok.....

Is This Answer Correct ?    4 Yes 2 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 / rakesh jena

Simply you will copy all the 10 flat files into GDG base.
Then thry ISPF3.4 option menu you can see all the o/p of
flat would be available in last 10 current version of GDG
file. Please let me know if i am wrong but after try once.

We are using this method always in our pjct.

Is This Answer Correct ?    3 Yes 3 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 / garry

@Balmukund : Ultimate reply:

Same can be done by following method:

Sort all the 10 files on a ASC KEY.

Merge them and copy them to any file (Or GDG).

Let me know if you ned JCL for this. I hope u can do it and post the JCL for others.


Thnx, pls let us know the result

Garry

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

What is 'S0C7' abend?

9 Answers  


Explain the job statement in jcl?

0 Answers  


Explain the function of //cntl statement?

0 Answers  


How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?

0 Answers  


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

2 Answers  






proc1,proc2,up to proc5 is there if i want to call proc1 and proc5how can u write the code

2 Answers  


How does jcl specify the job to the operating system?

0 Answers  


What is the purpose and meaning of the REGION keyword and what JCL statement is it associated with?

3 Answers   IBM,


Hi Please try to be to-the-point. 1) How to INCLUDE a JCL segment in a JOB ? (A Small example) 2) What is SPOOL and what is SPOOL FULL ? and how to direct the output of a Jobstep to SPOOL ?

3 Answers   IBM,


what is the use of JCL?

0 Answers  


What is the significance of addrspc parameter in exec statement?

0 Answers  


Can comments be specified at the very beginning of a jobcard? Will the JCL execute?

3 Answers  


Categories