Re: datatrieve - VMS

This is a discussion on Re: datatrieve - VMS ; I need to modify the fifth element of a field that is defined with an occurs clause. How do I do that? -- clarence ------------------------------------------------------------------------ clarence's Profile: http://techiegroups.com/member.php?userid=6231 View this thread: http://www.techiegroups.com/showthread.php?t=52780...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: datatrieve

  1. Re: datatrieve


    I need to modify the fifth element of a field that is defined with an
    occurs clause. How do I do that?


    --
    clarence
    ------------------------------------------------------------------------
    clarence's Profile: http://techiegroups.com/member.php?userid=6231
    View this thread: http://www.techiegroups.com/showthread.php?t=52780


  2. Re: datatrieve

    In article , clarence writes:
    >
    > I need to modify the fifth element of a field that is defined with an
    > occurs clause. How do I do that?


    As I recall, there is no "array indexing" technique available in Datatrieve.
    So you have to fake it.

    I'm about ten years out of practice, so forgive any errors:

    declare occurs-count usage long.
    for r in your-domain where r.some-field = "some value" modify using begin
    occurs-count = 0
    for o in your-occurs-clause modify using begin
    occurs-count = occurs-count + 1;
    if occurs-count eq 5 then o.field-in-your-occurs-clause = "new value";
    end
    end

+ Reply to Thread