Please enable JavaScript to view this site.

CopiaFacts™ Reference Manual

Obtain a unique MCF file number

CFUTIL NEXTMCF resultbatch [incr]

This utility is intended for use in a command or batch file, and obtains an MCF file number using the NEXTMCF file in the MAIL 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 NEXTMCF MYCMD.CMD <- calls NEXTMCF, writes MYCMD.CMD

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

DOPROC %NEXTMCF%.MCF     <- uses the NEXTMCF value as needed

The value in the NEXTMCF 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.