• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Admin Alert: Starting Multiple PC5250 Sessions in a Batch File

    September 7, 2011 Joe Hertvik

    In a recent column, I demonstrated how to configure a PC5250 session so that you can run multiple sessions on the same PC to a single iSeries/System i/Power i partition. The problem with that technique was that it only worked using sessions that connected to the same partition. This issue, I’ll demonstrate how to automatically start multiple PC5250 sessions on the same PC that connect to different partitions.

    Today’s column was inspired by reader Bill Swann, who reminded me that the iSeries Access for Windows package includes a very simple procedure for launching multiple PC5250 sessions at the same time on the same PC. All you have to do is create a PC5250 batch file (.bch) and you’ll easily be able to launch as many PC5250 sessions to as many partitions as you want on your PC, all with the click of only one key.

    Here’s how it’s done.

    The Concept

    PC5250 batch files work the same way as any other Windows PC batch file. They execute commands in sequence. In this case, each executed command is a call to start a PC5250 session file (.ws) that connects your PC to a different iSeries, System i, or Power i partition.

    To illustrate how a PC5250 batch file works, let’s look at an example. Let’s assume that I have three i OS partitions (PARTA, PARTB, and PARTC), each of which has its own PC5250 session file on my PC that is already configured to run multiple sessions to its respective partitions. However, I don’t want to go through the hassle of clicking on each respective PC5250 session icon each time I want to open a session. I’d rather click on one icon that opens one or more sessions to each of my partitions. The PC5250 batch file is the mechanism I can use to make this happen.

    A PC5250 batch file is a simple batch file that allows me to start several PC5250 sessions at the same time, simply by clicking on the batch file icon. It’s easy to create and use. Once I create my batch file, I can easily move it to my desktop, my Windows startup folder, or any other location that allows me to easily and quickly start my sessions. This technique works great in i OS shops that have multiple partitions, such that you only have to click on the one batch file icon to start desktop sessions to each of many different systems.

    Creating the Multi-Session PC5250 Batch File

    To create a PC5250 batch file from your Windows desktop, start up the Multiple Sessions application from your PC5250 emulation folder. In Windows XP, I can access Multiple Sessions by clicking on the Windows Start button and then selecting All Programs→iSeries Access for Windows→Emulator→Multiple Sessions from the Start menu. This will bring me to the Create/Modify Batch File screen show here.

    From here, I can populate my batch file with PC5250 session calls by highlighting each session name I want to add to my .bch file and then clicking on the Add button. Every time I click on Add, the program will add another session call entry to my .bch file.

    So if I wanted to add one session startup for each of three partitions to my batch file, I would first highlight the parta.ws session file and then click Add. This adds a PC5250 parta.ws session call command (pcsws.exe) into my batch file, which I can see in the Batch-File Entries section of this screen. If I wanted to add session startups for my partb.ws and partc.ws PC5250 session files, I would highlight each of these sessions and again click on the Add button. This would add two new session calls to the Batch File Entries section. Using this technique, I can add as many PARTA, PARTB, and PARTC session startups as I want to my batch file.

    Modifying How Each Session Starts

    If I then want to modify how my .bch sessions start up, I can add parameters to each session call by moving my mouse pointer over to the Batch-File Entries part of the Create/Modify Batch File screen and then modifying my PC5250 calls with one of the following parameters.

    1. To minimize one or more of my sessions as an icon on the Windows taskbar (not as an open window), I would add /i to the end of that session’s PC5250 call statement in my batch file. I would then be able to use ALT-TAB to go to that session or click on its icon on the Windows taskbar to use the session.

    2. To start one or more of my sessions as a hidden session, I would add the /H parameter to the end of each session call that I want to hide. After each hidden session starts, the PC5250 session will remain active but it will no longer show up on my Windows taskbar and it will not display in an open window. I won’t be able to click on the session on my Windows taskbar or to use the Windows ALT-TAB keystroke combination to move to the hidden session. I would only be able to get to a hidden session by going to an active PC5250 session that is not hidden and selecting Window→Show Session from the PC5250 menu bar. This screen shows all the active and hidden PC5250 sessions on my PC, as displayed here.

    From this list, I would then select the hidden session that I want to reveal, press Enter, and that session will become available on the Windows taskbar. One of the better scenarios for using hidden PC5250 sessions is when you’re starting a PC5250 printer session on the user’s desktop and you don’t want the user messing around with or changing the printer session settings. In that case, you may want to make the printer session’s PCSWS.EXE call into a hidden session.

    There is one thing to be careful of when using hidden PC5250 sessions. Never designate all of your .bch PC5250 session calls as hidden sessions. You will always need to have one non-hidden session active in order to reach your other hidden sessions. If all your sessions are hidden, you won’t be able to reach them through the Window→Show session option on the PC5250 toolbar.

    When I’m finished with configuring my .bch file, I can save it to my PC5250 emulator folder by clicking on File→Save or File→Save As from the Create/Modify Batch File screen toolbar. If I want to later change the PC5250 activation commands inside my .bch file, I can find and right-click on the file and select Modify from the pop-up menu that appears to once again reach the Create/Modify Batch File screen.

    Once my PC5250 batch file is ready, I can click on my .bch file to start all my i OS sessions at the same time. If I want these sessions to start whenever I sign on to the computer, I can move or copy the .bch file into my Windows Startup folder. I can also copy this file to my desktop if I want to easily start my sessions whenever I want.

    RELATED STORY

    Two PC5250 Configuration Secrets



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    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

    PowerTech:  2011 Security Event of the Year. September 22–23 in Las Vegas. RVSP today!
    VAULT400:  IBM Power7 Upgrade and HA/DR Webinars. Sept 27, Oct 25. Get a FREE white paper!
    Four Hundred Monitor Calendar:  Latest info on national conferences, local events, & Webinars

    IT Jungle Store Top Book Picks

    BACK IN STOCK: Easy Steps to Internet Programming for System i: List Price, $49.95

    The iSeries Express Web Implementer's Guide: List Price, $49.95
    The iSeries Pocket Database Guide: List Price, $59
    The iSeries Pocket SQL Guide: List Price, $59
    The iSeries Pocket WebFacing Primer: List Price, $39
    Migrating to WebSphere Express for iSeries: List Price, $49
    Getting Started with WebSphere Express for iSeries: List Price, $49
    The All-Everything Operating System: List Price, $35
    The Best Joomla! Tutorial Ever!: List Price, $19.95

    SunGard Launches Recover2Cloud Appreciation Rising for Web Serving on IBM i

    Leave a Reply Cancel reply

Volume 11, Number 25 -- September 7, 2011
THIS ISSUE SPONSORED BY:

SEQUEL Software
WorksRight Software
Botz & Associates, Inc.

Table of Contents

  • Adobe Flash Builder for the iSeries Programmer, Part 2
  • Dynamically Invoke SQL UDFs From RPG Code
  • Admin Alert: Starting Multiple PC5250 Sessions in a Batch File

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