View previous topic :: View next topic
|
Author |
Message |
srinivsa
New User
Joined: 26 Jul 2010 Posts: 2 Location: india
|
|
|
|
Hi ,
I want to create a gdg version,which should be containg a particular number of records (say first 10 records) copied from the previous version.
Thanks,
Srini |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
OK, great, off you go then.
If you hit any problems be sure to let us know and we will try to help you
Also, you really should learn and use the correct terminology for dealing with GDS.
Both version and generation are valid but with totally different meanings. Search the forum to find out why. |
|
Back to top |
|
|
srinivsa
New User
Joined: 26 Jul 2010 Posts: 2 Location: india
|
|
|
|
oops sorry expat,
was little bit hurry, could u please tell me how and what is the best way to do this using jcl..
im actually new to mainframe. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Which program would you like your JCL to execute ?
Again a terminology point, because all JCL does is execute the program of choice and allocate the required files to the correct DD names.
Use the search button and stay in the DFSORT forum as I am sure there are many examples of copying only a few records from file to file. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Note also that you have two requests here:
1. how to copy just 10 recs from any dataset to a new dataset, whether GDG or not
2. how to make the target dataset the next (or any other, for that matter) generation (oops, I gave it away) of a GDG |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I want to create a gdg version,which should be containg a particular number of records (say first 10 records) copied from the previous version. |
As someone new to mainframes, you need to be aware that terminology is critical in IT -- similar terms may mean very different things. In your case, a GDG version must be defined manually and the data set name ends in V01 (or V02 or ...) and is almost never created in production systems whereas a GDG generation is built millions of times a day all over the world by production jobs automatically. First determine which one you want and then proceed.
You would also benefit from clicking the manuals link at the top of the page and reading the JCL Language Reference and Programming Guide manuals -- preferably cover to cover. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I'm not sure if what I tell you will help you or not however, probably you can use it as a prototype:
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DUMMY,LRECL=aaa,RECFM=FB,BLKSIZE=0
//SORTOUT DD DSN=SOME.GDG.NEWGEN(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(1,1),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=('000000000')
/* |
This will create a new generation for an existing GDG with one row in it with a value '000000000'. |
|
Back to top |
|
|
|