Here is my little TRKCOMP exec. Sometimes I am hesitant to put something
like this out because there is going to be at least one critic that says it
is 'incorrect'. It is just something I did with copy/paste of other code...
Do with it as you please.

 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*/
/* Dependencies and pre-reqs:
*/
/*
*/
/* The pipe stage 'trackread' is used which is available in the
*/
/* Princeton University pipelines package.
*/
/* http://vm.marist.edu/~pipeline/index.html#Runtime
*/
/*
*/
/* PICKPIPE which can be downloaded from IBM's VM download page.
*/
/* http://www.vm.ibm.com/download/packages/
*/
/*
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*/


parse source . . exname .                       /* get the EXEC name for
displays */
rrc =
0

     say 'Enter disk disks -- DISK-1 DISK-2'  /* ask for disks to compare
*/
     pull disk disk1                          /* get response
*/
     if disk = '' then disk = 100             /* default to 100
*/
     if disk1 = '' then disk1 = 101           /* default to 101
*/
     erase 'dasd'||disk out
a
     erase 'dasd'||disk1 out
a
     erase combined out
a
     say 'START & END cylinders'              /* ask for cylinder range
*/
     pull start end                           /* get the response
*/
   if start = '' then start = 0                    /* if not specified
start on cyl 0 */
   if end = '' then end = start                    /* if not specified end
on the start cyl */
   'pipe query version | spec 1-3 1 | var
pipelevel'
    if pipelevel ¬= 'PIP' then,                     /* do we have correct
pipes?*/
       pickpipe u '(quiet'                          /* no then load the
UPLEVEL pipes   */
    if rc ¬= 0 then                                 /* was pipe load
successful?  */
      call msg 16, 'An uplevel pipe package is not available-- 'exname '
cannot continue'


   'pipe devinfo' disk '| var temp'                 /* get device
characteristics */
   if rc ¬= 0 then                                  /* device error
*/
      call msg 20, 'Device error trying to access ' disk '--' exname
'cannot continue'
      parse var temp cuu clas dvtyp cutyp cyls trkpc trklen .  /* parse it
out to vars */


   if dvtyp ¬= '3390' then                         /* device type must be
3390  */
      call msg 24, 'Device' cuu 'is not a supported device type' dvtyp '¬=
3390'


   if end = '*' | end = 'END' then end = cyls -1   /* calculate the end
cylinder */


   if end < start then                             /* verify cylinder
range      */
      call msg 26, 'END less than START on' disk ' --' exname 'cannot
continue'


   if end > cyls -1 then                            /* verify cylinder
range     */
      call msg 28, 'END ('end') > last cylinder ('cyls -1') on' disk ' --'
exname 'cannot continue'


 do start = start by 1 until start >= end           /* loop read specified
cylinders */ /*'do-a'*/
    cc = start                                      /* read
cylinder            */
    hh = 0                                          /* and
track                */
       do hh = hh by 1 until hh = trkpc -1          /* do all tracks on the
cylinder */ /*'do-b'*/
          call readtrk                              /* read disk 1
*/
          call readtrk1                             /* read disk 2
*/
          do x = 1 by 1 for utrack.0                /* look for mismatches
*/      /*'do-c'*/
             if utrack.x <> u1track.x then do       /* do the records
match? */    /*'do-d'*/
                say 'CC HH R =' cc hh x             /* no then display
address */
                'pipe literal' cc hh x '| >> combined out a'   /* write out
record address to combined file */
                'pipe var utrack.x | >>' dasd||disk 'out a'    /* write out
disk 1 mismatch */
                'pipe var utrack.x | >> combined out a'        /* write out
combined mismatch-1 */
                'pipe var u1track.x | >>' dasd||disk1 'out a'  /* write out
disk 2 mismatch */
                'pipe var u1track.x | >> combined out a'       /* write out
combined mismatch-2 */
             end                                    /* end 'do-d'
*/
          end                                       /* end 'do-c'
*/
       end                                          /* end 'do-b'
*/
 end                                                /* end 'do-a'
*/
signal
finish

readtrk:

    'PIPE (endchar ? )',                           /* start the pipe
*/
       '| trackread' disk cc hh,                   /* read a track
*/
        '| trackdeblock ',                         /* deblock the track
*/
        '| drop 2',                                /* drop HA & R0 records
*/
        '| stem utrack.'                           /* save the records in a
stem */
    if rc ¬= 0 then do                              /* device error?
*/
       call msg 00, '
'
       call msg 00, 'Invalid pointer see previous messages --'
exname

end

return



readtrk1:

    'PIPE (endchar ? )',                           /* start the pipe
*/
       '| trackread' disk1 cc hh,                  /* read a track
*/
        '| trackdeblock ',                         /* deblock the track
*/
        '| drop 2',                                /* drop HA & R0 records
*/
        '| stem u1track.'                          /* save the records in a
stem */
    if rc ¬= 0 then do                              /* device error?
*/
       call msg 00, '
'
       call msg 00, 'Invalid pointer see previous messages --'
exname

end

return

msg:                                           /*
messages                        */
  parse arg rrc, txt                           /* parse the message into
its parts */
  say txt                                      /* display the
message              */
  if rrc = 0 then
return
  signal finish                                /* wrap it up and
exit              */


finish:

   if pipelevel ¬= 'PIP' then,                 /* did we start with modern
pipes? */
      pickpipe cms '(quiet'                    /* no .. put back CMS
pipes        */
exit rrc                                       /*
exit                            */

On Tue, Dec 22, 2015 at 4:18 PM, Mark Post <mp...@suse.com> wrote:

> >>> On 12/22/2015 at 05:40 PM, Rick Troth <r...@casita.net> wrote:
> > On 12/22/2015 04:16 PM, Tom Huegel wrote:
> >> My ignorance overflows..
> >> When I look on my INTEL LINUX I can find grub.cfg in boot/grub2 but I
> >> cannot find it in the zLINUX.
>
> Most likely because it doesn't exist on your system(s).
>
> > Probably me making ASSumptions.
> > GRUB recently learned how to play in z land,
>
> Not really.  GRUB still doesn't understand DASD or SCSI over FCP (as
> implemented by z Systems).  GRUB only knows how to read the file systems
> Linux uses to find the various kernels and initrds specified in
> /boot/grub2/grub.cfg.
>
> > and the distros have picked
> > that up.
>
> To my knowledge, only SUSE Linux Enterprise Server 12 and 12 SP1 offer
> this.
>
> -snip-
> > In any case, the fact that /boot/grub exists suggests that we do want to
> > go the GRUB route and not traditional ZIPL.
>
> The zipl command is still needed on z Systems.  It's just not as
> front-and-center as it used to be in the past.  In particular, SUSE doesn't
> provide an /etc/zipl.conf any more, since there's no real need for customer
> modifications there.
>
> The way things work is that:
> 1. A Linux kernel needs to be booted from DASD or SCSI over FCP.  That
> means that zipl has to write out the pointers to the kernel and initrd so
> that the boot loader can find them.
> 2. Once the Linux system gets up to a point where GRUB can be invoked, it
> then tries to find both grub.cfg and then the Linux kernels and initrds
> that it references.
> 3. After the user specifies a specific kernel/initrd combination, possibly
> adding parameters to what is in /boot/grub2/grub.cfg, or the timeout
> happens, GRUB then boots the "real" system.
>
>
> Mark Post
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
>

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to