Use this guide to install and configure VersaLex on a Windows PC and map to the AS/400 through a networked drive. If you are installing directly on the AS/400 (available to LexiCom users only), see AS/400 Setup and installation instead.
AS/400 Network Access overview
AS/400 Network Access is an add-on feature available to those that have purchased it. If you did not purchase AS/400 Network Access, but need this functionality, contact your Cleo sales representative.
The AS/400 is also known as the “iSeries”, “System I” or "IBM i", but will continue to be referred to generically throughout this document as the “AS/400” however “iSeries”, “System i” or "IBM i" may be used interchangeably.
AS/400 Network Access enables VersaLex to read and write directly from the AS/400 native (QSYS.LIB) file system, allowing for seamless conversion of the data between EBCDIC and ASCII formats. Using AS/400 Network Access, AS/400 native files can be read or written by VersaLex, running under either the Windows or Unix platform.
Network Access process map
The following are the tasks that you must perform in order to successfully access files on a AS/400 server accessible through your network.
Configure VersaLex for AS/400 Network Access
Select the Native AS/400 Inbound/Outbound Directory Paths
Create Inbound and Outbound Files
Create Links in VersaLex for the Inbound and Outbound Files
Define a Default File Member (AS2 only)
Configure AS/400 Mapped Drives for Text Conversion (Windows only)
Configuring AS/400 Network Access
Follow the instructions below to configure the Cleo Harmony, Cleo VLTrader, or Cleo LexiCom application to access files on the AS/400.
On the Cleo Harmony, Cleo VLTrader, or Cleo LexiCom menu bar, select .
The following display panel will appear:
In the top portion of the panel:
Select the Enable AS/400 network access check box
In the Address field, enter the IP address of the remote AS/400
In the User ID and Password fields, enter a valid user ID / password on the remote AS/400. Use [Validate Login] to verify the entries. This user must have at least "All Object Access" system privilege if accessing native files that are not owned by this user.
Selecting the AS/400 Inbound/Outbound Directory paths
Follow these steps to add an AS/400 directory path to the Cleo Harmony, Cleo VLTrader, or Cleo LexiCom configuration. Repeat this process for each additional directory path:
- In the lower portion of the AS/400 Configuration panel, click the New button as shown:
- A display similar to the following will appear. Click on the down arrow to get a list of all AS/400 mapped file shares in your network:
- If you have mapped AS/400 file shares, a display similar to the following will be shown:
- Select the desired mapped file share, if one exists. Otherwise, enter the desired path in the AS/400 Directory Path field (for example, /QSYS.LIB for Native File System access or /LexiCom for Integrated File System access).
- Select the appropriate file system option, i.e., either Native File System or Integrated File System.
- If the Integrated File System option is selected, enter the appropriate Coded Character Set ID value, if provided by your trading partner. If this field is left blank, the CCSID value based on the default locale will be used.
- If the Native File System option is selected, select the Pad Inbound to Record Length option if inbound files will contain variable length records.
When this option is selected, all records are transformed to a fixed-length format as they are stored in the AS/400 NFS file member. End of line terminators (that is, CR, LF or CRLF) are stripped from the record and the remainder of the record is padded with blanks. The record length is determined from the AS/400 target file. If the inbound file contains a record larger than the AS/400 target file, an error will be logged and the file will not be stored. When this option is not selected, the inbound file will be assumed to already be fixed-length and will be streamed, i.e., no padding will be done to the records as they are written to the AS400 NFS file member and end of line terminators will not be stripped from the file.
- Select the Strip Padded Outbound Records option if outbound records are a fixed record length and are padded with the specified Padding Character. The record length is determined from the AS/400 NFS target file. When this option is selected, padding characters after the terminator (CR, LF or CRLF) will be removed.
The Padding Character is the decimal value of the character used in AS/400 target file for padding outbound records. By default, this value is set to 32 (the ASCII representation of a space). Any ASCII value between 0 – 127 can be used.
- The updated display should look similar to the one that follows. Click OK.
- The updated AS/400 Configuration panel will now be displayed similar to the one below. Click OK.
Creating Inbound and Outbound native files
Before you can successfully read and write AS/400 native files, they must be created using the following AS/400 CL commands. In this example, we have created a LEXICOM library where the INBOUND, OUTBOUND and SENTMSG files will reside:
CRTPF FILE(LEXICOM/INBOUND) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(*NOMAX)
CRTPF FILE(LEXICOM/OUTBOUND) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(*NOMAX)
CRTPF FILE(LEXICOM/SENTMSG) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(*NOMAX)
Creating links for the Inbound and Outbound files
The next step is to link the INBOUND and OUTBOUND (and optionally the SENTBOX) files that were created in the previous section with the "Inbox", "Outbox" and "Sentbox" in VersaLex. To do this, on the General panel at the Host level, enter the "Inbox", "Outbox" and optionally "Sentbox" entries, as shown below:
NFS Access Example
IFS Access Example
Defining a default file member (AS2 only)
If you are using AS2, in most cases you will need to define a default file name where the received entries will be stored. An AS/400 file must be specified in the form: /QSYS.LIB/LIBRARY.LIB/OBJECT.FILE/FILE.MBR.
To accommodate this format requirement, on the .mbr extension, as illustrated below:panel, add a file with a
Defining an Authorization List
If objects defined in the /LexiCom IFS or NFS directory need to be accessed but are not owned by the user that originally created them, Authorization Lists can be used to allow users read and write access rights to specified IFS folders or NFS libraries and files. (If a user is not included in the Authorization List, then the *PUBLIC authority assigned to the particular IFS or NFS directory will apply and will override the read/write authority originally assigned to the network access file share.) If read and/or write access is not properly assigned to users that will be reading and writing in the NFS directories, LexiCom will log errors that access to the request was denied. See AS/400 Setup and installation for information about creating and using Authorizations Lists for installing and configuring your AS/400 system.
Configuring content-type inboxing for the Native File System (AS2 only)
The Add Content-Type Directory to Inbox checkbox allows for sorting of incoming messages based on the content-type of the message to a subdirectory (under the Inbox specified on the General tab for the Host). You specify each of the content-types that you want directed to specified subdirectories by entering a name in the Directory field. Directory entries may be made for content-types of: EDIFACT, X12, XML, Binary, Plain Text, and Other (a default catch-all for messages with all other content-types you may receive.) The same subdirectory may be used for multiple content-types. You may also leave 'Directory' entries blank which will cause any received messages for that specific 'Content-Type' to be stored in the Inbox specified on the General tab.
By default, the Content-Type directories are preconfigured for windows or IFS based folders. To use this feature on the AS/400 Native File System, modifications must be made to all directories that will be used so that the settings have the correct AS/400 syntax, i.e., each setting must be in the form DIRECTORY.FILE, for example:
On the 'General' tab, specify just the library for the "Inbox" value where the "Content-Type" files will be created. In this example, we have used /QSYS.LIB/LEXICOM.LIB/:
Now verify that all the "directories" that you have specified, i.e., files in the form DIRECTORY.FILE, have a matching physical file defined. In the example above, the files EDIFACT.FILE, X12.FILE and XML.FILE under the /QSYS.LIB/LEXICOM.LIB library are being used. If these files don't already exist, create a physical file for each of the files you have specified as follows:
CRTPF FILE(LEXICOM/EDIFACT) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(*NOMAX)
CRTPF FILE(LEXICOM/X12) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(*NOMAX)
CRTPF FILE(LEXICOM/XML) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(*NOMAX)
As a final step, verify that the Add Mailbox Alias Directory To Inbox setting on the Advanced panel is not selected:
Configuring AS/400 mapped drives for text conversion (Windows only)
Through IBM i Client Access for Windows, you can map an AS/400 file share with a Windows network drive and view its contents through Windows Explorer. By default, the contents of AS/400 files are stored in EBCDIC, which cannot be viewed through Windows.
To allow automatic conversion of your files to ASCII format, follow this simple procedure:
1. Open System i Navigator and select the File Shares item:
2. Right-click the File Shares item and select the Open i5/OS NetServer option:
3. Right-click the file share that you have mapped into Windows and select Properties option:
4. Select the Allow file text conversion checkbox and add the file extensions of all files that you will be viewing through Windows. In the example below, all .mbr files will automatically be converted:
Please sign in to leave a comment.