Search Path Management Commands

In this section:

FOCUS has a default search path for application and system components. You can supplement this search path by using one or more of the following APP commands:

Generally, these commands add applications to the beginning of the default search path. The exception is temporary components that are created in the current session. These temporary components are searched first, before the user-defined path.

APP PATH

How to:

The APP PATH command sets the search path to a designated list of application names that refer to applications under the approot value. You can specify multiple application names to extend the search path.

Syntax: How to Add an Application to the Search Path Manually

APP PATH app1[/] [app2[/] ...]
    [appn[/]]

where:

app1...appn

Are application names. If you follow an application name with a slash (/), nested applications (the subtree of applications below the named application) will not be in the search path. If you do not follow the application name with a slash, the nested_app parameter in the edaserve.cfg file determines whether nested applications are searched for files referenced in a procedure, and to what level. If you need to specify more application names than can fit on one line, add the continuation character (-) at the end of the first line, and code more application names on the next line.

Note:

  • You can use the APP PATH command without an application name to reset the search path to the initial list.
  • APP PATH does not validate the application list.

APP PREPENDPATH

How to:

The APP PREPENDPATH command enables you to temporarily add application names to the beginning of an existing APP PATH search path.

If you wish to use this command to alter the search path, you must code it manually in your application.

Syntax: How to Add Application Names to the Beginning of a Search Path

APP PREPENDPATH app1[/] [app2[/]] ...
   [appn[/]]

where:

app1...appn

Are application names. If you follow an application name with a slash (/), nested applications (the subtree of applications below the named application) will not be in the search path. If you do not follow the application name with a slash, the nested_app parameter determines whether nested applications are searched for files referenced in a procedure, and to what level. If you need to specify more application names than can fit on one line, add the continuation character (-) at the end of the first line, and code more application names on the next line.

APP APPENDPATH

How to:

The APP APPENDPATH command enables you to temporarily add application names to the end of an existing APP PATH search path.

If you wish to use this command to alter the search path, you must code it manually in your application.

Syntax: How to Add Application Names to the End of a Search Path

APP APPENDPATH app1[/] [app2[/]] ... [appn[/]]

where:

app1...appn

Are application names. If you follow an application name with a slash (/), nested applications (the subtree of applications below the named application) will not be in the search path. If you do not follow the application name with a slash, the nested_app parameter determines whether nested applications are searched for files referenced in a procedure, and to what level. If you need to specify more application names than can fit on one line, add the continuation character (-) at the end of the first line, and code more application names on the next line.

APP MAP

How to:

Reference:

The APP MAP command allows you to assign an application name to a non-approot application anywhere in the file system or to redirect an application. The application name becomes a virtual application under approot, which can be referenced in an APP PATH command and any other APP command that takes an application name as a parameter.

Note that mapping does not automatically add a directory to the path, it simply makes it available for addition to the search path.

Syntax: How to Map a Physical File Location or Redirect an Application

To map a physical file location outside of approot, the syntax is:

APP MAP virtualname real_location

where:

virtualname

Is an application name of up to 64 characters that can later be used in an APP PATH command.

real_location

Is a real full path name or DDNAME in the native style of the given operating system. On UNIX and Linux, the location may be a mixed case name, but the MAP virtualname itself is always handle insensitive when used (that is, EX mymap/mytest).

Note that if the real location contains spaces, it must be surrounded by double quotation marks.

To redirect an approot or non-approot application to a different name, the syntax is:

APP MAP app1 app2/dir1/dir2/../dirn

where:

app1

Can be an existing physical, mapped or linked app. It can also be a new app.

app2

Can be a physical, mapped or linked or non-existent app.

dir1 ... dirn

Are application directory names.

Syntax: How to Map DDNAME Allocations

The syntax for this type of mapping is

APP MAP appname file_extension=//dd:ddname;file_extension=//dd:ddname;...

where:

appname

Is the name of the application used to reference this mapping in an APP PATH, APP APPENDPATH, or APP PREPENDPATH command.

file_extension

Is one of the following valid FOCUS file extensions:

.mas
.fex
.acx
.htm
.sty
.gif
.psb
ddname

Is the ddname of the allocation you wish to map. The allocation can be performed using JCL code or a DYNAM command.

Example: Mapping DDNAME Allocations

DYNAM ALLOC FILE MYMAS DA EDAARH.MASTER.DATA SHR REU
APP MAP APP1 MAS=//DD:MYMAS;
APP APPENDPATH APP1

By default, FOCUS has an APP MAP command in the EDASPROF file to map the application MVSAPP to the allocations FOCEXEC, MASTER, ACCESS, HTML, FOCSTYLE, GIF, FOCPSB. While allocations of these ddnames are not required for the APP MAP command to be valid, once the ddnames are allocated by JCL or DYNAM commands, they become available for use.

Reference: APP MAP With Universal Naming Convention (UNC)

On platforms that support Universal Naming Convention (UNC), you must use the UNC to designate a network drive to access APP directories. The UNC must:

  • Be at least one folder below the initial shared location.
  • Not contain spaces unless enclosed in double quotation marks. For example,
    \\mynode\myshare\accnting
    "\\mynode\my share\accnting"

APP SET METALOCATION_SAME

How to:

The APP SET METALOCATION_SAME command identifies whether Master Files and their corresponding Access Files must be in the same location.

Syntax: How to Control the Location of Synonym Files

APP SET METALOCATION_SAME {ON|OFF}

where:

ON

Specifies that Master Files and their corresponding Access Files must reside in the same application directory. ON is the default value.

OFF

Specifies that once the Master File for a request is located, FOCUS will use the active search path to find the corresponding Access File.

APP ? METALOCATION_SAME

How to:

The APP ? METALOCATION_SAME command queries whether Master Files and their corresponding Access Files must be in the same location.

Syntax: How to Query Whether Synonym Files Must Reside in the Same Location

APP ? METALOCATION_SAME

If the result of this query command is ON, FOCUS expects to find corresponding Master and Access Files in the same application directory. If the result is OFF, FOCUS uses the active search path to find the Access File that corresponds to a given Master File.

APP SHOWPATH

How to:

The APP SHOWPATH command lists all the currently active applications in the search path, including baseapp, which is always last.

Syntax: How to List Active Applications

APP SHOWPATH

Example: Listing Active Applications in the Search Path

FOCUS is generally installed with two default applications: ibisamp (contains sample files), and baseapp (which can contain any files you create).

The APP SHOWPATH command generates the following output is:

ibisamp
baseapp

Information Builders