Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference GETDIRECTORY
Functions and Expressions Reference Guide
118
GETDIRECTORY
The GETDIRECTORY function returns the full path (directory) for the compiled map
file or the source or destination associated with a specified card object.
Syntax
GETDIRECTORY ([ single-simple-object-name ] )
Meaning
GETDIRECTORY ([ card_or_object_for_which_directory_is_needed
] )
Returns
This function returns a single-text-item.
Without an argument,
GETDIRECTORY returns the full path associated with the
compiled map.
With an argument,
! From a map rule, returns the full path of the source or destination that is
associated with the card. In a map rule, the argument must be the name of
the card for which to get the directory.
! From a component rule, returns the full path of the source or destination
that is associated with the active source or destination.
Note The GETDIRECTORY command without arguments will return the directory of
the compiled map, regardless of whether it is used in a map rule or in a
component rule.
Examples
GETDIRECTORY (OrderFile)
If the card OrderFile is associated with the data file,
c:\<install_dir>\order.txt,
GETDIRECTORY returns c:\ <install_dir>\.
GETDIRECTORY ( )
If the compiled map on the HP-UX is /maps/prod/mymap.mmc,
GETDIRECTORY returns /maps/prod/.