Well, thank you, Jim.  I had already sent FINDFILE EXEC to Bob off-list.
And I did indeed update FINDFILE to ignore non-CMS formatted disks 
(thought I sent you a copy), last update: 20051128.
Regardless, the latest 20051128 version is pasted below.

BTW, during our conversion last weekend from VM/ESA 240 to z/VM 510 (z/VM 
520 showed up the afternoon of Friday 30Dec2005 - just a little too late 
to install, refit  CP Exits, test and implement), the FINDFILE EXEC came 
in handy lots of times.  E.g. Where's that CEEDOPT ASSEMBLE file for the 
LE Run-time options? 

Mike Walter
Hewitt Associates
The opinions expressed herein are mine alone, not my employer's.

/* Prolog; See Epilog for additional information ********************
 * Exec Name     - FINDFILE EXEC                                    *
 * Unit Support  - OSS/VM                                           *
 * Status        - Version 1, Release 1.0                           *
 ********************************************************************/
   trace o

   address 'COMMAND'
   parse source xos xct xfn xft xfm xcmd xenvir .
   parse upper arg parms 1 operands '(' options ')' parmrest

/* Signal ON ERROR */

   If operands='?' then Signal Explain

   parse var operands ifn ift .
   If ift='' then ift='*'

   /* ------------------------------------------------------------- */
   /* Set 'ACCESSM0 ON' if possible, to see fm0 files on r/o disks  */
   /* ------------------------------------------------------------- */
  'PIPE (NAME QueryACCESSM0)' ,
     '| COMMAND QUERY ACCESSM0' ,
     '| SPECS WORD 2 1' ,
     '| VAR ?accm0'
   ?accm0=(?accm0='ON')                /* Set flag true=1, false=0  */
   If \?accm0 then                     /* ACCESSM0 not ON?          */
      Do                               /* It's not, try to set it   */
       'STATE ACCESSM0 MODULE *'       /* Command available?        */
        ?accm0=(rc=0)                  /* Set flag true=1, false=0  */
        If ?accm0 then 'ACCESSM0 ON'   /* If cmd avail, issue it    */
      End
   If rc<>0 | \?accm0 then             /* An error or not avail?    */
      Do
        say 'Warning: filemode 0 files on R/O disks will not be' ,
            'found.'
        say 'You must have access to the "ACCESSM0 MODULE" to do so.'
      End

  'PIPE (NAME QVDASD)' ,
     '| CP QUERY VIRTUAL DASD' ,
     '| SPECS WORD 2 1' ,                   /* Keep only vdev addrs */
     '| STEM vdasd.'

   /* Sample QUERY ACCESSED output:
   *  U      R/W       712  193   SYSPTL
   *  H/G    R/W      1234  DIR   PPS01:SYSPROG.SAMPLES
   *  X/X    R/O      1340  19D   HELP
   *  W      R/W         0  EEE   VMR51A   - OS
   *  Y/S    R/O      2576  19E   MNT19E
   *  Z      R/W      2874  DIR   PPS01:SYSPROG.TOOLS
   */

  'PIPE (END ? NAME Qaccessed)' ,
     '| COMMAND QUERY ACCESSED' ,
     '| DROP 1' ,                           /* Blitz title line     */
     '| PICK WORD 6 \== /-/' ,              /* \CMS disk; e.g. - OS */
     '| copy: FANOUT' ,                     /* Make a copy of reply */
     '| dirs: NLOCATE WORD 4 /DIR/' ,       /* Shunt directories    */
      , /* Prefix vdev addresses with zeros, make 4 bytes long      */
     '| SPECS WORDS 1.3 1' ,                /* fm/ext stat #files   */
             'PAD 0 WORD 4 NW.4 RIGHT' ,    /* add vdev             */
             'WORDS 5-* NW' ,               /* add disk label       */
     '| fany: FANINANY' ,                   /* Bring back DIRs      */
     '| SORT 1.3 A' ,                       /* By accessed fmode    */
     '| STEM accessed.' ,
     '? copy:' ,
       '| SPECS SUBSTR 1.1 OF WORD 1 1' ,   /* Keep accessed fmodes */
       , /* LOOKUP Details=accessed fmodes, Masters=Alphabet        */
       '| l: LOOKUP 1-1 1-1' ,              /* Find matching fmodes */
     '?' ,
       '  STRLITERAL /ABCDEFGHIJKLMNOPQRSTUVWXYZ/' , /* All fmodes  */
       '| DEBLOCK FIXED 1' ,                /* Break into sep recs  */
       '| l:' ,                             /* To LOOKUP as Mst recs*/
     '? l:' ,                               /* Tertiary LOOKUP o/p  */
       '| TAKE 1' ,                         /* 1st free filemode    */
       '| VAR freefm' ,
     '? dirs:',
       '| fany:'                            /* Back to accessed list*/

  'PIPE (END ? NAME Unaccessed)' ,
     '| STEM vdasd.' ,                      /* Dtl: All mdisks      */
     '| l: LOOKUP WORD 1 WORD 4' ,
     '| HOLE' ,
     '? STEM accessed.' ,                   /* Mst: Accessed fmodes */
       '| l:' ,                             /* Pass to LOOKUP       */
       '| STEM unaccessed.'                 /* Unreferenced Dtls    */


   endrc=28                                /* Set default          */
   Do ax=1 to accessed.0
      parse var accessed.ax accfm rwstat filecnt vdev label . ,
                          1 .     .      .       .    dirdtls
      If vdev='DIR'
         then Call DirDisp
         else Call MdiskDisp
   End
   Drop rwstat filecnt vdev label ax
   accfm=''

   Do ux=1 to unaccessed.0
      parse var unaccessed.ux vdev .
      Call MdiskDisp
   End
Call Exit endrc


/********************************************************************/
/*                   Sub-Routines below this point                  */
/********************************************************************/

Exit:
   parse arg exitrc .
   If verify(exitrc,'-0123456789')=0 then Exit exitrc
                                     else Exit 999999


MdiskDisp:

   parse var accfm l1accfm 2 .          /* Just get the letter      */
   If accfm='' | rwstat<>'R/W' then
      Do                                /* Not already accessed R/W */
        If ?accm0
           then acccmd='ACCESS' vdev freefm '(MODE0'
           else acccmd='ACCESS' vdev freefm

       'PIPE (NAME Access)' ,
          '| COMMAND' acccmd ,
          '| TAKE 1' ,      /* Maybe: DMSACC723I fm (vdev) R/O - OS */
          '| PICK WORD 5 == /-/' ,        /* Is this OS or DOS disk?*/
          '| COUNT LINES' ,
          '| VAR ?osdisk'                 /* Set Boolean flag       */
        If rc<>0 | ,                      /* No files, not accessed */
           ?osdisk then                   /* No CMS files on OS disk*/
           Do
            'PIPE (NAME RlseOS) COMMAND RELEASE' freefm
             Return
           End
        ?accdone=1
      End
   Else ?accdone=0

   /* Remove "SEARCH" option from LISTFILE options for MDISKs       */
   If options<>'' then
      Do
        wkopts=options
        mdiskopts=''
        Do while wkopts<>''
           parse var wkopts opt wkopts
           If abbrev('SEARCH',opt,3) then Iterate
           mdiskopts=mdiskopts opt
        End
      End
   else mdiskopts=options

   If ?accdone
      then 'PIPE (NAME AccLF)   COMMAND LISTFILE' ifn ift freefm ,
                                       '(' mdiskopts ,
              '| STEM found.'
      else 'PIPE (NAME UnAccLF) COMMAND LISTFILE' ifn ift l1accfm ,
                                       '(' mdiskopts ,
              '| STEM found.'
   src=rc
   If src<>0 & src<>28 then say acccmd

   If ?accdone then 'PIPE (NAME Rlse) COMMAND RELEASE' freefm

   If src<>0 & src<>28 then                 /* Rpt LISTFILE errors  */
      Do
       'PIPE (NAME RptLFerrs) STEM found. | CONSOLE'
        Call Exit src
      End
   If src<>0 then Return

   endrc=0                                  /* Something found!     */

  'PIPE (NAME GetOwner)' ,
     '| CP QUERY MDISK' vdev ,
     '| DROP 1' ,                           /* Blitz title line     */
     '| SPECS /Found on: 'vdev'/ 1' ,
             '/ Ownerid, vdev=/ NW' ,
             'WORDS 3-4 NW' ,
     '| CONSOLE' ,

   If ?accdone then
      Do
        If accfm='' then L1accfm='_'
       'PIPE (NAME OverlayFreeFM)' ,
          '| STEM found.' ,
          '| SPECS WORDS 1.2 1' ,               /* Fname Ftype      */
                  '/'L1accfm'/ 19' ,            /* Overlay Fm       */
                  'SUBSTR 2-* OF WORD 3 NEXT' , /* Actual FM number */
                  'WORDS 4-* NW' ,              /* Remaining reply  */
          '| STEM found.'
      End

   If pos('NOH',options)=0                  /*LISTFILE opt NOHEADER?*/
      then 'PIPE (NAME NNOH) STEM found. | NLOCATE W3 /FM/ | CONSOLE'
      else 'PIPE (NAME  NOH) STEM found. | CONSOLE'
Return


DirDisp:

   parse var accfm l1accfm 2 .              /* Just get the letter  */
  'PIPE (NAME DirLF) COMMAND LISTFILE' ifn ift l1accfm ,
                                      '(' options ,
     '| STEM found.'
   src=rc
   If src<>0 & src<>28 then                 /* Rpt LISTFILE errors  */
      Do
       'PIPE (NAME RptLFerrs2) STEM found. | CONSOLE'
        Call Exit src
      End
   If rc<>0 then Return

   endrc=0                                       /* Something found */
   say 'Found on:' vdev dirdtls
   If pos('NOH',options)=0
      then 'PIPE (NAME NNOH2) STEM found. | NLOCATE W3 /FM/ | CONSOLE'
      else 'PIPE (NAME  NOH2) STEM found. |          CONSOLE'

  'PIPE (NAME Rel2) COMMAND RELEASE' freefm          /* Just in case */
Return


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' xfn'HELP) <' xfn xft xfm ,
     '| INSIDE +/*ExplainBegin;+ +ExplainEnd;+' ,
     '| CONSOLE'
Call Exit 4

/*ExplainBegin;

FINDFILE is used to search the issuing userid, for files on all
virtual DASD (even those not accessed), and accessed SFS directories.

Each virtual DASD address is ACCESSed using a free filemode, LISTFILE
issued, and matching files and their virtual address reported.  If the
'ACCESSM0 MODULE' is available, ACCESSM0 is SET ON so that filemode 0
(zero) files on R/O disks are searched as well.

LISTFILE is issued against accessed SFS Directories, with matching
files and their directory name reported.

Syntax:

                                +-*-------------+
>--FINDFILE--+-fname_pattern-+--+-ftype_pattern-+--| options |-------><

Options:

Options are passed directly to LISTFILE.  Some will not make sense to
use from this command.

ExplainEnd; */
/* Epilog ***********************************************************
 * Function      - See "Explain" subrtn above.                      *
 * Component of  - VM Sysprog Toolbox.                              *
 * Program Lang. - CMS REXX                                         *
 * Return Codes  - From LISTFILE command.                           *
 * Date Written  - 20020802                                         *
 * Author        - Michael R. Walter                                *
 * Changed | By  | Description of Change                            *
 * --------+-----+------------------------------------------------- *
 * 20020807  mrw - If ACCESS returns rc=28 no files on disk, iterate*
 * 20020809  mrw - Handle non-CMS disks w/o error.                  *
 *               - Report mdisk owner and vdev.                     *
 *               - Display accessed disks/dirs first then unacc disk*
 *               - Display actual Fmode for accessed files,         *
 *                 '_n' for unaccessed files.                       *
 *               - Handle directories accessed as extensions        *
 *               - Exit with rc=0 if any file found.                *
 * 20051128  mrw - Ignore more accessed non-CMS disks (e.g. "- OS") *
 *                                                                  *
 ********************************************************************/




"Jim Bohnsack" <[EMAIL PROTECTED]> 

Sent by: "VM/ESA and z/VM Discussions" <[email protected]>
01/04/2006 11:51 AM
Please respond to
"VM/ESA and z/VM Discussions" <[email protected]>



To
[email protected]
cc

Subject
Re: FCB image for 6262-014






Bob--You need Mike Walter's FINDFILE EXEC.  Everyone does IMHO.  It will 
search all of the mdisks on the id on which it is run, accessed or not.  I 

found a little glitch with it in November and Mike said, I thought, that 
he'd fix it but even with that it's still a great tool.  The glitch was/is 

that if you're running it from an id such as MAINT and you have the sysres 

volume linked as 123 and probably any other non-CMS full volume virtual 
address, it gets confused.
Jim

At 12:01 PM 1/4/2006, you wrote:
>Thank you so much. MAINT's 194 disk wasn't accessed so I didn't see it in 

>the Q DISK list. I found the files, issued the IMAGELIB command and 
>started the printer. It works great! I'm much better at VSE than VM. 
>You've been a great help. THANKS, Bob.
>
>Imler, Steven J wrote:
>>Check MAINT's CP "base" code disk ... the 194 MiniDisk or SFS directory
>>you chose for the CP BASE.
>><<< snip >>>
>>Filename Filetype Fm Format Lrecl    Records     Blocks IMAG4248 
>>CNTRL    O2 F         80          4          1 IMAG4245 CNTRL    O2 
>>F         80          3          1 IMAG3262 CNTRL    O2 
>>F         80         10          1 IMAG3211 CNTRL    O2 
>>F         80          8          1 IMAG3203 CNTRL    O2 
>>F         80         14          1 IMAG1403 CNTRL    O2 
>>F         80         11          1 IMAG3800 CNTRL    O1 
>>F         80        225          5 <<< snip >>>
>>JR Imler
>>JR (Steven) Imler
>>Computer Associates
>>Senior Software Engineer
>>Work: +1 703 708 3479
>>Fax:  +1 703 708 3267
>>[EMAIL PROTECTED]
>>[EMAIL PROTECTED]
>>
>>-----Original Message-----
>>From: VM/ESA and z/VM Discussions [mailto:[EMAIL PROTECTED] On
>>Behalf Of Bob Forward
>>Sent: Wednesday, January 04, 2006 11:31 AM
>>To: [email protected]
>>Subject: FCB image for 6262-014
>>Because of an operator snafu with z/VM 3.10 over the weekend, printer
>>images
>>for our local-attached 6262-014 printers have been lost. When we start
>>the
>>printer, it is looking for image: IMAG4248, fcb: FCB1. According to the
>>CP
>>COMMAND AND UTILITY manual, I am supposed to assemble an object file to
>>refer to in a CNTRL file to refer to in an IMAGELIB command. I can't
>>even
>>find an ASSEMBLE source file for this FCB. Can someone steer me in the
>>right
>>direction?
>
>--
>Bob Forward
>Professor, Computer Technology
>Manager, Mainframe Operations
>Texarkana College
>2500 N. Robison Rd.
>Texarkana, TX 75599
>ph. 903-832-5565 Ext.3344
>Internet page: http://www.texarkanacollege.edu/~bforward

Jim Bohnsack
Cornell Univ.
(607) 255-1760




 
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.

Reply via email to