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

Started task using a generation dataset


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

New User


Joined: 08 Feb 2022
Posts: 39
Location: USA

PostPosted: Thu Apr 13, 2023 5:28 pm
Reply with quote

I have a started task uses a generation dataset for DDPRINT. This started task is only brought down for 5 minutes and then restarted. I need to modify the dataset after it's created but when the task starts up it creates a new generation of the dataset but the other generations are not accessible and are held by the started task.

Is there a way to release those datasets or must I make changes only while the started task is down?

MLK
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Thu Apr 13, 2023 6:52 pm
Reply with quote

The STC will access the DSN by it's relative number I guess. Means, it's blocked for you to update. To be consistent with z/OS you can only update when the STC is down. Other options are possible, but shall not be discussed.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Thu Apr 13, 2023 8:37 pm
Reply with quote

That doesnt sound right. Can we see the JCL, please?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Apr 13, 2023 10:16 pm
Reply with quote

quoting the manual
www.ibm.com/docs/en/zos/2.1.0?topic=jobs-submitting-multiple-update-generation-data-group
not the latest one but the concept has been the same since GDGs were born

Quote:

This topic provides guidelines that you can use when you submit multiple jobs that update a particular GDG:

No two jobs running concurrently can refer to the same GDG.

For batch or dynamic allocation jobs that specify relative generation numbers, the system enqueues the GDG base name as shared or exclusive, depending on the highest disposition that is used in the job. The GDG base name is exclusive if the highest job disposition is NEW or MOD. The GDG base name is shared if the highest job disposition is SHR. This safeguard prevents concurrent users from updating the GDG by adding or deleting generation data sets while other users are using the GDG.

For batch or dynamic allocation jobs that use absolute generation data set names, the system does not enqueue the GDG base. Multiple users are able to update the GDG by deleting or adding generation data sets at the same time. This situation does not affect the integrity of the GDG or generation data sets. However, jobs that use relative generation numbers might obtain the wrong generation, because the numbers can change. Even if you use absolute generation numbers, a job might accidentally replace a generation data set that another job is using.

The only time that you can use absolute generation numbers is when you need to run concurrent jobs that use the same GDG and at least one of the jobs uses a disposition of NEW or MOD. Ensure that the jobs do not accidentally overlay a generation data set that another job is using.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Apr 13, 2023 10:23 pm
Reply with quote

Quote:
The STC will access the DSN by it's relative number I guess.
I suspect the same.
Back to top
View user's profile Send private message
M Lee Klein

New User


Joined: 08 Feb 2022
Posts: 39
Location: USA

PostPosted: Thu Apr 13, 2023 10:31 pm
Reply with quote

The jcl in the started task is

//DDPRINT DD DSN=BD.ADABAS.MPMPRNT(+1),
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(TRK,(5,5),RLSE)

I was wanting to run a job that references BD.ADABAS.MPMPRNT.G2093v00.

So because I used a +1 in the started task jcl, I cannot access the generation?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Apr 13, 2023 11:48 pm
Reply with quote

Quote:
So because I used a +1 in the started task jcl, I cannot access the generation?


Yes, since you use +1, you cannot access any generations in the GDG.
If your started task writes to the fully qualified generation with GXXXvYY at the end then the other generations would be accessible.
Although it could be a pain to make started task to use a absolute full name instead of the relative name
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Fri Apr 14, 2023 12:07 am
Reply with quote

To verify the current allocation, use ISRDDN or D GRS command. The GDG base and latest Generation is highly likely in-use, means not available for other updates until the STC has freed the resources.
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top