× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Mike.

I don't know why my scan doesn't work either, but I'm not going to agonize
over it any more. I'll figure it out eventually.

I've found some other weird things that have happened on this V4R5 system
that no one else ever seems to come across, so I don't know if I've got
gremlins or what. Ran into some funky CGI errors the other day that even
Brad Stone hadn't seen before.

I'm going to order and load the latest cume and see if that fixes some of my
problems.  However, the problem with scan is likely with my logic or
assumptions, and not with RPG or OS/400. Since scanning for a hex value
worked for you (and others) it should also work for me, so I'll keep at it.

Thanks all for your responses!

Shannon O'Donnell
----- Original Message -----
From: "Mike Naughton" <mnaughton@juddwire.com>
To: <midrange-l@midrange.com>
Sent: Thursday, November 29, 2001 11:34 AM
Subject: Re: scanning for a hex value in RPGIV


> Hi Shannon,
>
> I can't tell you why your scan is failing, but I can tell you that
> scanning for hex values works fine (I have used it to to search for null
> values in data passed from other systems, and it's very handy). I just ran
> a little test:
>
> 1. I set up a test file with the following DDS:
> A          R TEST
> A            TESTFLD       24
>
> 2. Then used DBU to edit the file and add a record with "TEST VALUE"
>
> 3. Then used the hex editor to change the space between TEST and VALUE to
> x'B6'
> TESTFLD  TEST¶VALUE
>          ECEEBECDEC44444444444444
>          352365134500000000000000
>
>
> 4. Then wrote a simple program:
> FTEST001PF IF   E             DISK
> D                 DS
> D  POS                           2  0
> D  PARA           S              1    INZ(x'B6')
> C                   READ      TEST
> C     TESTFLD       DSPLY
> C                   Eval      POS = %SCAN(PARA:TESTFLD)
> C     POS           DSPLY
> C                   EVAL      *INLR=*ON
> C                   RETURN
>
> 5. Here are the results of the program:
> DSPLY  TEST¶VALUE
> DSPLY  05
>
> So what you're trying to do should work fine.  (Usually when that happens
> to me, I find it's something really simple. . . .  :-)
>
> hth,
>
> midrange-l@midrange.com writes:
> >This is a multi-part message in MIME format.
> >--
> >[ Picked text/plain from multipart/alternative ]
> >From within an RPGIV program...I am reading a db file which contains HTML
> >source code. I want to scan each record, searching for specific
> >characters.
> >
> >For example, if I insert the paragraph symbol in the HTML, I want to scan
> >the HTML source and see if it contains the paragraph symbol.
> >
> >Here's a sample record. Note the paragraph symbol:
> >
> > <p class=MsoNormal>This is a para mark ¶ and I m putting it right
> >here.</p>
> >
> >In my RPG program I am using the SCAN  (tried the %SCAN BIF too) opcode
> >to scan for a hex value of x'b6'...which is the para symbol.
> >However, the SCAN fails to find a match.
> >
> >Anyone have an idea of why the SCAN is failing?
> >
> >Thanks,
> >
> >
> >
> >Shannon O'Donnell
> >--
>
>
> Mike Naughton
> Senior Programmer/Analyst
> Judd Wire, Inc.
> 124 Turnpike Road
> Turners Falls, MA  01376
> 413-863-4357 x444
> mnaughton@juddwire.com
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.