HP3000-L Archives

February 2003, Week 3

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:
"Shahan, Ray" <[log in to unmask]>
Reply To:
Shahan, Ray
Date:
Fri, 21 Feb 2003 09:17:19 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (73 lines)
Jeff, here's a script I wrote that does a generic search of the redo stack
for an argument value that you enter.  It's not real fancy (especially by
your standards), but it does work (most of the time), and it's a great time
saver for me.   For instance, you can find all the commands that you entered
that started with LIST or BUIL, etc..    :-)


ANYPARM LR_TO_FIND = ![" "]
COMMENT
COMMENT  This CMD file will parse the redo stack searching for
COMMENT  any commands that start with the value entered by the
COMMENT  user.  When a value is found, that command line is then
COMMENT  echoed to the user for a subsequent redo/do
COMMENT
COMMENT  Written by Ray N. Shahan 04/11/2001
COMMENT
IF "!LR_TO_FIND" = " "
  LISTREDO
  RETURN
ENDIF
SETVAR LR_TO_FIND_LIMIT 10
SETVAR LR_TO_FIND_LEN LEN("!LR_TO_FIND")
IF LR_TO_FIND_LEN > LR_TO_FIND_LIMIT
  ECHO
  ECHO String to find length cannot exceed !LR_TO_FIND_LIMIT characters
  ECHO Please shorten find string and try again
  ECHO
  DELETEVAR LR_@
  RETURN
ENDIF
FILE LRTMP=LRTMP,OLDTEMP
IF NOT FINFO ("*LRTMP","EXISTS")
  BUILD LRTMP;REC=-79,,F,ASCII;MSG;TEMP;DISC=!HPREDOSIZE
ENDIF
LISTREDO > *LRTMP
SETVAR LR_LRTMP_EOF FINFO("*LRTMP","EOF")
WHILE LR_LRTMP_EOF > 0
  SETVAR LR_LRTMP_EOF   LR_LRTMP_EOF - 1
  INPUT LR_REC < *LRTMP
  IF UPS(STR(LR_REC,9,!LR_TO_FIND_LEN)) = UPS("!LR_TO_FIND")
    ECHO !LR_REC
  ENDIF
ENDWHILE
DELETEVAR LR_@

Ray Shahan

"Life is what happens while you're busy making other plans", John Lennon

> -----Original Message-----
> From: VANCE,JEFF (HP-Cupertino,ex1) [SMTP:[log in to unmask]]
> Sent: Thursday, February 20, 2003 7:45 PM
> To:   [log in to unmask]
> Subject:      CI Programming tidbits or examples?
>
> Hi all,
>
> I will be doing another CI Programming talk at both Solution
> Symposia and I'd like to incorporate suggestions from you.
>
> So, if you have some script examples that you find really
> useful and are willing to share, or if you have a problem
> that you'd like to solve with a CI script, please let me know.
>
>  Thanks,
>  Jeff Vance, vCSY
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2