home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rdebug21.zip / RDXMIMIC.KEX < prev    next >
Text File  |  1993-03-25  |  2KB  |  57 lines

  1. /*H* RDXMIMIC.KEX 02-07-93 11:57 */
  2.  Parse Value 'COMMAND SET!COMMAND EXT' With dbcs'!'dbce
  3.  Parse Value 'COMMAND!COMMAND SOS!COMMAND X' With dbc'!'dbso '!'dbxx
  4.  dbce '/OPSYS'
  5.  dbme='rdxMIMIC'
  6.  dbsys=opsys.1
  7.  if dbsys='OS/2' then dbsys='OS2'     /*O*/
  8.  trace o?r   /*T*/
  9.  address KEDIT
  10.  dbc 'REFRESH'
  11.  dbcs 'WRAP OFF'
  12.  dbcs 'MSGM OFF'
  13.  trace o?r   /*T*/
  14.  if trace()='?R' then dbcs 'MSGM ON'  /*T*/
  15.  dbc ":1CH!;! ; !**"
  16.  dbc ":1CH!!  !*"
  17.  call db8change "! exit ! /*Exit*/ Return !"
  18.  parse value result with dbtrc dbtrap
  19.  if dbtrc=-7 then return -7 dbtrap
  20.  call db8change "! trace ! /*trace !"
  21.  dbpullsay=0
  22.  call db8change "! parse upper pull ! Call DBPULL 'pu !"  /*NC*/
  23.  call db8change "! parse pull ! Call DBPULL 'pp !"        /*NC*/
  24.  call db8change "! pull ! Call DBPULL 'p !"               /*NC*/
  25.  trace  o?r   /*T*/
  26.  call db8change "! say ! Call DBSAY !"                    /*NC*/
  27.  ":1CH/  //*"
  28.  ":1CH/ ; /;/**"
  29.  dbcs 'MSGM ON'
  30.  dbc 'MSG .'
  31.  dbcs 'WRAP ON'
  32.  exit dbpullsay
  33.  
  34.  db8CHANGE:    procedure  expose dbpullsay dbce dbc
  35.  parse arg '!'dbtarget '!'dbnew '!'
  36.  dbnew=strip(dbnew)
  37.  ':0'
  38.  do Forever
  39.    dbc 'LOC !'dbtarget
  40.    if rc<>0 then leave
  41.    dbce '/CURL'
  42.    line = curline.3
  43.    lineup = translate(line)
  44.    key = strip(translate(dbtarget))
  45.    dbl = length(key)
  46.    dbi=pos(key,lineup)
  47.    if dbi>1 then do
  48.      dbpullsay=1
  49.      dbrest=substr(line,dbi+dbl)
  50.      if left(dbnew,12)=' Call DBPULL'    then dbrest=dbrest"'"
  51.      if left(dbnew,16)=" /*trace"  then dbrest=dbrest"*/"
  52.      line=substr(line,1,dbi-1)dbnew''dbrest; end
  53.    dbc 'REP' line
  54.    '+1'
  55.  end
  56.  Return 0;
  57.