Do not arouse the wrath of the great and powerful z/OS. I said come back tomorrow

dinsdag 18 maart 2008

HSM LIST TTOC

Here's the challenge:

Take the output from one (or more) HSM LIST TTOCs and store them in a SAS PDB keeping date and time the TTOC as made.

For this example we will only store a limited number of fields from the HSL LIST TTOC output, I assume you can fill in the blanks if needed :)

Without further ado, here's the SAS code:

First, we need to parse the entire input file (yes this can be a GDG base of the GDG containing all your LIST TTOCS!) (blogger still dont do blanks for me, so code has been downgrades with spaces for readbility)

data hsm01;
.. infile hsmttoc;
.. input @31 selstring $16.
.... @75 theDate $8.
.... @63 theTime $8.
.... @95 theSyst $8.
.... @1 VOLSER $7.
.... @19 TYPE $7.
.... @46 PCTVALID $4.
.... @101 LIBNAM $9.;


Next we wat to 'save' the time and date from the LIST TTOC HEADER.

data hsm02;
.. set hsm01;
.. if selstring = "TAPE VOLUME TTOC" then do;
.... call symput('saveDate', thedate);
.... call symput('saveTime', thetime);
.... call symput('saveSyst', thesyst);
.. end;
.. theDate = symget('saveDate');
.. theTime = symget('saveTime');
.. theSyst = symget('saveSyst');

Now we can drop all the unwanted lines, I took the lines with the LIBNAME as valid lines. I assume you know what value to use for libnam ;)

data hsm03(drop= selstring libnam);
.. set hsm02;
.. where libnam = 'YOURLIBNAM';

And there we have it, a nice collection with all HSM owned volumes, their type (backup, migrates dumps) and their percentvalid.

Still to do, or why this problem arised in the first place, complete the SAS job so we will end up with a nice 'active data distribution'-graph.

This is something for next time :)

Geen opmerkingen:

Powered By Blogger

html code

This Should Be A Geeky Link
I need some good 100x100 piccies :)

a text

About Me

Mijn foto
Tja, It-er 'pur sang' vanaf de vroege tienerjaren (en misschien vlak daarvoor ook al wel, zal het eens navragen bij paps en mams) verslaafd aan computers. Via de commodore 64 (bedankt Cees) door naar de MSX1, MSX2, MSX2+, Commodore Amiga, 286,386,386DX,486,Apple powerPC, pentium weer terug naar af op het Mainframe (je weet toch, die oude dinosaurus machines die nu weer zo hip zijn!) Uiteraard dus werkzaam in de IT. 9 jaar bij een bank/verzekeraar en vanaf binnenkort de detachering in. Hopeloos verliefd op mijn meissie Stacey (uit NoordIerland, al het mooie komt van verre!) en koning te rijk met onze zoon Jamie. Ach er valt nog zo veel te vertellen, maar het lezen van de berichten zal na verloop van tijd wel wat meer duidelijk maken.

Labels