On 7 Apr, 08:42, "Grzegorz Mazur"
<ne...@[EMAIL PROTECTED]
> wrote:
> Hi All!
>
> This is more of a mainframe question than a COBOL one, but
nevertherless...
>
> I am looking for a way to get information on dataset allocation (primary
and
> secondary space) from a COBOL batch program. Basically what I am doing
is
> generating a JCL from this program, that will allocate a dataset with
very
> similar space allocation to a model dataset. To be correct on the PRI
and
> SEC allocation, I need the exact numbers - guessing them doesn't seem
right
> :) This is a part of a larger backup manipulation process, so the amount
of
> datasets is large.
>
> Has anyone got a clue how to do it? I was already considering IDCAMS and
> NAVIQUEST - the first one cannot be called from COBOL (at least not in a
> programmer-friendly way), the second one is also batch driven. In both
cases
> re****t analysis is difficult... I am sure some kind of a tool must exist
:(
>
> BTW - no, I cannot use 'LIKE' in the space allocation parameters, as
LIKE
> has some serious limitations (i.e. it does not really allocate the same
> space). "Unless you explicitly code the SPACE parameter for the new data
> set, the system determines the space to be allocated for the new data
set by
> adding up the space allocated in the first three extents of the model
data
> set. Therefore, the space allocated for the new data set will generally
not
> match the space that was specified for the model data set." (IBM JCL
> manual).
>
> Please help! ;)
>
> Thanks in advance,
> Greg
I suggest that you do this by writing a cobol program which will:
1. read a list of source datasets;
2. for each source dataset generate an IEFBR14 job which references
two datasets. The first dataset it references must be the source
dataset with DISP=(MOD,PASS,PASS) and the second dataset must be your
new backup dataset using a DISP=(NEW,CATLG,DELETE) and with a
SPACE=*.firstdatasetddname.
Alternatively, you could reallocate the datasets to DATACLAS (or
whatever it is called where the system automatically allocates space
according to pre-determined model sizes).


|