9.129 LIST_PRINTERS

Note: Built-In Function Rules     Usage Options

This BIF will return a list of printers currently configured on the machine.

Refer to Technical Notes if running on Windows Vista.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Opt

Printer Location

A – All printers

L – Local Only - use always with IBM i.

Default is A.

1

1

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

L

Req

Working List containing the printer's full name (see technical notes).

The list must be in the following format:

From – To  Description

1 – 255  Printer Name

256 – 256  Printer Location (L – local, N – network).

255

255

 

 

2

A

Req

Return Code

OK = list returned successfully

OV = list returned completely filled but more printers than could fit in the list still exist.

NR = empty list returned

ER = an error occurred

2

2

 

 

 

Technical Notes

Example

FUNCTION OPTIONS(*DIRECT)

DEF_LIST NAME(#PRNLIST) FIELDS(#PRN_NAME #PRN_LOC) TYPE(*WORKING)

USE BUILTIN(LIST_PRINTERS) WITH_ARGS(A) TO_GET(#PRNLIST #STD_CMPAR)