OS FileName$: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
The '''OS_FileName$''' [[internal function]] does returns the real [[operating system]] path of a [[virtual path]].  In other words it converts a BR filename (A$) based on a [[Drive]] statement to the name used by the operating system outside of Business Rules!.  This internal function does the opposite of [[BR_FileName$]].
The '''OS_FileName$(A$)''' [[internal function]] does returns the real [[operating system]] path of a [[virtual path]].  In other words it converts a BR filename A$ based on a [[Drive]] statement to the name used by the operating system outside of BR.  This internal function does the opposite of [[BR_FileName$]].


In BR! a file name that is preceded with a colon (":") (i.e.  ":C:\Test") is always interrupted as a operating system's file path and/or name.  File specifications without a preceding colon will be processed as a BR file path and/or name (a.k.a. [[Virtual Path]])
In BR a file name that is preceded with a colon (":") (i.e.  ":C:\Test") is always interpreted as an operating system file path and/or name.  File specifications without a preceding colon will be processed as a BR file path and/or name (a.k.a. [[Virtual Path]])




Line 10: Line 10:
  OS_FileName$("C:\Example Path\")
  OS_FileName$("C:\Example Path\")


====History====
====Comments and examples====
#Introduced in [[Business Rules!|BR!]] 4.18


====Comments and examples====
When a [[DRIVE]] statement included in the BRCONFIG.SYS file, or executed with EXECUTE CONFIG DRIVE which remaps a location within BR, a system call that refers to a file on the remapped drive will fail unless the remapping parallels the operating system location.  Using the OS_FILENAME$(A$) in the system call rather than just the BR name will allow the operating system to find the correct file.
When a [[DRIVE]] statement included in the BRCONFIG.SYS file, or executed with EXECUTE CONFIG DRIVE .... remaps a location within BR, a system call that refers to a file on the remapped drive will fail unless the remapping parallels the operating system location.  Using the OS_FILENAME$(A$) in the system call rather than just the BR name will allow the operating system to find the correct file.


  01010 EXECUTE "CONFIG DRIVE X:,\\server1\data\datafiles,\,\"
  01010 EXECUTE "CONFIG DRIVE X:,\\server1\data\datafiles,\,\"
Line 20: Line 18:


====Related functions====
====Related functions====
*[[Simple colon]] (:)
*[[Simple colon]] (:)



Revision as of 09:25, 30 January 2012

The OS_FileName$(A$) internal function does returns the real operating system path of a virtual path. In other words it converts a BR filename A$ based on a Drive statement to the name used by the operating system outside of BR. This internal function does the opposite of BR_FileName$.

In BR a file name that is preceded with a colon (":") (i.e. ":C:\Test") is always interpreted as an operating system file path and/or name. File specifications without a preceding colon will be processed as a BR file path and/or name (a.k.a. Virtual Path)


Syntax

OS_FileName$(A$)
OS_FileName$("C:\Example Path\")

Comments and examples

When a DRIVE statement included in the BRCONFIG.SYS file, or executed with EXECUTE CONFIG DRIVE which remaps a location within BR, a system call that refers to a file on the remapped drive will fail unless the remapping parallels the operating system location. Using the OS_FILENAME$(A$) in the system call rather than just the BR name will allow the operating system to find the correct file.

01010 EXECUTE "CONFIG DRIVE X:,\\server1\data\datafiles,\,\"
01020 EXECUTE "SYS COPY "&OS_FILENAME$(X:\tempfile)&" "&OS_FILENAME$(X:\tempfile)&".tmp"

Related functions