&CONTROL ERROR TIME &ERROR &EXIT &RETCODE GLOBAL MACLIB TESTLIB OSMACRO OSMACR01 ASSEMBLE TESTA PRINT TESTA LISTING GLOBAL TXTLIB TESTLIB PROGLIB ACCESS 200 E &BEGSTACK OS.TEST3.STREAM.BETA &END
FILEDEF INDDl E DSN ?
FILEDEF INDD2 READER
FILEDEF OUTFTLE DISK TEST DAT! 11 LOAD TESTA (START &IF &RETCODE = 100 &GOTO -RET100 &IF &RETCODE = 200 &GOTO -RET200 &EXIT &RETCODE -RET100 &CONTINUE -RET200 &CONTINUE The &CONTROL and &ERROR control statements in the EXEC procedure
ensure that if an error occurs during any Fart of the EXEC, the
remainder of the EXEC does not execute, and the execution summary of the EXEC indicates the command that caused the error.
Note that for the FILEDEF command entered with the DSN ? operand,
you must stack the response before issuing the FILEDEF command. In this
example, since the OS data set name has more than eight characters, you must use the &BEGSTACK control statement to stack it. If you use the &STACK control state.ent, the EXEC processor truncates all words to
eight characters. When your program is finished executing, the EXEC special variable
&RETCODE indicates the contents of general register 15 at the time the
program exited. You can use this value to perform additional steps in
your EXEC procedure. Additional steps are indicated in the preceding example by ellipses.
For detailed information on creating EXEC procedures, see "Part 3.
Learning to Use EXEC." 150 IBM VM/370 CMS User's Guide
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. SD23-9024-1 for 5748-118 Section 9. Developing DOS Programs underCMS You can use CMS to create, compile, execute and debug DOS programs
written in assembler, COBOL, or PL/I programming languages. CMS simulates many functions of the Disk Operating System (DOS/iSE) so that
you can use the interactive facilities of VM/370 to develop your
programs, and then execute them in a DOS virtual machine.
This section tells you
describes the CMS commands
files and CMS/DOS commands DOS/iSE: The CMS/DOS environment
how to use the CMS/DOS environment. It
you can use to manipulate DOS disks and DOS you can use to simulate the functions of Using DOS files on DOS disks Using the ASSGN command Using the DLBL command Using DOS libraries in CMSjDOS Using macro libraries DOS assembler macros supported Assembling source programs Link-editing programs in CMS/DOS Executing programs in CMS/DOS For a practice terminal session using the commands and techniques
presented in this section, see "Appendix D: Sample Terminal Sessions." CMS/DOS is neither CMS nor is it DOS; it is a composite, and its
vocabulary contains both CMS and DOS teras. CMS/DOS performs many of
the same functions as DOS, but where, under DOS, a function is initiated
by a control card, in CMS it is initiated by a command. Bany CftS/DOS commands, therefore, have the same names as the DOS control statement
that performs the same function. In those cases where the control
statement you would use in DOS and the command you use in CKS are
different, the differences are explained. For the most part, whenever a term that is familiar to you as a DOS term is used, it has the same
meaning to CMS/DOS, unless otherwise indicated.
The eMS/DOS Environment
After you have loaded CMS into your virtual machine you can enter the CMS/DOS environment by issuing:
set dos on
If you want to access a DOS system residence volume during your CMS/DOS terminal session, you should link to and access the disk that contains
the DOS SYSRES before you issue the SET command. For example, if you
share the system residence volume with other users and it is in your
directory at virtual address 390, you would issue the command: access 390 g
and then issue the SET command as follows:
Section 9. Developing DOS programs Under CftS 151
Previous Page Next Page