• Using the Print Screen Function from a program

    From Thomas Welsch@21:1/5 to All on Sun Dec 19 06:51:04 2021
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr.UgoGagliardelli@21:1/5 to All on Mon Dec 20 09:00:40 2021
    Il 19.12.2021 15.51, Thomas Welsch ha scritto:
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Welsch@21:1/5 to Dr.UgoGagliardelli on Mon Dec 20 10:37:46 2021
    Dr.UgoGagliardelli schrieb am Montag, 20. Dezember 2021 um 08:59:11 UTC+1:
    Il 19.12.2021 15.51, Thomas Welsch ha scritto:
    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.
    Thank you very much for your fast response. Unfortunately, I have two problems with the solution proposed by you: I don't want to use the PRINT Keyword as I would like to keep the normal functioning of a screen shot, I'd prefer to use a function key for
    providing the new function. On the other hand, I don't even know how to handle the using of the PRINT key as my programs (working with COBOL) does not set any function key indicators when using the PRINT key (actually, they seem not to receive any
    reaction from the host at all). BTW: here's why I would need kind of a screen shot: I want to allow users to produce an Excel sheet with the data from some screens. Therefore, the I-O fields used in my software aren't enough as the constants on display
    would not be known to the programs. I could add them, of course but that would mean writing a program for every special screen in the last consequence whereas I could write a more general program with a few parameters only if I had to handle the screen
    shots only.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From angelo__@21:1/5 to All on Mon Dec 20 21:22:04 2021
    Il 19/12/2021 15:51, Thomas Welsch ha scritto:
    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.

    To copy the data on the screen I created a macro and inserted it in the toolbar.
    The macro is then callable on any video format without modifying
    programs and dspf.
    For my needs this macro writes the data in a pc text file .txt

    --
    Questa e-mail รจ stata controllata per individuare virus con Avast antivirus. https://www.avast.com/antivirus

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jon Paris@21:1/5 to All on Tue Dec 21 07:24:54 2021
    On Monday, December 20, 2021 at 8:22:07 PM UTC, angelo__ wrote:
    Il 19/12/2021 15:51, Thomas Welsch ha scritto:
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Welsch@21:1/5 to Jon Paris on Tue Dec 28 11:47:11 2021
    Jon Paris schrieb am Dienstag, 21. Dezember 2021 um 16:24:56 UTC+1:
    On Monday, December 20, 2021 at 8:22:07 PM UTC, angelo__ wrote:
    Il 19/12/2021 15:51, Thomas Welsch ha scritto:
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jon Paris@21:1/5 to jd...@arcor.de on Tue Dec 28 12:10:01 2021
    On Tuesday, December 28, 2021 at 7:47:12 PM UTC, jd...@arcor.de wrote:
    Jon Paris schrieb am Dienstag, 21. Dezember 2021 um 16:24:56 UTC+1:
    On Monday, December 20, 2021 at 8:22:07 PM UTC, angelo__ wrote:
    Il 19/12/2021 15:51, Thomas Welsch ha scritto:
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)