• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • STRCPYSCN: The Poor Man’s 5250 Remote Control Program

    May 17, 2006 Hey, Joe

    When I perform technical support for some remote 5250 users, I don’t always have the ability to remotely log on to their PC and troubleshoot the problem. There are also times when I can’t or don’t want to go through the trouble of starting a GoToMyPC session with the user machine. Do i5 and iSeries boxes provide any native capabilities for working with another user’s 5250 session?

    –Bob

    While I’m a big fan of remotely logging on to user PCs, I do realize that it’s not always possible to take over a PC running a 5250 session when user machines may be hiding behind various firewalls spanning a single building, a single city, or the entire world. In those cases, where you really need to see what a 5250 user is doing, it’s handy to know about the Start Copy Screen (STRCPYSCN) and End Copy Screen (ENDCPYSCN) commands.

    STRCPYSCN is a simple little command that allows you to view or capture all the screen output from an active 5250 session. So if you’re in New York and your supported user is in Toronto, and you are both running on the same i5 partition, you can easily see what he’s doing on his 5250 session by running the following command on your green-screen session.

    STRCPYSCN SRCDEV(job_name) OUTDEV(*REQUESTER)

    where job_name is the job name of the 5250 device session that you want to view.

    After STRCPYSCN starts, i5/OS will show the following break message on the 5250 target screen that you are asking to monitor.

    Type reply (if required), press Enter. 
      From  . . . :   JOE            05/10/06   20:53:47 
      Cause . . . . . :   Start copy screen has been requested 
    with output to job_name. Reply C to prevent copy screen or 
    G to allow it. (C G)        
    
        Reply . . . 
    

    This message asks your target user for permission to monitor their session. If the user types in ‘C’, permission is denied and the command ends on your requesting session. If the user types in ‘G’, permission is granted and copies of the target session’s 5250 screens will automatically be forwarded to your session, allowing you to follow along as your target user performs various i5/OS and menu commands.

    There are a few things to be aware of, however, when running STRCPYSCN over a remote user’s terminal session. First, your keyboard will be locked up during STRCPYSCN processing, and you will not be able to run any commands on either your target 5250 session or on your own session. STRCPYSCN essentially takes over your terminal so that you can only see what your target user is seeing; there isn’t much latitude for independent action on your viewing system.

    In addition, the forwarded screen captures on your viewing machine will always be one screen behind those on your target machine. So the user will always have to be working one screen ahead in order for you to view the functions that you want to see. One nice way to get around this is by having your target user press the F5 key on screens that have a F5=Refresh option, and STRCPYSCN will show you the previously unrefreshed screen, which should mostly contain the same information as the screen that the user is currently viewing.

    When you’re ready to end the user’s STRCPYSCN session, simply ask the user to run the following End Copy Screen command (ENDCPYSCN) from their desktop.

    ENDCPYSCN

    And this will end target screen forwarding to your viewing machine, leaving you free to run commands again on your 5250 session.

    STRCPYSCN is also good for capturing successive 5250 screens and writing them to an i5/OS or OS/400 file that can be viewed by, FTPed to, or emailed to another person for problem diagnosis. In the file capture scenario, there will be no viewing machine, only a target machine that is copying its screen shots to an output file. To set up this capability, you must run the following STRCPYSCN command on your target machine.

    STRCPYSCN SRCDEV(*REQUESTER) OUTDEV(*NONE) OUTFILE(library/file_name)

    In this scenario, all screens on the target machine are automatically forwarded to a system file, which can be viewed by or sent to another user for analysis. When you run the ENDCPYSCN command, your session will stop copying screens to its output file and it will close the file. That file can then be used by any other user on your i5 box.

    While STRCPYSCN is not as elegant as other PC remote control programs, it serves the purpose of providing a quick and dirty way to troubleshoot 5250 green-screen problems without having any additional software loaded on the target machine. Besides helping troubleshooting, STRCPYSCN can also be used for demonstrating software functionality.

    HTH

    –Joe

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    New Generation Software

    FREE Webinar:

    Creating Great Data for Enterprise AI

    Enterprise AI relies on many data sources and types, but every AI project needs a data quality, governance, and security plan.

    Wherever and however you want to analyze your data, adopting modern ETL and BI software like NGS-IQ is a great way to support your effort.

    Webinar: June 26, 2025

    RSVP today.

    www.ngsi.com – 800-824-1220

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    Bytware:  Network security, anti-virus, monitoring, notification/alerts, file recovery, & compliance
    COMMON:  Join us at the Fall 2006 conference, September 17-21, in Miami Beach, Florida
    ProData Computer Services:  Use Server Proven DBU-on-demand for $10 a day anytime, anywhere!

    TMW Systems Gets New CEO Sun Microsystems Begins Taking Java Open Source

    Leave a Reply Cancel reply

Volume 6, Number 20 -- May 17, 2006
THIS ISSUE SPONSORED BY:

WorksRight Software
Asymex
Profound Logic Software

Table of Contents

  • Debugging iSeries Java Applications Remotely
  • Common Sense Comparisons
  • STRCPYSCN: The Poor Man’s 5250 Remote Control Program

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D
  • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
  • Fresche Overhauls X-Analysis With Web UI, AI Smarts
  • Is It Time To Add The Rust Programming Language To IBM i?
  • Is IBM Going To Raise Prices On Power10 Expert Care?
  • IBM i PTF Guide, Volume 27, Number 20

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle