Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 16 FEB 2009 03:36:23AM David E Schranz wrote:

I've come across 2 instances where OI 8.0.1 seems to be working incorrectly unless I'm doing something wrong, as follows:

Instance 1 … substring extraction.

e.g. TXT=ALPHA-1,lth … where lth is a positive number; I'd like to extract the ending characters from APHA. In this case, if lth contains 3, only the last character is being extracted. If lth is negative, the correct (inverted) substring is extracted.

Instance 2 … program aborting on successive XLATEs

e.g. TXT1=XLATE("FILE1", "ABC", "FIELD1", "X")

    TXT2=XLATE("FILE1", "ABC", "FIELD2", "X")
    TXT3=XLATE("FILE1", "ABC", "FIELD3", "X")

I'm trying to obtain several fields from the same record successively and each field contains multi-values (say, about 100 values in each field). Program is aborting. When issuing a READ statement for this record and then extracting each field, program works ok, meaning that the record is not corrupt. I've also run an LH_VERIFY on the file's DICT and INDEX and they are ok. Why should this be happening?

Any comments or verification of these 2 presumable bugs would be appreciated.


At 16 FEB 2009 10:50AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

-3, 3

The Sprezzatura Group

World leaders in all things RevSoft


At 16 FEB 2009 10:59AM David E Schranz wrote:

Thanks, but has it always been like this?


At 16 FEB 2009 06:27PM [email protected] wrote:

Yes :)

[email protected]

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 16 FEB 2009 10:17PM Warren Auyong wrote:

As Sprezz sez, Yep,as far back as Revelation.

If a=123456'

then -1,3 would return 6 (return 3 characters starting at the last position in the string)

-3,3 would return 456 (return 3 characters starting from the 3rd character from the end of the string)

-1,-3 returns 654

-3,-3 returns 432

As far as your XLATES go why not just read the entire record into a variable e.g. myrecord=XLATE(myfile,'RECID','','X') and then do field extracts (myrecord)?


At 17 FEB 2009 05:44AM David E Schranz wrote:

Thanks Warren, I ahd already done that. But it still intrigues me why successive XLATE's should now be acting strangely.


At 19 FEB 2009 03:12PM Warren Auyong wrote:

I have no idea. Maybe @DICT, @RECORD or @ID are getting stepped on. If it were ARev I would suspect that you're running out of stack or string space.

Sprezzatura knows more about the internals of OI and ARev than I ever will. Perhaps they have some ideas.


At 20 FEB 2009 06:47AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Sorry Warren but not enough info to go on :). Xlate/CalculateX don't use system variables per se so it must be something else. When you say "abort" David are there any messages?

The Sprezzatura Group

World leaders in all things RevSoft


At 23 FEB 2009 01:58AM David E Schranz wrote:

No, program simply stops working. As I said, I got around this by reading the whole record and then selecting each field I wanted … performance is also better, naturally.

But still, I had never come across this anomaly before. And any hints would be welcome.


At 24 FEB 2009 08:14AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

If you add to a log file at each line of the program with status() and @File.Error what do you see?

The Sprezzatura Group

World leaders in all things RevSoft

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/5e3755a6a6509f508525755f002f46c6.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1