Discussion:
Using the Print Screen Function from a program
(too old to reply)
Thomas Welsch
2021-12-19 14:51:04 UTC
Permalink
I would like to get a screen shot after a user presses a special function key. I will then call another program to process the QSYSPRT output for special purposes. I could, of course, easily transfer the output record of the screen file but I need the whole screen, constants etc. included. And I don't want to change the usual function of the Print Key. Is there an API or anything else callable which produces the QSYSPRT output? Using V7R3.

Thanks a lot in advance.
Dr.UgoGagliardelli
2021-12-20 08:00:40 UTC
Permalink
Post by Thomas Welsch
I would like to get a screen shot after a user presses a special function key. I will then call another program to process the QSYSPRT output for special purposes. I could, of course, easily transfer the output record of the screen file but I need the whole screen, constants etc. included. And I don't want to change the usual function of the Print Key. Is there an API or anything else callable which produces the QSYSPRT output? Using V7R3.
Thanks a lot in advance.
Maybe you should use the PRINT Keyword in a Display file to specify a
particular printer-file for the print-screen or have the program get the
control.
Thomas Welsch
2021-12-28 19:47:11 UTC
Permalink
Post by Thomas Welsch
I would like to get a screen shot after a user presses a special function key. I will then call another program to process the QSYSPRT output for special purposes. I could, of course, easily transfer the output record of the screen file but I need the whole screen, constants etc. included. And I don't want to change the usual function of the Print Key. Is there an API or anything else callable which produces the QSYSPRT output? Using V7R3.
The only programmatic way I know of doing this is via the DSM APIs. That allows you to capture the entire screen content as it currently appears to the user. Since you appear to want to simply extract some of the data on the screen that might be the way to go. You'd have to know where in the buffer the field(s) were or have some way of identifying them.
I can dig out an RPG example for you if you want. Just let me know.
This would be most helpful. Thanks in advance.
Jon Paris
2021-12-28 20:10:01 UTC
Permalink
Post by Thomas Welsch
Post by Thomas Welsch
I would like to get a screen shot after a user presses a special function key. I will then call another program to process the QSYSPRT output for special purposes. I could, of course, easily transfer the output record of the screen file but I need the whole screen, constants etc. included. And I don't want to change the usual function of the Print Key. Is there an API or anything else callable which produces the QSYSPRT output? Using V7R3.
The only programmatic way I know of doing this is via the DSM APIs. That allows you to capture the entire screen content as it currently appears to the user. Since you appear to want to simply extract some of the data on the screen that might be the way to go. You'd have to know where in the buffer the field(s) were or have some way of identifying them.
I can dig out an RPG example for you if you want. Just let me know.
This would be most helpful. Thanks in advance.
I can't find just the specific piece of code - but the example I wrote for the RPG Error Handling redpiece gives you all that you need and is working code. You can find it here: http://www.systemideveloper.com/downloadFiles/REDBOOK.zip

If you don't have the redpiece - which explains the code - it is here: https://www.redbooks.ibm.com/redpapers/pdfs/redp4324.pdf

If you have any questions feel free to email me.

Continue reading on narkive:
Loading...