!PATHTKN()

!PATHTKN()

Top  Previous  Next

 

The !PATHTKN() subroutine processes special tokens in a VOC or ACCOUNTS file pathname.

 

 

Format

 

CALL !PATHTKN(outpath, inpath)

 

where

 

outpathis the returned processed pathname. This may be the same variable as inpath.

 

inpathis the pathname to be processed. This may be the same variable as outpath.

 

 

Pathnames recorded in the VOC or the QMSYS ACCOUNTS file may include special tokens that represent variable components. The !PATHTKN() subroutine processes a pathname, substituting the expansions for these tokens.

 

The special tokens are:

@DRIVEThe drive letter for the QMSYS directory (Windows only).
@HOMEThe user's home directory as defined by the corresponding operating system environment variable (HOMEPATH on Windows, HOME elsewhere).
@QMSYSThe full pathname of the QMSYS directory.
@TMPThe pathname of the system temporary directory as defined by the TEMPDIR configuration parameter.

 

The token must be the leading part of the pathname.

 

 

The !PATHTKN() subroutine is also defined as a function in the SYSCOM KEYS.H include record:

outpath = PARSE.PATHNAME.TOKENS(inpath)

 

 

Examples

 

The entry for the QMSYS account in the ACCOUNTS register is simply

@QMSYS

This ensures that the entire system can be moved without needing to update the QMSYS account location.

 

When using QM installed on a USB flash drive on Windows, creating an account on the USB device sets the ACCOUNTS register entry as

@DRIVE:pathname

The account is therefore accessible even if the flash drive takes on a different drive letter in later use.