How to combine two gdg 's into a single gdg?

Showing Answers 1 - 10 of 10 Answers

Guest

  • Jun 14th, 2006
 

Hi,

This is very simple.Please use the JCL to merge both the GDG's into a new GDG.

//S1    EXEC PGM=ICETOOL
//TOOLMSG   DD SYSOUT=*
//DFSMSG    DD SYSOUT=*
//IN1 DD DSN=...  GDG1,DISP=SHR
//    DD DSN=...  GDG2,DISP=SHR

//OUT DD DSN=GDG NEW,DISP=SHR 
//TOOLIN DD *
SORT FROM(IN1) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
  SORT FIELDS=COPY

Thank you

Krishy

  Was this answer useful?  Yes

jvsamycts

  • Oct 10th, 2009
 

Use IEBGENER and give the two gdg's in SYSUT1 and concatenated gdg will be created in SYSUT2. SYSIN should be DD DUMMY.

  Was this answer useful?  Yes

vinod.thete

  • Aug 31st, 2013
 

We can achieve using ICEGENER Utility also

Code
  1. //step   EXEC   PGM = ICEGENER

  2. //SYSUT1 DD DSN=AISSTMP.MILN.TEST(0),

  3. //                 DISP=SHR

  4. //             DD DSN=AISSTMP.MILN.TEST(1),

  5. //                 DISP=SHR

  6. //SYSOUT DD DSN=AISSTMP.MILN.TESTOUT,

  7. //                 DISP=OLD

  8. //SYSOUT DD SYSOUT=*

  9. //SYSOUT DD DUMMY

  10.  


Note : correct me if i am wrong

  Was this answer useful?  Yes

PK.Ganapathy

  • Jan 7th, 2015
 

There are multiple utilities. Personally, I use SORT with SORTIN to include the 2 GDGs, and the SORTOUT with the output GDG. Your SYSIN will be SORT FIELDS=COPY

Code
  1. //SORTIN DD DISP=SHR,DSN=<gdg1>

  2. //               DD DISP=SHR,DSN=<gdg 2>

  3. //SORTOUT DD DISP=(NEW,CATLG),DSN=<new gdg(+1)>,SPACE=<space parms>

  4. //SYSIN DD *

  5. SORT FIELDS=COPY

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions