GET-statement with or without VIA option.

Merol Newman merol.newman@ramesys.com
Wed, 13 Feb 2002 19:23:56 -0000


I'm sure Bob is right - it was just something I wouldn't have trusted to work.

But looking at your Qshow list, I think TNUENDRMNT might be a temporary item. Does it get reset at
the right point? You could put an info statement just before the GET to test this. If not, it would
work OK when the value of TNUENDRMNT is the same as for the previous record.

Is the "while retrieving" loop in the same program? You might be calling the ghost screen from
another screen, and passing the temp from that - in which case if the temp is "reset at mode", it
will be re-initialized as the ghost screen is called - an obscure bug, but we've had it happen!

On the subject of GETs in initialize procedures, I've written several processes which do the same
sort of thing as you're doing - running Quick code against a file with a "while retrieving" loop.
I've always used INITIALIZE without problems, but I think you can use ENTRY in the same way. It
might be worth a try!

Good luck!

Merol

merol.newman@ramesys.com
Ramesys, Eldon Way, Crick, Northamptonshire, UK. NN6 7SL
phone 01788 822133/823831, fax 01788 823601


> -----Original Message-----
> From: powerh-l-admin@cube.swau.edu
> [mailto:powerh-l-admin@cube.swau.edu]On Behalf Of Chris Sharman
> Sent: 13 February 2002 15:14
> To: ressingm@unive.nl
> Cc: PowerH List
> Subject: RE: GET-statement with or without VIA option.
>
>
>
> >the GET-statement I showed is performed from within an internal procedure.
> >That procedure is called from within the INITIALIZE-procedure, inside a
> >While retrieving on the file GEDD037Z (sequential).
>
> There's a warning in the manual about using get during initialize.
> Sometimes you can get away with ignoring these warnings, but other times
> they can result in obscure problems, which can be hard to track down.
>
> Merol & Bob made interesting suggestions, although I thought Bob implied
> "VIAINDEX x USING a, b" would use a for the first segment & b for the
> second, contradicting what Merol said. I don't know which is right: it used
> to be taught that VIA was preferable to VIAINDEX (mattered in some
> circumstances, not in others). The only time you'd have to use VIAINDEX as
> opposed to VIA would be if, say, you had two matching indices, one
> ascending, one descending, and needed to specify which to use.
>
> Chris

>