|
Prev: WD 1.10, Variable Length groups and CALL statement
Next: Sampling accuracy and everyone being wrong was Re: Decimal versus binary arithmetic was Re: J4 - presentation/discussion on "Future of the COBOL Standard"
From: Grzegorz Mazur on 7 Apr 2008 03:42 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 report 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
From: Michael Mattias on 7 Apr 2008 08:59 "Grzegorz Mazur" <news2(a)ihateunwantedmail.gregu.cjb.net> wrote in message news:ftcq9s.3n0.1(a)hamster.gregu.cjb.net... > 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 "documentation" 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. (Complete list of software available for download here: http://www.talsystems.com/tsihome_html/techcorner.html) -- Michael C. Mattias Tal Systems Inc. Racine WI mmattias(a)talsystems.com
From: Grzegorz Mazur on 7 Apr 2008 09:28 "Michael Mattias" <mmattias(a)talsystems.com> wrote in message news:NUoKj.1153$GO4.875(a)newssvr19.news.prodigy.net... > "Grzegorz Mazur" <news2(a)ihateunwantedmail.gregu.cjb.net> wrote in message > news:ftcq9s.3n0.1(a)hamster.gregu.cjb.net... >> 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 > "documentation" > 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
From: Binyamin Dissen on 7 Apr 2008 10:09 On Mon, 7 Apr 2008 09:42:19 +0200 "Grzegorz Mazur" <news2(a)ihateunwantedmail.gregu.cjb.net> wrote: :>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 :>report 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). Basically, you are asking how to install a screw with a hammer. While it can be done, the results tend to be less than desirable. Your best bet is to use REXX and the LISTDSI function. Or an assembler subroutine. But if you want a pure COBOL solution..... Read the file till end. That will give you a record count. -- Binyamin Dissen <bdissen(a)dissensoftware.com> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies.
From: Alistair on 7 Apr 2008 16:01
On 7 Apr, 08:42, "Grzegorz Mazur" <ne...(a)ihateunwantedmail.gregu.cjb.net> 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 > report 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). |