Copy GDG to GDG (one to one).

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
User avatar
arrbee
Active Member
Posts: 144
Joined: Fri Feb 24, 2006 11:33 am

Copy GDG to GDG (one to one).

Post by arrbee » Tue Apr 18, 2006 1:46 pm

Hi Frank,

Is it possible to copy a GDG versions to another new GDG (one old generation to one new generation) using the SORT?

Please let me know.

TIA.
Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)

User avatar
kvenkat_b4u@yahoo.com
Member
Posts: 2
Joined: Sat Apr 22, 2006 3:07 pm
Location: chennai

GDG

Post by kvenkat_b4u@yahoo.com » Wed Apr 26, 2006 9:03 am

HI,

WE CAN COPY OLDER VERSION OF GDG TO NEWER VERSION BY USING SORT

//STEP4 EXEC SORTD
//SORTIN DD DSN=DEMO.TEST.GDG.G0001V00,DISP=SHR
//SORTOUT DD DSN=DEMO.TEST.GDG(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(1,1),RLSE),
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB),
// UNIT=SYSDA
//SYSIN DD *
SORT FIELDS=(1,5,CH,A)
/*
//SYSOUT DD SYSOUT=*
//
Love to learn ever..,
By,
venkat

ramana murthy
Member
Posts: 10
Joined: Thu Jul 21, 2011 1:34 pm

Post by ramana murthy » Thu Jul 21, 2011 7:35 pm

thats a good one ..........but sort work files are must between SORTIN AND SORTOUT.
//SORTWK01 DD UNIT=DASD,SPACE=(TRK,(1,1),RLSE


ANY QUERIES:ramanamurthyt87@gmail.com :D

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu Jul 21, 2011 7:46 pm

thx for updating a 5 year old thread.

and if the SORT option had been SORT FIELDS=COPY, no sortwork files would have been needed.

also, placement of dd statements within a step have no manditory order.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

ramana murthy
Member
Posts: 10
Joined: Thu Jul 21, 2011 1:34 pm

Post by ramana murthy » Thu Jul 21, 2011 9:40 pm

All your suggestions are to me .Thank you.

Ramana Murthy.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sat Jul 30, 2011 2:15 pm

Actually, coding SORTWKs in the JCL is not a (Sync or DF) Sort requirement. Allowing Sort to dynamically allocate necessary SORTWORK space is generally considered more efficient, as the SORTWORK space is acquired "as needed" and you avoid scenarios where disk space is potentially over-allocated by the user.
Regards,
Anuj

academyindia4

Topic deleted by Admin

Post by academyindia4 » Mon Feb 01, 2016 10:54 pm

<< Content deleted By Admin >>

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others