The call PADM PI returns the following information about every printer in a printer control LTERM (list not exhaustive):
printer ID of the printer
name of the related LTERM partner
status of the printer, i.e. openUTM informs you whether or not the printer is currently disabled and if it is connected to the application or not
number of print jobs in the printer queue
number of time-driven print jobs in the printer queue and their earliest output time
You can output this information, e.g. to the printer control LTERM.
You can output information about a specific printer. To do this, you must enter its printer ID in the kcrn field of the parameter area. If you enter blanks in kcrn, openUTM informs you about the first printer.
You can also output information about all printers belonging to a printer control LTERM using the following procedure:
At the first PADM PI, enter blanks in the kcrn field of the parameter area in order to read the information about the first printer.
openUTM returns various items of information including the printer ID of the first printer. If at least one more printer is associated with this printer control LTERM, UTM writes the printer ID of the next printer in the kcrmf field of the KB return area.
Call PADM PI again and write the printer ID which openUTM previously returned to kcrmf in kcrn of the KB parameter area.
openUTM supplies information to the second printer and returns the printer ID of the next printer, provided that another printer exists etc.
When reading the information for the last printer, openUTM returns blanks to the kcrmf field.
A data structure exists for the information returned by PADM PI which you can place over the message area. The C data structure is called kc_padm and is part of the header file kcpad.h: the COBOL data structure is called KCPADC.
See sections "KDCPADM INFORM", "LIST=PRINTERS" in "INFORM - Display information about printers for a printer control LTERM". |