Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
That was just a copy paste error. I took the wrong version of the JCL Please ignore GENOUT/GENIN problem. I still have the same error even after changing it to GENIN.
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
Hi Dick sherrer,
As suggested , I started from the begnining of the JCL i.e. step by step and i found that it is working fine if i use the latest version of the gdg manually.
But if i replace G0002V00 with (0). It is throwing me error. Is there any way to point to the latest version of the GDG?
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Quote:
Is there any way to point to the latest version of the GDG?
I suspect the +1 is not "the latest" while in the creating step . . . It has not been "finalized" and does not yet "exist" - it is still being created.
From the JCL manual (i added the bolding):
Quote:
Use the LIKE parameter to specify the allocation attributes of a new data set by copying the attributes of a model data set, which must be an existing cataloged data set and reside on a direct access volume.
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
Well, I tried using (0) only.
I tried using (+1) for creating a new generation dataset and for referring to the latest version of previous file, i used (0) in LIKE parameter. I dont see any problem with this. Correct me if i am wrong.
Also, we are using JES3. That means all the datasets are allocated before the job is scheduled. So a new version of the dataset OUT1 must be created already before the job is scheduled.
Correct. (+n) relative GDGs are used to work out what the explicit G**V* suffix will be, based on a look at the catalog when the job starts. (Though in the example above the OP is creating +1 of two different datasets)
If you can't get like to work with relative GDG and don't want the hassle of working out what the explicit DSN is, you could always dodge the bullet by setting up a spurious non-GDG file as ID..&QUAL1..MODEL and using that in the LIKE statement.
When new GDG version are being allocated, the catalog happens only when the job finishes.
I guess this happens after the step in which the GDG is created. But accessing the new GDG created in the same job depends on sys parms... some places u can access only after the job has completed...others it could after the STEP has completed.....