z/OS DFSMSdfp Advanced Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example of CVAFFILT Macro Sequences

z/OS DFSMSdfp Advanced Services
SC23-6861-01

The example below demonstrates the order that you might issue CVAFFILT macro calls to complete the following tasks:

  • Request the DSCBs for a list of data sets.
  • Resume CVAFFILT processing interrupted because of insufficient user buffers.
  • Release the kept filter save area.
The example assumes the following conditions:
  • You are an authorized caller (that is, you are specifying a UCB address and IOAREA=KEEP).
  • You have initialized a CVAF buffer list with the following characteristics:
    • Four buffers
    • The buffer list address in your program has the label BUFADDR
    • The same buffer list is used for ACCESS=READ and ACCESS=RESUME processing.
  • You have initialized a filter criteria list as follows:
    • FCLCOUNT = 6 (You are requesting DSCB chains for six data set names.)
    • FCL1LIST = '1'B (The data set names are fully qualified.)
    • FCL1ORDR = '1'B (You want the DSCB chains returned in the order implied by data set name elements in the FCL.)
    • The six data set name elements are initialized so that they form a list requesting SYS1.A, SYS2.B, SYS3.C, SYS4.D, SYS5.E, and SYS6.F.
  • The first five data sets have DSCB chain lengths or 1, 5, 2, 3, and 1, respectively, on the volume.
  • The sixth data set (SYS6.F) is not defined on the volume.
To obtain an initialized CVPL, you could issue the following CVAFFILT macro (list form—does not call CVAF). This example requests the branch entry to CVAF and specifies that the caller is in supervisor state.
CVPLIST  CVAFFILT BRANCH=(YES,SUP),MF=L
To obtain the first set of DSCB chains, you could issue the following CVAFFILT macro (execute form—calls CVAF). This example specifies that the filter save area is to be kept to allow for ACCESS=RESUME calls. The IOAREA is to be kept for improved efficiency.
CVAFFILT ACCESS=READ,BUFLIST=bufaddr,FCL=fcladdr,
         UCB=ucbaddr,FLTAREA=KEEP,IOAREA=KEEP,
         MF=(E,CVPLIST)
This CVAFFILT call returns the following DSCBs:
Buffer    Contents of Buffer

   1      Format-1 DSCB, SYS1.A
   2      Format-1 DSCB, SYS3.C
   3      Format-3 DSCB, SYS3.C
   4      Undefined (unused)
CVAF filter produces return code = 4, CVSTAT = X'40' (RESUME recommended), and FCLDSCBR = 3. (CVAF returns a total of three DSCBs for the two data sets.) CVAF would not return DSCBs for data set SYS2.B because its chain contains more DSCBs than the total number of buffers provided. To retrieve the DSCBs for SYS2.B, you need to specify at least five buffers and execute another ACCESS=READ. (Even though CVAF allows you to specify a different buffer list for each READ or RESUME, or to modify the existing list between READ and RESUME calls, modifying the FCL would cause unpredictable results.) Buffer entry 4 does not have any DSCBs returned, because SYS4.D's DSCB chain size is larger than the number of remaining buffers. The FCL status information would be as follows:
DSN      FCLDSNST   FCL3UPDT   Comments
SYS1.A       1         1       DSCBs returned from this call
SYS2.B       5         1       DSCB chain exceeds total buffers
SYS3.C       1         1       DSCBs returned from this call
SYS4.D       0         0       DSCBs can be returned by RESUME
SYS5.E       0         0       DSCBs can be returned by RESUME
SYS6.F       0         0       DSCBs can be returned by RESUME
Because this CVAFFILT invocation recommends RESUME, and you specified FLTAREA=KEEP, you could use the following execute form of CVAFFILT to obtain more DSCB chains:
CVAFFILT ACCESS=RESUME,MF=(E,CVPLIST)
This CVAFFILT call returns DSCBs as follows:
Buffer   Contents of Buffer
   1     Format-1 DSCB, SYS4.D
   2     Format-2 DSCB, SYS4.D
   3     Format-3 DSCB, SYS4.D
   4     Format-1 DSCB, SYS5.E
CVAF filter produces return code = 0, CVSTAT = 0 (request completed), and updates the FCL status as follows:
DSN      FCLDSNST   FCL3UPDT   Comments
SYS1.A       1         0       DSCBs returned from prior call
SYS2.B       5         0       DSCB chain exceeds total buffers
SYS3.C       1         0       DSCBs returned from prior call
SYS4.D       1         1       DSCBs returned from this call
SYS5.E       1         1       DSCBs returned from this call
SYS6.F       2         1       Data set name not found

FCLDSCBR would contain 4. (This CVAFFILT call returns a total of four DSCBs.) CVAF filter does not return any DSCBs for SYS6.F, because its format-1 DSCB cannot be found on the volume (FCLDSNST = '2').

Because this status indicates that CVAF filter has returned all requested DSCBs, and you requested FLTAREA=KEEP and IOAREA=KEEP on the previous call, request the RLSE function as follows:
CVAFFILT ACCESS=RLSE,FLTAREA=NOKEEP,IOAREA=NOKEEP,
         MF=(E,CVPLIST)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014