HP3000-L Archives

April 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Anderson <[log in to unmask]>
Reply To:
Michael Anderson <[log in to unmask]>
Date:
Tue, 1 Apr 1997 17:52:53 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (91 lines)
Tim Ericson wrote:
>
> Michael gave us a PRINTO-like command file, and I replied with my own,
> and here's another that I use *all* the time (especially checking COBOL
> listings for errors):
>



If you ever have a need to check all $STDLIST's for a "String", I use this
little command file, I like making use of this new POSIX stuff too.

--------------------------------------
parm  _searchstring
SETVAR HPAUTOCONT TRUE
Showtime
Setvar _tempmsg 'stdmsg'
Setvar _tempio 'stdio'
Setvar hpcierr 0
Purge !_tempmsg,temp > $null
Build !_tempmsg;rec=-80,1,f,ascii;temp;msg
Purge !_tempio,temp > $null
Build !_tempio;rec=-80,1,f,ascii;temp
File !_tempmsg=!_tempmsg,oldtemp
File !_tempio=!_tempio,oldtemp
SPOOLF O@;SELEQ=[FILEDES=$STDLIST and STATE=DEFER];SHOW > *!_tempmsg
Setvar _numrecs Finfo('*!_tempmsg','EOF')
Echo
Echo
While _numrecs > 0
 Input _stdmsgrec < *!_tempmsg
 Setvar _spfname str(_stdmsgrec,21,8)
 Setvar _jnum    str(_stdmsgrec,12,6)
 Setvar _jstate  str(_stdmsgrec,50,7)
 Setvar _numrecs (_numrecs-1)
 If _spfname = '$STDLIST'
    Setvar _ilen pos(' ',_stdmsgrec,1)-2
    Setvar _dfid str(_stdmsgrec,2,_ilen)

    Setvar _fname  '!_dfid'+'.out.hpspool'
   Fgrep.hpbin.sys;info=" -ci !_searchstring " < !_fname  > xcountx
   Input _count < xcountx
   If not ( !_count = 0 )
    Setvar _mpecmd &
     'print '+'!_dfid'+'.out.hpspool;START=3;END=3 > *!_tempio'
    !_mpecmd
    Input  _jobname < *!_tempio
    Setvar _jname str(_jobname,5,38)
    Setvar _mpecmd &
     'print '+'!_dfid'+'.out.hpspool;START=6;END=6 > *!_tempio'
    !_mpecmd
    Input _jobtime < *!_tempio
    Setvar _jday  str(_jobtime,1,5)
    Setvar _jtime str(_jobtime,20,11)
    Setvar _mpecmd &
     'print '+'!_dfid'+'.out.hpspool;START=-3;END=-3 > *!_tempio'
    !_mpecmd
    Input _jobcpu  < *!_tempio
    Setvar _jcpueoj  str(_jobcpu,2,10)
    If '!_jstate' = 'CREATE '
       Setvar _jcpueoj 'EXEC'
    Else
       If '!_jcpueoj' = 'REMAINDER '
          Setvar _jcpueoj  str(_jobcpu,15,15)
       Endif
    Endif
    Echo ***** !_jnum!_jname!_jday!_jtime!_jcpueoj
      fgrep.hpbin.sys;info=" -nie !_searchstring " < !_fname
      echo -----------------------------------------------------
      echo
   endif
 endif
ENDWHILE
purge msgfile,temp    > $NULL
reset msgfile         > $NULL
deletevar _nrecs, _xcmd, _msgrec, _flength > $NULL
SETVAR HPAUTOCONT FALSE

----------------------------------------
I just recently upgraded to MPE/iX from and old classic, so this CI lang is
new to me, but I don't know how I ever got by without it.  :-)

I don't have MPEX, so I have written a few ci command files to try to makeup
for it.

Cheers,

Michael Anderson,
Systems Programmer.
TIW Corporation Inc.

ATOM RSS1 RSS2