|
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: Charles Hottel on 7 Apr 2008 20:40 "Grzegorz Mazur" <news2(a)ihateunwantedmail.gregu.cjb.net> wrote in message news:ftdejv.1jc.1(a)hamster.gregu.cjb.net... > "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 > 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 documentation 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.
From: William M. Klein on 8 Apr 2008 00:32 Wouldn't using an ISPF library service do this for you? Check out DSINFO at http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ispzsg60/2.6 -- Bill Klein wmklein <at> ix.netcom.com "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. 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: Alistair on 9 Apr 2008 16:48
On 8 Apr, 05:32, "William M. Klein" <wmkl...(a)nospam.netcom.com> wrote: > Wouldn't using an ISPF library service do this for you? Check out DSINFO > athttp://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ispzsg60/2.6 > > -- > Bill Klein Thanks for the link Bill, it looks worthy of further investigation. |