Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Creating an Empty version of GDG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Anu Narayanan

New User


Joined: 12 Sep 2005
Posts: 20
Location: USA

PostPosted: Tue Jan 16, 2007 3:41 am    Post subject: Creating an Empty version of GDG
Reply with quote

Hi,

I have the following Requirement.

One version of GDG would be created every month and at the end of the year, there would be 12 generations. The next year beginning I would need to delete all the versions created for the previous year and create a dummy version of the GDG on january 1st.

For deleting all the version I can use Idcams and specify
DEL (PLI0.DZC120WK.EXTRACT.*) which will delete all the existing versions of GDG without affecting the base.

How do I create a Dummy version of gdg after the above step is accomplished ?

Thanks for your replies.
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Jan 16, 2007 4:09 am    Post subject: Re: Creating an Empty version of GDG
Reply with quote

Anu, this is all you need to do to delete all gens and create a dummy gen (empty)

Code:

//JS00100 EXEC PGM=IEFBR14
//DELDSN  DD  DSN=PLI0.DZC120WK.EXTRACT,    GDG BASE, delete all gens
//            DISP=(OLD,DELETE,KEEP)
//DMMYDSN DD  DSN=PLI0.DZC120WK.EXTRACT(+1),
//            DISP=(,CATLG,DELETE),
//            SPACE=...
//            DCB=(...
Back to top
View user's profile Send private message
balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Tue Jan 16, 2007 3:05 pm    Post subject: Re: Creating an Empty version of GDG
Reply with quote

Hi

Try using Fastdel which will delete all the versions of the file

//FASTDEL EXEC PGM=FASTDEL
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
filename
/*

and then create empty version of the file using IEFBR14 based on conditional execution of the above step


Naga.
Back to top
View user's profile Send private message
Anu Narayanan

New User


Joined: 12 Sep 2005
Posts: 20
Location: USA

PostPosted: Wed Jan 17, 2007 3:07 am    Post subject: Re: Creating an Empty version of GDG
Reply with quote

Hi David,

Thanks for your reply. Can IEFBR14 be still used to create the GDG generations in tape? because when i used UNIT=C instead of UNIT=D, my job completes successfully, but i am not able to see any versions created. Whereas if i use UNIT=D for creating on disk, my job completes successfully as well as a new version of GDG is created.

Thanks for your reply
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jan 17, 2007 3:24 am    Post subject:
Reply with quote

Hello,

When IEFBR14 is used to "create" an empty dataset, it does not "really" create an empty dataset. It does allocate space on dasd and make a catalog entry.

A likely reason that the tape did not work was because there was no open/close issued against the new file - most tape management systems get their info from SMF open/close info and with IEFBR14 there is no open/close - just allocatoin and de-allocation.

If you "create" a new empty file with IEFBR14 you may have an open error in the program that tries to read it because there may be a dcb conflict.

Are you sure that you want an "empty" tape? If you create an empty file on dasd and the "real" files on tape, you should still be able to read them all with the gdg base name in your jcl.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Jan 17, 2007 3:26 am    Post subject:
Reply with quote

Tapes are a different sort of animal....instead of IEFBR14 it looks like you'll have to use a utility that actually opens the output dataset. Try sort, idcams or gener, with zero input and see which one works (brighter people here would probably know but sometimes the chase is the adventure).

Bill
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Jan 17, 2007 3:53 am    Post subject:
Reply with quote

dick scherrer wrote:
If you create an empty file on dasd and the "real" files on tape, you should still be able to read them all with the gdg base name in your jcl.
Good point Dick, I hadn't thought of that.
Another thing Anu, why is that first GDG necessary, do you have a job running before the first real one gets created that needs an empty one to go against?
Back to top
View user's profile Send private message
Anu Narayanan

New User


Joined: 12 Sep 2005
Posts: 20
Location: USA

PostPosted: Thu Jan 18, 2007 1:11 am    Post subject: Re: Creating an Empty version of GDG
Reply with quote

Hi,

Thanks for your replies.

I need an Empty version becuase of the following reason.

My job A runs every month beginning creating one version. so at the end of December we would have 12 versions. every version would contain Year to date DATA.
Another job B uses the lastest version created by job A every month in addition to another file created in the same job B.
So when running Job B on January first, I do not want to use the version created by Job A which would contain previous year DATA.
So I need to empty all the versions of the GDg created by JOB A every year begininng and create an empty version so that my job B when looking for the latest version would still be able to find an empty GDG version.
Hope I am clear.
I am thinking of the DASD empty dataset creation as an option like David said.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jan 18, 2007 1:49 am    Post subject:
Reply with quote

Thanks for the info, I was just curious....
Back to top
View user's profile Send private message
jinal_mca

New User


Joined: 05 Jan 2007
Posts: 23
Location: Pune, India

PostPosted: Wed Jan 24, 2007 12:41 pm    Post subject: solution
Reply with quote

First of all while defining index of GDF specify ur limit to 12. Which wl store 12 versions.

When limit wl reach to delete all version specify EMPTY property in ur model.

c ya
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jan 24, 2007 7:12 pm    Post subject:
Reply with quote

Hello Jinal,

If i understood the original request, an "empty" version is needed - one file that IS cataloged and when read will immediately be at end of file.

I do not believe your post will accomplish that. It will cause the catalog entries to change but will NOT create an EOF dataset.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Is there a time Version of DATEDIFF ? Bill Woodger DFSORT/ICETOOL 1 Wed Aug 17, 2016 7:06 pm
No new posts Syncsort version supporting FINDREP c... juares castro SYNCSORT 9 Tue Aug 09, 2016 6:54 pm
No new posts Creating an 'Enter' event with IMS MF... dileep chirasani Java & MQSeries 1 Sat Aug 06, 2016 2:23 am
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us