"Grzegorz Mazur" <news2@[EMAIL PROTECTED]
> wrote in message
news:ftdejv.1jc.1@[EMAIL PROTECTED]
> "Michael Mattias" <mmattias@[EMAIL PROTECTED]
> wrote in message
> news:NUoKj.1153$GO4.875@[EMAIL PROTECTED]
>> "Grzegorz Mazur" <news2@[EMAIL PROTECTED]
> wrote in
message
>> news:ftcq9s.3n0.1@[EMAIL PROTECTED]
>>> 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..
>>
>> You are looking to calculate how much to allocate? Or determine what
the
>> allocation parameters of an existing dataset are?
>>
>> If the former - you want to calculate - it's pretty badly out of date,
>> but
>> this file on my web site ...
>>
>> http://www.talsystems.com/tsihome_html/downloads/VsamSpace.zip
>> or
>> http://www.talsystems.com/tsihome_html/downloads/VsamSpace.exe
>>
>> Includes this software:
>> " Windows/32 software to calculate space requirements
(cylinders/tracks)
>> for
>> VSAM files based on media, record size, CI Size/freespace percent and
>> more.
>> Enables "tuning" of parameters to optimize DASD usage. Freeware."
>>
>> One of the software button options is "explain" or "info" or
>> "do***entation"
>> or something like that, which generates a text file explaining all the
>> arithmetic I used to calculate the space.. which you could code to do
the
>> calculations for your actual data.
>>
>> You will no doubt have to look up the parameters for the particular
disk
>> drives in use (I have not updated that software for about eight years
and
>> I'm sure there are new devices in that time), but it could be a start
for
>> you.
>
> Hi Mattias,
>
> unfortunately calculating wouldn't be a problem (we use a very well
> defined SPACE parameter set, depending on the amount of records rather
> than TRK or CYL). It is finding the actual parameters of an *existing*
> dataset that is the issue. To be more clear - I have a lot of datasets,
I
> need to manipulate them, but I have no way of knowing what their size
is.
> I am now trying to find that way :)
>
> Since posting the original message I've gone through DFSMS manual,
IDCAMS
> etc. Yet no cigar so far...
>
> Thanks for your input though :)
>
> Greg
>
I am not certain which control block contains the information that you
want.
Probably the DCB of the JFCB, but I am not certain..
Do a google group search on comp.lang.cobol searching for "cobptr". You
should find a COBOL program with that name that accesses these control
blocks and some others. However it only accesses some fields from them
and
IIRC not the ones you seek. Part of the do***entation within the program
gives the library and macro names that were used. Doing an assembly of a
program with the macros you can see the displacements for the generated
fields and use that to code COBOL definitions to match the fields that you
want. If you are not able to do this then let me know and I will see if I
can locate the fields for you and will post an example program that
displays
the values.
However be warned in advance that control blocks sometimes do change and
that can break this type of program code so it is well to think long and
hard before using this type of code in a production program. YMMV.


|