pmattes / x3270

Family of IBM 3270 emulators
46 stars 18 forks source link

which key has to be pressed to perform page down and page up in wc3270 #50

Closed FWDQK closed 1 year ago

FWDQK commented 1 year ago

Hi Team, We are trying to launch wc3270 using script (-xrm wc3270.model:2 ) Please suggest which key to be hit to perform page down and page up action.

We have tried roll up, roll down, PF7, PF8, pagedown,pageup etcm but still it failed.

pmattes commented 1 year ago

The PageUp and PageDown keys in wc3270 are mapped to the Scroll() action, and are used to move through wc3270's scroll buffer. This is implemented entirely within wc3270 and there is no interaction with the host.

If you are talking about the host's page up and page down actions, how to do this is host-dependent. PF(7) and PF(8) are usually used for this (and are mapped to the F7 and F8 keys on the keyboard), but not all the time. You mentioned Roll Up and Roll down, so I will guess this is an AS/400 or iSeries host. In that case, Roll Up is the F8 key on the keyboard and and Roll Down is the F7 key. If you actually want pass the 5250 F7 and F8 keys to the host, you need to send PA(1)+PF(7) and PA(1)+PF(8) respectively. In wc3270, PA(1) is mapped to Alt-1, so you would press Alt-1, then F7 on the keyboard to get F7 on the host and Alt-1, then F8 on the keyboard to get F8 on the host.

Reference: https://www.ibm.com/docs/en/i/7.2?topic=sessions-3270-keyboard-mapping-telnet-servers

FWDQK commented 1 year ago

The PageUp and PageDown keys in wc3270 are mapped to the Scroll() action, and are used to move through wc3270's scroll buffer. This is implemented entirely within wc3270 and there is no interaction with the host.

If you are talking about the host's page up and page down actions, how to do this is host-dependent. PF(7) and PF(8) are usually used for this (and are mapped to the F7 and F8 keys on the keyboard), but not all the time. You mentioned Roll Up and Roll down, so I will guess this is an AS/400 or iSeries host. In that case, Roll Up is the F8 key on the keyboard and and Roll Down is the F7 key. If you actually want pass the 5250 F7 and F8 keys to the host, you need to send PA(1)+PF(7) and PA(1)+PF(8) respectively. In wc3270, PA(1) is mapped to Alt-1, so you would press Alt-1, then F7 on the keyboard to get F7 on the host and Alt-1, then F8 on the keyboard to get F8 on the host.

Reference: https://www.ibm.com/docs/en/i/7.2?topic=sessions-3270-keyboard-mapping-telnet-servers

Hi, We have already tried it but still it did not worked. It says function key not allowed. In aboved link, it has mentioned roll down is PF7, roll up is PF8

pmattes commented 1 year ago

The best way for me to help with this would be to look at a data stream trace from wc3270.

FWDQK commented 1 year ago

The best way for me to help with this would be to look at a data wc3270 trace for page down.zip stream trace from wc3270.

Hi, Please find the attached trace files.

pmattes commented 1 year ago

Those traces are consistent with my understanding of the 5250 key mappings. The 'only f7' trace shows the 3270 PF7 key being interpreted as the 5250 Roll Down key, and the host reports that you're already at the bottom of the file, so there's nothing more to roll down to. The 'with command f7' trace shows the 3270 key sequence PA1, PF7 being interpreted as the 5250 F7 key, which is apparently not allowed on that screen.

I can't comment much beyond that. The correct 5250 key to send to your host to perform the action you want depends on what the host is expecting. ;-(

FWDQK commented 1 year ago

Those traces are consistent with my understanding of the 5250 key mappings. The 'only f7' trace shows the 3270 PF7 key being interpreted as the 5250 Roll Down key, and the host reports that you're already at the bottom of the file, so there's nothing more to roll down to. The 'with command f7' trace shows the 3270 key sequence PA1, PF7 being interpreted as the 5250 F7 key, which is apparently not allowed on that screen.

I can't comment much beyond that. The correct 5250 key to send to your host to perform the action you want depends on what the host is expecting. ;-(

Hi, Thanks. Even though it's showing nothing to Roll down, it is allowed to Roll down when we are doing same flow using AS400. Also, you can see + icon, which means page down is available.

We are using wc3270.

Please help to suggest if we have any other alternative. As this action is mandate to perform flow and if we cannot perform this, Robot framework cannot be used to execute AS400 applications.

pmattes commented 1 year ago

I don't think this is a wc3270 issue. Does this screen behave differently with a different 3270 emulator?

I understand that the host is displaying the '+'. But wc3270 is doing its job properly, as far as I can tell. The only thing I can think of at this point is that your host might have the Roll Up and Roll Down key mappings switched. That is, the error message from the host is ambiguous. It does not say if you rolled down too far or rolled up too far. Have you tried F8, instead of F7?

FWDQK commented 1 year ago

I don't think this is a wc3270 issue. Does this screen behave differently with a different 3270 emulator?

I understand that the host is displaying the '+'. But wc3270 is doing its job properly, as far as I can tell. The only thing I can think of at this point is that your host might have the Roll Up and Roll Down key mappings switched. That is, the error message from the host is ambiguous. It does not say if you rolled down too far or rolled up too far. Have you tried F8, instead of F7?

Thanks. It worked.