Pg. of GC20-1819-2 Rev March 30, 1979 by SUppa SD23-9024-1 for 5748-118 The CMS disk files created are always in unblocked, 80-character for.at. IEHMOYE: OS unloaded partitioned data sets on tapes created by the lEHMOYE utility program can be read either by the TAPPDS command or by the TAPEMAC command. The TAPPDS command creates an individual CMS file from each member of the PDS. If the PDS is a macro library, you can use the TAPEMAC command to copy it into a CMS MACLIB. A MACLIB, a macro library, has a special format and can usually be created only by using the CMS MACLIB command. If you use the TAPPDS command, you have to use the MACLIB command to create the macro library from individual files containing macro definitions. SPECIFYING SPECIAL TAPE HANDLING OPTIONS For most of the tape handling that you do in eMS, you do not have to be concerned with the density or recording format of the magnetic tapes that you use. There are, however, some instances when it may be important and there are command options that you can use with the TAPE command MODESET operand and with ASSGN and FILEDEF command options. The specific situations and the command options you should use are listed below. • If you are reading or writing a 7-track tape and the density of the tape is either 200 or 556 bpi, you must specify DEN 200 or DEN 556. • If you are reading or writing a 7-track tape with a density of 800 bpi, you must specify 7TRACKa • If you are reading or writing a 7-track tape without using the data convert feature, you must use the TRTCH option. • If you are writing a tape using a 9-track dual density tape drive with the 9TRACK option specified, and you want the density to be 800 (on an 800/1600 drive) or 6250 (on a 1600/6250 drive), then you must specify DEN 800 or DEN 6250. I • If you are writing a tape, the default tape block size is 4096 bytes plus a 5-byte header. This format is not compatible with previous YM/370 systems. Therefore, if you want to write a tape compatible with previous YM/370 systems, you must use the 'BLK 800' option of the TAPE command. The TAPE command is described in detail in !ALJIQ Using the Remote Spooling Communications Subsystem (RSCS) If your VM/370 installation is on a Remote Spooling Communications Subsystem (RSCS) network, you can send printer, punch, or reader spool files to users at remote locations. To send a spool file, you must know the userid of the virtual machine at your location that is running RSCS and the location identification (locid) of the remote location. If you are sending a spool file to a particular user at the remote location, you should also know that userid of the user. The CP commands that you can use to transmit files across the network are TAG and SPOOL. The TAG command allows you to specify the locid and userid that are to receive a spool file, or, in the case of tagging a Section 7. Using Real Printers, Punches, Readers, and Tapes 123
Pg. of GC20-1819-2 Rev March 30, 1979 by SUppa SD23-9024-1 for 5748-118 The CMS disk files created are always in unblocked, 80-character for.at. IEHMOYE: OS unloaded partitioned data sets on tapes created by the lEHMOYE utility program can be read either by the TAPPDS command or by the TAPEMAC command. The TAPPDS command creates an individual CMS file from each member of the PDS. If the PDS is a macro library, you can use the TAPEMAC command to copy it into a CMS MACLIB. A MACLIB, a macro library, has a special format and can usually be created only by using the CMS MACLIB command. If you use the TAPPDS command, you have to use the MACLIB command to create the macro library from individual files containing macro definitions. SPECIFYING SPECIAL TAPE HANDLING OPTIONS For most of the tape handling that you do in eMS, you do not have to be concerned with the density or recording format of the magnetic tapes that you use. There are, however, some instances when it may be important and there are command options that you can use with the TAPE command MODESET operand and with ASSGN and FILEDEF command options. The specific situations and the command options you should use are listed below. • If you are reading or writing a 7-track tape and the density of the tape is either 200 or 556 bpi, you must specify DEN 200 or DEN 556. • If you are reading or writing a 7-track tape with a density of 800 bpi, you must specify 7TRACKa • If you are reading or writing a 7-track tape without using the data convert feature, you must use the TRTCH option. • If you are writing a tape using a 9-track dual density tape drive with the 9TRACK option specified, and you want the density to be 800 (on an 800/1600 drive) or 6250 (on a 1600/6250 drive), then you must specify DEN 800 or DEN 6250. I • If you are writing a tape, the default tape block size is 4096 bytes plus a 5-byte header. This format is not compatible with previous YM/370 systems. Therefore, if you want to write a tape compatible with previous YM/370 systems, you must use the 'BLK 800' option of the TAPE command. The TAPE command is described in detail in !ALJIQ Using the Remote Spooling Communications Subsystem (RSCS) If your VM/370 installation is on a Remote Spooling Communications Subsystem (RSCS) network, you can send printer, punch, or reader spool files to users at remote locations. To send a spool file, you must know the userid of the virtual machine at your location that is running RSCS and the location identification (locid) of the remote location. If you are sending a spool file to a particular user at the remote location, you should also know that userid of the user. The CP commands that you can use to transmit files across the network are TAG and SPOOL. The TAG command allows you to specify the locid and userid that are to receive a spool file, or, in the case of tagging a Section 7. Using Real Printers, Punches, Readers, and Tapes 123
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. S£23-9024-1 for 5748-XX8 ERROR PROCESSING When the standard label processing routines find errors or discrepancies on tape labels, they send a message to the CMS terminal user who is processing the tape. After an error message is issued, the user can ask the system operator to mount a new tape, use the CMS TAPE command to position the tape at a different file, or respecify his label description information. If you are a terminal user and want another tape mounted, you send the system operator a message telling him what tape to mount. Some errors cause program termination and others do not. The effect of tape label processing errors depends on both the type of error and the type of program (that is, CMS/DOS, OS simulation, CMS command, etc.) that invokes the label processing. The following are general guidelines on error handling: • Messages identifying the error are always issued. • Onder OS simulation, tape label errors result in open errors. These errors prevent a tape file from being opened. They do not necessarily end a job. Errors in trailer labels (except block count errors) have no effect on processing. • In CMS/DOS, the terminal user is generally given two choices: ignore the error or cancel the job. The new-tape option is not allowed. • The CMS commands TAPEMAC and TAPPDS terminates with a non-zero return code after a tape label error. • Certain error situations such as unexpired files and block count errors for OS simulation allow the user to ignore the error and do not cause open errors. In these cases, the user enters his decision at the terminal after he is notified of the error. • Errors that occur during the loading of an NSt routine cause an abend (code 155 or 15A). A block count abend gives an error code of 500. In all cases, after an error has been detected and diagnosed, you .ust decide what to do. you may wish to have a new tape mounted and then re-execute the command or you may want to respecify your tABELDEF description if it Was incorrect. You can also use the TAPE command to space the tape to a new file if it was positioned incorrectly. THE MOVEFILE COMMAND The MOVEFILE command can copy sequential tape files into disk files, or sequential disk files onto tape. It can be particularly useful when you need to copy a file from a tape and you do not know the format of the tape. To use the MOVEFILE command, you must first define the input and output files using the FILEDEF command. For example, to copy a file from a tape attached to your virtual machine at virtual address 181 to a CMS disk, you would enter: filedef input tap1 filedef output disk tape file a movefile input output 122.14 IBM VM/370 CMS User's Guide
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. SD23-9024-1 for 5748-118 This sequence of commands creates a file named TAPE FILE A1. Then use CMS commands to manipulate and examine the contents of the file. MOVEFILE can also be used to display tape labels and/or 'move labelled tape files. See "Tape Labels in CMS" for details. TAPES CREATED BY OS UTILITY PROGRAMS The CMS command TAPPDS can read OS partitioned and sequential data sets from tapes created by the IEBPTPCH, IEBUPDTE, and IEHftOVE utility programs. When you use the TAPPDS command 6 the OS data set is copied into a CMS disk file, or in the case of partitioned data sets, into multiple disk files. Sequential or partitioned data sets created by IEBPTPCH must be unblocked for CMS to read them. If you have a tape created by this utility, each member (if the data set is partitioned) is preceded with a card that contains "MEMBER=membername". If you read this tape with the command: tappds * then, CMS creates a disk file from each member, using the membername for the filename and assigning a filetype of CKSUT1. If you want to assign a particular filetype, for example TEST, you could enter the command as follows: tappds * test If the file you are reading is a sequential data set, you should use the NOPDS option of the TAPPDS command: tappds test file (nopds The above command reads a sequential data set and assigns it a file identifier of TEST FILE. If you do not specify a filename or filetype, the default file identifier is TAPPDS CKSUT1. Tapes in control file format created by the IEBUPDTE utility program can be read by CMS. Data sets may be blocked or unblocked, and may be either sequential or partitioned; Since files created by IEBUPDTE contain ./ADD control cards to signal the addition of members to partitioned data sets, you must use the COL1 option of the TAPPDS command. Also, you must indicate to CMS that the tape was created by IEBUPDTE. For example, to read a partitioned data set, you would enter the command: tappds * test (update co11 Section 7. Using Real Printers, Punches, Readers, and Tapes 122.15
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. S£23-9024-1 for 5748-XX8 ERROR PROCESSING When the standard label processing routines find errors or discrepancies on tape labels, they send a message to the CMS terminal user who is processing the tape. After an error message is issued, the user can ask the system operator to mount a new tape, use the CMS TAPE command to position the tape at a different file, or respecify his label description information. If you are a terminal user and want another tape mounted, you send the system operator a message telling him what tape to mount. Some errors cause program termination and others do not. The effect of tape label processing errors depends on both the type of error and the type of program (that is, CMS/DOS, OS simulation, CMS command, etc.) that invokes the label processing. The following are general guidelines on error handling: • Messages identifying the error are always issued. • Onder OS simulation, tape label errors result in open errors. These errors prevent a tape file from being opened. They do not necessarily end a job. Errors in trailer labels (except block count errors) have no effect on processing. • In CMS/DOS, the terminal user is generally given two choices: ignore the error or cancel the job. The new-tape option is not allowed. • The CMS commands TAPEMAC and TAPPDS terminates with a non-zero return code after a tape label error. • Certain error situations such as unexpired files and block count errors for OS simulation allow the user to ignore the error and do not cause open errors. In these cases, the user enters his decision at the terminal after he is notified of the error. • Errors that occur during the loading of an NSt routine cause an abend (code 155 or 15A). A block count abend gives an error code of 500. In all cases, after an error has been detected and diagnosed, you .ust decide what to do. you may wish to have a new tape mounted and then re-execute the command or you may want to respecify your tABELDEF description if it Was incorrect. You can also use the TAPE command to space the tape to a new file if it was positioned incorrectly. THE MOVEFILE COMMAND The MOVEFILE command can copy sequential tape files into disk files, or sequential disk files onto tape. It can be particularly useful when you need to copy a file from a tape and you do not know the format of the tape. To use the MOVEFILE command, you must first define the input and output files using the FILEDEF command. For example, to copy a file from a tape attached to your virtual machine at virtual address 181 to a CMS disk, you would enter: filedef input tap1 filedef output disk tape file a movefile input output 122.14 IBM VM/370 CMS User's Guide
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. SD23-9024-1 for 5748-118 This sequence of commands creates a file named TAPE FILE A1. Then use CMS commands to manipulate and examine the contents of the file. MOVEFILE can also be used to display tape labels and/or 'move labelled tape files. See "Tape Labels in CMS" for details. TAPES CREATED BY OS UTILITY PROGRAMS The CMS command TAPPDS can read OS partitioned and sequential data sets from tapes created by the IEBPTPCH, IEBUPDTE, and IEHftOVE utility programs. When you use the TAPPDS command 6 the OS data set is copied into a CMS disk file, or in the case of partitioned data sets, into multiple disk files. Sequential or partitioned data sets created by IEBPTPCH must be unblocked for CMS to read them. If you have a tape created by this utility, each member (if the data set is partitioned) is preceded with a card that contains "MEMBER=membername". If you read this tape with the command: tappds * then, CMS creates a disk file from each member, using the membername for the filename and assigning a filetype of CKSUT1. If you want to assign a particular filetype, for example TEST, you could enter the command as follows: tappds * test If the file you are reading is a sequential data set, you should use the NOPDS option of the TAPPDS command: tappds test file (nopds The above command reads a sequential data set and assigns it a file identifier of TEST FILE. If you do not specify a filename or filetype, the default file identifier is TAPPDS CKSUT1. Tapes in control file format created by the IEBUPDTE utility program can be read by CMS. Data sets may be blocked or unblocked, and may be either sequential or partitioned; Since files created by IEBUPDTE contain ./ADD control cards to signal the addition of members to partitioned data sets, you must use the COL1 option of the TAPPDS command. Also, you must indicate to CMS that the tape was created by IEBUPDTE. For example, to read a partitioned data set, you would enter the command: tappds * test (update co11 Section 7. Using Real Printers, Punches, Readers, and Tapes 122.15
March 30, 1979 printer or punch, of any spool files produced hy that device. With the SPOOL command, you spool your virtual device to the RSCS virtual machine. You can also use the TRANSFER command to transfer files frem your own virtual card reader. The CP commands TAG, SPOOL, and TRANSFER are discussed in detail in the publication !££ 124 VM/370 CMS User's Guide
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. SD23-9024-1 for 5748-XX8 Part 2. Program Development Using eMS You can use CMS to write, develop, update, and test: • OS programs to execute either in the CMS environment (using OS simulation) or in an as virtual machine • DOS programs to execute in either the CMS/DOS environment or in a DOS virtual machine • CMS programs to execute in the CMS environment The OS and DOS simulation capabilities of CMS allow you to develop OS and DOS programs interactively in a time-sharing environment. When your programs are thoroughly tested, you can execute them in an as or DOS virtual machine under the control of VM/370. "Section 8. Developing OS Programs Under CMS" is for programmers who use OS. It describes procedures and techniques for using CMS commands that simulate OS functions. "Section 9. Developing DOS Programs Under CMS" is for programmers who use DOS. It describes procedures and techniques for using CMS/DOS commands to simulate DOS/VSE functions. If you use VSAM and access method services in either a DOS or an OS environment, "Section 10. Using Access Method Services and VSAM in CMS and CMS/DOS" provides usage information for you. It describes how to use CMS to manipulate VSAM disks and data sets. You can use the interactive facilities of CP and CMS to test and debug programs directly at your terminal. "Section 11. How VM/370 Can Help You Debug Your programs" shows examples of commands and debugging techniques. The CMS batch facility is a CMS to another machine for execution. to a CMS batch virtual machine is CMS Batch Facility." feature that allows you to send jobs How to prepare and send job streams described in "Section 12. Using the As you learn to use CMS, you may want to write programs for CMS applications. "Section 13. programming for the CMS Environment" contains information for assembler language programmers: linkage conventions, programming notes, and macro instructions you can use in CMS programs. Part 2. Program Development Using CES 125