Giter VIP home page Giter VIP logo

Comments (3)

dirk-zimoch avatar dirk-zimoch commented on June 13, 2024

In redirections as you used it, StreamDevice acts according to the reported data type of the record. For lsi, that is STRING, which has 39 usable chars. You can see the same effect when trying to write to the lsi with dbpf <recordname> "<some extra long string>". That is exactly, what StreamDevice is doing when processing redirections.
To see the lsi as an array of SIZV chars, you need to access <recordname>.$
Again, you can check that behavior with dbpf and dbgf.
This should work as intended:
in "%(\$1LastErr-I.$)[^\r]";

from streamdevice.

dirk-zimoch avatar dirk-zimoch commented on June 13, 2024

BTW: The same is true when reading the lsi with CA.
That means, unlike other record types, using the root name of an lsi (and probably lso as well) is pretty useless. You will always only be able to access the first 39 chars. You basically always have to use .$. This is quite unfortunate.
Maybe that behavior should be documented in the lsi/lso documentation, as it is probably not the expected behavior for most users.

from streamdevice.

mdavidsaver avatar mdavidsaver commented on June 13, 2024

Ah, yes. You are correct. And not the first person to remind me of the necessity of adding .$ (aka. .VAL$) when using lsi. There is no truncation if I append this in the proto file, and on my OPI screen (which I somehow didn't think of right away...).

Maybe that behavior should be documented in the lsi/lso documentation ...

For what it is worth, I looked at your lsi page before opening this ticket. So I would have seen a reminder there.

I am starting to wonder if lsi is worth my trouble vs aai or waveform. It seems unlikely to me that I am the only one who continues to forget this subtlety.

from streamdevice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.