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


Example of using the CVAFSEQ macro to process a volume in physical sequential order

z/OS DFSMSdfp Advanced Services
SC23-6861-01

This example will use the CVAFSEQ macro to read through the DSCBs in physical sequential order. Although CVAFSEQ can be used to process both an indexed and non indexed volume in physical sequential order this example uses a non indexed volume. The CVAFSEQ call will return DSCBs where BFLEARG is set to a starting CCHHR. This value is initially set to zero and the CVAFSEQ call uses ACCESS=GT. A buffer list with five buffer list entries is contained within the program and is used to read up to five DSCBs at a time.

Output from this program will be to OUTDD. It will be a list of all the datasets on the volume and their corresponding CCHHRs. The output from this program is based on the volume and dataset information detailed within the source code example. If the output received is different it can be verified using the IEHLIST utility.

This program must be APF authorized because it uses the UCB= and BRANCH=(YES,PGM) parameters. It is bad programming practice to give a program APF authorization unnecessarily. In this case these two options just give a slight performance improvement. To remove APF authorization from this example, perform these steps:
  • Remove the SETCODE and ENTRY statements for the binder.
  • Replace the UCB parameter with DEB=(reg). Precede the CVAFSEQ macro with an instruction to load the specified register from DEBADD.
  • Remove the BRANCH parameter on CVAFSEQ.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014