Please enable JavaScript to view this site.

CopiaFacts™ Reference Manual

Obtain a unique FS file number

CFUTIL NEXTFS resultbatch [incr]

This utility is intended for use in a command or batch file, and obtains an FS file number using the NEXTFS file in the TOSEND folder. The value is placed on a Windows 'SET' command in the named batch file, which can then be called from within your own batch file:

REM MYCMD.CMD           <- name of your own command file

CFUTIL NEXTFS MYCMD.CMD <- calls NEXTFS, writes MYCMD.CMD

CALL MYCMD.CMD          <- contains for example: SET NEXTFS=00012345

DOPROC %NEXTFS%.FS      <- uses the NEXTFS value as needed

The value in the NEXTFS file is incremented by the value supplied as incr, which defaults to one if no parameter is given.

If you are writing an application which can call a DLL, you can also use the CF9JOBADM DLL to obtain the next FS number to use.