ASNA WingsRPG™ Reference Manual

Importing Display Files Process

The Microsoft .NET component equivalent to a Display File object is the Web form. Web forms are contained in files with an ".aspx" extension, and this help often refers to them as .aspx pages or Wings Display Files. These files typically contain static (X)HTML markup, as well as markup defining server-side Web Controls and User Controls. This process has also been somewhat automated in Wings Flight Plans but the underlying steps remain the same and performing them with Wings Design Aid can be simpler for smaller projects.

The Process

In the ASNA Wings Website solution in Visual Studio, select the display file folder, which is normally called "Views". Use the right-mouse click, to show the folder context menu. One of the options on this context menu is "Import Display Files from DDS". The Import Display Files from DDS dialog will be presented with the prompts as explained in the next section: Import Display Files Dialog.

  • Importing a single Display File

    Single DDS source members may be imported by entering the location of the DDS source member (see Import Display Files Dialog), by default, the output ASPX Page filename is the same as the DDS source member, but it may be overridden. If the output ASPX Page filename is overridden, the IBM i RPG program needs to be updated to match the new workstation filename.

    Note: Microsoft Windows imposes some restrictions on file names. Therefore, some valid IBM i object names may not be valid as Microsoft Windows file names. The ASNA Wings import process will automatically replace the invalid characters and replace them with equivalent valid characters based upon the MonarchSpecialCharReplacements specified in the application setting section of the Web.config file. There is no need to modify the RPG program when this automatic conversion happens since the ASNA Wings runtime will do this conversion when the ASPX Page is requested as a result of an open Workstation file operation.

  • Importing multiple Display files (batch import)

    Multiple DDS source members from the same library may be imported by entering a pattern in the place of the DDS source member name (see Import Display Files Dialog.). The pattern may be a simple 'Wildcard' substitution pattern (i.e. '*' matches any number of characters, or '?' matches any single character) or an advanced (Regular Expression pattern).
    To use Regular Expressions, an explicit option must be checked when using the Import Display Files Dialog.

Once the single or multiple DDS source member(s) are selected and after pressing the OK button, the import process starts and the Visual Studio Output window shows details during the import process as shown below.

    ------ Import started: Database: '*Public/ELM', Member: 'NUTSNBOLTS/QDDSSRC/CUSTDSPF', Output location: C:\Projects\WingsWebsite\Views\' ------
    C:\Projects\WingsWebsite\Views\CUSTDSPF.aspx created successfully.
    ========== Import: succeeded. Elapsed time: 1,673 ms ==========    

The Results

During the import process ASNA Wings extends the Web form by including a collection of User Controls that implement the DDS Display file entries and keywords used to describe the IBM i Display file creating an ASPX file. A Wings Record Format (Wrf) file for each record in a display file is also generated.

Special Considerations

The RPG Program expects the data for Workstation records that are written or read to be of a specific type and in order as described by the IBM i Display file used during compilation. When the Display File's DDS source member is imported, the (X)HTM markup generated matches the different records in the same order and type as those in the original DDS. If the ASPX Page's markup is modified by the user to further modernize the application (see Adding Display Fields for more information), the IBM i Display file must be updated and the RPG program must be re-compiled to make sure the record definition expected by the RPG program matches the changes made to the Display file. This process is called Exporting Display Files and can be handled either as a manual process run by the Wings developer or with Wings Flight Plans.