Version 4.8

All Platforms

NEW FEATURES GUIDE

COMMANDS

LABELS

Enhanced COMMANDS

System Maintained Variables

New Command Line Flags

Environment Variables

New Platforms

Trig & Log Functions

 

NEW COMMANDS

back to index

F9 Search Now Available in *cabe Help

In define processing, when you press the F10 Help key for that
forever growing list of commands, you can now use the F9 search
key to find your favorite command or phrase.

The search will produce a ListBox which is key sensitive.
You can also customize the end-user help files by editing the
key words area of your help files.

 

N=ACCESS(filename,type)

Allows you to check whether a file has a
particular type of access privilege.

Type is any combination of R=Read W=Write and X=Execute access.

pw = access("/etc/passwd","rw")

Returns 0 if you have all the specified access permissions to the file. Otherwise, a negative value is returned. This value is the negative of the system error number.


OPENDIR( )

Allows you to do the equivalent of a DOS DIR or UNIX ls command.

It returns the number of files that meet the criteria.

The format of the function is:

N = OpenDir(format type, filename)

  • N = opendir(); no format type and no filename
    Creates a list of all filePro files
  • N = opendir("PRC_MASK")
    Creates a list of all prc files for the current file
  • N = opendir("SCR_MASK", "fpcust")
    Creates a list of all screens for the fpcust file
  • N = opendir("*.htm")
    Creates a list of all *.htm screens in the current files directory

    The listed wildcards are the DOS versions. They are
    different for Unix. (ie: "prc.*" vs. "*.prc") This
    is why you should use the predefined masks rather than
    hardcoding the wildcards.

The preset cross-platform terms that the function understands are

PRC_MASK
TOK_MASK
SCR_MASK
IDX_MASK
BRW_MASK
OUT_MASK
SEL_MASK


NEXTDIR( )

Each execution of this command returns a detailed file
specification that the preceeding OpenDir() located.

Subsequent NextDir() allows you to build a list of files found with sizes, dates etc.

The format of the function is:

XX=NextDir()

The format of the returned fixed length string is:

filename    extension     size      date    time    fullname

14            10         14          8       6       25

abcdefghijklmn abcdefghij 01234567891234 01-01-99 12:12a  -------

with a single space between each of the portions of the string.
The filenames, extensions, and fullname left justified.
The size right justified w/commas. The date and time right justified.


CLOSEDIR( )

Closes the OpenDir(), NextDir() session.


READSCREEN( )

Returns the text portion of a screen as a single 1600-character field

XX = READSCREEN( filename, screenname [ , section ] )

Where "filename" is the name of the filePro file, and "screenname" is the screen name.
The optional third parameter is the section of the screen to be read.
The currently supported sections are:
0: Graphics characters are returned as text equivalents. (ie: '|', '-', '+')
1: Graphics characters are returned as-is
2: Graphics characters are returned as spaces.
If not specified, the default section is zero.

If the screen cannot be read (ie: doesn't exist) then READSCREEN() returns a null value.


RECLEN( )

Returns the record length of the specified file

The format of this function is:

XX=RecLen( )
Returns the record length of the current file.

XX=RecLen(lookupname)
Returns the record length of the specified lookup.


FREESPACE( )

Returns the amount of disk freespace of the
drive letter [DOS] or filesystem [Unix] you specify.

XX = FreeSpace(drive)

XX = FreeSpace(); with no drive specified
Returns the available free space (in bytes) on the drive the main file's map is located on.
For UNIX versions it will use the partition the main map file's map is on

  • XX = FreeSpace("C")
    Returns the amount of free space left on the C drive
    You can substitute the partition for the drive letter in UNIX versions.


IXCOMMENT( )

Returns the comment for the index specified.

xx=IXCOMMENT(filename,indexletter)

xx = IXCOMMENT("arcust","A")

Returns the comment from the specified index.
If the index doesn't exist, or has no comment, a null value is returned.


IXSORT( )

Returns the sort information for a specified index.

XX=IXSORT(filename,indexletter[,sortlevel])

xx = IXSORT("arcust","A")

The return value is in the format:

field,legth,ascend/decend,[sub-total])

If no sortlevel is specified, all sortlevels
are returned in the format for all possible choices
2 , 12,a,n:1 , 15,a,n: : :


SORTINFO( )

Returns the sort information for a specified output. It also includes the subtotal break information.

XX=SORTINFO( )
Returns the sort information for the currently running output format.

XX=SORTINFO(filename,formatname[,sortlevel])

The return value is in the format for all possible choices:

field,legth,ascend/decend,[sub-total])

5 , 8,a,y:2 , 15,a,y


STRTOK( )

Returns the location of the first occurrence of any of the specified characters
passed to it in a string that is also passed to it.

N=STRTOK(string,characters[,startpos])

l=strtok(aa," 1234567890,./[]{}()!@#$%^&*+=-_<>?",l+"1")

Note that this is different from the INSTR() function in that it will return the first occurrance of any of the specified characters, not a string of characters.


FLUSHKEY

Empties the keyboard buffer before returning control to the executing program.
This includes any keystrokes sent via the PUSHKEY command
that have not already been executed.


HTML


Allows you to create HTML files using standard HTML funcitons.

html :tr ; html :td ; html :tx "Address" ; html :td- ; html :tr-
and so on.....


JSFILES

A processing command to easily create sequential ASCII files.

Basically, it is the same as the previous HTML :CR and :TX command
except it doesn't put in the HTML or BODY tags in the document
when the created function is specified.

JSFILE [id] :CR filename
...

This was originally designed to create JavaScript files.
(Hence the command name.)
The sequential ASCII file is a side benefit.


DECLARE

Global and Local dummy variables LONG names

Up to 32 characters long.
Only applies to Define Processing.
Not supported on Screens or Output Formats.

DECLARE LOCAL - the variable is visible only to the current prc table.
DECLARE GLOBAL - makes the variable visible to other prc tables.
DECLARE EXTERN - refers to a variabled DECLAREd GLOBAL in another table.
DECLARE - same as DECLARE LOCAL.

Note that, if one table has DECLARE GLOBAL, and another table has the same name using DECLARE LOCAL, the other table uses its own copy of that name.

Note that the meaning of GLOBAL here is different than the meaning of the global ",g" flag when specifying the field type and length.

The DECLAREd variables can be used anywhere in processing that the classic 2-letter dummy fields could be used.

EXAMPLES:

DECLARE GLOBAL LastName(20,*,g), FirstName(20,*,g)

DECLARE LOCAL YTDSales(10,.2)



New

Trig functions

result = DTOR(angle) Converts degrees to radians.
result = RTOD(angle) Converts radians to degrees.

result = SIN/COS/TAN(angle)
angle = ASIN/ACOS/ATAN(n)

The usual. Angles given in radians.

result = SIN/COS/TAN(angle)
angle = ASIN/ACOS/ATAN(n)

The usual. Angles given in degrees.

result = ATAN(y,x)
result = DATAN(y,x)

Returns the arctangent of (y/x), in
radians (ATAN) or degrees (DATAN).

Note that there are two versions of ATAN/DATAN. With one parameter
or two. One parameter means the parameter is the tangent value to
return the arctangent for. Two parameters specifies the y/x slope
to return the arctangent for.


Log functions

result = LOG(n) Natural (base e) logarithm
result = LOG10(n) Base 10 logarithm
result = EXP(n) Exponent function (e^n)
result = EXP10(n) Base 10 exponent (10^n)


New & Enhanced @LABEL's

back to index

 

@DONE

The output processing sub-routine labeled by the @DONE will be executed when the output processing is done even if no records are selected. Executes after @WGT label and after all output has been sent to the printer/spooler.


@WGT

If the environment variable PFWGT0=ON, filePro will execute
the
@WGT processing even of no records are selected.

Enhanced .prc COMMANDS

back to index

CALL path

Enhanced to allow you to CALL a processing table
that exists in another filePro file.

Call "path/prcname"


CHAIN path

Enhanced to allow you to CHAIN to a processing table
that exists in another filePro file.


LOOKUP k=, r=, b=

Enhanced to allow you to use expressions including the new extended long name variables.

Examples:

lookup dat = (FileName & "@" & QualFile) i=A k=(KeyWord) -nx

lookup zip = zipcodes i=A k=(State & ZipCode) -nx

lookup sys = (SysFile) r=(RecNum) -n

lookup foo = (FileName) i=A k=(LookupKey) -nx b=(BrowseHeader & BrowseFormat)

In the above examples:

FileName, QualFile, KeyWord, State, ZipCode, SysFile, RecNum,
LookupKey, BrowseHeader, & BrowseFormat
are GLOBAL define variables whose value may be set in processing.


Export ASCII/WORD -A

Enhanced to allow you to Append to the end of a file.

If the file does not exist, filePro will create it.


COPY lookup1 TO lookup2

Allows you to copy a record from one lookup to another.

New or Enhanced
System Maintained Variables

back to index

@C4 4-digit year equivalent of @CD
@B4 4-digit year equivalent of @BD
@U4 4-digit year equivalent of @UD
@T4 4-digit year equivalent of @TD
@CP Provides the position of the cursor in the field you just left
@FI Provides the current file name
@QU Provides the current qualifier name
@PR Provides Current Printer Name
@PT Provides Current Printer Type
@PC Provides Current Printer Comment
@PD Provides Current Printer Destination
@RP Provides Number of Records Processed
@PW Reads the variable contents of the -rw command line flag of dreport/rreport. Used by the Jumpstart shell.

New Command Line Flags

back to index

REPORT & CLERK

-as n Causes dreport and rreport to start processing beginning at record number n instead of the record # 1.
-fp filename You can use this to have dreport or rreport to run the specified output processing table which does not have to have an .out format associated with it. Particularly useful in processing only output processing situations.
-rf nnn,lll[,ad]

-rf @filename

Allows you to specify a sort order to be used when you run dreport or rreport from the command line. You can either specify the sort order directly on the command line or point to a file that contains the sort order.
-rw data Works like the -r flag and allows you to pass a variable to a processing table you have specified by a command line. The output processing table then uses a @PW system maintained variable to read the variable contents.
-sr n Allows you to run dreport or rreport on a single specific record number n.

DXMAINT

-rf nnn,lll[,ad]

-rf @filename

Has been enhanced to allow you to specify a filename of a file that contains the sort order you want to use
-c comment New flag to add comment to index

RCABE

-ca & -cia Provides a way to tokenize all .prc tables with one request.

New or Enhanced
Environment Variables

back to index

PFCONFIG=<path>

Allows you to set an individual config location that over-rides the default fp\lib directory. Enter the full path of the config location to be used and you must include the 'config' filename. Allows you to set an individual config location that over-rides the default fp/lib/config file.

PFAUTOKSIZE=NNN Sets a default TOK size for automatic processing. Equivalent -ty
PFFORMTOKSIZE=NNN Sets a default TOK size for processing used with FORM command or @KEYF. Equivalent -tf
PFBIXBLANK=OFF Controls how filePro treats a null lookup key. Causes a null key to find the lowest key in the (4.5) index, just as earlier 4.5 programs worked. The default is ON, which treats a null key as an all-blank key, the way that 4.1 worked.
PFLX=ON | OFF Globally disables the ability to create a browse lookup using the F6 key wherever it was possible to do so. Equivalent to the "-lx" command line flag.
PFQUIT=OFF Disables the ability of UNIX users to press the CTRL\ to exit a program
PFSYSYR4=ON Sets @TD,@UD, @BD and @CD to return 4-digit years instead of 2-digit years. NOTE: screens and reports may need to be reformatted to fit the extra digits.
PFWGT0=ON This will force dreport and rreport to do @WGT processing even if no records are selected
PFBACKGROUND=OFF Turns off in *report and dxmaint the ability to enter the background mode with the flags "-bg" and "!g"
PFMISSINGARG=OLD Flag to revert back to old method of ignoring missing aruments on the command line such as -pn without a 'printer name'
PFSKIPLOCKED=nnn Allows locked records to be skipped after nnn seconds. Records skipped are not included in @rp
PFPRINTER Enhanced to allow setting to LOCAL and SCREEN. LOCAL is like the -PT flag and will always send to local LPT1 even if network printer or captured port. SCREEN is like the -PV flag.
PFCLOCK=OFF In the DOS/LAN and Native 32 bit versions of filePro, this will turn off the clock in the upper left of RunMenu for improved performance.
PFNEWNTCONSOLE=ON In the Native 32-bit version of filePro, this enhances multi-windowing capabilities of the operating system. Currently this is used for fPGold development.
PFSYSEUID=OFF If OFF then SYSTEM command will be executed without the filePro setuid. Some systems may not allow a program to reclaim a setuid after giving it up. On these systems, setting this variable will cause bad things to happen to filePro. SCO OSV5 does not have a problem with this. Linux kernels prior to 1.1.37 have a problem. The default is ON, which means that SYSTEM commands run with setuid filepro, just as prior releases of filePro.

New
Operating System
Platforms

back to index

UNIXWARE 7

This powerful O/S from SCO has now been tested and approved. The standard UNIX version of filePro Plus loads and operates.

LINUX

This new and exciting O/S has now been tested and approved. Modified installation and supporting file structure to support.

Microsoft Windows 95/98/NT

New! This version uses the native 32-bit code of this popular O/S from Microsoft and does not require any DOS extenders such as DOS/4GW.



fP Technologies, Inc.
9225 Promontory Road Indianapolis, IN 46236
800-847-4740

An Employee Owned Company


11/01/98
filePro, filePro Plus, and filePro Gold are registered trademarks of
fP Technologies, Inc.