Loading ...
Sorry, an error occurred while loading the content.

RE: [magicu-l] Select Programs Question

Expand Messages
  • Emege
    just testing sorry ... From: Steven G. Blank [mailto:sgblank@xmission.com] Sent: Friday, May 30, 2003 1:02 AM To: magicu-l@yahoogroups.com Subject: Re:
    Message 1 of 11 , Jun 1, 2003
    • 0 Attachment
      just testing sorry


      -----Original Message-----
      From: Steven G. Blank [mailto:sgblank@...]
      Sent: Friday, May 30, 2003 1:02 AM
      To: magicu-l@yahoogroups.com
      Subject: Re: [magicu-l] Select Programs Question


      Oops -- my bad:

      Update the variable in the Record PREFIX -- not Suffix.

      Apologies.

      SGB


      At 10:47 AM 5/29/2003, I wrote:
      ><snip> Then in the Record Suffix of the task from which the Select
      >Program is to be called, Update this variable with the current record's
      >state code.
      ><snip>

      ----------------------------
      Steven G. Blank
      Salt Lake City, Utah USA
      ----------------------------




      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • Keith Canniff
      Interesting point. Here s what happens: All fields (real, virtuals, virtuals inside of handlers) are all pre- loaded/positioned in the stack. Handler virtuals
      Message 2 of 11 , Jun 1, 2003
      • 0 Attachment
        Interesting point. Here's what happens:

        All fields (real, virtuals, virtuals inside of handlers) are all pre-
        loaded/positioned in the stack. Handler virtuals are added to the
        end of the stack So if you had 3 fields defined in Record Main, They
        would be A, B, and C. If you had a handler with 2 virutals, then
        they would be D and E.

        When another program or task is called, the subtask will see ALL the
        fields, including those that are in the handler, even if the handler
        hasn't been used, which could make the 'A'VAR-1 reference point to
        the wrong field.

        One other kicker before you try to add a generic handler to the
        bottom of all other levels and put your to be passed variable to the
        subtask/program. The VALUES to these handler virtuals is only
        available when the handler is active. Even inits don't work unless
        the handler is executed.

        If you don't have virutals in handlers, 'A'VAR-1 will work fine.
        Otherwise you may have to have a special name assigned to the field
        and have a called program in task prefix of the called
        program "find" the field to use by name, starting at 'A'VAR-1 -
        counter(0) until the VARNAME(('A'VAR-1)-counter(0)) contains the
        string you've defined. If you want to make this a generic called
        program that will work with any program, then make sure you use a
        unique string for the field name (like: |LAST_RM|<rest of name>).
        The search would be INSTR(VARNAME(('A'VAR-1)-COUNTER(0)),'|LAST_RM|')
        >0. When true, you've found the last field in Record Main.

        You definitely only want to write this once and reuse it when needed.

        --- In magicu-l@yahoogroups.com, "Ulrich Sollberger"
        <ulrich.sollberger@c...> wrote:
        > Sorry to 'bug' in but in 9.x you might not be able to determine
        what IS
        > the last variable of the calling program as one can define virtuals
        > nowadays in handlers. They surely are added to the stack at some
        point
        > in time - I have no idea if they are already there when loading the
        > program or only when actually activating a handler.
        > Ulrich Sollberger
        >
        > > -----Message d'origine-----
        > > De : Steven G. Blank [mailto:sgblank@x...]
        > > Envoye : jeudi, 29. mai 2003 21:08
        > > A : magicu-l@yahoogroups.com
        > > Objet : Re: [magicu-l] Select Programs Question
        > >
        > >
        > > Oh yeah, much better - VARCURR('A'VAR - 1) is way more
        predictable.
        > >
        > > Thanks, Shermie!
        > >
        > >
        > > At 12:28 PM 5/29/2003, you wrote:
        > > ><snip>
        > > >Only thing I might do a tad differently from your outline is
        > > to place the
        > > >"state" field (in your particular example) at the very bottom
        of the
        > > >calling program's record main, rather than at the start.
        > > ><snip>
        > >
        > > ----------------------------
        > > Steven G. Blank
        > > Salt Lake City, Utah USA
        > > ----------------------------
        > >
        > >
        > >
        > >
        > > Your use of Yahoo! Groups is subject to
        > > http://docs.yahoo.com/info/terms/
        > >
        > >
      Your message has been successfully submitted and would be delivered to recipients shortly.