Copy AFPDS Resource (QGSCPYRS) API
Required Parameter Group:
1 | Qualified user space name | Input | Char(20) |
2 | Format name | Input | Char(8) |
3 | Qualified resource name | Input | Char(20) |
4 | Resource object type | Input | Char(10) |
5 | Error code | I/O | Char(*) |
Default Public Authority: *USE
Threadsafe: No
The Copy AFPDS Resource (QGSCPYRS) API puts an AFPDS data stream equivalent of the specified AFPDS resource into the specified user space.
Authorities and Locks
- User Space Authority
- *CHANGE
- User Space Library Authority
- *EXECUTE
- Resource Authority
- *USE
- Library Authority
- *USE
- User Space Lock
- *EXCLRD
- Resource Lock
- *SHRRD
Required Parameter Group
- Qualified user space name
- INPUT; CHAR(20)
The user space that the copy of the AFPDS resource is inserted into. The first 10 characters contain the user space name and the second 10 characters contain the library name.
You can use these special values for the library name:
*CURLIB The job's current library *LIBL The library list
- Format name
- INPUT; CHAR(8)
The format and content of the information returned in the user space.
You must specify the following:
CPYR0100 Information about the resources, and the resource AFPDS data stream. For more information about the CPYR0100 format, see Format CPYR0100.
- Qualified resource name
- INPUT; CHAR(20)
The name of the AFPDS resource to be copied. The first 10 characters contain the resource name and the second 10 characters contain the library name. The user must specify the library name.
The following special values can be used for the library name:
*CURLIB The job's current library. *LIBL The library list.
- Resource object type
- INPUT; CHAR(10)
The object type of the AFPDS resource.
The following values are allowed:
*PAGSEG Page segment *PAGDFN Page definition *OVL Overlay *FORMDF Form definition *FNTRSC Font resource
- Error code
- I/O; CHAR(*)
The structure in which to return error information. For the format of the structure, see Error code parameter.
Format of the User Space
The format of the user space consists of:
- A user area
- A generic header
- An input parameter section
- A header section
- A resource information section
- A resource data stream section
For details about the user area and generic header fields, see User spaces. The organization of the user space after the header section is dependent on format CPYR0100.
Format CPYR0100 shows the general structure of the user space for format CPYR0100.
Offset values are calculated from the beginning of the user space.
Input Parameter Section
For more details about the fields, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | CHAR(10) | User space name specified |
10 | A | CHAR(10) | User space library name specified |
20 | 14 | CHAR(8) | Format name specified |
28 | 1C | CHAR(10) | Resource name specified |
38 | 26 | CHAR(10) | Resource library name specified |
48 | 30 | CHAR(10) | Resource object type specified |
Field Descriptions
Format name specified. The format of the user space specified.
Resource library name specified. The name of the library name of the AFPDS resource specified.
Resource name specified. The name of the AFPDS resource specified.
Resource object type specified. The object type of the AFPDS resource specified.
User space library name specified. The library name of the user space specified.
User space name specified. The name of the user space specified.
Header Section
The following table shows the header information returned for the CPYR0100 format.
For more details about the fields, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | CHAR(10) | User space name used |
10 | A | CHAR(10) | User space library name used |
20 | 14 | CHAR(10) | Resource object name used |
30 | 1E | CHAR(10) | Resource object library used |
40 | 28 | CHAR(10) | Resource object type used |
50 | 32 | CHAR(2) | Reserved |
52 | 34 | BINARY(4) | Offset to resource information |
56 | 38 | BINARY(4) | Size of resource information |
60 | 3C | BINARY(4) | Offset to resource data stream |
64 | 40 | BINARY(4) | Size of resource data stream |
Field Descriptions
Offset to resource data stream. Locates the data for the resource data stream returned. The offset value is calculated from the beginning of the user space.
Offset to resource information. Locates the data for the resource information returned. The offset value is calculated from the beginning of the user space. This value is zero when the resource object type requested is not *FNTRSC.
Reserved. Reserved for byte alignment.
Resource object library name used. The name of the library of the AFPDS resource used to retrieve the resource.
Resource object name used. The name of the AFPDS resource used to retrieve the resource.
Resource object type used. The object type of the AFPDS resource used to retrieve the resource.
Size of resource data stream. The size, in bytes, of the resource data stream section.
Size of resource information. The size, in bytes, of the resource information section. This value is zero when the requested resource object type is not *FNTRSC.
User space library name used. The library name of the user space used.
User space name used. The name of the user space used.
Resource Information Section
For more details about the fields, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | CHAR(1) | Pel density |
1 | 1 | CHAR(10) | Font resource subtype |
Field Descriptions
Font resource subtype. The type of font resource returned in the user space.
Valid values are:
FNTCHRSET | Font character set |
CDEPAG | Code page |
CDEFNT | Coded font |
Pel density. The pel density of the font resource returned in the user space.
Valid values are:
0 | Undefined |
1 | 240 pel density |
2 | 300 pel density |
3 | Adobe Type 1 outline font. |
4 | Adobe Type 0 composite outline font. |
5 | 600 pel density |
Resource Data Stream Section
The resource data stream section contains the AFPDS data stream of the resource that is to be copied.
Error Messages
Message ID | Error Message Text |
---|---|
CPF2150 E | Object information function failed. |
CPF2151 E | Operation failed for &2 in &1 type *&3. |
CPF24B4 E | Severe error while addressing parameter list. |
CPF3CF1 E | Error code parameter not valid. |
CPF3C21 E | Format name &1 is not valid. |
CPF33CF E | Qualified resource name not valid. |
CPF34CE E | Value &1 not valid for resource object type. |
CPF34C5 E | The AFPDS resource is too large for the user space &1. |
CPF811A E | User space &4 in &9 damaged. |
CPF9801 E | Object &2 in library &3 not found. |
CPF9802 E | Not authorized to object &2 in &3. |
CPF9803 E | Cannot allocate object &2 in library &3. |
CPF9807 E | One or more libraries in library list deleted. |
CPF9808 E | Cannot allocate one or more libraries on library list. |
CPF9810 E | Library &1 not found. |
CPF9820 E | Not authorized to use library &1. |
CPF9830 E | Cannot assign library &1. |
CPF9838 E | User profile storage limit exceeded. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
API introduced: V3R7
[ Back to top | Print APIs | APIs by category ]