|
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
As an Amazon Associate we earn from qualifying purchases.
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.