Working offline with nl files

Newlook files (nl files) allow you to work with screens without needing to be connected to a live host session.

There are a number of ways to save a host screen as an .nl file.

Creating nl files from live screens in the runtime client or Smartclient

Navigate to the screen you wish to save as an nl file and click the save button () or File | Save.

This will save the current screen as an nl file.

Note:

By default, any generated .nl file will be given the same name as the screen's title. If this name already exists, then a number will be appended to the file name to ensure that each .nl file has a unique name.

If you would like to save multiple screens as nl files, you can select the option to Automatically save each screen as it is displayed, which will capture each screen you navigate to as a separate offline host file (.nl), in the folder specified in the Path field.

TIP:

From version 10.5 onwards, DBCS characters can be saved in nl files, allowing you to work with DBCS screens off-line. Nl files containing saved DBCS characters will not be compatible with versions prior to 10.5.

Creating an nl file using the Save method

It is possible to create a script or macro that calls the Save method at runtime to save the current screen as an nl file. For more information refer to the Save method topic.

Creating an nl file from an override in Identify

To export an override's stored screen data as an nl file, open the override in Identify and select Tools | Export to NL file... from the Developer menu. Navigate to the folder that you wish to save the nl file in, enter the file name and click Save.

It is worth pointing out that this process will save the override's stored presentation space (the current 5250 screen) at the time you create the nl file. If the override is subsequently updated, then the stored presentation space (5250 screen data) may be different from the screen you have saved as an nl file previously.

Generate nl files for all overrides in the current repository

To export the stored screen data of every override in your current repository as a series of nl files, select Tools | Repository | Create NL files... from the Developer menu.

Specify the folder where the nl files will be created (note that any files you have in this folder already will be overwritten) and click Create. An nl file for every override in your repository will be created in the specified folder, as well as an all.nll file referencing every nl file created in the folder. After the export is finished, click View Folder to navigate to the folder containing the nl files.

Opening nl files

Once saved to this format, you can open an offline nl file by selecting File | Open () from the menu (or via the OpenFile method in a script or OpenFile macro action), and refine the screen's UI as though you were working with a live screen. Any development changes you make while working offline will be saved in your repository and solution files, which means that all changes made offline will apply to your live screens next time you connect to your IBM i application

Working offline removes the constraints of always having to have a live connection during development. It is most commonly used for offline demonstrations, early development work and testing.

Create an NLL file list manually

Multiple .nl file names can be stored in a Newlook file list (.nll file). When an .nll file is opened in Newlook, the offline files will display consecutively in the order specified in the .nll list.

When browsing a file list offline in Smartclient or the Runtime Client, the Page Down key will advance to the next file in the list, while the Page Down key will advance to the previous file.

It is also possible to use the navigation buttons in the menu bar while an .nll list is loaded.

 

To create an .nll file list, copy all the .nl files that you want in your list into a folder that you have created specifically for this purpose (typically this would be a folder called "Nls" or "Screens" within your solution folder), open a DOS prompt and navigate to that folder, then execute the following commands (where "MyList.nll" is the name of the new file list):

chcp 65001

dir *.nl /b /on >"MyList.nll"

The chcp 65001 command above ensures that the NLL file is encoded in unicode.

Once saved, you can open a Newlook file list in the same way you would open an .nl file, by selecting File | Open () from the runtime client or Smartclient menu, or opening it via the OpenFile method or macro action.

 

See Also

Configuring shortcuts | Command line arguments | Smartclient menu | Save method


© 2004-2021 looksoftware. All rights reserved.