You are here: Function Reference > Alphabetical Listing > D > DeviceName

DeviceName

Use this function to return the current output device file name, such as the name of the current print stream output file.

Syntax

DeviceName ( )

There are no parameters for this function.

Example

This example shows an example post-transaction banner DAL script:

IF TotalSheets() > 16000
#COUNTER += 1
CurFile = DeviceName()
Drive = FileDrive(CurFile)
Path = FilePath(CurFile)
Ext = FileExt(CurFile)
RecipBatch = RecipBatch()
NewFile = FullFileName(Drive,Path,RecipBatch & #COUNTER,Ext)
SetDeviceName(NewFile)
BreakBatch()
END
Note See FileDrive, FileExt, FileName, FilePath, and FullFileName for information on using DAL functions to manipulate file names.

Keep in mind...

The only DAL function actually involved in splitting the print stream is BreakBatch. The others make it easier to implement this functionality. For example, since you need to name the new print stream, you use the SetDeviceName procedure. To find the name of the current device, you use the DeviceName function. If you need to create unique file names, you can use the UniqueString function.

Note While you can call all of these DAL functions in Documaker Server or Documaker Desktop, the BreakBatch and SetDeviceName functions are not applicable in Documaker Desktop because it does not use the batch printing engine. DeviceName and UniqueString are applicable to both Documaker Desktop and Documaker Server.

See also