ASNA WingsRPG™ Reference Manual

Limited Capability Users

IBM i user profiles with the Limited Capability (LMTCPB) attribute set to *YES or *PARTIAL are considered Limited users. Prior to Wings 5.2 the specific boundaries imposed on Limited users prevented them from accessing Interactive RPG programs and their attached 5250 screens.

When Wings establishes a connection to the IBM i through DataGate, it creates either a Batch or an Interactive job on behalf of the user. Batch jobs are initiated via the SBMJOB command with a CALL to the DATAGATE program as the command to run in the submitted job. Interactive jobs are initiated via telnet, once again with the DATAGATE program given as the initial program to run, and support for the Wings 5250 terminal emulator is only available to Interactive jobs.

With Interactive jobs, DataGate defaults to requesting that the DataGate server be available to receive and process commands sent from the web site. In order for the DataGate job to comply with this request, it must specify itself as the initial program for the starting job so that it can sit on a loop processing commands sent from the DataGate client; this is something that can't be done for limited users.

Limited users' profiles cannot provide an initial program to run on interactive jobs, thus, before Wings 5.2, limited users could not establish Wings jobs with support for programs requiring the use of 5250 screens.

For Limited users, Wings includes a feature that can direct the DataGate system to initiate the interactive job without attempting to override the initial program assigned to the profile. Because this feature doesn't start the DATAGATE program, using it will render the server job unable to support requests being made from the Windows client, for example requests to open database files or call programs. This type of interactive server job will start as if the user had logged on to a traditional interactive job: the initial program or menu specified in the user profile will begin the job. However, rather than throwing an error, programs enhanced with an ASNAWINGS Handler or presenting 5250 screens will direct the user I/O to the Windows server to be sent to the user's browser.

For a walkthrough of how to optimize Wings for Limited Users, see Customizing the WingsJob class to support Limited Capability Users.

Hint – Unless Limited Users have default menus that include a specific escape command, they will need to enter SIGNOFF ENDCNN(*YES) on the command line to end the session properly.


Wings handles Limited users with the following logic:

  • If the job is batch (the DCLDB VTerm parameter equals *NONE) the DataGate system uses the SBMJOB command to start it. This type of job is available to both Unlimited and Limited users.
  • If the job is Interactive (in AVR, the DCLDB VTerm parameter equals *MONARCHWEB; in VB and C# the Database constructor parameter is VirtualTerminal.MonarchWeb), the DataGate system can do one of three things, determined by the ServerSupport property of the Database object. The ServerSupport property can take its values (listed in parenthesis below) from the AVRRuntime.ServerSupport enumeration. This property is set in the WingsJob file:
    • Always attempt to start the DATAGATE program in the job (Start) – this is the default behavior; Limited users will encounter an error.
    • Never attempt to start the DATAGATE program (DoNotStart) – will deny the use of many DataGate client requests such as opening a file or calling a program, but supports 5250 and Wings-enabled screens for Limited and Unlimited users alike.
    • Run the DATAGATE program only if the user profile is Unlimited (StartIfUnlimitedUser) – invokes DATAGATE in the job only if the user's account is Unlimited, and functions like DoNotStart if the user is Limited. This requires that the DG8SVCPRF user profile(part of the DataGate system) has *READ authority to the user profile, so that it can determine the value of LMTCPB.

If either DoNotStart or StartIfUnlimitedUser are selected, a DefaultJobCodePageID for the desired 5250 screens must be established in the code before opening a connection to the database.

Critical –All of the logic for AVRRuntime.ServerSupport must take place before the database Open command is run, otherwise it will simply behave as if it remained set to defaults.


Proper placement and coding in a C# application might look like this:

     myDatabase = new AVRRuntime.Database( "", AVRRuntime.VirtualTerminal.MonarchWeb, AVRRuntime.OpenAccessDspF.Wings );
    myDatabase.ServerSupport = AVRRuntime.ServerSupport.DoNotStart;
    myDatabase.DefaultJobCodePageID = 37;

    while( true )
        . . . 
        . . . 

In AVR, it may look like more like this:

   dcldb myDatabase DBName("ProductionDB") VTerm(*MonarchWeb) OpenAccessDspF(*Wings)
     . . .

         myDatabase.ServerSupport =  ASNA.VisualRPG.Runtime.ServerSupport.DoNotStart
         myDatabase.DefaultJobCodePageID = 37
         CONNECT myDatabase
     . . .
Important – These properties and processes are designed to work for Wings and its 5250 Emulator specifically. This support does not extend to Monarch or other AVR applications.