General Information for an IBM i Installation

In this section:

This section covers general information for an IBM i installation.


Top of page

x
Sample Metadata, Data, and Other Tutorial Samples

Releases prior to 7.7.06 pre-load various samples into the IBISAMP application. As of 7.7.06, on a new installation, the IBISAMP application is created, but is not pre-loaded. The server Web Console has a new feature on the ribbon and on the application tree (under new), Tutorials (the Create Tutorial Framework page), which has a pull-down for various samples. The DMC also has this feature on the application tree.

There are currently about 10 different tutorial/sample selections available on the pull-down select list to match various customer needs. The bulk of the prior IBISAMP sample objects can be generated by selecting the Create Legacy Sample Tables and Files tutorial. Other prior IBISAMP DataMigrator sample objects (usually starting with the characters dm*) are now loaded by choosing their respective DataMigrator tutorials. Under the new method, the tutorials/samples may be loaded to any application, not just IBISAMP.

If you are doing just a software refresh, the prior IBISAMP objects will be unchanged (because a refresh does not touch app directories).


Top of page

x
Accessing IFS Files and QSYS Libraries

In this section:

The location of procedure (FOCEXEC) files, Master Files (MASTER), Access Files (ACCESS), and FOCUS database files may be QSYS, IFS, or both. IFS is the preferred location, and is the location used for files created by the HTTP Web Console.



x
Accessing IFS Files

The native mode of the server is to use the QSH Integrated File System (IFS), which follows standard file syntax as found on UNIX platforms to access files.



x
Syntax: How to Access IFS Files

IFS access follows the standards of a number of other platforms for FILEDEF, USE, and APPS, but is most like UNIX because the file names follow the same rules. The following is a summary of the respective commands and conventions

FILEDEF ddname DISK filename [(options]
USE 
filename [AS name]
END
 
APP MAP MYAPP directory

where:

ddname

Is the reference name for the file being opened.

filename

Is either the relative path or full path and the file name (for example, myfile.dat, acctng/myfile.dat, or /home/iadmin/acctng/myfile.dat).

options

Are the available access options, such as LRECL or RECFM.

For more information about FILEDEF options, see the Stored Procedures Reference.

name

Is the optional alternate name of the Master File.

directory

Is the full path name of the directory (for example, /home/iadmin/acctng).

Use of a relative path name is not recommended, since this varies with any given connection to the server. Use of environment variables or shortcuts (for example, $HOME or ~) is not supported in any context.



x
Accessing QSYS Libraries

QSYS access works with libraries and has the following APP, FILEDEF, DATASET, and USE support for accessing existing applications.

The option to use IFS references to QSYS libraries is a native feature of IBM i. IFS references to QSYS names, such MYLIB, use IFS-style references, such as /QSYS.LIB/MYLIB.LIB, which are clearly recognizable as QSYS references.

To map a QSYS library to a WebFOCUS application root directory (APPROOT), use the APP MAP command, as described in How to Map a QSYS Library to APPROOT.

To access or create a FOCUS database in a QSYS library, you need to issue a USE command, as described in How to Use the USE Command to Access a FOCUS Database.

To access a member of a physical file (other than a FOCUS database) in a QSYS library, you can use either:

If you issue an explicit FILEDEF command, and a DATASET attribute exists, the FILEDEF command takes precedence.

Creating a HOLD file automatically creates the physical file if it does not already exist. Issuing a -WRITE or -READ statement, however, requires that the physical file exist.



x
Syntax: How to Map a QSYS Library to APPROOT

To assist with existing applications outside the pre-defined application root directory (APPROOT), the APP MAP command allows an alias to be assigned to a non-APPROOT directory. This alias becomes a virtual directory under APPROOT so it can then be referenced in an APP PATH command. Mapping does not automatically add to the path. It simply makes it available to participate in an APP PATH command. For more information about APPROOT, see the WebFOCUS Developing Reporting Applications manual.

In APP mode, the APP MAP command supports use of IFS QSYS library references so that the application name can be used for path search purposes in applications through the APP PATH command. However, the contents of a QSYS mapping are not available from the Web Console.

The syntax for mapping an application to a QSYS library is:

APP MAP appname /QSYS.LIB/libname.LIB

where:

appname

Is the name of the application.

libname

Is the name of the library to which you are mapping the application. The name must be uppercase.



x
Syntax: How to Use FILEDEF to Access a QSYS Library Member

To use the FILEDEF command to access a member of a physical file in a QSYS library, the syntax is

FILEDEF ddname DISK QSYS:library/file(member) (LRECL n

where:

ddname

Is the logical name you want to assign to the member. It can be up to eight characters in length, and can contain letters, numbers, and underscores. It must begin with a letter.

When used to associate a data source with a Master File, the ddname must match the name of the Master File.

library

Is the QSYS library in which the file is located.

file

Is the name of the file.

member

Is the name of the member to which you are assigning a logical name.

For the member of a single-member physical file, the member name must be identical to the file name. The operating system shorthand of *FIRST is not a valid alternative.

For a member of a multiple-member physical file, you can specify any member name.

LRECL

Specifies the logical record length (LRECL) of the member.

n

Is the local record length.



x
Syntax: How to Use DATASET to Access a QSYS Library Member

To use the DATASET attribute of a Master File synonym to access a member of a physical file in a QSYS library, the syntax is

DATASET = QSYS:library/file(member) (LRECL n

where:

library

Is the QSYS library in which the physical file is located.

file

Is the name of the physical file.

member

Is the name of the member that you want to access.

LRECL

Specifies the logical record length (LRECL) of the member.

n

Is the local record length.



x
Syntax: How to Use the USE Command to Access a FOCUS Database

To access a FOCUS database, the syntax is

USE 
library/file[(member)] [AS name] [NEW]
END

where:

library

Is the QSYS library in which the physical file is located.

file

Is the name of the physical file.

member

Is the name of the member that you want to access. If you omit the name, it defaults to the name of the physical file.

This is the default name used by WebFOCUS to refer to the member. You can override it by specifying AS name.

AS

Defines a logical name that you can use instead of the member name.

name

Is the logical name you want to assign to the member.

NEW

Creates the member, and also creates the physical file if it does not exist. The data source is created as a member of a physical file starting with "F$". The file is created in the specified QSYS library.

This construction allows you to organize multiple FOCUS databases within a single QSYS physical file with a functional name, such as FOCUS, ACCTG, SHIPPING, AR, or AP; or as individual QSYS physical file members, such as SHIP(SHIP), AR(AR), AP(AP), or SHIP(FOCUS).

Early releases of FOCUS and iWay (FOCUS Release 6.x, and iWay Releases 3.x and 4.x) created FOCUS databases with an arbitrary "F$" added to the beginning of the source physical name and used "FOCUS" as the member name. Therefore, the name on the disk was in the form CURLIB/F$MYDB(FOCUS). All subsequent releases do not assume this is a default, and therefore require either a USE command with an explicit AS, or that the files are renamed to fit the current conventions.

For more information about the USE command, see the WebFOCUS Developing Reporting Applications manual.


iWay Software