Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. SD23-9024-1 for 5748-XX8 When you create a tape in CMS using AMSERV, CMS writes a tape mark preceding each output file that it writes. When this same tape is read using AMSERV under CMS, HDR1 and VOL1 labels are checked using the LABELDEF command you provide. If you read this tape in a real DOS/VS system, you should use a TLBL card instead of the LABELtEF command. Similarly, when you create a tape under a DOS/VS system using access method services, if the tape is created with standard labels, CMS AMSERV has no difficulty reading it. The only time you should worry about positioning a tape created by AMSERV is when you want to read the tape using a method other than AMSERV, for example, the MOVEFILE command. Then, you must forward space the tape past the label, using the CMS TAPE command before you can read it. Defining OS Input and Output Files !2te: This information is for OS/VS VSAM users only. VSE/VSAM users should refer to "Defining DOS Input and output Files" for information on defining files for use with VSAM. If you are going to use access method services to manipulate VSAM or SAM files or you are going to execute VSAM programs under eMS, you must use the DLBL command to define the input and output files. The basic format of the DLBL command is: DLBL ddname filemode DSN datasetname (options where ddname corresponds to the FILE parameter in the AMSERV file and dataset name corresponds to the entry name of the VSAM file, that is, the name specified in the NAME parameter of an access method services control statement. If you are using a CMS file for AMSERV input or output, use the CMS operand and enter CMS file identifiers as follows: dlbl mine a cms out file1 (vsam The maximum length allowed for ddnames under CMS VSAM is seven characters. This means that if you have assigned eight-character ddnames (or filenames) to files in your programs, only the first seven characters of each ddname are used. So, if a program refers to the ddname OUTPUTDD, you should issue the DLBL command for a ddname of OUTPUTD. Since you can encounter problems with a program that contains ddnames with the same first seven characters, you should recompile those programs using seven-character ddnames. There are several options you can use when issuing the DLBL command to define VSAM input and output files. These are: • VSAM, which you must use to indicate that the file is a VSAM file. Note: You do not have to use the VSAM file if you are using any since they imply that the file ddnames (filenames) IJSYSCT and being defined is a iSAM file. VSAM option to identify a file as a of the other options listed here, is a VSAM file. In addition, the IJSYSUC also indicate that the file Section 10. Using Access Method Services and VSAM 197
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. SD23-9024-1 for 5748-XX8 When you create a tape in CMS using AMSERV, CMS writes a tape mark preceding each output file that it writes. When this same tape is read using AMSERV under CMS, HDR1 and VOL1 labels are checked using the LABELDEF command you provide. If you read this tape in a real DOS/VS system, you should use a TLBL card instead of the LABELtEF command. Similarly, when you create a tape under a DOS/VS system using access method services, if the tape is created with standard labels, CMS AMSERV has no difficulty reading it. The only time you should worry about positioning a tape created by AMSERV is when you want to read the tape using a method other than AMSERV, for example, the MOVEFILE command. Then, you must forward space the tape past the label, using the CMS TAPE command before you can read it. Defining OS Input and Output Files !2te: This information is for OS/VS VSAM users only. VSE/VSAM users should refer to "Defining DOS Input and output Files" for information on defining files for use with VSAM. If you are going to use access method services to manipulate VSAM or SAM files or you are going to execute VSAM programs under eMS, you must use the DLBL command to define the input and output files. The basic format of the DLBL command is: DLBL ddname filemode DSN datasetname (options where ddname corresponds to the FILE parameter in the AMSERV file and dataset name corresponds to the entry name of the VSAM file, that is, the name specified in the NAME parameter of an access method services control statement. If you are using a CMS file for AMSERV input or output, use the CMS operand and enter CMS file identifiers as follows: dlbl mine a cms out file1 (vsam The maximum length allowed for ddnames under CMS VSAM is seven characters. This means that if you have assigned eight-character ddnames (or filenames) to files in your programs, only the first seven characters of each ddname are used. So, if a program refers to the ddname OUTPUTDD, you should issue the DLBL command for a ddname of OUTPUTD. Since you can encounter problems with a program that contains ddnames with the same first seven characters, you should recompile those programs using seven-character ddnames. There are several options you can use when issuing the DLBL command to define VSAM input and output files. These are: • VSAM, which you must use to indicate that the file is a VSAM file. Note: You do not have to use the VSAM file if you are using any since they imply that the file ddnames (filenames) IJSYSCT and being defined is a iSAM file. VSAM option to identify a file as a of the other options listed here, is a VSAM file. In addition, the IJSYSUC also indicate that the file Section 10. Using Access Method Services and VSAM 197
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. SD23-9024-1 for 5748-118 dlbl newfile b (extent sys001 DMSDLB331R ENTER EXTENT SPECIFICATIONS: 100 60, 400 80, 60 40 d sys003, 2000 100 c sys002 (null line) Any extents you enter without specifying a .ode letter and SYSxxx value default to the mode and SYSxxx on the DLBL command line, in this case, the B-disk l SYS001. If you make any errors issuing the DLEL command or extent information, you must re-enter the entire command sequence. IDENTIFYING EXISTING When you issue a DLBL command to IdentIfy-an exIstIng multivolume VSAM file, you must use the MULT option of the DLBL command: dlbl old b1 dsn ? (sys002 mult DMSDLB220R ENTER DATA SET NAME: dostest.file DMSDLB330R ENTER VOLUME SPECIFICATIONS: c sys004, d sys003 e sys007 (null line) When you enter the DLBL command you should specify the mode letter and logical unit for the first volume on the command line. When you enter the MULT opticn you are prompted to enter additional sFecifications for the remaining extents. In the preceding examFle, the data set has extents on disks accessed as B-, C-, D-, and E-disks. USING TAPE INPUT AND OUTPUT If you are using AMSERV for a function that requires tape input and/or output, you must have the tape(s) attached to your virtual machine. The valid addresses for tapes are 181, 182, 183, and 184. When referring to tapes, you can also refer to them using their CMS symtolic names TAP1, TAP2, TAP3, and TAP4. For AMSERV functions that use tape input/output, the TLBL control statement is simulated by building a dummy DLBL containing a user-supplied ddname (filename). CMS does not read tape labels and does not recognize tape data set names. When you invoke the AMSERV command, you must use the TAPII or TAPOUT option to specify the tape device being used: amserv export (tapout 181 In this examFle, the output from the AMSERV control statements in a file named EXPORT goes to a tape at virtual address 181. CMS prompts you to enter the ddname: DMSAMS367R ENTER TAPE OUTPUT DDNAMES: After you enter the ddname specified on the FILE parameter in the AMSERV file and press the carriage return, the AMSERV command executes. AMSERV opens all tape files as standard labelled tapes (FILAB=STD on the DTFMT macro). Therefore, you need a LABELDEF command for any tape file used for input or output with AMSERV. The LABELDEF command is the CMS/DOS equivalent of the DOS/VSE TLB control statement. The LABELDEF command is used to specify information in VOL1 and HDR1 labels on the 196 IBM VM/370 eMS User's Guide
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. SD23-9024-1 for 5748-118 tape. See the description of the LABELDEF command in section 7 for more information on this command. You should use the same name for the filename on your LABELDEF command as you do for the ddname you enter in reply to message DMSAMS367R (the ddname specified on the FILE Farameter in the AMSERV file). However, the LABELDEF command must be issued hefore the AMSERV command. The following sequence of commands might be used when you have tape output: assgn sys005 tap1 tape rew (181 assgn syscat e assgn 5ys006 e labeldef catout fid catfile volid amserv dlbl ijsysct e dsn mastcat (syscat vsam dlbl catin e dsn file (sys006 vsam amserv repro (tapout 181 DMSAMS367R ENTER TAPE OUTPUT DDNAMES catout Note that if you do not care what is written in a tape output label or do not want input labels checked, you can specify a LABELDEF with no parameters ether than filenamee The command: labeldef intape used for an input tape with ddname INTAPE causes the standard labels cn the tape to be skipped without any A similar statement for output writes tape labels with default values (see the description of the LABELDEF command in section 7j. If you try to use a tape that does not already contain for an AMSERV tape file, you will receive an error message. is used for output, this message is followed by another informs you that you have a choice of continuing by writing on the previously unlabelled tape or rejecting this tape. files must already contain standard VOL1 and HtR1 labels to by AMSERV. a VOL1 label If the tape message that a VOLl label Input tape be processed Section 10. Using Access Method Services and VSAM 196.1
March 30, 1979 • EXTENT, which you must use when you are defining a catalog or a VSAM data space; you are prompted to enter the volume information. • MULT, which you must use in order to access a multivolume VSAM file; you are prompted to enter the extent information. • CAT, which you can use to identify a catalog which contains the entry for the VSAM file you are defining. • BUFSP, which you can use to specify the size of the buffers VSAM should use during program execution. ALLOCATING EXTENTS ON OS DISKS AND MINIDISKS When you use access method services to manipulate VSAM files under OS, you do not have to worry about allocating the real cylinders and tracks to contain the files. When you use CMS AMSERV, however, you are responsible for indicating which cylinders and tracks should contain particular VSAM spaces when you use the DEFINE control statement to define space. Extents for VSAM data spaces can be defined, in AMSERV files, in terms of cylinders, tracks, or records. Extent information you supply to CMS when executing AMSERV must always be in terms of tracks. When you define data spaces or unique clusters, the extent information (number of cylinders, tracks, or records) in the AMSERV file must match the extents you supply when you issue the DLBL command to define the file. When you supply extent information for the master catalog, any extents you enter in excess of those required for the catalog are claimed by the catalog and used as data space. CMS does not make secondary space allocation for VSAM data spaces. If you execute an AMSERV file that specifies a secondary space allocation, CMS ignores the parameter. When you use the DLBL command to define VSAM data space, you must use the EXTENT option, which indicates to eMS that you are going to enter data extents. For eXample, if you enter: dlbl space b (extent CMS prompts you to enter the extents: DMSDLB331R ENTER EXTENT SPECIFICATIONS: When you enter the extents, you specify the relative track number of the first track of the extent, followed by the number of tracks. Fer example, if you are allocating an entire 2314 disk, you would enter: 20 3980 (null line) You can never write on cylinder 0, track 0; and, since VSAM data spaces must be allocated on cylinder boundaries, you should never allocate cylinder O. Cylinder 0 is often used for the volume table of contents (VTOC) as well, so it is always best to begin defining space with cylinder 1. The list below shows the DASD devices supported by CMS number of cylinders on each that can be allocated for VSAM the number of tracks per cylinder: 198 IBM VMj370 CMS User's Guide VSAM, the space, and
Disk 2314/2319 3330 Model 1 3330 Model 11 3340 Model 35 3340 Model 70 3350 200 404 808 348 696 555 20 19 19 12 12 30 You can determine which disk extents on an as disk or minidisk are available for allocation by using the LISTDS command with the FREE option, which also indicates the relative track numbers, as well as actual cylinder and head numbers. USING VSAM CATALOGS While you are developing and testing your VSAM programs in CMS, you may find it convenient to create and use your own master catalog, which may be on a CMS minidisk. VSAM catalogs, like any other cluster, can be shared read-only among several users. You name the VSAM master catalog for your terminal session using the ddname IJSYSCT for the DLBL command. For example, if your VSAM master catalog is located on an OS disk you have accessed as a C-disk, you would enter: d1bl ijsysct c dsn master catalog (perm You must define the master catalog at the start of every terminal If you are always using the same master catalog, you might include the DLBL co •• and you need to define it in your PROFILE EXEC: ACCESS 555 C DLBL IJSYSCT C DSN MASTCAT (PERM You should use the PERM option so that you do not have to reset the master catalog assignment after clearing previous DLBL definitions. The command: dlbl * clear clears all file definitions except those entered with the PERM option. The sample DLBL command used in the preceding example is almost identical with the one you would issue to define a master catalog using AMSERV. The only difference is that you must enter the EXTENT option so that you can list the data spaces that this master catalog is to control. As an example, suppose that you have a 30-cylinder 3330 minidisk assigned to you to use for testing your VSAM programs under CMS. Assuming that the minidisk is in your directory at address 333, you should first access it: access 333 d D(333) R/i - as Section 10. Using Access Method Services and VSAM 199