I just tried both versions on an old 430RES disk.  The one that DEFINED
MDISK of 1 cylinder missed 6 minidisks. For example:
HIT on cylinder: 0905
MNT3B2 001  Q/Q R/O   146 3390 4096     6381      23804-91       247


2010/11/18 Kris Buelens <kris.buel...@gmail.com>

> Nice piece of work.  Two remarks though:
>
>    1. Why "address CMS 'STATE ACCESSM0 MODULE *'"?
>    If the use of address CMS is to get an error message, better code 'CMDCALL
>    STATE ACCESSM0 MODULE *' this way you get error messages, and without
>    loosing the safety of ADDRESS COMMAND.
>    2. The MDISK you define before trying ACCESS, is always 1 cylinder
>    big.  If the MDISK contains many files, the CMS directory file can extend
>    beyond that cylinder and ACCESS will fail.  Without reverting to TRACKREAD
>    (or alike) to extract record 3 (and search for CMS1 and if found, get the
>    number of CMS formatted cylinders), you could better use
>    'PIPE CP DEFINE MDISK 001' cx 'END' volid
>
>
> 2010/11/17 Mike Walter <mike.wal...@hewitt.com>
>
>
>> Been there, done that, have the T-shirt (which seems to have shrunken a
>> few sizes).
>>
>> Try copy/past of the following LOSTDISK EXEC.  It does require the ID to
>> be able to execute the DEFINE MDISK command.
>>
>> Mike Walter
>> Aon Corporation
>> The opinions expressed herein are mine alone, not my employer's.
>>
>> /* Prolog; See Epilog for additional information ********************
>> * Exec Name     - LOSTDISK EXEC                                    *
>> * Unit Support  - OSS/VM                                           *
>> * Status        - Version 1, Release 1.0                           *
>> ********************************************************************/
>>
>>   address 'COMMAND'
>>   parse source xos xct xfn xft xfm xcmd xenvir .
>>   parse upper arg parms 1 operands '(' options ')' parmrest
>>
>>   parse var operands volid fn ft .
>>   If vol='' | volid='?' then
>>      Signal Explain
>>
>>   If fn='' | ft='' then
>>      Do
>>        say 'Warning: searching for ONLY MINIDISKS'
>>        say 'If you need to find specific file patterns on lost' ,
>>            'disks, enter:' xfn '?'
>>      End
>>
>>   ?fl=0
>>   ?LFopts=0
>>   lfopts=''
>>   wkopts=options
>>   Do while wkopts<>''
>>      parse var wkopts opt wkopts
>>      Select
>>        When abbrev('FILELIST',opt,5) then ?fl=1
>>        When opt='FL'                 then ?fl=1
>>        When opt='LFOPTIONS'          then
>>          Do
>>            ?lfopts=1
>>            lfopts=wkopts
>>            wkopts=''
>>          End
>>        Otherwise nop
>>      End /* Select */
>>   End
>>
>>   If ?fl & ?lfopts then
>>      Do
>>        say xfn'; Mutually exclusive options specified:' ,
>>                 'FILELIST LFOPTIONS'
>>        Call Exit 20
>>      End
>>
>>
>>   address CMS 'STATE ACCESSM0 MODULE *'
>>   If rc=0 then
>>      Do
>>        'ACCESSM0 ON'
>>        ?accm0=1
>>      End
>>   Else If ?fl then
>>           Do
>>             say 'Warning!  Filemode 0 files will not be displayed' ,
>>                 'when using FILELIST option'
>>             say 'because the ACCESSM0 MODULE is unavailable.'
>>           End
>>
>>   /* Warning: CP DEFINE MDISK gets a R/W link to the disk.         */
>>   /* Do NOT issue a CMS RELEASE, just DETACH it - other users      */
>>   /* are likely to have a R/W link to the disk, release can        */
>>   /* provide a quick one-way encyryption (trash it)!               */
>>   ?showhdr=1
>>   Do cx=0 by 1
>>     'PIPE CP DETACH 001'
>>     'PIPE CP DEFINE MDISK 001' cx 1 volid ,
>>        '| STEM emsg.'
>>      src=rc
>>      /* HCPLNM024E Cylinder or block numbers missing or invalid */
>>      If src=24 then Leave
>>      If rc<>0 then
>>         Do
>>           src=rc
>>          'PIPE STEM emsg. | CONS'
>>           Call Exit src
>>         End
>>     'PIPE COMMAND ACCESS 001 Q/Q'            /* Prevent R/W access */
>>      If rc<>0 then Iterate
>>      If ft='' then
>>         Do
>>           If ?showhdr
>>              then showhdrstage=''
>>              else showhdrstage='| DROP 1'
>>
>>          'PIPE COMMAND QUERY DISK Q' ,
>>              showhdrstage ,
>>             '| PREFACE STRLITERAL /HIT on cylinder:' right(cx,4,0)'/' ,
>>             '| CONSOLE'
>>           ?showhdr=0
>>           Iterate
>>         End
>>
>>     'PIPE COMMAND LISTFILE' fn ft 'Q ('lfopts '| STEM hit.'
>>      If rc<>0 then Iterate
>>
>>      If ?showhdr
>>         then showhdrstage=''
>>         else showhdrstage='| DROP 1'
>>
>>     'PIPE (END ? Name GetSizeToo)' ,
>>        '| COMMAND QUERY DISK Q' ,
>>        '| copy: FANOUT' ,
>>           showhdrstage ,
>>        '| PREFACE STRLITERAL /HIT on cylinder:' right(cx,4,0)'/' ,
>>        '| CONSOLE' ,
>>        '? copy:' ,
>>          '| TAKE LAST' ,
>>          '| VAR qdisk'
>>
>>      ?showhdr=0
>>     'PIPE STEM hit. | CONSOLE'
>>      If \?fl then Iterate
>>     /* They want FILELIST, probably XEDIT.  Need real mdisk size.  */
>>     'PIPE CP DET 0001'
>>      parse var qdisk . . . . size .
>>     'PIPE CP DEFINE MDISK 001' cx size volid ,
>>        '| STEM emsg.'
>>      If rc<>0 then
>>         Do
>>           src=rc
>>          'PIPE STEM emsg. | CONS'
>>           Call Exit src
>>         End
>>     'PIPE COMMAND ACCESS 001 Q'
>>
>>      /* Help prevent accidental R/W update *AFTER* FILELIST built  */
>>      If ?accm0
>>         then push 'COMMAND ACCESS 001 Q/Q (MODE0'
>>         else push 'COMMAND ACCESS 001 Q/Q'
>>      queue 'COMMAND EMSG Hit on cylinder' cx
>>     'EXEC FILELIST' fn ft 'Q'
>>   End
>> Call Exit 0
>>
>>
>> /********************************************************************/
>> /*                   Sub-Routines below this point                  */
>> /********************************************************************/
>>
>> Exit:
>>   parse arg exitrc .
>>   If verify(exitrc,'-0123456789')=0 then Exit exitrc
>>                                     else Exit 999999
>>
>> Error:
>>   say '+++ "ERROR" error routine entered in:' xfn xft xfm', rc='rc
>>   say '+++ from line:' sigl', which reads:'
>>   say '+++'sourceline(sigl)
>> Call Exit 20
>>
>>
>> Syntax:
>>   say '+++ "SYNTAX" error routine entered in:' xfn xft xfm', rc='rc
>>   say '+++ from line:' sigl', which reads:'
>>   say '+++'sourceline(sigl)
>> Call Exit 20
>>
>>
>> NoValue:
>>   say '+++ "NoValue" error routine entered in:' xfn xft xfm', rc='rc
>>   say '+++ from line:' sigl', which reads:'
>>   say '+++'sourceline(sigl)
>>   say '+++ Variable with no value is:' condition('Description')
>> Call Exit 24
>>
>> Explain:
>>  'PIPE (NAME Explain)' ,
>>     '| <' xfn xft xfm ,
>>     '| INSIDE /ExplainBegin:/ /ExplainEnd:/' ,
>>     '| CONSOLE'
>>   Call Exit 0
>> /*
>> ExplainBegin:
>> LOSTDISK is used from a userid with the PrivClass for 'CP DEFINE MDISK'
>> to locate mindisks, and optionally files, on a full-pack volume.
>> It is handy if you no longer have a DIRECTORY mapping that volume.
>>
>> Syntax:
>>
>> >--LOSTDISK--+-volser-+--+---------------------------------+-|options|-><
>>                         +--fnamepattern--+----------------+
>>                                          +--ftypepattern--+
>>
>>
>> |-Options-|
>>
>> FILEList
>> FL
>>          Enter FILELIST on the files with patching filename (and
>>          optionally filetype) patterns from the found mdisk(s).
>>
>>
>> LFoptions
>>          Mutually exclusive with "FILELIST" or "FL".
>>          Issues LISTFILE for the specified "fnamepattern ftypepattern"
>>          with the "LFoptions" arguments as LISTFILE's options.
>>
>> For example:
>>
>> lostdisk vmres1
>> lostdisk vmpk01 *some* file*
>> lostdisk vmpk02 *some* cata* (filel
>> lostdisk vmu087 *some* *x*   (fl
>> lostdisk 520res user direct  (fl
>> ExplainEnd:
>> */
>>
>> /* Epilog ***********************************************************
>> * Function      - See 'Explain' subroutine, above.                 *
>> * Component of  - VM System Programmers Toolbox                    *
>> * Command format- See 'Explain' subroutine, above.                 *
>> * Called by     - Concerned sysprogs.                              *
>> * Dependencies  - CMS REXX                                         *
>> *               - CMS Pipelines                                    *
>> *               - Privs to use the command CP DEFINE MDISK         *
>> *               - Optionally, FILELIST EXEC                        *
>> *               - Optionally, ACCESSM0 MODULE                      *
>> * Program Lang. - CMS REXX                                         *
>> * Date Written  - 20020226                                         *
>> * Author        - Michael R. Walter                                *
>> * Changed | By  | Description of Change                            *
>> * --------+-----+------------------------------------------------- *
>> * 20061107  mrw - Added example: lostdisk 520res user direct (fl   *
>> *                 following real-life "test".  ;-)                 *
>> * 20090408  mrw - Changed loop from 3338 cyls to rc=24.            *
>> * 20090415  mrw - Add LFOPTIONS support.                           *
>> *                                                                  *
>> ********************************************************************/
>>
>>
>>
>>  *"Brian France" <b...@psu.edu>*
>>
>> Sent by: "The IBM z/VM Operating System" <IBMVM@LISTSERV.UARK.EDU>
>>
>> 11/17/2010 02:32 PM
>>  Please respond to
>> "The IBM z/VM Operating System" <IBMVM@LISTSERV.UARK.EDU>
>>
>>
>>   To
>> IBMVM@LISTSERV.UARK.EDU
>> cc
>>   Subject
>> A how to ?...
>>
>>
>>
>>
>> Folks,
>>     Our storage folks have come across a dasd volume that apparently by
>> it's name was one of our VM volumes. Now, none of my 3 vm's have this volume
>> on line and I would like to just have a look see as to what was on the
>> volume. Is there a utility to do this? We have Vmdirect but I don't believe
>> by adding this volume into the pool a map is going to give me anything since
>> no users have it. IF this was z/OS, I would simply use ISPF 3.4 to list the
>> contents of the volume and this is what I was wondering about, it something
>> like that existed in z/VM. Maybe this is something that can't be done due to
>> the nature of it all. Thanx in advance...
>> --
>>
>> --
>>
>> Brian W. France
>> Systems Administrator (Mainframe)
>> Pennsylvania State University
>> Administrative Information Services - Infrastructure/SYSARC
>> Rm 25 Shields Bldg., University Park, Pa. 16802
>> 814-863-4739 *
>> **b...@psu.edu* <b...@psu.edu>
>>
>> "To make an apple pie from scratch, you must first invent the universe."
>>
>> Carl Sagan
>>
>> ------------------------------
>>
>> The information contained in this e-mail and any accompanying documents
>> may contain information that is confidential or otherwise protected from
>> disclosure. If you are not the intended recipient of this message, or if
>> this message has been addressed to you in error, please immediately alert
>> the sender by reply e-mail and then delete this message, including any
>> attachments. Any dissemination, distribution or other use of the contents of
>> this message by anyone other than the intended recipient is strictly
>> prohibited. All messages sent to and from this e-mail address may be
>> monitored as permitted by applicable law and regulations to ensure
>> compliance with our internal policies and to protect our business. E-mails
>> are not secure and cannot be guaranteed to be error free as they can be
>> intercepted, amended, lost or destroyed, or contain viruses. You are deemed
>> to have accepted these risks if you communicate with us by e-mail.
>
>
>
>
> --
> Kris Buelens,
> IBM Belgium, VM customer support
>



-- 
Kris Buelens,
IBM Belgium, VM customer support

Reply via email to