IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

creating a gdg version with some records(template header)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinivsa

New User


Joined: 26 Jul 2010
Posts: 2
Location: india

PostPosted: Wed Sep 08, 2010 3:51 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 08, 2010 3:54 pm
Reply with quote

OK, great, off you go then.
If you hit any problems be sure to let us know and we will try to help you icon_rolleyes.gif

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
View user's profile Send private message
srinivsa

New User


Joined: 26 Jul 2010
Posts: 2
Location: india

PostPosted: Wed Sep 08, 2010 3:58 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 08, 2010 4:19 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Wed Sep 08, 2010 4:55 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Sep 08, 2010 5:07 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Sep 09, 2010 4:33 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top