!ABSPATH()

!ABSPATH()

Top  Previous  Next

 

The !ABSPATH() subroutine forms an absolute pathname from a directory and file path.

 

 

Format

 

CALL !ABSPATH(path, dir, file)

 

where

 

pathis the returned absolute pathname.

 

diris the directory path to be used when prefixing the pathname.

 

fileis the file path to be processed.

 

 

The !ABSPATH() subroutine uses the supplied directory and file path to construct an absolute pathname.

 

If file commences with @QMSYS, path is returned as the file value with the @QMSYS token replaced by the QMSYS account pathname.

 

If file commences with a directory separator character, path is returned as file.

 

If file commences with a Windows drive specification, path is returned as file.

 

Otherwise, path is formed by concatenating dir and file, inserting a directory separator character if required.

 

 

Examples

 

Dir

File

Path

Any

@QMSYS\ACCOUNTS

C:\QMSYS\ACCOUNTS

Any

\SALES\CUSTOMERS

\SALES\CUSTOMERS

Any

C:\SALES\CUSTOMERS

C:\SALES\CUSTOMERS

C:\SALES

CUSTOMERS

C:\SALES\CUSTOMERS

C:\

CUSTOMERS

C:\CUSTOMERS