This document covers the following topics:
Display a list of printer profiles.
This subprogram lists all printer profiles that are stored in the defined cabinet (as specified with the parameter Cabinet) and in cabinet SYSCNT.
This subprogram should be invoked iteratively until the return code 77 indicates the end of the list.
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Return-code | N2 | X | ||
Cabinet | A8 | R | The cabinet in which the printer profiles are stored. | |
Start-value | A32 | O | The name of a printer profile. If Start-value is not specified, a list of all printer profiles is returned. When you specify a name (e.g. "sag"), the list starts with the specified name and continues until the end of the list is reached. When you specify a name with an asterisk (e.g. "sag*"), only the names that start with the specified characters are returned. | |
Number | N2 | O | The maximum number of printer profiles that are returned with each call. When you do not specify a value, or when you specify a value greater than 20, the default value 20 is used. | |
Profile-table | A35/1:20 | X | The name of the printer profile. Whenever a printer profile defined in cabinet SYSCNT is listed, "(S)" is shown after the name. However, if you use the cabinet SYSCNT, "(S)" is not shown. | |
Work-parameter | A64 | For internal use. See The Work Parameter. |
00 | Success |
77 | End of list |
90 | No profile(s) found |
None
0010 * 0020 * Return 20 printer profiles of cabinet 'SYSCNT' beginning with 'z' 0030 * 0040 DEFINE DATA LOCAL 0050 1 RETURN-CODE (N2) 0060 1 CABINET (A8) 0070 1 START-VALUE (A32) 0080 1 NUMBER (N2) 0090 1 PROFILE-TABLE (A35/1:20) 0100 1 WORK-PARAMETER (A64) 0110 * 0120 END-DEFINE 0130 * 0140 RESET RETURN-CODE 0150 MOVE 'SYSCNT' TO CABINET 0160 MOVE 'Z' TO START-VALUE 0170 MOVE 20 TO NUMBER 0180 * 0190 REPEAT UNTIL RETURN-CODE = 77 0200 CALLNAT 'Z-DIS23' 0210 RETURN-CODE 0220 CABINET 0230 START-VALUE 0240 NUMBER 0250 PROFILE-TABLE (*) 0260 WORK-PARAMETER 0270 * 0280 IF NOT RETURN-CODE EQ 0 OR EQ 77 0290 WRITE 'Return code:' RETURN-CODE 0300 STOP 0310 END-IF 0320 * 0330 PRINT PROFILE-TABLE(*) 0340 END-REPEAT 0350 END