z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Description

z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN
SA23-1372-00

The COFCREAT macro allows your application to add an object, on behalf of an end user, to a class of VLF objects. Before issuing COFCREAT, or any VLF macro, you need to understand the information on using the virtual lookaside facility (VLF) that appears in z/OS MVS Programming: Authorized Assembler Services Guide.

Normal processing of an end user request for an object includes the following steps:
  1. Issue the COFRETRI macro to attempt to retrieve the object.
  2. Examine the return code from COFRETRI. VLF can only create an object after you have tried to retrieve it and when COFRETRI completed with one of the following conditions:
    • Object not found (return code 8)
    • Best available object found (return code 2)
    • Best available object found, but target area is not large enough (return code 6)
  3. If the return code is 8, create the object. (Processing return codes 2 or 6 might also require you to create the object.) Between issuing the COFRETRI and the COFCREAT for the object, do not issue any COFRETRI macro with the same UTOKEN.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Supervisor state, with PSW key 0-7
Dispatchable unit mode: Task or SRB
Cross memory mode: Any PASN, any HASN, any SASN
AMODE: 24- or 31-bit
ASC mode: Primary or access register (AR)
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks held
Control parameters: Must be in the primary address space

Programming requirements

  • Your program must be running under a task with the same home ASID as the issuer of the COFIDENT macro that identified the user.
  • For non-PDS classes, you can issue COFCREAT with the REPLACE option. If you specify REPLACE, VLF does not require that COFRETRI precede COFCREAT. Because VLF cannot then guarantee that the source object has not changed, your application must ensure that the source object remains unchanged between the time when you reference the source object to create the object parts list and the time when you receive control back from COFCREAT.

    If you do not specify REPLACE, you must issue the COFRETRI macro before you issue COFCREAT.

  • To ensure the integrity of the data, the working storage that your application uses to create the VLF object must not be key 8 storage, and you must perform the following steps:
    1. Change to (or remain in) supervisor state.
    2. Issue a BLDL macro for the PDS member using the same DDNAME used to identify the user to VLF. If a user changes the data set allocation associated with a DDNAME used to identify a VLF user, VLF invalidates that user's token (UTOKEN).
    3. Save the “K” value from a successful BLDL to pass to VLF as the CINDEX value on COFCREAT.
    4. Read the object from DASD, ensuring the following:
      • The DCB used for I/O must not be in key 8 storage.
      • The I/O buffers must not be in key 8 storage.
    5. Issue the COFCREAT macro to create the VLF object.
    6. If necessary, copy the object to key 8 storage to enable the user program to access it.

    Failure to follow these steps compromises the integrity of data objects in VLF storage. Depending on the nature of the class of VLF objects, incorrect data could cause severe system integrity problems.

  • If you do not specify REPLACE and issue COFCREAT for an object that already exists in VLF storage, VLF returns a successful completion code but does not replace the object data. In this case, VLF assumes that the data you supply is identical to the data that already exists in its storage.

    If you specify REPLACE and issue COFCREAT for an object that already exists in VLF storage, VLF does replace the existing object with the parts specified in the object parts list.

Restrictions

None.

Input register information

Before issuing the COFCREAT macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.

Output register information

When control returns to the caller, the GPRs contain:
Register
Contents
0
Reason code
1
Used as a work register by the system
2-14
Unchanged
15
Return code
When control returns to the caller, the ARs contain:
Register
Contents
0-1
Used as work registers by the system
2-14
Unchanged
15
Used as a work register by the system

Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.

Performance implications

None.

Syntax

The standard form of the COFCREAT macro is written as follows:

Syntax Description
   
     name name: Symbol. Begin name in column 1.
   
One or more blanks must precede COFCREAT
   
COFCREAT  
   
One or more blanks must follow COFCREAT
   
MAJOR=major major: Rx-type address or register (2) - (12).
CINDEX=cindex cindex: Rx-type address or register (2) - (12).
   
,DDNAME=ddname ddname: Rx-type address or register (2) - (12).
  Specify DDNAME only with CINDEX.
   
    ,REPLACE=NO Default: REPLACE=NO
    ,REPLACE=YES Specify REPLACE only with MAJOR.
   
,MINOR=minor minor: Rx-type address or register (2) - (12).
   
,UTOKEN=utoken utoken: Rx-type address or register (2) - (12).
   
,OBJPRTL=objprtl objprtl: Rx-type address or register (2) - (12).
   
,OBJPLSZ=objplsz objplsz: Rx-type address or register (2) - (12).
   
    ,RETCODE=retcod retcod: Rx-type address or register (2) - (12).
   
    ,RSNCODE=rsncod rsncod: Rx-type address or register (2) - (12).
   

Parameters

The parameters are explained as follows:

MAJOR=major
Specifies the major name of the object to be created. The length of the major name must be the same as the length specified by MAJLEN on the COFDEFIN macro that defined the class of objects. Specify MAJOR only for a non-PDS class. (For a PDS class, you must use CINDEX and DDNAME.)
CINDEX=cindex
Identifies a one-byte field that contains the concatenation index of the major name associated with the object being created. CINDEX is required for a PDS class. The index is the zero-origin relative number of the major name for the object in the major name list of the user creating the object. This list is the one supplied to VLF on the COFIDENT macro that identified the user to VLF.

For concatenated partitioned data sets, the CINDEX value is the same as the “K” (concatenation index) value returned when your application issued a BLDL macro to locate a member.

When you specify CINDEX, you must also specify DDNAME.

,DDNAME=ddname
Specifies the 8-character DDNAME of the concatenated data set list. DDNAME is required for a PDS class. This DDNAME must be the same as the one supplied to VLF on the COFIDENT macro that identifies the user to VLF. It represents the major name search order for this identified user.

When you specify DDNAME, you must also specify CINDEX.

,REPLACE=YES
,REPLACE=NO
Indicates that an object existing in VLF should (REPLACE=YES) or should not (REPLACE=NO) be replaced by the parts in the input object parts list. If the object does not exist in VLF, then VLF creates a new object.
,MINOR=minor
Specifies the minor name of the object. The length of the significant portion of the name depends on the MINLEN value defined for the class on the COFDEFIN macro, either explicitly or by default. (For a PDS class, the length is always 8.)
,UTOKEN=utoken
Specifies the required 16-character user token returned from the COFIDENT macro for the user on whose behalf your application is issuing COFCREAT.
,OBJPRTL=objprtl
Specifies the required object parts list. The object parts list describes the source areas from which VLF can obtain consecutive parts of the object. The object parts list consists of a fullword containing the number of object parts, followed by three words for each part:
  1. A fullword that contains the ALET that currently addresses the part. An ALET of 1, referencing the SASN of the caller, or ALETs referencing entries on the PASN access list of the caller, are not allowed.
  2. A fullword that contains the 31-bit address of the data for the part.
  3. A fullword that contains the length of the part.

The number of parts list entries must be from 1 to 16. If your program is not running in access register (AR) ASC mode, the ALET(s) must be zero.

,OBJPLSZ=objplsz
Specifies the required fullword field that contains the size (in bytes) of the object parts list.
,RETCODE=retcod
Specifies the location where the system is to store the return code. The return code is also in general purpose register (GPR) 15. If you specify a storage location, it must be on a fullword boundary,
,RSNCODE=rsncod
Specifies the location where the system is to store the reason code. If you specify a storage location, it must be on a fullword boundary. The reason code is also in GPR 0.

ABEND codes

None.

Return and reason codes

When the COFCREAT macro returns control to your program, GPR 15 (and retcod, if you coded RETCODE) contains one of the following hexadecimal return codes. GPR 0 (and rsncod, if you coded RSNCODE) contains one of the following reason codes.

Table 1. Return and Reason Codes for the COFCREAT Macro
Hexadecimal Return Code Reason Code Meaning and Action
00 00 Meaning: The VLF object has been created.

Action: None.

02 02 Meaning: Program error. No VLF object was created because the create request specified an ineligible major name.

Action: Check the major name specified on the macro invocation. Ensure that there is a matching EMAJ specified major name for this class in the SYS1.PARMLIB member COFVLFnn.

02 04 Meaning: Environmental error. No VLF object was created. A retrieve request was not done for this minor name, a time-out occurred for the pending create, or the pending create was invalidated by a notification that the object might have changed.

Action: Issue the COFRETRI macro prior to issuing the COFCREAT macro. It may be necessary to retry the COFRETRI/COFCREAT invocations several times.

02 06 Meaning: Environmental error. No VLF object was created because the create request specified a major name that has been invalidated by a notification that the object might have changed. The user token will be invalidated. This situation also can occur as a result of a Modify VLF command that changes the major name.

Action: Issue a COFIDENT macro to reidentify the user to VLF.

04 00 Meaning: Program error. The requested major name is not in the user's search order.

Action: Ensure that the requested major name was specified in the search order specified through the MAJNLST when the user was identified with the COFIDENT macro.

0A 00 Meaning: Program error. The parameter list cannot be accessed.

Action: Make necessary corrections to ensure that the parameter list ALET is on the dispatchable unit access list (DU-AL) and rerun the job.

0C 00 Meaning: Program error. The class to which the user is identified is not currently defined.

Action: Redefine the class with COFDEFIN and retry the COFCREAT.

10 00 Meaning: Program error. A user token was specified but the user is not currently identified to VLF.

Action: Identify the user with COFIDENT and retry the COFCREAT.

12 00 Meaning: Program error. The DDNAME is not the same as the DDNAME specified on the COFIDENT macro that returned this user token.

Action: Use the same DDNAME that was specified with the COFIDENT, and retry the COFCREAT.

14 00 Meaning: Environmental error. VLF incurred a program check when it tried to access the object parts list.

Action: Retry the operation. If the problem persists, specify a smaller OBJPLSZ parameter for the OBJPRTL.

18 00 Meaning: Program error. The class to which the user is identified is a PDS class, but CINDEX was not specified.

Action: Reissue the COFCREAT, and include the required CINDEX keyword.

18 02 Meaning: Program error. OBJPLSZ was larger than the maximum allowable size, or the number of parts in the object parts list was greater than 16.

Action: Ensure that the specified OBJPLSZ was not greater than 16, and that the number of object parts specified in OBJPE4RTL is not greater than 16, and then reissue the COFCREAT macro.

18 04 Meaning: Program error. REPLACE was specified, but the class to which the user is identified is a PDS class.

Action: Reissue the COFCREAT without specifying the REPLACE option.

18 0A Meaning: Program error. The major name cannot be accessed by the specified ALET. The ALET is a SASN ALET, or the ALET is not on the dispatchable unit access list (DU-AL).

Action: Make necessary corrections to ensure that the major name ALET parameter is on the dispatchable unit access list (DU-AL) and rerun the job.

18 0B Meaning: Program error. The minor name cannot be accessed by the specified ALET. The ALET is a SASN ALET, or the ALET is not on the dispatchable unit access list (DU-AL).

Action: Make necessary corrections to ensure that the minor name ALET parameter is on the dispatchable unit access list (DU-AL) and rerun the job.

18 0C Meaning: Program error. The object parts list cannot be accessed using the specified ALET. The ALET is a SASN ALET, or the ALET is not on the dispatchable unit access list (DU-AL).

Action: Make necessary corrections to ensure that the objects parts list ALET parameter is on the dispatchable unit access list (DU-AL) and rerun the job.

18 0D Meaning: Program error. A part in the object parts list cannot be accessed using the specified ALET. The ALET is a SASN ALET, or the ALET is not on the dispatchable unit access list (DU-AL).

Action: Make necessary corrections to ensure that the objects parts list ALET parameter is on the dispatchable unit access list (DU-AL) and rerun the job.

1C 00 Meaning: Environmental error. There was not enough storage available to create this object.

Action: Increase the value of MAXVIRT for this class in the SYS1.PARMLIB member COFVLFnn; or ensure that TRIM=ON is specified when the class is defined with COFDEFIN; or free storage through the use of COFPURGE.

28 00 Meaning: Environmental error. VLF is not active.

Action: Issue the Start VLF system command, and rerun the job.

2C nnnn Meaning: System error. There was an unexpected error in VLF.

Action: Record the return and reason codes and supply them to the appropriate IBM® support personnel.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014