Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DSPF - DSPATR(&FIELD) + DSPATR(PC)

835 views
Skip to first unread message

Thomas Raddatz

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
Hello to everyone,

I have a pretty strange problem with a display file.

When I code the following to set the attributes of a field and to
position the cursor to that field the cursor does not get positioned
although *IN76 has been set to *ON:

*
A SFPAU_A 1A P
*
A SFPAU 2A B 8 2DSPATR(&SFPAU_A)
A 76 DSPATR(PC)

If I change the code as shown above the cursor stays on the field and I
can affect the field attributes by &SFPAU_A.

*
A SFPAU_A 1A P
*
A SFPAU 2A B 8 2DSPATR(&SFPAU_A)
A DSPATR(PC)

And if I change the code like this I can set the cursor by setting *IN76
to *ON or *OFF but obviously can not change the attributes of the field.

*
A SFPAU 2A B 8 2
A 76 DSPATR(PC)

Last but not least I should not forget to mention that we are on V4R2
and that the problem occurs within a subfile record.

I do not know if it happens in a single screen, too.

Any ideas?

Thomas Raddatz, Germany.

--
*=====================================================*

e-mail Adresse:
Thomas....@Online-Club.de

Homepage:
http://www.online-club.de/~Thomas.Raddatz/

*=====================================================*


Thomas Raddatz

unread,
Mar 27, 1999, 3:00:00 AM3/27/99
to

RSBAS400

unread,
Mar 28, 1999, 3:00:00 AM3/28/99
to
Are you updating the subfile record? You must update the subfile record..

Gwecnal

unread,
Mar 31, 1999, 3:00:00 AM3/31/99
to
In article <37012C6F...@online-club.de>, Thomas Raddatz
<Thomas....@online-club.de> writes:

>
>I have a pretty strange problem with a display file.
>
>When I code the following to set the attributes of a field and to
>position the cursor to that field the cursor does not get positioned
>although *IN76 has been set to *ON:
>
> *
> A SFPAU_A 1A P
> *
> A SFPAU 2A B 8 2DSPATR(&SFPAU_A)
> A 76 DSPATR(PC)

> snip

The manual for V4r2 says that the valid syntax for DSPATR is one OR the other
of the two you are using. It does not say you can use them both (on the other
hand, it does not explictly say you can't). Maybe this is somehow involved in
your problem.

Gary Guthrie

unread,
Mar 31, 1999, 3:00:00 AM3/31/99
to
Hi Thomas,

Where does the cursor position when *IN76 is on for the FIRST write to the record format?
Is it at the first field or the one with the conditioned DSPATR(PC) keyword. This might be
a clue for you.

Do you by chance have the PUTOVR keyword in the display file? If the answer is yes, you'll
need to add OVRATR to the field so that conditioned attributes are resent when the record
format is redisplayed.

Let us know if this takes care of your problem so that if it doesn't we can continue to
look at it.

Gary Guthrie
Editor, The RPG Source
Technical Editor, NEWS/400

Thomas Raddatz

unread,
Mar 31, 1999, 3:00:00 AM3/31/99
to
Yes, this is how I understood the manual, too. But it is funny that it
works if I do not use the indicator, isn´t it?

What I think is that it is bug in the display file or rpg program
compiler since it is not possible to position the cursor by the
program-to-system field. What do you think about to position the cursor,
then? Do not tell me to position it by row and column coordinates.

Tomorrow I am going to do a small test with a single screen program.
Let´s see what will happen.

Thomas Raddatz, Germany.

Gwecnal schrieb:


>
> In article <37012C6F...@online-club.de>, Thomas Raddatz
> <Thomas....@online-club.de> writes:
>
> >
> >I have a pretty strange problem with a display file.
> >
> >When I code the following to set the attributes of a field and to
> >position the cursor to that field the cursor does not get positioned
> >although *IN76 has been set to *ON:
> >
> > *
> > A SFPAU_A 1A P
> > *
> > A SFPAU 2A B 8 2DSPATR(&SFPAU_A)
> > A 76 DSPATR(PC)
>
> > snip
>
> The manual for V4r2 says that the valid syntax for DSPATR is one OR the other
> of the two you are using. It does not say you can use them both (on the other
> hand, it does not explictly say you can't). Maybe this is somehow involved in
> your problem.

--

Thomas Raddatz

unread,
Apr 1, 1999, 3:00:00 AM4/1/99
to
Hi Gary,

> Where does the cursor position when *IN76 is on for the FIRST write to the record format?

It is at the first field. :-(
It does not matter if it is the write to the subfile or an update to the
subfile.

> Do you by chance have the PUTOVR keyword in the display file? If the answer is yes, you'll

The is no keyword like this in the DspF.

By the way, the same technique works as designed in a single screen
program.
If you are interested in investigating the problem closer you may have a
look at the example code that came with my original posting at the top
of this thread.

Thank you for your hand.

Thomas Raddatz, Germany.

0 new messages