Obtain a unique FS file number

NEXTFS resultbatch [incr]

This program 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

NEXTFS RESULT.CMD  <- calls NEXTFS.EXE, writes RESULT.CMD

CALL RESULT.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 CF8JOBADM DLL to obtain the next FS number to use.