Getting the schema of your FIleMaker database using the 'Execute SQL' script step

For a while now it has been possible to get some of your FIleMaker schema data via the design functions or using AppleScript. But what isn't obvious is that you can also use FileMaker's Execute SQL script step to get your schema via a SQL query.

% sw_vers
ProductName: Mac OS X
ProductVersion: 10.3.7
BuildVersion: 7S215

In Panther (Mac OS 10.3.x), you may optionally specify a parameter to get a single field's data. One oddity to watch for however is that although sw_vers has field labels that begin with an uppercase character, the command options always use with a lowercase character as the first letter.

There is no unix man page for this command in Jaguar (10.2), but in 10.3 we get the following:

SW_VERS(1)  BSD General Commands Manual  SW_VERS(1)

 sw_vers - print Mac OS X operating system version information

 sw_vers -productName
 sw_vers -productVersion
 sw_vers -buildVersion

 sw_vers prints version information about the Mac OS X or Mac OS X Server
 operating system running on the local machine.

 When executed with no options sw_vers prints a short list of version

 % sw_vers
 ProductName: Mac OS X
 ProductVersion: 10.3
 BuildVersion: 7A100

The ProductName property provides the name of the operating system
release (typically either "Mac OS X" or "Mac OS X Server"). The
ProductVersion property defines the version of the operating system
release (for example, "10.2.4" or "10.3"). The BuildVersion property
provides the specific revision of the operating system as generated by
the Mac OS X build system.

The output of sw_vers can be refined by the following options.

-productName Print just the value of the ProductName property.

-productVersion Print just the value of the ProductVersion property.

-buildVersion Print just the value of the BuildVersion property.

% sw_vers -productName
Mac OS X

% sw_vers -productVersion

% sw_vers -buildVersion


Mac OS X March 10, 2003 Mac OS X