Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Creating and using the sample data sets z/OS DFSORT: Getting Started SC23-6880-00 |
||||||||||||
Many of the examples in this document refer to the sample data sets SORT.SAMPIN, SORT.SAMPADD, SORT.BRANCH and SORT.SAMPOUT. Appendix A, "Creating the Sample Data Sets" shows you how to create your own copies of these data sets, using a program called ICESAMP shipped with DFSORT, if you want to try the examples in this document that use them. Note: Some of the examples use data sets other than SORT.SAMPIN, SORT.SAMPOUT,
SORT.SAMPADD, and SORT.BRANCH. You can either create data sets from
scratch to match the ones used in the text, or else perform a similar
exercise on data sets you already have.
Before you begin, turn to Descriptions of the sample data sets. Many of the examples in this document refer to the sample bookstore data sets as the input data sets, so you should become familiar with them. The input data sets contain the data that you want arranged or sorted. You must specify an input data set for every DFSORT job you run. The sample bookstore data set is named SORT.SAMPIN and the additional bookstore data set is named SORT.SAMPADD. Each record in the bookstore data sets has 12 fields (book title, author’s last name, and so on). A record can be represented by one horizontal row on the page. A field can be represented by one vertical column on the page. To sort a data set, you choose one or more fields that you want to use to order the records (arrange in ascending or descending order). These fields are called control fields (or, in COBOL, keys). As you work through the exercises on the following pages, remember that each entire record is sorted, not just the control field. However, for the sake of simplicity, the figures in the text show only the control fields being discussed. The sorted records actually contain all of the fields, but one page is not wide enough to show them. Descriptions of the sample data sets, shows all of the fields in each record. It is also arranged with headings and numbers that show the byte positions of each field. The numeric fields are in binary format (see Table 2) and therefore will not appear on most displays as they do in this document. Methods you can use to arrange and view the data are explained in the chapters on DFSORT functions that follow. Table 1 shows an example of sorted fields. Notice the line of numbers above the sorted fields. These numbers represent the byte positions of those fields. You use byte positions to identify fields to DFSORT. The examples show the byte positions to help you while you are learning to use DFSORT. The byte positions do not actually appear in any of your processed data sets. In Table 1, the first two records, which show nothing in the course department fields, are general purpose books not required for a particular course. For this example, the control field is the Course Department field.
Also notice that records in Table 1 with equally collating control fields (in this case,the same department) appear in their original order. For example, within the Computer Science department (COMP), the title Video Game Design still appears before Computers: An Introduction. You can control whether records with equally collating control fields appear in their original order or whether DFSORT orders them randomly. The system programmer sets defaults at installation time that you can change with some DFSORT options at run time. The examples in this document assume that the default is for records with equally collating control fields to appear in their original order.
|
Copyright IBM Corporation 1990, 2014
|